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 | CHARACTER(:), ALLOCATABLE :: numnatp_ref !! Character buffer for reference namelist pisces |
---|
16 | CHARACTER(:), ALLOCATABLE :: numnatp_cfg !! Character buffer for configuration 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 | LOGICAL :: ln_sediment !: Flag to enable sediment module |
---|
27 | |
---|
28 | !!* Time variables |
---|
29 | INTEGER :: nrdttrc !: ??? |
---|
30 | REAL(wp) :: rfact , rfactr !: ??? |
---|
31 | REAL(wp) :: rfact2, rfact2r !: ??? |
---|
32 | REAL(wp) :: xstep !: Time step duration for biology |
---|
33 | REAL(wp) :: ryyss !: number of seconds per year |
---|
34 | REAL(wp) :: r1_ryyss !: inverse number of seconds per year |
---|
35 | |
---|
36 | |
---|
37 | !!* Biological parameters |
---|
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) :: ldocp !: ??? |
---|
50 | REAL(wp) :: ldocz !: ??? |
---|
51 | REAL(wp) :: lthet !: ??? |
---|
52 | REAL(wp) :: no3rat3 !: ??? |
---|
53 | REAL(wp) :: po4rat3 !: ??? |
---|
54 | |
---|
55 | |
---|
56 | !!* diagnostic parameters |
---|
57 | REAL(wp) :: tpp !: total primary production |
---|
58 | REAL(wp) :: t_oce_co2_exp !: total carbon export |
---|
59 | REAL(wp) :: t_oce_co2_flx !: Total ocean carbon flux |
---|
60 | REAL(wp) :: t_oce_co2_flx_cum !: Cumulative Total ocean carbon flux |
---|
61 | REAL(wp) :: t_atm_co2_flx !: global mean of atmospheric pco2 |
---|
62 | |
---|
63 | !!* restoring |
---|
64 | LOGICAL :: ln_pisdmp !: restoring or not of nutrients to a mean value |
---|
65 | INTEGER :: nn_pisdmp !: frequency of relaxation or not of nutrients to a mean value |
---|
66 | |
---|
67 | !!* Mass conservation |
---|
68 | LOGICAL :: ln_check_mass !: Flag to check mass conservation |
---|
69 | LOGICAL , PUBLIC :: ln_ironice !: boolean for Fe input from sea ice |
---|
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(:,:,:) :: enanom, ediatm !: PAR for phyto, nano and diat |
---|
78 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: epico !: PAR for pico |
---|
79 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: epicom !: PAR for pico |
---|
80 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: emoy !: averaged PAR in the mixed layer |
---|
81 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: heup_01 !: Absolute euphotic layer depth |
---|
82 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksi !: LOBSTER : zooplakton closure |
---|
83 | |
---|
84 | !!* Biological fluxes for primary production |
---|
85 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksimax !: ??? |
---|
86 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: biron !: bioavailable fraction of iron |
---|
87 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: plig !: proportion of iron organically complexed |
---|
88 | |
---|
89 | !!* Sinking speed |
---|
90 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsbio3 !: POC sinking speed |
---|
91 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsbio4 !: GOC sinking speed |
---|
92 | |
---|
93 | !!* SMS for the organic matter |
---|
94 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xfracal !: ?? |
---|
95 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac !: ?? |
---|
96 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac2 !: ?? |
---|
97 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: orem !: ?? |
---|
98 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiss !: ?? |
---|
99 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodcal !: Calcite production |
---|
100 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodpoc !: Calcite production |
---|
101 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: conspoc !: Calcite production |
---|
102 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodgoc !: Calcite production |
---|
103 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: consgoc !: Calcite production |
---|
104 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: blim !: bacterial production factor |
---|
105 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizen !: size of diatoms |
---|
106 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizep !: size of diatoms |
---|
107 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sized !: size of diatoms |
---|
108 | |
---|
109 | |
---|
110 | !!* Variable for chemistry of the CO2 cycle |
---|
111 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak13 !: ??? |
---|
112 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak23 !: ??? |
---|
113 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aksp !: ??? |
---|
114 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hi !: ??? |
---|
115 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: excess !: ??? |
---|
116 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aphscale !: |
---|
117 | |
---|
118 | |
---|
119 | !!* Temperature dependancy of SMS terms |
---|
120 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc !: Temp. dependancy of various biological rates |
---|
121 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc2 !: Temp. dependancy of mesozooplankton rates |
---|
122 | |
---|
123 | LOGICAL, SAVE :: lk_sed |
---|
124 | |
---|
125 | !!---------------------------------------------------------------------- |
---|
126 | !! NEMO/TOP 4.0 , NEMO Consortium (2018) |
---|
127 | !! $Id$ |
---|
128 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
129 | !!---------------------------------------------------------------------- |
---|
130 | CONTAINS |
---|
131 | |
---|
132 | INTEGER FUNCTION sms_pisces_alloc() |
---|
133 | !!---------------------------------------------------------------------- |
---|
134 | !! *** ROUTINE sms_pisces_alloc *** |
---|
135 | !!---------------------------------------------------------------------- |
---|
136 | USE lib_mpp , ONLY: ctl_stop |
---|
137 | INTEGER :: ierr(10) ! Local variables |
---|
138 | !!---------------------------------------------------------------------- |
---|
139 | ierr(:) = 0 |
---|
140 | !* Biological fluxes for light : shared variables for pisces & lobster |
---|
141 | ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj), & |
---|
142 | & heup_01(jpi,jpj) , xksi(jpi,jpj) , STAT=ierr(1) ) |
---|
143 | ! |
---|
144 | |
---|
145 | IF( ln_p4z .OR. ln_p5z ) THEN |
---|
146 | !* Biological fluxes for light |
---|
147 | ALLOCATE( enano(jpi,jpj,jpk) , ediat(jpi,jpj,jpk) , & |
---|
148 | & enanom(jpi,jpj,jpk) , ediatm(jpi,jpj,jpk), & |
---|
149 | & etot_ndcy(jpi,jpj,jpk), emoy(jpi,jpj,jpk) , STAT=ierr(2) ) |
---|
150 | |
---|
151 | !* Biological fluxes for primary production |
---|
152 | ALLOCATE( xksimax(jpi,jpj) , biron(jpi,jpj,jpk) , STAT=ierr(3) ) |
---|
153 | ! |
---|
154 | !* SMS for the organic matter |
---|
155 | ALLOCATE( xfracal (jpi,jpj,jpk), orem(jpi,jpj,jpk) , & |
---|
156 | & nitrfac(jpi,jpj,jpk), nitrfac2(jpi,jpj,jpk) , & |
---|
157 | & prodcal(jpi,jpj,jpk) , xdiss (jpi,jpj,jpk), & |
---|
158 | & prodpoc(jpi,jpj,jpk) , conspoc(jpi,jpj,jpk) , & |
---|
159 | & prodgoc(jpi,jpj,jpk) , consgoc(jpi,jpj,jpk) , & |
---|
160 | & blim (jpi,jpj,jpk) , STAT=ierr(4) ) |
---|
161 | |
---|
162 | !* Variable for chemistry of the CO2 cycle |
---|
163 | ALLOCATE( ak13 (jpi,jpj,jpk) , & |
---|
164 | & ak23(jpi,jpj,jpk) , aksp (jpi,jpj,jpk) , & |
---|
165 | & hi (jpi,jpj,jpk) , excess(jpi,jpj,jpk) , & |
---|
166 | & aphscale(jpi,jpj,jpk), STAT=ierr(5) ) |
---|
167 | ! |
---|
168 | !* Temperature dependancy of SMS terms |
---|
169 | ALLOCATE( tgfunc(jpi,jpj,jpk) , tgfunc2(jpi,jpj,jpk), STAT=ierr(6) ) |
---|
170 | ! |
---|
171 | !* Sinkong speed |
---|
172 | ALLOCATE( wsbio3 (jpi,jpj,jpk) , wsbio4 (jpi,jpj,jpk), & |
---|
173 | & STAT=ierr(7) ) |
---|
174 | ! |
---|
175 | IF( ln_ligand ) THEN |
---|
176 | ALLOCATE( plig(jpi,jpj,jpk) , STAT=ierr(8) ) |
---|
177 | ENDIF |
---|
178 | ENDIF |
---|
179 | ! |
---|
180 | IF( ln_p5z ) THEN |
---|
181 | ! |
---|
182 | ALLOCATE( epico(jpi,jpj,jpk) , epicom(jpi,jpj,jpk) , STAT=ierr(9) ) |
---|
183 | |
---|
184 | !* Size of phytoplankton cells |
---|
185 | ALLOCATE( sizen(jpi,jpj,jpk), sizep(jpi,jpj,jpk), & |
---|
186 | & sized(jpi,jpj,jpk), STAT=ierr(10) ) |
---|
187 | ENDIF |
---|
188 | ! |
---|
189 | sms_pisces_alloc = MAXVAL( ierr ) |
---|
190 | ! |
---|
191 | IF( sms_pisces_alloc /= 0 ) CALL ctl_stop( 'STOP', 'sms_pisces_alloc: failed to allocate arrays' ) |
---|
192 | ! |
---|
193 | END FUNCTION sms_pisces_alloc |
---|
194 | |
---|
195 | !!====================================================================== |
---|
196 | END MODULE sms_pisces |
---|