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 branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES – NEMO

source: branches/CNRS/dev_r6270_PISCES_QUOTA/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90 @ 8003

Last change on this file since 8003 was 8003, checked in by aumont, 7 years ago

modification in the code to remove unnecessary parts such as kriest and non iomput options

  • Property svn:keywords set to Id
File size: 16.3 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   !!             3.6  !  2015-05  (O. Aumont) PISCES quota
13   !!----------------------------------------------------------------------
14#if defined key_pisces || defined key_pisces_reduced || defined key_pisces_quota
15   !!----------------------------------------------------------------------
16   !!   'key_pisces*'                                       PISCES bio-model
17   !!----------------------------------------------------------------------
18   !! trc_ini_pisces   : PISCES biochemical model initialisation
19   !!----------------------------------------------------------------------
20   USE par_trc         ! TOP parameters
21   USE oce_trc         !  shared variables between ocean and passive tracers
22   USE trc             !  passive tracers common variables
23   USE sms_pisces      !  PISCES Source Minus Sink variables
24
25   IMPLICIT NONE
26   PRIVATE
27
28   PUBLIC   trc_ini_pisces   ! called by trcini.F90 module
29
30
31#  include "top_substitute.h90"
32   !!----------------------------------------------------------------------
33   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
34   !! $Id$
35   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
36   !!----------------------------------------------------------------------
37CONTAINS
38
39   SUBROUTINE trc_ini_pisces
40      !!----------------------------------------------------------------------
41      !!                   ***  ROUTINE trc_ini_pisces ***
42      !!
43      !! ** Purpose :   Initialisation of the PISCES biochemical model
44      !!----------------------------------------------------------------------
45
46      SELECT CASE ( nn_p4z )
47      !
48        CASE(1)          ;   CALL p2z_ini   !  LOBSTER
49        CASE(2)          ;   CALL p4z_ini   !  PISCES
50        CASE(3)          ;   CALL p5z_ini   !  PISCES QUOTA
51
52      END SELECT
53
54   END SUBROUTINE trc_ini_pisces
55
56   SUBROUTINE p5z_ini
57      !!----------------------------------------------------------------------
58      !!                   ***  ROUTINE p5z_ini ***
59      !!
60      !! ** Purpose :   Initialisation of the PISCES biochemical model
61      !!                with variable stoichiometry
62      !!----------------------------------------------------------------------
63#if defined key_pisces_quota 
64      !
65      USE p5zsms          ! Main P4Z routine
66      USE p4zche          !  Chemical model
67      USE p5zsink         !  vertical flux of particulate matter due to sinking
68      USE p4zopt          !  optical model
69      USE p4zsbc          !  Boundary conditions
70      USE p4zfechem       !  Iron chemistry
71      USE p5zrem          !  Remineralisation of organic matter
72      USE p5zpoc          !  Remineralization of organic particles
73      USE p4zligand       !  Remineralization of organic ligands
74      USE p4zflx          !  Gas exchange
75      USE p5zlim          !  Co-limitations of differents nutrients
76      USE p5zprod         !  Growth rate of the 2 phyto groups
77      USE p5zmicro        !  Sources and sinks of microzooplankton
78      USE p5zmeso         !  Sources and sinks of mesozooplankton
79      USE p5zmort         !  Mortality terms for phytoplankton
80      USE p4zlys          !  Calcite saturation
81      USE p5zsed          !  Sedimentation & burial
82      !
83      REAL(wp), SAVE :: sco2   =  2.312e-3_wp
84      REAL(wp), SAVE :: alka0  =  2.423e-3_wp
85      REAL(wp), SAVE :: oxyg0  =  177.6e-6_wp 
86      REAL(wp), SAVE :: po4    =  2.174e-6_wp 
87      REAL(wp), SAVE :: bioma0 =  1.000e-8_wp 
88      REAL(wp), SAVE :: silic1 =  91.65e-6_wp 
89      REAL(wp), SAVE :: no3    =  31.04e-6_wp * 7.625_wp
90      !
91      INTEGER  ::  ierr
92      !!----------------------------------------------------------------------
93
94      IF(lwp) WRITE(numout,*)
95      IF(lwp) WRITE(numout,*) ' p5z_ini :   PISCES biochemical model initialisation'
96      IF(lwp) WRITE(numout,*) '             With variable stoichiometry'
97      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
98
99                                                 ! Allocate PISCES arrays
100      ierr =         sms_pisces_alloc()         
101      ierr = ierr +  p4z_che_alloc()
102      ierr = ierr +  p5z_sink_alloc()
103      ierr = ierr +  p4z_opt_alloc()
104      ierr = ierr +  p5z_lim_alloc()
105      ierr = ierr +  p5z_prod_alloc()
106      ierr = ierr +  p5z_rem_alloc()
107      ierr = ierr +  p4z_flx_alloc()
108      ierr = ierr +  p5z_sed_alloc()
109      !
110      IF( lk_mpp    )   CALL mpp_sum( ierr )
111      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'pisces_alloc: unable to allocate PISCES arrays' )
112      !
113      ryyss    = nyear_len(1) * rday    ! number of seconds per year
114      r1_ryyss = 1. / ryyss
115      !
116      CALL p5z_sms_init       !  Maint routine
117      !                                            ! Time-step
118      ! Set biological ratios
119      ! ---------------------
120      rno3    =  16._wp / 122._wp
121      po4r    =   1._wp / 122._wp
122      o2nit   =  32._wp / 122._wp
123      rdenit  = 105._wp /  16._wp
124      rdenita =   3._wp /  5._wp
125      o2ut    = 133._wp / 122._wp
126      no3rat3 = no3rat3 / rno3
127      po4rat3 = po4rat3 / po4r
128
129      ! Initialization of tracer concentration in case of  no restart
130      !--------------------------------------------------------------
131      IF( .NOT. ln_rsttr ) THEN 
132         
133         trn(:,:,:,jpdic) = sco2
134         trn(:,:,:,jpdoc) = bioma0
135         trn(:,:,:,jpdon) = bioma0
136         trn(:,:,:,jpdop) = bioma0
137         trn(:,:,:,jptal) = alka0
138         trn(:,:,:,jpoxy) = oxyg0
139         trn(:,:,:,jpcal) = bioma0
140         trn(:,:,:,jppo4) = po4 / po4r
141         trn(:,:,:,jppoc) = bioma0
142         trn(:,:,:,jppon) = bioma0
143         trn(:,:,:,jppop) = bioma0
144         trn(:,:,:,jpgoc) = bioma0
145         trn(:,:,:,jpgon) = bioma0
146         trn(:,:,:,jpgop) = bioma0
147         trn(:,:,:,jpbfe) = bioma0 * 5.e-6
148         trn(:,:,:,jpsil) = silic1
149         trn(:,:,:,jpdsi) = bioma0 * 0.15
150         trn(:,:,:,jpgsi) = bioma0 * 5.e-6
151         trn(:,:,:,jpphy) = bioma0
152         trn(:,:,:,jpnph) = bioma0
153         trn(:,:,:,jppph) = bioma0
154         trn(:,:,:,jppic) = bioma0
155         trn(:,:,:,jpnpi) = bioma0
156         trn(:,:,:,jpppi) = bioma0
157         trn(:,:,:,jpdia) = bioma0
158         trn(:,:,:,jpndi) = bioma0
159         trn(:,:,:,jppdi) = bioma0
160         trn(:,:,:,jpzoo) = bioma0
161         trn(:,:,:,jpmes) = bioma0
162         trn(:,:,:,jpfer) = 0.6E-9
163         trn(:,:,:,jpsfe) = bioma0 * 5.e-6
164         trn(:,:,:,jppfe) = bioma0 * 5.e-6
165         trn(:,:,:,jpdfe) = bioma0 * 5.e-6
166         trn(:,:,:,jpnfe) = bioma0 * 5.e-6
167         trn(:,:,:,jpnch) = bioma0 * 12. / 55.
168         trn(:,:,:,jppch) = bioma0 * 12. / 55.
169         trn(:,:,:,jpdch) = bioma0 * 12. / 55.
170         trn(:,:,:,jpno3) = no3
171         trn(:,:,:,jpnh4) = bioma0
172#if defined key_ligand
173         trn(:,:,:,jplgw) = 0.6E-9
174         trn(:,:,:,jpfep) = 0.
175#endif
176
177         ! initialize the half saturation constant for silicate
178         ! ----------------------------------------------------
179         xksi(:,:)    = 2.e-6
180         xksimax(:,:) = xksi(:,:)
181      END IF
182
183      CALL p5z_sink_init      !  vertical flux of particulate organic matter
184      CALL p4z_opt_init       !  Optic: PAR in the water column
185      CALL p5z_lim_init       !  co-limitations by the various nutrients
186      CALL p5z_prod_init      !  phytoplankton growth rate over the global ocean.
187      CALL p4z_sbc_init       !  boundary conditions
188      CALL p4z_fechem_init    !  Iron chemistry
189      CALL p5z_rem_init       !  remineralisation
190      CALL p5z_poc_init       !  remineralisation of organic particles
191#if defined key_ligand
192      CALL p4z_ligand_init    !  remineralisation of organic ligands
193#endif
194      CALL p5z_mort_init      !  phytoplankton mortality
195      CALL p5z_micro_init     !  microzooplankton
196      CALL p5z_meso_init      !  mesozooplankton
197      CALL p4z_lys_init       !  calcite saturation
198      CALL p4z_flx_init       !  gas exchange
199
200      ndayflxtr = 0
201
202      IF(lwp) WRITE(numout,*) 
203      IF(lwp) WRITE(numout,*) 'Initialization of PISCES tracers done'
204      IF(lwp) WRITE(numout,*) 
205#endif
206      !
207   END SUBROUTINE p5z_ini
208
209   SUBROUTINE p4z_ini
210      !!----------------------------------------------------------------------
211      !!                   ***  ROUTINE p4z_ini ***
212      !!
213      !! ** Purpose :   Initialisation of the PISCES biochemical model
214      !!----------------------------------------------------------------------
215#if defined key_pisces 
216      !
217      USE p4zsms          ! Main P4Z routine
218      USE p4zche          !  Chemical model
219      USE p4zsink         !  vertical flux of particulate matter due to sinking
220      USE p4zopt          !  optical model
221      USE p4zsbc          !  Boundary conditions
222      USE p4zfechem       !  Iron chemistry
223      USE p4zrem          !  Remineralisation of organic matter
224      USE p4zpoc          !  Remineralisation of organic particles
225      USE p4zligand       !  Remineralization of organic ligands
226      USE p4zflx          !  Gas exchange
227      USE p4zlim          !  Co-limitations of differents nutrients
228      USE p4zprod         !  Growth rate of the 2 phyto groups
229      USE p4zmicro        !  Sources and sinks of microzooplankton
230      USE p4zmeso         !  Sources and sinks of mesozooplankton
231      USE p4zmort         !  Mortality terms for phytoplankton
232      USE p4zlys          !  Calcite saturation
233      USE p4zsed          !  Sedimentation & burial
234      !
235      REAL(wp), SAVE :: sco2   =  2.312e-3_wp
236      REAL(wp), SAVE :: alka0  =  2.423e-3_wp
237      REAL(wp), SAVE :: oxyg0  =  177.6e-6_wp
238      REAL(wp), SAVE :: po4    =  2.174e-6_wp
239      REAL(wp), SAVE :: bioma0 =  1.000e-8_wp
240      REAL(wp), SAVE :: silic1 =  91.65e-6_wp
241      REAL(wp), SAVE :: no3    =  31.04e-6_wp * 7.625_wp
242      !
243      INTEGER  ::  ierr
244      !!----------------------------------------------------------------------
245
246      IF(lwp) WRITE(numout,*)
247      IF(lwp) WRITE(numout,*) ' p4z_ini :   PISCES biochemical model initialisation'
248      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
249
250                                                 ! Allocate PISCES arrays
251      ierr =         sms_pisces_alloc()
252      ierr = ierr +  p4z_che_alloc()
253      ierr = ierr +  p4z_sink_alloc()
254      ierr = ierr +  p4z_opt_alloc()
255      ierr = ierr +  p4z_lim_alloc()
256      ierr = ierr +  p4z_prod_alloc()
257      ierr = ierr +  p4z_rem_alloc()
258      ierr = ierr +  p4z_flx_alloc()
259      ierr = ierr +  p4z_sed_alloc()
260      !
261      IF( lk_mpp    )   CALL mpp_sum( ierr )
262      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'pisces_alloc: unable to allocate PISCES arrays' )
263      !
264      ryyss    = nyear_len(1) * rday    ! number of seconds per year
265      r1_ryyss = 1. / ryyss
266      !
267
268      CALL p4z_sms_init       !  Maint routine
269      !                                            ! Time-step
270      ! Set biological ratios
271      ! ---------------------
272      rno3    =  16._wp / 122._wp
273      po4r    =   1._wp / 122._wp
274      o2nit   =  32._wp / 122._wp
275      o2ut    = 133._wp / 122._wp
276      rdenit  =  ( ( o2ut + o2nit ) * 0.80 - rno3 - rno3 * 0.60 ) / rno3
277      rdenita =   3._wp /  5._wp
278
279
280      ! Initialization of tracer concentration in case of  no restart
281      !--------------------------------------------------------------
282      IF( .NOT. ln_rsttr ) THEN
283
284         trn(:,:,:,jpdic) = sco2
285         trn(:,:,:,jpdoc) = bioma0
286         trn(:,:,:,jptal) = alka0
287         trn(:,:,:,jpoxy) = oxyg0
288         trn(:,:,:,jpcal) = bioma0
289         trn(:,:,:,jppo4) = po4 / po4r
290         trn(:,:,:,jppoc) = bioma0
291         trn(:,:,:,jpgoc) = bioma0
292         trn(:,:,:,jpbfe) = bioma0 * 5.e-6
293         trn(:,:,:,jpsil) = silic1
294         trn(:,:,:,jpdsi) = bioma0 * 0.15
295         trn(:,:,:,jpgsi) = bioma0 * 5.e-6
296         trn(:,:,:,jpphy) = bioma0
297         trn(:,:,:,jpdia) = bioma0
298         trn(:,:,:,jpzoo) = bioma0
299         trn(:,:,:,jpmes) = bioma0
300         trn(:,:,:,jpfer) = 0.6E-9
301         trn(:,:,:,jpsfe) = bioma0 * 5.e-6
302         trn(:,:,:,jpdfe) = bioma0 * 5.e-6
303         trn(:,:,:,jpnfe) = bioma0 * 5.e-6
304         trn(:,:,:,jpnch) = bioma0 * 12. / 55.
305         trn(:,:,:,jpdch) = bioma0 * 12. / 55.
306         trn(:,:,:,jpno3) = no3
307         trn(:,:,:,jpnh4) = bioma0
308#if defined key_ligand
309         trn(:,:,:,jplgw) = 0.6E-9
310         trn(:,:,:,jpfep) = 0.
311#endif
312
313         ! initialize the half saturation constant for silicate
314         ! ----------------------------------------------------
315         xksi(:,:)    = 2.e-6
316         xksimax(:,:) = xksi(:,:)
317      END IF
318
319      CALL p4z_sink_init      !  vertical flux of particulate organic matter
320      CALL p4z_opt_init       !  Optic: PAR in the water column
321      CALL p4z_lim_init       !  co-limitations by the various nutrients
322      CALL p4z_prod_init      !  phytoplankton growth rate over the global ocean.
323      CALL p4z_sbc_init       !  boundary conditions
324      CALL p4z_fechem_init    !  Iron chemistry
325      CALL p4z_rem_init       !  remineralisation
326      CALL p4z_poc_init       !  remineralization of organic particles
327#if defined key_ligand
328      CALL p4z_ligand_init    !  remineralisation of organic ligands
329#endif
330      CALL p4z_mort_init      !  phytoplankton mortality
331      CALL p4z_micro_init     !  microzooplankton
332      CALL p4z_meso_init      !  mesozooplankton
333      CALL p4z_lys_init       !  calcite saturation
334      CALL p4z_flx_init       !  gas exchange
335
336      ndayflxtr = 0
337
338      IF(lwp) WRITE(numout,*)
339      IF(lwp) WRITE(numout,*) 'Initialization of PISCES tracers done'
340      IF(lwp) WRITE(numout,*)
341#endif
342      !
343   END SUBROUTINE p4z_ini
344
345   SUBROUTINE p2z_ini
346      !!----------------------------------------------------------------------
347      !!                   ***  ROUTINE p2z_ini ***
348      !!
349      !! ** Purpose :   Initialisation of the LOBSTER biochemical model
350      !!----------------------------------------------------------------------
351#if defined key_pisces_reduced 
352      !
353      USE p2zopt
354      USE p2zexp
355      USE p2zbio
356      USE p2zsed
357      !
358      INTEGER  ::  ji, jj, jk, ierr
359      !!----------------------------------------------------------------------
360
361      IF(lwp) WRITE(numout,*)
362      IF(lwp) WRITE(numout,*) ' p2z_ini :   LOBSTER biochemical model initialisation'
363      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
364
365      ierr =        sms_pisces_alloc()         
366      ierr = ierr + p2z_exp_alloc()
367      !
368      IF( lk_mpp    )   CALL mpp_sum( ierr )
369      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'p2z_ini: unable to allocate LOBSTER arrays' )
370
371      ! LOBSTER initialisation for GYRE : init NO3=f(density) by asklod AS Kremeur 2005-07
372      ! ----------------------
373      IF( .NOT. ln_rsttr ) THEN             ! in case of  no restart
374         trn(:,:,:,jpdet) = 0.1 * tmask(:,:,:)
375         trn(:,:,:,jpzoo) = 0.1 * tmask(:,:,:)
376         trn(:,:,:,jpnh4) = 0.1 * tmask(:,:,:)
377         trn(:,:,:,jpphy) = 0.1 * tmask(:,:,:)
378         trn(:,:,:,jpdom) = 1.0 * tmask(:,:,:)
379         WHERE( rhd(:,:,:) <= 24.5e-3 )  ;  trn(:,:,:,jpno3 ) = 2._wp * tmask(:,:,:)
380         ELSE WHERE                      ;  trn(:,:,:,jpno3) = ( 15.55 * ( rhd(:,:,:) * 1000. ) - 380.11 ) * tmask(:,:,:)
381         END WHERE                       
382      ENDIF
383      !                       !  Namelist read
384      CALL p2z_opt_init       !  Optics parameters
385      CALL p2z_sed_init       !  sedimentation
386      CALL p2z_bio_init       !  biology
387      CALL p2z_exp_init       !  export
388      !
389      IF(lwp) WRITE(numout,*) 
390      IF(lwp) WRITE(numout,*) 'Initialization of LOBSTER tracers done'
391      IF(lwp) WRITE(numout,*) 
392#endif
393      !
394   END SUBROUTINE p2z_ini
395#else
396   !!----------------------------------------------------------------------
397   !!   Dummy module                            No PISCES biochemical model
398   !!----------------------------------------------------------------------
399CONTAINS
400   SUBROUTINE trc_ini_pisces             ! Empty routine
401   END SUBROUTINE trc_ini_pisces
402#endif
403
404   !!======================================================================
405END MODULE trcini_pisces
Note: See TracBrowser for help on using the repository browser.