Commit a62e5d30d0261594c916eb29c3664f92b8dfe5a2
1 parent
1025a7c4
Exists in
master
and in
1 other branch
Complement de la revision precedente
Showing
3 changed files
with
32 additions
and
0 deletions
Show diff stats
src/extras/bio/bio.F90
... | ... | @@ -721,6 +721,11 @@ |
721 | 721 | if (allocated(var_units)) deallocate(var_units) |
722 | 722 | if (allocated(var_long)) deallocate(var_long) |
723 | 723 | |
724 | +!DD | |
725 | + if (allocated(lumlim)) deallocate(lumlim) | |
726 | + if (allocated(nitlim)) deallocate(nitlim) | |
727 | + if (allocated(ammlim)) deallocate(ammlim) | |
728 | + | |
724 | 729 | ! The external provide arrays |
725 | 730 | if (allocated(h)) deallocate(h) |
726 | 731 | if (allocated(nuh)) deallocate(nuh) |
... | ... | @@ -803,6 +808,17 @@ |
803 | 808 | allocate(var_long(numc),stat=rc) |
804 | 809 | if (rc /= 0) stop 'init_bio(): Error allocating var_long)' |
805 | 810 | |
811 | +!DD | |
812 | + | |
813 | + allocate(lumlim(0:nlev),stat=rc) | |
814 | + if (rc /= 0) stop 'init_bio(): Error allocating (lumlim)' | |
815 | + | |
816 | + allocate(nitlim(0:nlev),stat=rc) | |
817 | + if (rc /= 0) stop 'init_bio(): Error allocating (nitlim)' | |
818 | + | |
819 | + allocate(ammlim(0:nlev),stat=rc) | |
820 | + if (rc /= 0) stop 'init_bio(): Error allocating (ammlim)' | |
821 | + | |
806 | 822 | ! The external provide arrays |
807 | 823 | allocate(h(0:nlev),stat=rc) |
808 | 824 | if (rc /= 0) stop 'init_bio(): Error allocating (h)' | ... | ... |
src/extras/bio/bio_save.F90
... | ... | @@ -92,6 +92,15 @@ |
92 | 92 | iret = new_nc_variable(ncid,'par',NF_REAL,4,dims,par_id) |
93 | 93 | iret = set_attributes(ncid,par_id,units='W/m2',long_name='PAR') |
94 | 94 | |
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') | |
103 | + | |
95 | 104 | dims(1) = time_dim |
96 | 105 | iret = new_nc_variable(ncid,'totn',NF_REAL,1,dims,totn_id) |
97 | 106 | iret = set_attributes(ncid,totn_id,units='mmol/m**2', & |
... | ... | @@ -110,6 +119,11 @@ |
110 | 119 | !CHG4 PAR (par = par(:)) |
111 | 120 | iret = store_data(ncid,par_id,XYZT_SHAPE,nlev,array=par(:)) |
112 | 121 | |
122 | + !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(:)) | |
126 | + | |
113 | 127 | iret = store_data(ncid,totn_id,T_SHAPE,1,scalar=totn) |
114 | 128 | #endif |
115 | 129 | case default | ... | ... |
src/extras/bio/bio_var.F90
... | ... | @@ -21,6 +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 | 25 | REALTYPE, dimension(:,:), allocatable :: cc,ws |
25 | 26 | integer :: surface_flux_method=-1 |
26 | 27 | integer :: n_surface_fluxes=-1 |
... | ... | @@ -35,6 +36,7 @@ |
35 | 36 | integer, dimension(:), allocatable :: var_ids |
36 | 37 | integer :: wp_id !CHG2 |
37 | 38 | integer :: par_id !CHG4 |
39 | + integer :: lumlim_id,nitlim_id,ammlim_id !DD | |
38 | 40 | character(len=64), dimension(:), allocatable :: var_names |
39 | 41 | character(len=64), dimension(:), allocatable :: var_units |
40 | 42 | character(len=64), dimension(:), allocatable :: var_long | ... | ... |