[1073] | 1 | MODULE 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 |
---|
[1445] | 7 | !! 3.2 ! 2009-04 (C. Ethe & NEMO team) style |
---|
[1073] | 8 | !!---------------------------------------------------------------------- |
---|
[5266] | 9 | #if defined key_pisces || defined key_pisces_reduced || defined key_pisces_quota |
---|
[1073] | 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! 'key_pisces' PISCES model |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
| 13 | USE par_oce |
---|
| 14 | USE par_trc |
---|
| 15 | |
---|
| 16 | IMPLICIT NONE |
---|
| 17 | PUBLIC |
---|
| 18 | |
---|
[4147] | 19 | INTEGER :: numnatp_ref = -1 !! Logical units for namelist pisces |
---|
| 20 | INTEGER :: numnatp_cfg = -1 !! Logical units for namelist pisces |
---|
| 21 | INTEGER :: numonp = -1 !! Logical unit for namelist pisces output |
---|
[3294] | 22 | |
---|
[3680] | 23 | !!* Biological fluxes for light : variables shared by pisces & lobster |
---|
| 24 | INTEGER , ALLOCATABLE, SAVE, DIMENSION(:,:) :: neln !: number of T-levels + 1 in the euphotic layer |
---|
| 25 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: heup !: euphotic layer depth |
---|
| 26 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: etot !: par (photosynthetic available radiation) |
---|
| 27 | ! |
---|
| 28 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksi !: LOBSTER : zooplakton closure |
---|
| 29 | ! !: PISCES : silicon dependant half saturation |
---|
| 30 | |
---|
[5266] | 31 | #if defined key_pisces || defined key_pisces_quota |
---|
[1445] | 32 | !!* Time variables |
---|
| 33 | INTEGER :: nrdttrc !: ??? |
---|
| 34 | INTEGER :: ndayflxtr !: ??? |
---|
| 35 | REAL(wp) :: rfact , rfactr !: ??? |
---|
| 36 | REAL(wp) :: rfact2, rfact2r !: ??? |
---|
[2528] | 37 | REAL(wp) :: xstep !: Time step duration for biology |
---|
[1073] | 38 | |
---|
[1445] | 39 | !!* Biological parameters |
---|
[3680] | 40 | INTEGER :: niter1max, niter2max !: Maximum number of iterations for sinking |
---|
[1445] | 41 | REAL(wp) :: rno3 !: ??? |
---|
| 42 | REAL(wp) :: o2ut !: ??? |
---|
| 43 | REAL(wp) :: po4r !: ??? |
---|
| 44 | REAL(wp) :: rdenit !: ??? |
---|
[3294] | 45 | REAL(wp) :: rdenita !: ??? |
---|
[1445] | 46 | REAL(wp) :: o2nit !: ??? |
---|
| 47 | REAL(wp) :: wsbio, wsbio2 !: ??? |
---|
| 48 | REAL(wp) :: xkmort !: ??? |
---|
| 49 | REAL(wp) :: ferat3 !: ??? |
---|
[1073] | 50 | |
---|
[3680] | 51 | !!* diagnostic parameters |
---|
| 52 | REAL(wp) :: tpp !: total primary production |
---|
| 53 | REAL(wp) :: t_oce_co2_exp !: total carbon export |
---|
| 54 | REAL(wp) :: t_oce_co2_flx !: Total ocean carbon flux |
---|
| 55 | REAL(wp) :: t_atm_co2_flx !: global mean of atmospheric pco2 |
---|
[1073] | 56 | |
---|
[3680] | 57 | !!* restoring |
---|
| 58 | LOGICAL :: ln_pisdmp !: restoring or not of nutrients to a mean value |
---|
| 59 | INTEGER :: nn_pisdmp !: frequency of relaxation or not of nutrients to a mean value |
---|
[1073] | 60 | |
---|
[3680] | 61 | !!* Mass conservation |
---|
| 62 | LOGICAL :: ln_check_mass !: Flag to check mass conservation |
---|
| 63 | |
---|
[1445] | 64 | !!* Biological fluxes for primary production |
---|
[2715] | 65 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksimax !: ??? |
---|
| 66 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanono3 !: ??? |
---|
| 67 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiatno3 !: ??? |
---|
| 68 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanonh4 !: ??? |
---|
| 69 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiatnh4 !: ??? |
---|
[4529] | 70 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanopo4 !: ??? |
---|
| 71 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiatpo4 !: ??? |
---|
[2715] | 72 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimphy !: ??? |
---|
| 73 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimdia !: ??? |
---|
[5266] | 74 | #if ! defined key_pisces_quota |
---|
[2715] | 75 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: concdfe !: ??? |
---|
| 76 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: concnfe !: ??? |
---|
[5266] | 77 | #endif |
---|
[3294] | 78 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimnfe !: ??? |
---|
| 79 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimdfe !: ??? |
---|
| 80 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimsi !: ??? |
---|
[3680] | 81 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: biron !: bioavailable fraction of iron |
---|
[1073] | 82 | |
---|
[1445] | 83 | !!* SMS for the organic matter |
---|
[2715] | 84 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xfracal !: ?? |
---|
| 85 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac !: ?? |
---|
| 86 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimbac !: ?? |
---|
[3680] | 87 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimbacl !: ?? |
---|
[2715] | 88 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiss !: ?? |
---|
[3680] | 89 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodcal !: Calcite production |
---|
[1073] | 90 | |
---|
[1445] | 91 | !!* Variable for chemistry of the CO2 cycle |
---|
[2715] | 92 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: akb3 !: ??? |
---|
| 93 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak13 !: ??? |
---|
| 94 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak23 !: ??? |
---|
| 95 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aksp !: ??? |
---|
| 96 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: akw3 !: ??? |
---|
| 97 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: borat !: ??? |
---|
| 98 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hi !: ??? |
---|
[3294] | 99 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: excess !: ??? |
---|
[1073] | 100 | |
---|
[3294] | 101 | !!* Temperature dependancy of SMS terms |
---|
| 102 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc !: Temp. dependancy of various biological rates |
---|
| 103 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc2 !: Temp. dependancy of mesozooplankton rates |
---|
| 104 | |
---|
[2715] | 105 | !!* Array used to indicate negative tracer values |
---|
| 106 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnegtr !: ??? |
---|
| 107 | |
---|
[1073] | 108 | #if defined key_kriest |
---|
[1445] | 109 | !!* Kriest parameter for aggregation |
---|
[3780] | 110 | REAL(wp) :: xkr_eta !: Sinking exponent |
---|
| 111 | REAL(wp) :: xkr_zeta !: N content exponent |
---|
| 112 | REAL(wp) :: xkr_ncontent !: N content factor |
---|
| 113 | REAL(wp) :: xkr_massp !: |
---|
| 114 | REAL(wp) :: xkr_mass_min, xkr_mass_max !: Minimum, Maximum mass for Aggregates |
---|
[1073] | 115 | #endif |
---|
| 116 | |
---|
[3680] | 117 | #endif |
---|
[5266] | 118 | |
---|
| 119 | # if defined key_pisces_quota |
---|
| 120 | !!* Biological parameters |
---|
| 121 | REAL(wp) :: no3rat3 !: ??? |
---|
| 122 | REAL(wp) :: po4rat3 !: ??? |
---|
| 123 | |
---|
| 124 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xpicono3 !: ??? |
---|
| 125 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xpiconh4 !: ??? |
---|
| 126 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xpicopo4 !: ??? |
---|
| 127 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanodop !: ??? |
---|
| 128 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xpicodop !: ??? |
---|
| 129 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiatdop !: ??? |
---|
| 130 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanofer !: ??? |
---|
| 131 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xpicofer !: ??? |
---|
| 132 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiatfer !: ??? |
---|
| 133 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimpic !: ??? |
---|
| 134 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimpfe !: ??? |
---|
| 135 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: fvnuptk |
---|
| 136 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: fvpuptk |
---|
| 137 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: fvduptk |
---|
| 138 | |
---|
| 139 | !!* Allometric variations of the quotas |
---|
| 140 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqnnmin !: ??? |
---|
| 141 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqnnmax !: ??? |
---|
| 142 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqpnmin !: ??? |
---|
| 143 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqpnmax !: ??? |
---|
| 144 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqnpmin !: ??? |
---|
| 145 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqnpmax !: ??? |
---|
| 146 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqppmin !: ??? |
---|
| 147 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqppmax !: ??? |
---|
| 148 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqndmin !: ??? |
---|
| 149 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqndmax !: ??? |
---|
| 150 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqpdmin !: ??? |
---|
| 151 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xqpdmax !: ??? |
---|
| 152 | |
---|
| 153 | !!* SMS for the organic matter |
---|
| 154 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizen !: size of diatoms |
---|
| 155 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizep !: size of diatoms |
---|
| 156 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sized !: size of diatoms |
---|
| 157 | |
---|
| 158 | #endif |
---|
[2715] | 159 | !!---------------------------------------------------------------------- |
---|
| 160 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
| 161 | !! $Id$ |
---|
| 162 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 163 | !!---------------------------------------------------------------------- |
---|
| 164 | CONTAINS |
---|
| 165 | |
---|
| 166 | INTEGER FUNCTION sms_pisces_alloc() |
---|
| 167 | !!---------------------------------------------------------------------- |
---|
| 168 | !! *** ROUTINE sms_pisces_alloc *** |
---|
| 169 | !!---------------------------------------------------------------------- |
---|
| 170 | USE lib_mpp , ONLY: ctl_warn |
---|
[5266] | 171 | #if defined key_pisces_quota |
---|
| 172 | INTEGER :: ierr(9) ! Local variables |
---|
| 173 | #else |
---|
[3294] | 174 | INTEGER :: ierr(6) ! Local variables |
---|
[5266] | 175 | #endif |
---|
[2715] | 176 | !!---------------------------------------------------------------------- |
---|
| 177 | ierr(:) = 0 |
---|
[3680] | 178 | !* Biological fluxes for light : shared variables for pisces & lobster |
---|
| 179 | ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj), xksi(jpi,jpj), STAT=ierr(1) ) |
---|
[2715] | 180 | ! |
---|
[5266] | 181 | #if defined key_pisces || defined key_pisces_quota |
---|
[2715] | 182 | !* Biological fluxes for primary production |
---|
[3680] | 183 | ALLOCATE( xksimax(jpi,jpj) , biron (jpi,jpj,jpk), & |
---|
[3294] | 184 | & xnanono3(jpi,jpj,jpk), xdiatno3(jpi,jpj,jpk), & |
---|
| 185 | & xnanonh4(jpi,jpj,jpk), xdiatnh4(jpi,jpj,jpk), & |
---|
[4529] | 186 | & xnanopo4(jpi,jpj,jpk), xdiatpo4(jpi,jpj,jpk), & |
---|
[3294] | 187 | & xlimphy (jpi,jpj,jpk), xlimdia (jpi,jpj,jpk), & |
---|
[5266] | 188 | #if ! defined key_pisces_quota |
---|
| 189 | & concnfe (jpi,jpj,jpk), concdfe (jpi,jpj,jpk), & |
---|
| 190 | #endif |
---|
[3294] | 191 | & xlimnfe (jpi,jpj,jpk), xlimdfe (jpi,jpj,jpk), & |
---|
[5266] | 192 | & xlimsi (jpi,jpj,jpk), STAT=ierr(2) ) |
---|
[2715] | 193 | ! |
---|
| 194 | !* SMS for the organic matter |
---|
[5266] | 195 | ALLOCATE( xfracal (jpi,jpj,jpk), nitrfac (jpi,jpj,jpk), & |
---|
| 196 | & xlimbac (jpi,jpj,jpk), xdiss (jpi,jpj,jpk), & |
---|
[3680] | 197 | & xlimbacl(jpi,jpj,jpk), prodcal(jpi,jpj,jpk), STAT=ierr(3) ) |
---|
| 198 | |
---|
[2715] | 199 | !* Variable for chemistry of the CO2 cycle |
---|
[3294] | 200 | ALLOCATE( akb3(jpi,jpj,jpk) , ak13 (jpi,jpj,jpk) , & |
---|
| 201 | & ak23(jpi,jpj,jpk) , aksp (jpi,jpj,jpk) , & |
---|
| 202 | & akw3(jpi,jpj,jpk) , borat (jpi,jpj,jpk) , & |
---|
[3680] | 203 | & hi (jpi,jpj,jpk) , excess(jpi,jpj,jpk) , STAT=ierr(4) ) |
---|
[2715] | 204 | ! |
---|
[3294] | 205 | !* Temperature dependancy of SMS terms |
---|
[3680] | 206 | ALLOCATE( tgfunc(jpi,jpj,jpk) , tgfunc2(jpi,jpj,jpk) , STAT=ierr(5) ) |
---|
[3294] | 207 | ! |
---|
[2715] | 208 | !* Array used to indicate negative tracer values |
---|
[3680] | 209 | ALLOCATE( xnegtr(jpi,jpj,jpk) , STAT=ierr(6) ) |
---|
| 210 | #endif |
---|
[5266] | 211 | |
---|
| 212 | #if defined key_pisces_quota |
---|
| 213 | !* Biological arrays for phytoplankton growth |
---|
| 214 | ALLOCATE( xpicono3(jpi,jpj,jpk), xpiconh4(jpi,jpj,jpk), & |
---|
| 215 | & xpicopo4(jpi,jpj,jpk), xpicodop(jpi,jpj,jpk), & |
---|
| 216 | & xnanodop(jpi,jpj,jpk), xdiatdop(jpi,jpj,jpk), & |
---|
| 217 | & xnanofer(jpi,jpj,jpk), xdiatfer(jpi,jpj,jpk), & |
---|
| 218 | & xpicofer(jpi,jpj,jpk), xlimpfe (jpi,jpj,jpk), & |
---|
| 219 | & fvnuptk (jpi,jpj,jpk), fvduptk (jpi,jpj,jpk), & |
---|
| 220 | & fvpuptk (jpi,jpj,jpk), xlimpic (jpi,jpj,jpk), & |
---|
| 221 | & STAT=ierr(7) ) |
---|
| 222 | |
---|
| 223 | !* Minimum/maximum quotas of phytoplankton |
---|
| 224 | ALLOCATE( xqnnmin (jpi,jpj,jpk), xqnnmax(jpi,jpj,jpk), & |
---|
| 225 | & xqpnmin (jpi,jpj,jpk), xqpnmax(jpi,jpj,jpk), & |
---|
| 226 | & xqnpmin (jpi,jpj,jpk), xqnpmax(jpi,jpj,jpk), & |
---|
| 227 | & xqppmin (jpi,jpj,jpk), xqppmax(jpi,jpj,jpk), & |
---|
| 228 | & xqndmin (jpi,jpj,jpk), xqndmax(jpi,jpj,jpk), & |
---|
| 229 | & xqpdmin (jpi,jpj,jpk), xqpdmax(jpi,jpj,jpk), STAT=ierr(8) ) |
---|
| 230 | ! |
---|
| 231 | !* Size of phytoplankton cells |
---|
| 232 | ALLOCATE( sizen (jpi,jpj,jpk), sizep (jpi,jpj,jpk), & |
---|
| 233 | & sized (jpi,jpj,jpk), STAT=ierr(9) ) |
---|
| 234 | ! |
---|
| 235 | #endif |
---|
| 236 | |
---|
[2715] | 237 | ! |
---|
| 238 | sms_pisces_alloc = MAXVAL( ierr ) |
---|
| 239 | ! |
---|
| 240 | IF( sms_pisces_alloc /= 0 ) CALL ctl_warn('sms_pisces_alloc: failed to allocate arrays') |
---|
| 241 | ! |
---|
| 242 | END FUNCTION sms_pisces_alloc |
---|
| 243 | |
---|
[1073] | 244 | #else |
---|
| 245 | !!---------------------------------------------------------------------- |
---|
| 246 | !! Empty module : NO PISCES model |
---|
| 247 | !!---------------------------------------------------------------------- |
---|
| 248 | #endif |
---|
| 249 | |
---|
| 250 | !!====================================================================== |
---|
| 251 | END MODULE sms_pisces |
---|