Commit 4e171ca60e0881234ba27ca70451489cc77f7300

Authored by dumoda01
1 parent 5f398854
Exists in master and in 1 other branch snow

Modification du modele bio_ismer par l'ajout de diagnostics (lumlim2, etc.) et l…

…'ajout de coefficients au module de dependence en temperature.
src/extras/bio/bio.F90
... ... @@ -589,6 +589,10 @@
589 589 do i=1,nlev
590 590 cc(6,i) = amm(i)
591 591 end do
  592 + else if (j==1 .and. bio_model==1) then
  593 + do i=1,nlev
  594 + cc(1,i) = nit(i)
  595 + end do
592 596 else
593 597 ! do advection step due to settling or rising
594 598 call adv_center(nlev,dt,h,h,ws(j,:),flux, &
... ... @@ -754,9 +758,12 @@
754 758 if (allocated(var_long)) deallocate(var_long)
755 759  
756 760 !DD
757   - if (allocated(lumlim)) deallocate(lumlim)
758   - if (allocated(nitlim)) deallocate(nitlim)
759   - if (allocated(ammlim)) deallocate(ammlim)
  761 + if (allocated(lumlim1)) deallocate(lumlim1)
  762 + if (allocated(nitlim1)) deallocate(nitlim1)
  763 + if (allocated(ammlim1)) deallocate(ammlim1)
  764 + if (allocated(lumlim2)) deallocate(lumlim2)
  765 + if (allocated(nitlim2)) deallocate(nitlim2)
  766 + if (allocated(ammlim2)) deallocate(ammlim2)
760 767  
761 768 ! The external provide arrays
762 769 if (allocated(h)) deallocate(h)
... ... @@ -842,14 +849,23 @@
842 849  
843 850 !DD
844 851  
845   - allocate(lumlim(0:nlev),stat=rc)
846   - if (rc /= 0) stop 'init_bio(): Error allocating (lumlim)'
  852 + allocate(lumlim1(0:nlev),stat=rc)
  853 + if (rc /= 0) stop 'init_bio(): Error allocating (lumlim1)'
  854 +
  855 + allocate(nitlim1(0:nlev),stat=rc)
  856 + if (rc /= 0) stop 'init_bio(): Error allocating (nitlim1)'
  857 +
  858 + allocate(ammlim1(0:nlev),stat=rc)
  859 + if (rc /= 0) stop 'init_bio(): Error allocating (ammlim1)'
  860 +
  861 + allocate(lumlim2(0:nlev),stat=rc)
  862 + if (rc /= 0) stop 'init_bio(): Error allocating (lumlim2)'
847 863  
848   - allocate(nitlim(0:nlev),stat=rc)
849   - if (rc /= 0) stop 'init_bio(): Error allocating (nitlim)'
  864 + allocate(nitlim2(0:nlev),stat=rc)
  865 + if (rc /= 0) stop 'init_bio(): Error allocating (nitlim2)'
850 866  
851   - allocate(ammlim(0:nlev),stat=rc)
852   - if (rc /= 0) stop 'init_bio(): Error allocating (ammlim)'
  867 + allocate(ammlim2(0:nlev),stat=rc)
  868 + if (rc /= 0) stop 'init_bio(): Error allocating (ammlim2)'
853 869  
854 870 ! The external provide arrays
855 871 allocate(h(0:nlev),stat=rc)
... ...
src/extras/bio/bio_fasham.F90
... ... @@ -271,7 +271,7 @@
271 271 !
272 272 ! !USES:
273 273 use observations, only: nprof,aprof !CHG3-5
274   - use meanflow, only: nit,amm !CHG3-5
  274 + use meanflow, only: nit,amm,T,S !CHG3-5
275 275  
276 276 IMPLICIT NONE
277 277  
... ... @@ -540,7 +540,7 @@
540 540 ! Original author(s): Hans Burchard, Karsten Bolding
541 541 !
542 542 ! !LOCAL VARIABLES:
543   - REALTYPE :: ff,fac,fac2,min67,q1,q2
  543 + REALTYPE :: ff,fac,min67,q1,q2
544 544 REALTYPE :: Ps !CHG1
545 545 integer :: i,j,ci
546 546 !EOP
... ... @@ -576,11 +576,11 @@
576 576 fac=(cc(z,ci)+z0)/(k3*(r1*cc(p,ci)+r2*cc(b,ci)+r3*cc(d,ci))+ &
577 577 r1*cc(p,ci)**2+r2*cc(b,ci)**2+r3*cc(d,ci)**2)
578 578 min67=min(cc(a,ci),eta*cc(l,ci))
579   -
  579 +
580 580 ! Light and nutrient limitation factors
581   - lumlim(ci)=ff
582   - nitlim(ci)=q1
583   - ammlim(ci)=q2
  581 + lumlim1(ci)=ff
  582 + nitlim1(ci)=q1
  583 + ammlim1(ci)=q2
584 584  
585 585 dd(p,d,ci)=mu1*(cc(p,ci)+p0)/(k5+cc(p,ci)+p0)*cc(p,ci) &
586 586 +(1.-beta)*gmax*r1*cc(p,ci)**2*fac
... ... @@ -599,11 +599,6 @@
599 599 dd(a,b,ci)=vb*min67/(k4+min67+cc(l,ci))*(cc(b,ci)+b0)
600 600 dd(l,b,ci)=vb*cc(l,ci)/(k4+min67+cc(l,ci))*(cc(b,ci)+b0)
601 601  
602   -! Taux de chute du phytoplancton en fonction de la croissance
603   -! ws(p,ci)=w_pmin+(w_pmax-w_pmin)*exp(-ff/theta)
604   -! ws(p,ci)=w_pmax-(w_pmax-w_pmin)*(ff/theta/(1.+ff/theta))
605   - ws(p,ci)=w_p
606   -
607 602 do i=1,numc
608 603 do j=1,numc
609 604 pp(i,j,ci)=dd(j,i,ci)
... ...
src/extras/bio/bio_ismer.F90
... ... @@ -544,9 +544,11 @@
544 544 ! !LOCAL VARIABLES:
545 545 REALTYPE :: amr1(1:nlev),amr2(1:nlev)
546 546 REALTYPE :: hmr1(1:nlev),hmr2(1:nlev)
547   - REALTYPE :: fac1,fac2,minal,qn1,qa1,qn2,qa2
  547 + REALTYPE :: fac1,fac2,fac3,fac4
  548 + REALTYPE :: minal,qn1,qa1,qn2,qa2
548 549 REALTYPE :: ps1,ps2,ff1,ff2
549   - REALTYPE :: Ea,Eh,kBeV,T0,ca,ch
  550 + REALTYPE :: Ea,Eh,kBeV,T0
  551 + REALTYPE :: amratio,hmratio,ca1,ca2,ch1,ch2
550 552 integer :: i,j,ci
551 553 !EOP
552 554 !-----------------------------------------------------------------------
... ... @@ -603,31 +605,45 @@
603 605 Ea = 0.32 ! Activation energy for autotrophs (eV)
604 606 kBeV = 8.62e-5 ! Boltzmann constant (eV K-1)
605 607 T0 = 273.15-1.9 ! Temperature at which metabolism stops
606   - ca = 1.0
607   - ch = 1.0
608   -
609   - ! The mass ratio between pico-phytoplankton (p1, 1 um) and
610   - ! nano- and micro-phytoplankton (p2, 10 um) is approximately 1:1e3,
611   - ! which translates into a ratio of (1e3)**0.25 = 5.62 between
612   - ! their respective metabolic rates, according to the MTE. The same
613   - ! ratio is applied to micro-zooplankton (100 um) versus
614   - ! meso-zooplankton (1000 um).
615   -
616   - ! Autotrophs
  608 +
  609 + ! metabolic rate coefficient (a(T0) in Gillooly et al. 2002 in kg^1/4 s^-1)
  610 + ! they are tuned to
  611 + ca1 = 3.61 ! pico-phytoplankton
  612 + ca2 = 14.58 ! micro-phytoplankton
  613 + ch1 = 3.265 ! micro-zooplankton
  614 + ch2 = 24.923 ! meso-zooplankton
  615 +
  616 + ! The mass ratio between pico-phytoplankton (p1) and
  617 + ! nano- and micro-phytoplankton (p2) is amratio,
  618 + ! which translates into a ratio of fac3=amratio**0.25 between
  619 + ! their respective metabolic rates, according to the MTE.
  620 + ! The same applies to micro-zooplankton (z1) versus
  621 + ! meso-zooplankton (z2) through fac4=hmratio**0.25.
  622 + amratio = 200.0
  623 + hmratio = 1000.0
  624 +
  625 + fac3 = amratio**0.25
  626 + fac4 = hmratio**0.25
  627 +
  628 + ! Autotroph metabolic rate
617 629 !amr1(ci) = 1.0
618 630 !amr2(ci) = 1.0
619   - amr1(ci) = max(0.0,ca*0.25*exp(Ea/(kBeV*T0**2)*(T(ci)/(1+T(ci)/T0))))
620   - amr2(ci) = max(0.0,ca*0.25*exp(Ea/(kBeV*T0**2)*(T(ci)/(1+T(ci)/T0))))/5.62
621   - ! Heterotrophs
  631 + amr1(ci) = max(0.0,ca1*0.25*exp(Ea/(kBeV*T0**2)*(T(ci)/(1+T(ci)/T0))) )
  632 + amr2(ci) = max(0.0,ca2*0.25*exp(Ea/(kBeV*T0**2)*(T(ci)/(1+T(ci)/T0)))/fac3)
  633 +
  634 + ! Heterotroph metabolic rate
622 635 !hmr1(ci) = 1.0
623 636 !hmr2(ci) = 1.0
624   - hmr1(ci) = max(0.0,ch*0.25*exp(Eh/(kBeV*T0**2)*(T(ci)/(1+T(ci)/T0))))
625   - hmr2(ci) = max(0.0,ch*0.25*exp(Eh/(kBeV*T0**2)*(T(ci)/(1+T(ci)/T0))))/5.62
  637 + hmr1(ci) = max(0.0,ch1*0.25*exp(Eh/(kBeV*T0**2)*(T(ci)/(1+T(ci)/T0))) )
  638 + hmr2(ci) = max(0.0,ch2*0.25*exp(Eh/(kBeV*T0**2)*(T(ci)/(1+T(ci)/T0)))/fac4)
626 639  
627 640 ! Light and nutrient limitation factors
628   - lumlim(ci) =ff1
629   - nitlim(ci) =qn1
630   - ammlim(ci) =qa1
  641 + lumlim1(ci) =ff1
  642 + nitlim1(ci) =qn1
  643 + ammlim1(ci) =qa1
  644 + lumlim2(ci) =ff2
  645 + nitlim2(ci) =qn2
  646 + ammlim2(ci) =qa2
631 647  
632 648 ! Nutrient uptake by pico- and nano-phytoplankton
633 649 dd(n,p1,ci) =amr1(ci)*ff1*qn1*(cc(p1,ci)+p0)
... ...
src/extras/bio/bio_save.F90
... ... @@ -13,7 +13,7 @@
13 13 !
14 14 ! !USES:
15 15 use bio_var
16   - use output, only: out_fmt,ts
  16 + use output, only: out_fmt,ts
17 17 #ifdef NETCDF_FMT
18 18 use ncdfout, only: ncid
19 19 use ncdfout, only: lon_dim,lat_dim,z_dim,time_dim,dims
... ... @@ -93,13 +93,25 @@
93 93 iret = set_attributes(ncid,par_id,units='W/m2',long_name='PAR')
94 94  
95 95 !DD Diagnostic des fonctions de croissance
96   - iret = new_nc_variable(ncid,'lumlim',NF_REAL,4,dims,lumlim_id)
97   - iret = set_attributes(ncid,lumlim_id,units='1/day', &
98   - long_name='light limited growth rate')
99   - iret = new_nc_variable(ncid,'nitlim',NF_REAL,4,dims,nitlim_id)
100   - iret = set_attributes(ncid,nitlim_id,units='',long_name='nitrate limitation')
101   - iret = new_nc_variable(ncid,'ammlim',NF_REAL,4,dims,ammlim_id)
102   - iret = set_attributes(ncid,ammlim_id,units='',long_name='ammonium limitation')
  96 + iret = new_nc_variable(ncid,'lumlim1',NF_REAL,4,dims,lumlim1_id)
  97 + iret = set_attributes(ncid,lumlim1_id,units='1/day', &
  98 + long_name='light limited growth rate for picophyto')
  99 + iret = new_nc_variable(ncid,'nitlim1',NF_REAL,4,dims,nitlim1_id)
  100 + iret = set_attributes(ncid,nitlim1_id,units='',long_name='nitrate limitation for picophyto')
  101 + iret = new_nc_variable(ncid,'ammlim1',NF_REAL,4,dims,ammlim1_id)
  102 + iret = set_attributes(ncid,ammlim1_id,units='',long_name='ammonium limitation for picophyto')
  103 + iret = new_nc_variable(ncid,'lumlim2',NF_REAL,4,dims,lumlim2_id)
  104 + iret = set_attributes(ncid,lumlim2_id,units='1/day', &
  105 + long_name='light limited growth rate for microphyto')
  106 + iret = new_nc_variable(ncid,'nitlim2',NF_REAL,4,dims,nitlim2_id)
  107 + iret = set_attributes(ncid,nitlim2_id,units='',long_name='nitrate limitation for microphyto')
  108 + iret = new_nc_variable(ncid,'ammlim2',NF_REAL,4,dims,ammlim2_id)
  109 + iret = set_attributes(ncid,ammlim2_id,units='',long_name='ammonium limitation for microphyto')
  110 +
  111 + !DD Diagnostic de npar (nb de particules lagrangiennes) pour bebogage
  112 + !iret = new_nc_variable(ncid,'npar',NF_REAL,4,dims,npar_id)
  113 + !iret = set_attributes(ncid,npar_id,units='', &
  114 + ! long_name='nb of particles per level')
103 115  
104 116 dims(1) = time_dim
105 117 iret = new_nc_variable(ncid,'totn',NF_REAL,1,dims,totn_id)
... ... @@ -120,9 +132,15 @@
120 132 iret = store_data(ncid,par_id,XYZT_SHAPE,nlev,array=par(:))
121 133  
122 134 !DD
123   - iret = store_data(ncid,lumlim_id,XYZT_SHAPE,nlev,array=lumlim(:))
124   - iret = store_data(ncid,nitlim_id,XYZT_SHAPE,nlev,array=nitlim(:))
125   - iret = store_data(ncid,ammlim_id,XYZT_SHAPE,nlev,array=ammlim(:))
  135 + iret = store_data(ncid,lumlim1_id,XYZT_SHAPE,nlev,array=lumlim1(:))
  136 + iret = store_data(ncid,nitlim1_id,XYZT_SHAPE,nlev,array=nitlim1(:))
  137 + iret = store_data(ncid,ammlim1_id,XYZT_SHAPE,nlev,array=ammlim1(:))
  138 + iret = store_data(ncid,lumlim2_id,XYZT_SHAPE,nlev,array=lumlim2(:))
  139 + iret = store_data(ncid,nitlim2_id,XYZT_SHAPE,nlev,array=nitlim2(:))
  140 + iret = store_data(ncid,ammlim2_id,XYZT_SHAPE,nlev,array=ammlim2(:))
  141 +
  142 + !DD
  143 + !iret = store_data(ncid,npar_id,XYZT_SHAPE,nlev,array=npar(:))
126 144  
127 145 iret = store_data(ncid,totn_id,T_SHAPE,1,scalar=totn)
128 146 #endif
... ...
src/extras/bio/bio_var.F90
... ... @@ -21,7 +21,7 @@
21 21 integer :: numc,numcc
22 22 REALTYPE, dimension(:), allocatable :: zlev
23 23 REALTYPE, dimension(:), allocatable :: par
24   - REALTYPE, dimension(:), allocatable :: lumlim,nitlim,ammlim !DD
  24 + REALTYPE, dimension(:), allocatable :: lumlim1,nitlim1,ammlim1,lumlim2,nitlim2,ammlim2 !DD
25 25 REALTYPE, dimension(:,:), allocatable :: cc,ws
26 26 integer :: surface_flux_method=-1
27 27 integer :: n_surface_fluxes=-1
... ... @@ -36,7 +36,7 @@
36 36 integer, dimension(:), allocatable :: var_ids
37 37 integer :: wp_id !CHG2
38 38 integer :: par_id !CHG4
39   - integer :: lumlim_id,nitlim_id,ammlim_id !DD
  39 + integer :: lumlim1_id,nitlim1_id,ammlim1_id,lumlim2_id,nitlim2_id,ammlim2_id !DD
40 40 character(len=64), dimension(:), allocatable :: var_names
41 41 character(len=64), dimension(:), allocatable :: var_units
42 42 character(len=64), dimension(:), allocatable :: var_long
... ...