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.
sms_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/sms_pisces.F90 @ 6453

Last change on this file since 6453 was 6453, checked in by aumont, 8 years ago

New developments of PISCES (QUOTA, ligands, lability, ...)

  • Property svn:keywords set to Id
File size: 9.1 KB
Line 
1MODULE 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   !!             3.6  !  2015-05  (O. Aumont) PISCES quota
9   !!----------------------------------------------------------------------
10#if defined key_pisces || defined key_pisces_reduced || defined key_pisces_quota 
11   !!----------------------------------------------------------------------
12   !!   'key_pisces*'                                         PISCES model
13   !!----------------------------------------------------------------------
14   USE par_oce
15   USE par_trc
16
17   IMPLICIT NONE
18   PUBLIC
19
20   INTEGER ::   numnatp_ref = -1           !! Logical units for namelist pisces
21   INTEGER ::   numnatp_cfg = -1           !! Logical units for namelist pisces
22   INTEGER ::   numonp      = -1           !! Logical unit for namelist pisces output
23
24   !!*  Biological fluxes for light : variables shared by pisces & lobster
25   INTEGER , ALLOCATABLE, SAVE, DIMENSION(:,:)   ::  neln    !: number of T-levels + 1 in the euphotic layer
26   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::  heup    !: euphotic layer depth
27   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::  heup_01 !: Absolute euphotic layer depth
28   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  etot    !: par (photosynthetic available radiation)
29   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::  xksi    !:  LOBSTER : zooplakton closure
30   !                                                         !:  PISCES  : silicon dependant half saturation
31
32#if defined key_pisces || defined key_pisces_quota 
33   !!*  Time variables
34   INTEGER  ::   nrdttrc           !: ???
35   INTEGER  ::   ndayflxtr         !: ???
36   REAL(wp) ::   rfact , rfactr    !: ???
37   REAL(wp) ::   rfact2, rfact2r   !: ???
38   REAL(wp) ::   xstep             !: Time step duration for biology
39   REAL(wp) ::   ryyss             !: number of seconds per year
40   REAL(wp) ::   r1_ryyss          !: inverse number of seconds per year
41
42   !!*  Biological parameters
43   INTEGER  ::   niter1max, niter2max   !: Maximum number of iterations for sinking
44   REAL(wp) ::   rno3              !: ???
45   REAL(wp) ::   o2ut              !: ???
46   REAL(wp) ::   po4r              !: ???
47   REAL(wp) ::   rdenit            !: ???
48   REAL(wp) ::   rdenita           !: ???
49   REAL(wp) ::   o2nit             !: ???
50   REAL(wp) ::   wsbio, wsbio2     !: ???
51   REAL(wp) ::   wsbio2max         !: ???
52   REAL(wp) ::   wsbio2scale       !: ???
53   REAL(wp) ::   xkmort            !: ???
54   REAL(wp) ::   ferat3            !: ???
55#if defined key_ligand
56   REAL(wp) ::   wfep              !: ???
57   REAL(wp) ::   ldocp           !: ???
58   REAL(wp) ::   ldocz           !: ???
59   REAL(wp) ::   lthet           !: ???
60#endif
61
62
63   !!*  diagnostic parameters
64   REAL(wp) ::  tpp                !: total primary production
65   REAL(wp) ::  t_oce_co2_exp      !: total carbon export
66   REAL(wp) ::  t_oce_co2_flx      !: Total ocean carbon flux
67   REAL(wp) ::  t_oce_co2_flx_cum  !: Cumulative Total ocean carbon flux
68   REAL(wp) ::  t_atm_co2_flx      !: global mean of atmospheric pco2
69
70   !!* restoring
71   LOGICAL  ::  ln_pisdmp          !: restoring or not of nutrients to a mean value
72   INTEGER  ::  nn_pisdmp          !: frequency of relaxation or not of nutrients to a mean value
73
74   !!* Mass conservation
75   LOGICAL  ::  ln_check_mass      !: Flag to check mass conservation
76
77   !!*  Biological fluxes for primary production
78   REAL(wp), ALLOCATABLE, SAVE,   DIMENSION(:,:)  ::   xksimax    !: ???
79   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:)  ::   biron      !: bioavailable fraction of iron
80#if defined key_ligand
81   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:)  ::   plig       !: proportion of iron organically complexed
82#endif
83
84   !!*  SMS for the organic matter
85   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   xfracal    !: ??
86   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   nitrfac    !: ??
87   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   orem       !: ??
88   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   xdiss      !: ??
89   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   prodcal    !: Calcite production
90   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   prodpoc    !: Calcite production
91   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   conspoc    !: Calcite production
92   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   prodgoc    !: Calcite production
93   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   consgoc    !: Calcite production
94
95
96   !!* Variable for chemistry of the CO2 cycle
97   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ak13       !: ???
98   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ak23       !: ???
99   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   aksp       !: ???
100   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   hi         !: ???
101   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   excess     !: ???
102
103   !!* Temperature dependancy of SMS terms
104   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tgfunc    !: Temp. dependancy of various biological rates
105   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tgfunc2   !: Temp. dependancy of mesozooplankton rates
106
107#if defined key_kriest
108   !!*  Kriest parameter for aggregation
109   REAL(wp) ::   xkr_eta                            !: Sinking  exponent
110   REAL(wp) ::   xkr_zeta                           !:  N content exponent
111   REAL(wp) ::   xkr_ncontent                       !:  N content factor   
112   REAL(wp) ::   xkr_massp                          !:
113   REAL(wp) ::   xkr_mass_min, xkr_mass_max         !:  Minimum, Maximum mass for Aggregates
114#endif
115
116#endif
117
118# if defined key_pisces_quota
119   !!*  Biological parameters
120   REAL(wp) ::   no3rat3           !: ???
121   REAL(wp) ::   po4rat3           !: ???
122
123   !!*  SMS for the organic matter
124   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   sizen      !: size of diatoms
125   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   sizep      !: size of diatoms
126   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   sized      !: size of diatoms
127
128#endif
129   !!----------------------------------------------------------------------
130   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
131   !! $Id$
132   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
133   !!----------------------------------------------------------------------
134CONTAINS
135
136   INTEGER FUNCTION sms_pisces_alloc()
137      !!----------------------------------------------------------------------
138      !!        *** ROUTINE sms_pisces_alloc ***
139      !!----------------------------------------------------------------------
140      USE lib_mpp , ONLY: ctl_warn
141#if defined key_pisces_quota
142      INTEGER ::   ierr(6)        ! Local variables
143#else
144      INTEGER ::   ierr(5)        ! Local variables
145#endif
146      !!----------------------------------------------------------------------
147      ierr(:) = 0
148      !*  Biological fluxes for light : shared variables for pisces & lobster
149      ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj),    &
150      &         heup_01(jpi,jpj), xksi(jpi,jpj), STAT=ierr(1) )
151      !
152#if defined key_pisces || defined key_pisces_quota
153      !*  Biological fluxes for primary production
154      ALLOCATE( xksimax(jpi,jpj)     , biron   (jpi,jpj,jpk),       &
155#if defined key_ligand
156      &         plig(jpi,jpj,jpk)    ,                              &
157#endif
158         &      STAT=ierr(2) )
159         !
160      !*  SMS for the organic matter
161      ALLOCATE( xfracal (jpi,jpj,jpk), nitrfac (jpi,jpj,jpk),      &
162         &      orem    (jpi,jpj,jpk),                             &
163         &      prodcal(jpi,jpj,jpk),  xdiss   (jpi,jpj,jpk),      & 
164         &      prodpoc(jpi,jpj,jpk) , conspoc(jpi,jpj,jpk),       &
165         &      prodgoc(jpi,jpj,jpk) , consgoc(jpi,jpj,jpk),     STAT=ierr(3) )
166
167      !* Variable for chemistry of the CO2 cycle
168      ALLOCATE( ak13  (jpi,jpj,jpk) ,                              &
169         &      ak23(jpi,jpj,jpk)    , aksp  (jpi,jpj,jpk) ,       &
170         &      hi  (jpi,jpj,jpk)    , excess(jpi,jpj,jpk) ,     STAT=ierr(4) )
171         !
172      !* Temperature dependancy of SMS terms
173      ALLOCATE( tgfunc(jpi,jpj,jpk)  , tgfunc2(jpi,jpj,jpk) ,    STAT=ierr(5) )
174         !
175#endif
176#if defined key_pisces_quota
177      !*  Size of phytoplankton cells
178      ALLOCATE( sizen   (jpi,jpj,jpk), sizep   (jpi,jpj,jpk),      &
179         &      sized   (jpi,jpj,jpk), STAT=ierr(6) )
180         !
181#endif
182
183      !
184      sms_pisces_alloc = MAXVAL( ierr )
185      !
186      IF( sms_pisces_alloc /= 0 )   CALL ctl_warn('sms_pisces_alloc: failed to allocate arrays') 
187      !
188   END FUNCTION sms_pisces_alloc
189
190#else
191   !!----------------------------------------------------------------------   
192   !!  Empty module :                                     NO PISCES model
193   !!----------------------------------------------------------------------
194#endif
195   
196   !!======================================================================   
197END MODULE sms_pisces   
Note: See TracBrowser for help on using the repository browser.