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/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/PISCES – NEMO

source: branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90 @ 2690

Last change on this file since 2690 was 2690, checked in by gm, 13 years ago

dynamic mem: #785 ; homogeneization of the coding style associated with dyn allocation

  • Property svn:keywords set to Id
File size: 6.6 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   !!----------------------------------------------------------------------
12#if defined key_pisces
13   !!----------------------------------------------------------------------
14   !!   'key_pisces'                                       PISCES bio-model
15   !!----------------------------------------------------------------------
16   !! trc_ini_pisces   : PISCES biochemical model initialisation
17   !!----------------------------------------------------------------------
18   USE par_trc         ! TOP parameters
19   USE sms_pisces      ! Source Minus Sink variables
20   USE trc
21   USE oce_trc         ! ocean variables
22   USE p4zche 
23   USE p4zche          !
24   USE p4zsink         !
25   USE p4zopt          !
26   USE p4zprod         !
27   USE p4zrem          !
28   USE p4zsed          !
29   USE p4zflx          !
30
31   IMPLICIT NONE
32   PRIVATE
33
34   PUBLIC   trc_ini_pisces   ! called by trcini.F90 module
35
36   REAL(wp) :: sco2   =  2.312e-3_wp
37   REAL(wp) :: alka0  =  2.423e-3_wp
38   REAL(wp) :: oxyg0  =  177.6e-6_wp 
39   REAL(wp) :: po4    =  2.174e-6_wp 
40   REAL(wp) :: bioma0 =  1.000e-8_wp 
41   REAL(wp) :: silic1 =  91.65e-6_wp 
42   REAL(wp) :: no3    =  31.04e-6_wp * 7.6_wp
43
44#  include "top_substitute.h90"
45   !!----------------------------------------------------------------------
46   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
47   !! $Id$
48   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
49   !!----------------------------------------------------------------------
50CONTAINS
51
52   SUBROUTINE trc_ini_pisces
53      !!----------------------------------------------------------------------
54      !!                   ***  ROUTINE trc_ini_pisces ***
55      !!
56      !! ** Purpose :   Initialisation of the PISCES biochemical model
57      !!----------------------------------------------------------------------
58      !
59      IF(lwp) WRITE(numout,*)
60      IF(lwp) WRITE(numout,*) ' trc_ini_pisces :   PISCES biochemical model initialisation'
61      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
62
63      CALL pisces_alloc()                          ! Allocate PISCES arrays
64
65      !                                            ! Time-step
66      rfact   = rdttrc(1)                          ! ---------
67      rfactr  = 1. / rfact
68      rfact2  = rfact / FLOAT( nrdttrc )
69      rfact2r = 1. / rfact2
70
71      IF(lwp) WRITE(numout,*) '    Passive Tracer  time step    rfact  = ', rfact, ' rdt = ', rdttra(1)
72      IF(lwp) write(numout,*) '    PISCES  Biology time step    rfact2 = ', rfact2
73
74
75
76      ! Set biological ratios
77      ! ---------------------
78      rno3   = (16.+2.) / 122.
79      po4r   =   1.e0   / 122.
80      o2nit  =  32.     / 122.
81      rdenit =  97.6    /  16.
82      o2ut   = 140.     / 122.
83
84      CALL p4z_che        ! initialize the chemical constants
85
86      ! Initialization of tracer concentration in case of  no restart
87      !--------------------------------------------------------------
88      IF( .NOT. ln_rsttr ) THEN 
89         
90         trn(:,:,:,jpdic) = sco2
91         trn(:,:,:,jpdoc) = bioma0
92         trn(:,:,:,jptal) = alka0
93         trn(:,:,:,jpoxy) = oxyg0
94         trn(:,:,:,jpcal) = bioma0
95         trn(:,:,:,jppo4) = po4 / po4r
96         trn(:,:,:,jppoc) = bioma0
97#  if ! defined key_kriest
98         trn(:,:,:,jpgoc) = bioma0
99         trn(:,:,:,jpbfe) = bioma0 * 5.e-6
100#  else
101         trn(:,:,:,jpnum) = bioma0 / ( 6. * xkr_massp )
102#  endif
103         trn(:,:,:,jpsil) = silic1
104         trn(:,:,:,jpbsi) = bioma0 * 0.15
105         trn(:,:,:,jpdsi) = bioma0 * 5.e-6
106         trn(:,:,:,jpphy) = bioma0
107         trn(:,:,:,jpdia) = bioma0
108         trn(:,:,:,jpzoo) = bioma0
109         trn(:,:,:,jpmes) = bioma0
110         trn(:,:,:,jpfer) = 0.6E-9
111         trn(:,:,:,jpsfe) = bioma0 * 5.e-6
112         trn(:,:,:,jpdfe) = bioma0 * 5.e-6
113         trn(:,:,:,jpnfe) = bioma0 * 5.e-6
114         trn(:,:,:,jpnch) = bioma0 * 12. / 55.
115         trn(:,:,:,jpdch) = bioma0 * 12. / 55.
116         trn(:,:,:,jpno3) = no3
117         trn(:,:,:,jpnh4) = bioma0
118
119         ! initialize the half saturation constant for silicate
120         ! ----------------------------------------------------
121         xksi(:,:)    = 2.e-6
122         xksimax(:,:) = xksi(:,:)
123
124      ENDIF
125
126      IF(lwp) WRITE(numout,*) 'Initialization of PISCES tracers done'
127      IF(lwp) WRITE(numout,*) ' '
128      !
129   END SUBROUTINE trc_ini_pisces
130
131
132   SUBROUTINE pisces_alloc
133      !!----------------------------------------------------------------------
134      !!                     ***  ROUTINE pisces_alloc  ***
135      !!
136      !! ** Purpose :   Allocate all the dynamic arrays of PISCES
137      !!----------------------------------------------------------------------
138      USE p4zint , ONLY : p4z_int_alloc     
139      USE p4zsink, ONLY : p4z_sink_alloc     
140      USE p4zopt , ONLY : p4z_opt_alloc           
141      USE p4zprod, ONLY : p4z_prod_alloc         
142      USE p4zrem , ONLY : p4z_rem_alloc           
143      USE p4zsed , ONLY : p4z_sed_alloc         
144      USE p4zflx , ONLY : p4z_flx_alloc
145      !
146      INTEGER :: ierr
147      !!----------------------------------------------------------------------
148      !
149      ierr =         sms_pisces_alloc()          ! Start of PISCES-related alloc routines...
150      ierr = ierr +     p4z_che_alloc()
151      ierr = ierr +     p4z_int_alloc()
152      ierr = ierr +    p4z_sink_alloc()
153      ierr = ierr +     p4z_opt_alloc()
154      ierr = ierr +    p4z_prod_alloc()
155      ierr = ierr +     p4z_rem_alloc()
156      ierr = ierr +     p4z_sed_alloc()
157      ierr = ierr +     p4z_flx_alloc()
158      !
159      IF( lk_mpp    )   CALL mpp_sum( ierr )
160      IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'pisces_alloc: unable to allocate PISCES arrays' )
161      !
162   END SUBROUTINE pisces_alloc
163
164#else
165   !!----------------------------------------------------------------------
166   !!   Dummy module                            No PISCES biochemical model
167   !!----------------------------------------------------------------------
168CONTAINS
169   SUBROUTINE trc_ini_pisces             ! Empty routine
170   END SUBROUTINE trc_ini_pisces
171#endif
172
173   !!======================================================================
174END MODULE trcini_pisces
Note: See TracBrowser for help on using the repository browser.