Commit bb33cab1c64165bff04e0fb1fb3f4d30af080735

Authored by Dany Dumont
1 parent f69f6551
Exists in master and in 1 other branch snow

Ajout de la variable ppnet (net primary production rate per day) dans le fichier…

… output nc pour les modeles fasham et ismer seulement
src/extras/bio/bio.F90
... ... @@ -575,6 +575,7 @@
575 575 case (5)
576 576 call surface_fluxes_mab(nlev,t(nlev),s(nlev))
577 577 case (6)
  578 + case (7)
578 579 end select
579 580  
580 581 if (bio_eulerian) then
... ... @@ -794,6 +795,7 @@
794 795 if (allocated(lumlim2)) deallocate(lumlim2)
795 796 if (allocated(nitlim2)) deallocate(nitlim2)
796 797 if (allocated(ammlim2)) deallocate(ammlim2)
  798 + if (allocated(ppnet)) deallocate(ppnet)
797 799  
798 800 ! The external provide arrays
799 801 if (allocated(h)) deallocate(h)
... ... @@ -898,6 +900,9 @@
898 900 allocate(ammlim2(0:nlev),stat=rc)
899 901 if (rc /= 0) stop 'init_bio(): Error allocating (ammlim2)'
900 902  
  903 + allocate(ppnet(0:nlev),stat=rc)
  904 + if (rc /= 0) stop 'init_bio(): Error allocating (ppnet)'
  905 +
901 906 ! The external provide arrays
902 907 allocate(h(0:nlev),stat=rc)
903 908 if (rc /= 0) stop 'init_bio(): Error allocating (h)'
... ...
src/extras/bio/bio_fasham.F90
... ... @@ -595,6 +595,8 @@
595 595 dd(a,b,ci)=vb*min67/(k4+min67+cc(l,ci))*(cc(b,ci)+b0)
596 596 dd(l,b,ci)=vb*cc(l,ci)/(k4+min67+cc(l,ci))*(cc(b,ci)+b0)
597 597  
  598 + ppnet(ci) =(dd(a,p,ci)+dd(n,p,ci)-dd(p,d,ci)-dd(p,z,ci)-dd(p,l,ci))*secs_pr_day
  599 +
598 600 do i=1,numc
599 601 do j=1,numc
600 602 pp(i,j,ci)=dd(j,i,ci)
... ...
src/extras/bio/bio_ismer.F90
... ... @@ -707,6 +707,9 @@
707 707 ws(p1,ci) = w_p1
708 708 ws(p2,ci) = w_p2
709 709  
  710 + ppnet(ci) =dd(a,p1,ci)+dd(n,p1,ci)-dd(p1,d,ci)-dd(p1,z1,ci)-dd(p1,z2,ci)-dd(p1,l,ci) &
  711 + +dd(a,p2,ci)+dd(n,p2,ci)-dd(p2,d,ci)-dd(p2,z1,ci)-dd(p2,z2,ci)-dd(p2,l,ci)
  712 +
710 713 do i=1,numc
711 714 do j=1,numc
712 715 pp(i,j,ci)=dd(j,i,ci)
... ...
src/extras/bio/bio_save.F90
... ... @@ -107,6 +107,8 @@
107 107 iret = set_attributes(ncid,nitlim2_id,units='',long_name='nitrate limitation for microphyto')
108 108 iret = new_nc_variable(ncid,'ammlim2',NF_REAL,4,dims,ammlim2_id)
109 109 iret = set_attributes(ncid,ammlim2_id,units='',long_name='ammonium limitation for microphyto')
  110 + iret = new_nc_variable(ncid,'ppnet',NF_REAL,4,dims,ppnet_id)
  111 + iret = set_attributes(ncid,ppnet_id,units='1/day',long_name='net primary production rate')
110 112  
111 113 !DD Diagnostic de npar (nb de particules lagrangiennes) pour bebogage
112 114 !iret = new_nc_variable(ncid,'npar',NF_REAL,4,dims,npar_id)
... ... @@ -138,6 +140,7 @@
138 140 iret = store_data(ncid,lumlim2_id,XYZT_SHAPE,nlev,array=lumlim2(:))
139 141 iret = store_data(ncid,nitlim2_id,XYZT_SHAPE,nlev,array=nitlim2(:))
140 142 iret = store_data(ncid,ammlim2_id,XYZT_SHAPE,nlev,array=ammlim2(:))
  143 + iret = store_data(ncid,ppnet_id,XYZT_SHAPE,nlev,array=ppnet(:))
141 144  
142 145 !DD
143 146 !iret = store_data(ncid,npar_id,XYZT_SHAPE,nlev,array=npar(:))
... ...
src/extras/bio/bio_var.F90
... ... @@ -22,6 +22,7 @@
22 22 REALTYPE, dimension(:), allocatable :: zlev
23 23 REALTYPE, dimension(:), allocatable :: par
24 24 REALTYPE, dimension(:), allocatable :: lumlim1,nitlim1,ammlim1,lumlim2,nitlim2,ammlim2 !DD
  25 + REALTYPE, dimension(:), allocatable :: ppnet
25 26 REALTYPE, dimension(:,:), allocatable :: cc,ws
26 27 integer :: surface_flux_method=-1
27 28 integer :: n_surface_fluxes=-1
... ... @@ -37,6 +38,7 @@
37 38 integer :: wp_id !CHG2
38 39 integer :: par_id !CHG4
39 40 integer :: lumlim1_id,nitlim1_id,ammlim1_id,lumlim2_id,nitlim2_id,ammlim2_id !DD
  41 + integer :: ppnet_id
40 42 character(len=64), dimension(:), allocatable :: var_names
41 43 character(len=64), dimension(:), allocatable :: var_units
42 44 character(len=64), dimension(:), allocatable :: var_long
... ...