New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
trcini_pisces.F90 in NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/src/TOP/PISCES – NEMO

source: NEMO/branches/2019/dev_r11078_OSMOSIS_IMMERSE_Nurser/src/TOP/PISCES/trcini_pisces.F90 @ 12928

Last change on this file since 12928 was 12928, checked in by smueller, 4 years ago

Synchronizing with /NEMO/trunk@12925 (ticket #2170)

  • Property svn:keywords set to Id
File size: 16.5 KB
Line 
1MODULE trcini_pisces
2   !!======================================================================
3   !!                         ***  MODULE trcini_pisces  ***
4   !! TOP :   initialisation of the PISCES biochemical model
5   !!======================================================================
6   !! History :    -   !  1988-07  (E. Maier-Reiner) Original code
7   !!              -   !  1999-10  (O. Aumont, C. Le Quere)
8   !!              -   !  2002     (O. Aumont)  PISCES
9   !!             1.0  !  2005-03  (O. Aumont, A. El Moussaoui) F90
10   !!             2.0  !  2007-12  (C. Ethe, G. Madec) from trcini.pisces.h90
11   !!             3.5  !  2012-05  (C. Ethe) Merge PISCES-LOBSTER
12   !!----------------------------------------------------------------------
13   !! trc_ini_pisces   : PISCES biochemical model initialisation
14   !!----------------------------------------------------------------------
15   USE par_trc         !  TOP parameters
16   USE oce_trc         !  shared variables between ocean and passive tracers
17   USE trc             !  passive tracers common variables
18   USE trcnam_pisces   !  PISCES namelist
19   USE sms_pisces      !  PISCES Source Minus Sink variables
20   USE sedini          !  SEDIMENTS initialization routine
21
22   IMPLICIT NONE
23   PRIVATE
24
25   PUBLIC   trc_ini_pisces   ! called by trcini.F90 module
26
27   !!----------------------------------------------------------------------
28   !! NEMO/TOP 4.0 , NEMO Consortium (2018)
29   !! $Id$
30   !! Software governed by the CeCILL license (see ./LICENSE)
31   !!----------------------------------------------------------------------
32CONTAINS
33
34   SUBROUTINE trc_ini_pisces( Kmm )
35      !!----------------------------------------------------------------------
36      !!                   ***  ROUTINE trc_ini_pisces ***
37      !!
38      !! ** Purpose :   Initialisation of the PISCES biochemical model
39      !!----------------------------------------------------------------------
40      INTEGER, INTENT(in)  ::  Kmm      ! time level indices
41      !
42      CALL trc_nam_pisces
43      !
44      IF( ln_p4z .OR. ln_p5z ) THEN  ;   CALL p4z_ini( Kmm )   !  PISCES
45      ELSE                           ;   CALL p2z_ini( Kmm )   !  LOBSTER
46      ENDIF
47
48   END SUBROUTINE trc_ini_pisces
49
50
51   SUBROUTINE p4z_ini( Kmm )
52      !!----------------------------------------------------------------------
53      !!                   ***  ROUTINE p4z_ini ***
54      !!
55      !! ** Purpose :   Initialisation of the PISCES biochemical model
56      !!----------------------------------------------------------------------
57      USE p4zsms          ! Main P4Z routine
58      USE p4zche          !  Chemical model
59      USE p4zsink         !  vertical flux of particulate matter due to sinking
60      USE p4zopt          !  optical model
61      USE p4zbc          !  Boundary conditions
62      USE p4zfechem       !  Iron chemistry
63      USE p4zrem          !  Remineralisation of organic matter
64      USE p4zflx          !  Gas exchange
65      USE p4zlim          !  Co-limitations of differents nutrients
66      USE p4zprod         !  Growth rate of the 2 phyto groups
67      USE p4zmicro        !  Sources and sinks of microzooplankton
68      USE p4zmeso         !  Sources and sinks of mesozooplankton
69      USE p4zmort         !  Mortality terms for phytoplankton
70      USE p4zlys          !  Calcite saturation
71      USE p4zsed          !  Sedimentation & burial
72      USE p4zpoc          !  Remineralization of organic particles
73      USE p4zligand       !  Remineralization of organic ligands
74      USE p5zlim          !  Co-limitations of differents nutrients
75      USE p5zprod         !  Growth rate of the 2 phyto groups
76      USE p5zmicro        !  Sources and sinks of microzooplankton
77      USE p5zmeso         !  Sources and sinks of mesozooplankton
78      USE p5zmort         !  Mortality terms for phytoplankton
79      !
80      INTEGER, INTENT(in)  ::  Kmm      ! time level indices
81      REAL(wp), SAVE ::   sco2   =  2.312e-3_wp
82      REAL(wp), SAVE ::   alka0  =  2.426e-3_wp
83      REAL(wp), SAVE ::   oxyg0  =  177.6e-6_wp 
84      REAL(wp), SAVE ::   po4    =  2.165e-6_wp 
85      REAL(wp), SAVE ::   bioma0 =  1.000e-8_wp 
86      REAL(wp), SAVE ::   silic1 =  91.51e-6_wp 
87      REAL(wp), SAVE ::   no3    =  30.9e-6_wp * 7.625_wp
88      !
89      INTEGER  ::  ji, jj, jk, jn, ierr
90      REAL(wp) ::  zcaralk, zbicarb, zco3
91      REAL(wp) ::  ztmas, ztmas1
92      CHARACTER(len = 20)  ::  cltra
93      !!----------------------------------------------------------------------
94      !
95      IF(lwp) THEN
96         WRITE(numout,*)
97         IF( ln_p4z ) THEN
98            WRITE(numout,*) 'p4z_ini :   PISCES biochemical model initialisation'
99            WRITE(numout,*) '~~~~~~~'
100         ELSE
101            WRITE(numout,*) 'p5z_ini :   PISCES biochemical model initialisation'
102            WRITE(numout,*) '~~~~~~~     With variable stoichiometry'
103         ENDIF
104      ENDIF
105      !
106      ! Allocate PISCES arrays
107      ierr =         sms_pisces_alloc()         
108      ierr = ierr +  p4z_che_alloc()
109      ierr = ierr +  p4z_sink_alloc()
110      ierr = ierr +  p4z_opt_alloc()
111      ierr = ierr +  p4z_flx_alloc()
112      ierr = ierr +  p4z_sed_alloc()
113      ierr = ierr +  p4z_lim_alloc()
114      IF( ln_p4z ) THEN
115         ierr = ierr +  p4z_prod_alloc()
116      ELSE
117         ierr = ierr +  p5z_lim_alloc()
118         ierr = ierr +  p5z_prod_alloc()
119      ENDIF
120      ierr = ierr +  p4z_rem_alloc()
121      !
122      CALL mpp_sum( 'trcini_pisces', ierr )
123      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'pisces_alloc: unable to allocate PISCES arrays' )
124      !
125      ryyss    = nyear_len(1) * rday    ! number of seconds per year
126      r1_ryyss = 1. / ryyss
127      !
128
129      ! assign an index in trc arrays for each prognostic variables
130      DO jn = 1, jptra
131        cltra = ctrcnm(jn) 
132        IF( cltra == 'DIC'      )   jpdic = jn      !: dissolved inoganic carbon concentration
133        IF( cltra == 'Alkalini' )   jptal = jn      !: total alkalinity
134        IF( cltra == 'O2'       )   jpoxy = jn      !: oxygen carbon concentration
135        IF( cltra == 'CaCO3'    )   jpcal = jn      !: calcite  concentration
136        IF( cltra == 'PO4'      )   jppo4 = jn      !: phosphate concentration
137        IF( cltra == 'POC'      )   jppoc = jn      !: small particulate organic phosphate concentration
138        IF( cltra == 'Si'       )   jpsil = jn      !: silicate concentration
139        IF( cltra == 'PHY'      )   jpphy = jn      !: phytoplancton concentration
140        IF( cltra == 'ZOO'      )   jpzoo = jn      !: zooplancton concentration
141        IF( cltra == 'DOC'      )   jpdoc = jn      !: dissolved organic carbon concentration
142        IF( cltra == 'PHY2'     )   jpdia = jn      !: Diatoms Concentration
143        IF( cltra == 'ZOO2'     )   jpmes = jn      !: Mesozooplankton Concentration
144        IF( cltra == 'DSi'      )   jpdsi = jn      !: Diatoms Silicate Concentration
145        IF( cltra == 'Fer'      )   jpfer = jn      !: Iron Concentration
146        IF( cltra == 'BFe'      )   jpbfe = jn      !: Big iron particles Concentration
147        IF( cltra == 'GOC'      )   jpgoc = jn      !: Big particulate organic phosphate concentration
148        IF( cltra == 'SFe'      )   jpsfe = jn      !: Small iron particles Concentration
149        IF( cltra == 'DFe'      )   jpdfe = jn      !: Diatoms iron Concentration
150        IF( cltra == 'GSi'      )   jpgsi = jn      !: (big) Silicate Concentration
151        IF( cltra == 'NFe'      )   jpnfe = jn      !: Nano iron Concentration
152        IF( cltra == 'NCHL'     )   jpnch = jn      !: Nano Chlorophyll Concentration
153        IF( cltra == 'DCHL'     )   jpdch = jn      !: Diatoms Chlorophyll Concentration
154        IF( cltra == 'NO3'      )   jpno3 = jn      !: Nitrates Concentration
155        IF( cltra == 'NH4'      )   jpnh4 = jn      !: Ammonium Concentration
156        IF( cltra == 'DON'      )   jpdon = jn      !: Dissolved organic N Concentration
157        IF( cltra == 'DOP'      )   jpdop = jn      !: Dissolved organic P Concentration
158        IF( cltra == 'PON'      )   jppon = jn      !: Small Nitrogen particle Concentration
159        IF( cltra == 'POP'      )   jppop = jn      !: Small Phosphorus particle Concentration
160        IF( cltra == 'GON'      )   jpgon = jn      !: Big Nitrogen particles Concentration
161        IF( cltra == 'GOP'      )   jpgop = jn      !: Big Phosphorus Concentration
162        IF( cltra == 'PHYN'     )   jpnph = jn      !: Nanophytoplankton N biomass
163        IF( cltra == 'PHYP'     )   jppph = jn      !: Nanophytoplankton P biomass
164        IF( cltra == 'DIAN'     )   jpndi = jn      !: Diatoms N biomass
165        IF( cltra == 'DIAP'     )   jppdi = jn      !: Diatoms P biomass
166        IF( cltra == 'PIC'      )   jppic = jn      !: Picophytoplankton C biomass
167        IF( cltra == 'PICN'     )   jpnpi = jn      !: Picophytoplankton N biomass
168        IF( cltra == 'PICP'     )   jpppi = jn      !: Picophytoplankton P biomass
169        IF( cltra == 'PCHL'     )   jppch = jn      !: Diatoms Chlorophyll Concentration
170        IF( cltra == 'PFe'      )   jppfe = jn      !: Picophytoplankton Fe biomass
171        IF( cltra == 'LGW'      )   jplgw = jn      !: Weak ligands
172      END DO
173
174      CALL p4z_sms_init       !  Maint routine
175      !
176
177      ! Set biological ratios
178      ! ---------------------
179      rno3    =  16._wp / 122._wp
180      po4r    =   1._wp / 122._wp
181      o2nit   =  32._wp / 122._wp
182      o2ut    = 133._wp / 122._wp
183      rdenit  =  ( ( o2ut + o2nit ) * 0.80 - rno3 - rno3 * 0.60 ) / rno3
184      rdenita =   3._wp /  5._wp
185      IF( ln_p5z ) THEN
186         no3rat3 = no3rat3 / rno3
187         po4rat3 = po4rat3 / po4r
188      ENDIF
189
190      ! Initialization of tracer concentration in case of  no restart
191      !--------------------------------------------------------------
192      IF( .NOT.ln_rsttr ) THEN 
193         tr(:,:,:,jpdic,Kmm) = sco2
194         tr(:,:,:,jpdoc,Kmm) = bioma0
195         tr(:,:,:,jptal,Kmm) = alka0
196         tr(:,:,:,jpoxy,Kmm) = oxyg0
197         tr(:,:,:,jpcal,Kmm) = bioma0
198         tr(:,:,:,jppo4,Kmm) = po4 / po4r
199         tr(:,:,:,jppoc,Kmm) = bioma0
200         tr(:,:,:,jpgoc,Kmm) = bioma0
201         tr(:,:,:,jpbfe,Kmm) = bioma0 * 5.e-6
202         tr(:,:,:,jpsil,Kmm) = silic1
203         tr(:,:,:,jpdsi,Kmm) = bioma0 * 0.15
204         tr(:,:,:,jpgsi,Kmm) = bioma0 * 5.e-6
205         tr(:,:,:,jpphy,Kmm) = bioma0
206         tr(:,:,:,jpdia,Kmm) = bioma0
207         tr(:,:,:,jpzoo,Kmm) = bioma0
208         tr(:,:,:,jpmes,Kmm) = bioma0
209         tr(:,:,:,jpfer,Kmm) = 0.6E-9
210         tr(:,:,:,jpsfe,Kmm) = bioma0 * 5.e-6
211         tr(:,:,:,jpdfe,Kmm) = bioma0 * 5.e-6
212         tr(:,:,:,jpnfe,Kmm) = bioma0 * 5.e-6
213         tr(:,:,:,jpnch,Kmm) = bioma0 * 12. / 55.
214         tr(:,:,:,jpdch,Kmm) = bioma0 * 12. / 55.
215         tr(:,:,:,jpno3,Kmm) = no3
216         tr(:,:,:,jpnh4,Kmm) = bioma0
217         IF( ln_ligand) THEN
218            tr(:,:,:,jplgw,Kmm) = 0.6E-9
219         ENDIF
220         IF( ln_p5z ) THEN
221            tr(:,:,:,jpdon,Kmm) = bioma0
222            tr(:,:,:,jpdop,Kmm) = bioma0
223            tr(:,:,:,jppon,Kmm) = bioma0
224            tr(:,:,:,jppop,Kmm) = bioma0
225            tr(:,:,:,jpgon,Kmm) = bioma0
226            tr(:,:,:,jpgop,Kmm) = bioma0
227            tr(:,:,:,jpnph,Kmm) = bioma0
228            tr(:,:,:,jppph,Kmm) = bioma0
229            tr(:,:,:,jppic,Kmm) = bioma0
230            tr(:,:,:,jpnpi,Kmm) = bioma0
231            tr(:,:,:,jpppi,Kmm) = bioma0
232            tr(:,:,:,jpndi,Kmm) = bioma0
233            tr(:,:,:,jppdi,Kmm) = bioma0
234            tr(:,:,:,jppfe,Kmm) = bioma0 * 5.e-6
235            tr(:,:,:,jppch,Kmm) = bioma0 * 12. / 55.
236         ENDIF
237         ! initialize the half saturation constant for silicate
238         ! ----------------------------------------------------
239         xksi(:,:)    = 2.e-6
240         xksimax(:,:) = xksi(:,:)
241         IF( ln_p5z ) THEN
242            sized(:,:,:) = 1.0
243            sizen(:,:,:) = 1.0
244            sized(:,:,:) = 1.0
245         ENDIF
246      END IF
247
248
249      CALL p4z_sink_init         !  vertical flux of particulate organic matter
250      CALL p4z_opt_init          !  Optic: PAR in the water column
251      IF( ln_p4z ) THEN
252         CALL p4z_lim_init       !  co-limitations by the various nutrients
253         CALL p4z_prod_init      !  phytoplankton growth rate over the global ocean.
254      ELSE
255         CALL p5z_lim_init       !  co-limitations by the various nutrients
256         CALL p5z_prod_init      !  phytoplankton growth rate over the global ocean.
257      ENDIF
258      CALL p4z_bc_init( Kmm )    !  boundary conditions
259      CALL p4z_fechem_init       !  Iron chemistry
260      CALL p4z_rem_init          !  remineralisation
261      CALL p4z_poc_init          !  remineralisation of organic particles
262      IF( ln_ligand ) &
263         & CALL p4z_ligand_init  !  remineralisation of organic ligands
264
265      IF( ln_p4z ) THEN
266         CALL p4z_mort_init      !  phytoplankton mortality
267         CALL p4z_micro_init     !  microzooplankton
268         CALL p4z_meso_init      !  mesozooplankton
269      ELSE
270         CALL p5z_mort_init      !  phytoplankton mortality
271         CALL p5z_micro_init     !  microzooplankton
272         CALL p5z_meso_init      !  mesozooplankton
273      ENDIF
274      CALL p4z_lys_init          !  calcite saturation
275      IF( .NOT.l_co2cpl ) &
276        & CALL p4z_flx_init      !  gas exchange
277
278      ! Initialization of the sediment model
279      IF( ln_sediment)   &
280        & CALL sed_init ! Initialization of the sediment model
281
282      CALL p4z_sed_init          ! loss of organic matter in the sediments
283
284      IF(lwp) WRITE(numout,*) 
285      IF(lwp) WRITE(numout,*) '   ==>>>   Initialization of PISCES tracers done'
286      IF(lwp) WRITE(numout,*) 
287      !
288   END SUBROUTINE p4z_ini
289
290
291   SUBROUTINE p2z_ini( Kmm )
292      !!----------------------------------------------------------------------
293      !!                   ***  ROUTINE p2z_ini ***
294      !!
295      !! ** Purpose :   Initialisation of the LOBSTER biochemical model
296      !!----------------------------------------------------------------------
297      !
298      USE p2zopt
299      USE p2zexp
300      USE p2zbio
301      USE p2zsed
302      !
303      INTEGER, INTENT(in)  ::  Kmm      ! time level indices
304      INTEGER  ::  ji, jj, jk, jn, ierr
305      CHARACTER(len = 10)  ::  cltra
306      !!----------------------------------------------------------------------
307
308      IF(lwp) WRITE(numout,*)
309      IF(lwp) WRITE(numout,*) ' p2z_ini :   LOBSTER biochemical model initialisation'
310      IF(lwp) WRITE(numout,*) ' ~~~~~~~'
311
312      ierr =        sms_pisces_alloc()         
313      ierr = ierr + p2z_exp_alloc()
314      !
315      CALL mpp_sum( 'trcini_pisces', ierr )
316      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'p2z_ini: unable to allocate LOBSTER arrays' )
317
318      DO jn = 1, jptra
319        cltra = ctrcnm(jn) 
320        IF( cltra == 'DET' )   jpdet = jn       !: detritus                    [mmoleN/m3]
321        IF( cltra == 'ZOO' )   jpzoo = jn       !: zooplancton concentration   [mmoleN/m3]
322        IF( cltra == 'PHY' )   jpphy = jn       !: phytoplancton concentration [mmoleN/m3]
323        IF( cltra == 'NO3' )   jpno3 = jn       !: nitrate concentration       [mmoleN/m3]
324        IF( cltra == 'NH4' )   jpnh4 = jn       !: ammonium concentration      [mmoleN/m3]
325        IF( cltra == 'DOM' )   jpdom = jn       !: dissolved organic matter    [mmoleN/m3]
326      ENDDO
327
328      jpkb = 10        !  last level where depth less than 200 m
329      DO jk = jpkm1, 1, -1
330         IF( gdept_1d(jk) > 200. ) jpkb = jk 
331      END DO
332      IF (lwp) WRITE(numout,*)
333      IF (lwp) WRITE(numout,*) ' first vertical layers where biology is active (200m depth ) ', jpkb
334      IF (lwp) WRITE(numout,*)
335      jpkbm1 = jpkb - 1
336      !
337
338
339      ! LOBSTER initialisation for GYRE : init NO3=f(density) by asklod AS Kremeur 2005-07
340      ! ----------------------
341      IF( .NOT. ln_rsttr ) THEN             ! in case of  no restart
342         tr(:,:,:,jpdet,Kmm) = 0.1 * tmask(:,:,:)
343         tr(:,:,:,jpzoo,Kmm) = 0.1 * tmask(:,:,:)
344         tr(:,:,:,jpnh4,Kmm) = 0.1 * tmask(:,:,:)
345         tr(:,:,:,jpphy,Kmm) = 0.1 * tmask(:,:,:)
346         tr(:,:,:,jpdom,Kmm) = 1.0 * tmask(:,:,:)
347         WHERE( rhd(:,:,:) <= 24.5e-3 )  ;  tr(:,:,:,jpno3,Kmm) = 2._wp * tmask(:,:,:)
348         ELSE WHERE                      ;  tr(:,:,:,jpno3,Kmm) = ( 15.55 * ( rhd(:,:,:) * 1000. ) - 380.11 ) * tmask(:,:,:)
349         END WHERE                       
350      ENDIF
351      !                        !  Namelist read
352      CALL p2z_opt_init        !  Optics parameters
353      CALL p2z_sed_init        !  sedimentation
354      CALL p2z_bio_init        !  biology
355      CALL p2z_exp_init( Kmm ) !  export
356      !
357      IF(lwp) WRITE(numout,*) 
358      IF(lwp) WRITE(numout,*) '   ==>>>   Initialization of LOBSTER tracers done'
359      IF(lwp) WRITE(numout,*) 
360      !
361   END SUBROUTINE p2z_ini
362
363   !!======================================================================
364END MODULE trcini_pisces
Note: See TracBrowser for help on using the repository browser.