1 | MODULE sms_pisces |
---|
2 | !!---------------------------------------------------------------------- |
---|
3 | !! *** sms_pisces.F90 *** |
---|
4 | !! TOP : PISCES Source Minus Sink variables |
---|
5 | !!---------------------------------------------------------------------- |
---|
6 | !! History : 1.0 ! 2000-02 (O. Aumont) original code |
---|
7 | !! 3.2 ! 2009-04 (C. Ethe & NEMO team) style |
---|
8 | !!---------------------------------------------------------------------- |
---|
9 | USE par_oce |
---|
10 | USE par_trc |
---|
11 | |
---|
12 | IMPLICIT NONE |
---|
13 | PUBLIC |
---|
14 | |
---|
15 | INTEGER :: numnatp_ref = -1 !! Logical units for namelist pisces |
---|
16 | INTEGER :: numnatp_cfg = -1 !! Logical units for namelist pisces |
---|
17 | INTEGER :: numonp = -1 !! Logical unit for namelist pisces output |
---|
18 | |
---|
19 | ! !: PISCES : silicon dependant half saturation |
---|
20 | |
---|
21 | !!* Model used |
---|
22 | LOGICAL :: ln_p2z !: Flag to use LOBSTER model |
---|
23 | LOGICAL :: ln_p4z !: Flag to use PISCES model |
---|
24 | LOGICAL :: ln_p5z !: Flag to use PISCES quota model |
---|
25 | LOGICAL :: ln_ligand !: Flag to enable organic ligands |
---|
26 | |
---|
27 | !!* Time variables |
---|
28 | INTEGER :: nrdttrc !: ??? |
---|
29 | REAL(wp) :: rfact , rfactr !: ??? |
---|
30 | REAL(wp) :: rfact2, rfact2r !: ??? |
---|
31 | REAL(wp) :: xstep !: Time step duration for biology |
---|
32 | REAL(wp) :: ryyss !: number of seconds per year |
---|
33 | REAL(wp) :: r1_ryyss !: inverse number of seconds per year |
---|
34 | |
---|
35 | |
---|
36 | !!* Biological parameters |
---|
37 | INTEGER :: niter1max, niter2max !: Maximum number of iterations for sinking |
---|
38 | REAL(wp) :: rno3 !: ??? |
---|
39 | REAL(wp) :: o2ut !: ??? |
---|
40 | REAL(wp) :: po4r !: ??? |
---|
41 | REAL(wp) :: rdenit !: ??? |
---|
42 | REAL(wp) :: rdenita !: ??? |
---|
43 | REAL(wp) :: o2nit !: ??? |
---|
44 | REAL(wp) :: wsbio, wsbio2 !: ??? |
---|
45 | REAL(wp) :: wsbio2max !: ??? |
---|
46 | REAL(wp) :: wsbio2scale !: ??? |
---|
47 | REAL(wp) :: xkmort !: ??? |
---|
48 | REAL(wp) :: ferat3 !: ??? |
---|
49 | REAL(wp) :: wfep !: ??? |
---|
50 | REAL(wp) :: ldocp !: ??? |
---|
51 | REAL(wp) :: ldocz !: ??? |
---|
52 | REAL(wp) :: lthet !: ??? |
---|
53 | REAL(wp) :: no3rat3 !: ??? |
---|
54 | REAL(wp) :: po4rat3 !: ??? |
---|
55 | |
---|
56 | |
---|
57 | !!* diagnostic parameters |
---|
58 | REAL(wp) :: tpp !: total primary production |
---|
59 | REAL(wp) :: t_oce_co2_exp !: total carbon export |
---|
60 | REAL(wp) :: t_oce_co2_flx !: Total ocean carbon flux |
---|
61 | REAL(wp) :: t_oce_co2_flx_cum !: Cumulative Total ocean carbon flux |
---|
62 | REAL(wp) :: t_atm_co2_flx !: global mean of atmospheric pco2 |
---|
63 | |
---|
64 | !!* restoring |
---|
65 | LOGICAL :: ln_pisdmp !: restoring or not of nutrients to a mean value |
---|
66 | INTEGER :: nn_pisdmp !: frequency of relaxation or not of nutrients to a mean value |
---|
67 | |
---|
68 | !!* Mass conservation |
---|
69 | LOGICAL :: ln_check_mass !: Flag to check mass conservation |
---|
70 | |
---|
71 | !!* Biological fluxes for light : variables shared by pisces & lobster |
---|
72 | INTEGER , ALLOCATABLE, SAVE, DIMENSION(:,:) :: neln !: number of T-levels + 1 in the euphotic layer |
---|
73 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: heup !: euphotic layer depth |
---|
74 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: etot !: par (photosynthetic available radiation) |
---|
75 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: etot_ndcy !: PAR over 24h in case of diurnal cycle |
---|
76 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: enano, ediat !: PAR for phyto, nano and diat |
---|
77 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: epico !: PAR for pico |
---|
78 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: emoy !: averaged PAR in the mixed layer |
---|
79 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: heup_01 !: Absolute euphotic layer depth |
---|
80 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksi !: LOBSTER : zooplakton closure |
---|
81 | |
---|
82 | !!* Biological fluxes for primary production |
---|
83 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksimax !: ??? |
---|
84 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: biron !: bioavailable fraction of iron |
---|
85 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: plig !: proportion of iron organically complexed |
---|
86 | |
---|
87 | !!* Sinking speed |
---|
88 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsbio3 !: POC sinking speed |
---|
89 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsbio4 !: GOC sinking speed |
---|
90 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wscal !: Calcite and BSi sinking speeds |
---|
91 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsfep |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | !!* SMS for the organic matter |
---|
96 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xfracal !: ?? |
---|
97 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac !: ?? |
---|
98 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac2 !: ?? |
---|
99 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: orem !: ?? |
---|
100 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiss !: ?? |
---|
101 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodcal !: Calcite production |
---|
102 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodpoc !: Calcite production |
---|
103 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: conspoc !: Calcite production |
---|
104 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodgoc !: Calcite production |
---|
105 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: consgoc !: Calcite production |
---|
106 | |
---|
107 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizen !: size of diatoms |
---|
108 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizep !: size of diatoms |
---|
109 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sized !: size of diatoms |
---|
110 | |
---|
111 | |
---|
112 | !!* Variable for chemistry of the CO2 cycle |
---|
113 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak13 !: ??? |
---|
114 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak23 !: ??? |
---|
115 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aksp !: ??? |
---|
116 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hi !: ??? |
---|
117 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: excess !: ??? |
---|
118 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aphscale !: |
---|
119 | |
---|
120 | |
---|
121 | !!* Temperature dependancy of SMS terms |
---|
122 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc !: Temp. dependancy of various biological rates |
---|
123 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc2 !: Temp. dependancy of mesozooplankton rates |
---|
124 | |
---|
125 | #if defined key_sed |
---|
126 | LOGICAL, PUBLIC, PARAMETER :: lk_sed = .TRUE. !: sediment flag |
---|
127 | #else |
---|
128 | LOGICAL, PUBLIC, PARAMETER :: lk_sed = .FALSE. !: sediment flag |
---|
129 | #endif |
---|
130 | |
---|
131 | !!---------------------------------------------------------------------- |
---|
132 | !! NEMO/TOP 4.0 , NEMO Consortium (2018) |
---|
133 | !! $Id$ |
---|
134 | !! Software governed by the CeCILL licence (./LICENSE) |
---|
135 | !!---------------------------------------------------------------------- |
---|
136 | CONTAINS |
---|
137 | |
---|
138 | INTEGER FUNCTION sms_pisces_alloc() |
---|
139 | !!---------------------------------------------------------------------- |
---|
140 | !! *** ROUTINE sms_pisces_alloc *** |
---|
141 | !!---------------------------------------------------------------------- |
---|
142 | USE lib_mpp , ONLY: ctl_warn |
---|
143 | INTEGER :: ierr(10) ! Local variables |
---|
144 | !!---------------------------------------------------------------------- |
---|
145 | ierr(:) = 0 |
---|
146 | !* Biological fluxes for light : shared variables for pisces & lobster |
---|
147 | ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj), & |
---|
148 | & heup_01(jpi,jpj) , xksi(jpi,jpj) , STAT=ierr(1) ) |
---|
149 | ! |
---|
150 | |
---|
151 | IF( ln_p4z .OR. ln_p5z ) THEN |
---|
152 | !* Biological fluxes for light |
---|
153 | ALLOCATE( enano(jpi,jpj,jpk) , ediat(jpi,jpj,jpk) , & |
---|
154 | & etot_ndcy(jpi,jpj,jpk), emoy(jpi,jpj,jpk) , STAT=ierr(2) ) |
---|
155 | |
---|
156 | !* Biological fluxes for primary production |
---|
157 | ALLOCATE( xksimax(jpi,jpj) , biron(jpi,jpj,jpk) , STAT=ierr(3) ) |
---|
158 | ! |
---|
159 | !* SMS for the organic matter |
---|
160 | ALLOCATE( xfracal (jpi,jpj,jpk), orem(jpi,jpj,jpk) , & |
---|
161 | & nitrfac(jpi,jpj,jpk), nitrfac2(jpi,jpj,jpk) , & |
---|
162 | & prodcal(jpi,jpj,jpk) , xdiss (jpi,jpj,jpk), & |
---|
163 | & prodpoc(jpi,jpj,jpk) , conspoc(jpi,jpj,jpk) , & |
---|
164 | & prodgoc(jpi,jpj,jpk) , consgoc(jpi,jpj,jpk) , STAT=ierr(4) ) |
---|
165 | |
---|
166 | !* Variable for chemistry of the CO2 cycle |
---|
167 | ALLOCATE( ak13 (jpi,jpj,jpk) , & |
---|
168 | & ak23(jpi,jpj,jpk) , aksp (jpi,jpj,jpk) , & |
---|
169 | & hi (jpi,jpj,jpk) , excess(jpi,jpj,jpk) , & |
---|
170 | & aphscale(jpi,jpj,jpk), STAT=ierr(5) ) |
---|
171 | ! |
---|
172 | !* Temperature dependancy of SMS terms |
---|
173 | ALLOCATE( tgfunc(jpi,jpj,jpk) , tgfunc2(jpi,jpj,jpk), STAT=ierr(6) ) |
---|
174 | ! |
---|
175 | !* Sinkong speed |
---|
176 | ALLOCATE( wsbio3 (jpi,jpj,jpk) , wsbio4 (jpi,jpj,jpk), & |
---|
177 | & wscal(jpi,jpj,jpk) , STAT=ierr(7) ) |
---|
178 | ! |
---|
179 | IF( ln_ligand ) THEN |
---|
180 | ALLOCATE( plig(jpi,jpj,jpk) , wsfep(jpi,jpj,jpk) , STAT=ierr(8) ) |
---|
181 | ENDIF |
---|
182 | ! |
---|
183 | ENDIF |
---|
184 | ! |
---|
185 | IF( ln_p5z ) THEN |
---|
186 | ! |
---|
187 | ALLOCATE( epico(jpi,jpj,jpk) , STAT=ierr(9) ) |
---|
188 | |
---|
189 | !* Size of phytoplankton cells |
---|
190 | ALLOCATE( sizen(jpi,jpj,jpk), sizep(jpi,jpj,jpk), & |
---|
191 | & sized(jpi,jpj,jpk), STAT=ierr(10) ) |
---|
192 | ENDIF |
---|
193 | ! |
---|
194 | sms_pisces_alloc = MAXVAL( ierr ) |
---|
195 | ! |
---|
196 | IF( sms_pisces_alloc /= 0 ) CALL ctl_warn('sms_pisces_alloc: failed to allocate arrays') |
---|
197 | ! |
---|
198 | END FUNCTION sms_pisces_alloc |
---|
199 | |
---|
200 | !!====================================================================== |
---|
201 | END MODULE sms_pisces |
---|