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 @ 6455

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

upgrade to last revision of 3_6_stable

  • Property svn:keywords set to Id
File size: 9.2 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   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   aphscale   !:
103
104
105   !!* Temperature dependancy of SMS terms
106   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tgfunc    !: Temp. dependancy of various biological rates
107   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tgfunc2   !: Temp. dependancy of mesozooplankton rates
108
109#if defined key_kriest
110   !!*  Kriest parameter for aggregation
111   REAL(wp) ::   xkr_eta                            !: Sinking  exponent
112   REAL(wp) ::   xkr_zeta                           !:  N content exponent
113   REAL(wp) ::   xkr_ncontent                       !:  N content factor   
114   REAL(wp) ::   xkr_massp                          !:
115   REAL(wp) ::   xkr_mass_min, xkr_mass_max         !:  Minimum, Maximum mass for Aggregates
116#endif
117
118#endif
119
120# if defined key_pisces_quota
121   !!*  Biological parameters
122   REAL(wp) ::   no3rat3           !: ???
123   REAL(wp) ::   po4rat3           !: ???
124
125   !!*  SMS for the organic matter
126   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   sizen      !: size of diatoms
127   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   sizep      !: size of diatoms
128   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   sized      !: size of diatoms
129
130#endif
131   !!----------------------------------------------------------------------
132   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
133   !! $Id$
134   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
135   !!----------------------------------------------------------------------
136CONTAINS
137
138   INTEGER FUNCTION sms_pisces_alloc()
139      !!----------------------------------------------------------------------
140      !!        *** ROUTINE sms_pisces_alloc ***
141      !!----------------------------------------------------------------------
142      USE lib_mpp , ONLY: ctl_warn
143#if defined key_pisces_quota
144      INTEGER ::   ierr(6)        ! Local variables
145#else
146      INTEGER ::   ierr(5)        ! Local variables
147#endif
148      !!----------------------------------------------------------------------
149      ierr(:) = 0
150      !*  Biological fluxes for light : shared variables for pisces & lobster
151      ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj),    &
152      &         heup_01(jpi,jpj), xksi(jpi,jpj), STAT=ierr(1) )
153      !
154#if defined key_pisces || defined key_pisces_quota
155      !*  Biological fluxes for primary production
156      ALLOCATE( xksimax(jpi,jpj)     , biron   (jpi,jpj,jpk),       &
157#if defined key_ligand
158      &         plig(jpi,jpj,jpk)    ,                              &
159#endif
160         &      STAT=ierr(2) )
161         !
162      !*  SMS for the organic matter
163      ALLOCATE( xfracal (jpi,jpj,jpk), nitrfac (jpi,jpj,jpk),      &
164         &      orem    (jpi,jpj,jpk),                             &
165         &      prodcal(jpi,jpj,jpk),  xdiss   (jpi,jpj,jpk),      & 
166         &      prodpoc(jpi,jpj,jpk) , conspoc(jpi,jpj,jpk),       &
167         &      prodgoc(jpi,jpj,jpk) , consgoc(jpi,jpj,jpk),     STAT=ierr(3) )
168
169      !* Variable for chemistry of the CO2 cycle
170      ALLOCATE( ak13  (jpi,jpj,jpk) ,                              &
171         &      ak23(jpi,jpj,jpk)    , aksp  (jpi,jpj,jpk) ,       &
172         &      hi  (jpi,jpj,jpk)    , excess(jpi,jpj,jpk) ,       &
173         &      aphscale(jpi,jpj,jpk),                           STAT=ierr(4) )
174         !
175      !* Temperature dependancy of SMS terms
176      ALLOCATE( tgfunc(jpi,jpj,jpk)  , tgfunc2(jpi,jpj,jpk) ,    STAT=ierr(5) )
177         !
178#endif
179#if defined key_pisces_quota
180      !*  Size of phytoplankton cells
181      ALLOCATE( sizen   (jpi,jpj,jpk), sizep   (jpi,jpj,jpk),      &
182         &      sized   (jpi,jpj,jpk), STAT=ierr(6) )
183         !
184#endif
185
186      !
187      sms_pisces_alloc = MAXVAL( ierr )
188      !
189      IF( sms_pisces_alloc /= 0 )   CALL ctl_warn('sms_pisces_alloc: failed to allocate arrays') 
190      !
191   END FUNCTION sms_pisces_alloc
192
193#else
194   !!----------------------------------------------------------------------   
195   !!  Empty module :                                     NO PISCES model
196   !!----------------------------------------------------------------------
197#endif
198   
199   !!======================================================================   
200END MODULE sms_pisces   
Note: See TracBrowser for help on using the repository browser.