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_r11708_aumont_PISCES_QUOTA/src/TOP/PISCES – NEMO

source: NEMO/branches/2019/dev_r11708_aumont_PISCES_QUOTA/src/TOP/PISCES/trcini_pisces.F90 @ 12537

Last change on this file since 12537 was 12537, checked in by aumont, 4 years ago

Comments in routines have been revised and significantly augmented

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