Commit a62e5d30 authored by dumoda01's avatar dumoda01

Complement de la revision precedente

parent 1025a7c4
......@@ -721,6 +721,11 @@
if (allocated(var_units)) deallocate(var_units)
if (allocated(var_long)) deallocate(var_long)
!DD
if (allocated(lumlim)) deallocate(lumlim)
if (allocated(nitlim)) deallocate(nitlim)
if (allocated(ammlim)) deallocate(ammlim)
! The external provide arrays
if (allocated(h)) deallocate(h)
if (allocated(nuh)) deallocate(nuh)
......@@ -803,6 +808,17 @@
allocate(var_long(numc),stat=rc)
if (rc /= 0) stop 'init_bio(): Error allocating var_long)'
!DD
allocate(lumlim(0:nlev),stat=rc)
if (rc /= 0) stop 'init_bio(): Error allocating (lumlim)'
allocate(nitlim(0:nlev),stat=rc)
if (rc /= 0) stop 'init_bio(): Error allocating (nitlim)'
allocate(ammlim(0:nlev),stat=rc)
if (rc /= 0) stop 'init_bio(): Error allocating (ammlim)'
! The external provide arrays
allocate(h(0:nlev),stat=rc)
if (rc /= 0) stop 'init_bio(): Error allocating (h)'
......
......@@ -92,6 +92,15 @@
iret = new_nc_variable(ncid,'par',NF_REAL,4,dims,par_id)
iret = set_attributes(ncid,par_id,units='W/m2',long_name='PAR')
!DD Diagnostic des fonctions de croissance
iret = new_nc_variable(ncid,'lumlim',NF_REAL,4,dims,lumlim_id)
iret = set_attributes(ncid,lumlim_id,units='1/day', &
long_name='light limited growth rate')
iret = new_nc_variable(ncid,'nitlim',NF_REAL,4,dims,nitlim_id)
iret = set_attributes(ncid,nitlim_id,units='',long_name='nitrate limitation')
iret = new_nc_variable(ncid,'ammlim',NF_REAL,4,dims,ammlim_id)
iret = set_attributes(ncid,ammlim_id,units='',long_name='ammonium limitation')
dims(1) = time_dim
iret = new_nc_variable(ncid,'totn',NF_REAL,1,dims,totn_id)
iret = set_attributes(ncid,totn_id,units='mmol/m**2', &
......@@ -110,6 +119,11 @@
!CHG4 PAR (par = par(:))
iret = store_data(ncid,par_id,XYZT_SHAPE,nlev,array=par(:))
!DD
iret = store_data(ncid,lumlim_id,XYZT_SHAPE,nlev,array=lumlim(:))
iret = store_data(ncid,nitlim_id,XYZT_SHAPE,nlev,array=nitlim(:))
iret = store_data(ncid,ammlim_id,XYZT_SHAPE,nlev,array=ammlim(:))
iret = store_data(ncid,totn_id,T_SHAPE,1,scalar=totn)
#endif
case default
......
......@@ -21,6 +21,7 @@
integer :: numc,numcc
REALTYPE, dimension(:), allocatable :: zlev
REALTYPE, dimension(:), allocatable :: par
REALTYPE, dimension(:), allocatable :: lumlim,nitlim,ammlim !DD
REALTYPE, dimension(:,:), allocatable :: cc,ws
integer :: surface_flux_method=-1
integer :: n_surface_fluxes=-1
......@@ -35,6 +36,7 @@
integer, dimension(:), allocatable :: var_ids
integer :: wp_id !CHG2
integer :: par_id !CHG4
integer :: lumlim_id,nitlim_id,ammlim_id !DD
character(len=64), dimension(:), allocatable :: var_names
character(len=64), dimension(:), allocatable :: var_units
character(len=64), dimension(:), allocatable :: var_long
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment