[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 |
---|
[6453] | 8 | !! 3.6 ! 2015-05 (O. Aumont) PISCES quota |
---|
[1073] | 9 | !!---------------------------------------------------------------------- |
---|
[6453] | 10 | #if defined key_pisces || defined key_pisces_reduced || defined key_pisces_quota |
---|
[1073] | 11 | !!---------------------------------------------------------------------- |
---|
[6453] | 12 | !! 'key_pisces*' PISCES model |
---|
[1073] | 13 | !!---------------------------------------------------------------------- |
---|
| 14 | USE par_oce |
---|
| 15 | USE par_trc |
---|
| 16 | |
---|
| 17 | IMPLICIT NONE |
---|
| 18 | PUBLIC |
---|
| 19 | |
---|
[4147] | 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 |
---|
[3294] | 23 | |
---|
[3680] | 24 | !!* Biological fluxes for light : variables shared by pisces & lobster |
---|
[6453] | 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 |
---|
[3680] | 31 | |
---|
[6453] | 32 | #if defined key_pisces || defined key_pisces_quota |
---|
[1445] | 33 | !!* Time variables |
---|
| 34 | INTEGER :: nrdttrc !: ??? |
---|
| 35 | INTEGER :: ndayflxtr !: ??? |
---|
| 36 | REAL(wp) :: rfact , rfactr !: ??? |
---|
| 37 | REAL(wp) :: rfact2, rfact2r !: ??? |
---|
[2528] | 38 | REAL(wp) :: xstep !: Time step duration for biology |
---|
[4996] | 39 | REAL(wp) :: ryyss !: number of seconds per year |
---|
| 40 | REAL(wp) :: r1_ryyss !: inverse number of seconds per year |
---|
[1073] | 41 | |
---|
[1445] | 42 | !!* Biological parameters |
---|
[3680] | 43 | INTEGER :: niter1max, niter2max !: Maximum number of iterations for sinking |
---|
[1445] | 44 | REAL(wp) :: rno3 !: ??? |
---|
| 45 | REAL(wp) :: o2ut !: ??? |
---|
| 46 | REAL(wp) :: po4r !: ??? |
---|
| 47 | REAL(wp) :: rdenit !: ??? |
---|
[3294] | 48 | REAL(wp) :: rdenita !: ??? |
---|
[1445] | 49 | REAL(wp) :: o2nit !: ??? |
---|
| 50 | REAL(wp) :: wsbio, wsbio2 !: ??? |
---|
[6453] | 51 | REAL(wp) :: wsbio2max !: ??? |
---|
| 52 | REAL(wp) :: wsbio2scale !: ??? |
---|
[1445] | 53 | REAL(wp) :: xkmort !: ??? |
---|
| 54 | REAL(wp) :: ferat3 !: ??? |
---|
[6453] | 55 | #if defined key_ligand |
---|
| 56 | REAL(wp) :: wfep !: ??? |
---|
| 57 | REAL(wp) :: ldocp !: ??? |
---|
| 58 | REAL(wp) :: ldocz !: ??? |
---|
| 59 | REAL(wp) :: lthet !: ??? |
---|
| 60 | #endif |
---|
[1073] | 61 | |
---|
[6453] | 62 | |
---|
[3680] | 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 |
---|
[4996] | 67 | REAL(wp) :: t_oce_co2_flx_cum !: Cumulative Total ocean carbon flux |
---|
[3680] | 68 | REAL(wp) :: t_atm_co2_flx !: global mean of atmospheric pco2 |
---|
[1073] | 69 | |
---|
[3680] | 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 |
---|
[1073] | 73 | |
---|
[3680] | 74 | !!* Mass conservation |
---|
| 75 | LOGICAL :: ln_check_mass !: Flag to check mass conservation |
---|
| 76 | |
---|
[1445] | 77 | !!* Biological fluxes for primary production |
---|
[2715] | 78 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksimax !: ??? |
---|
[3680] | 79 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: biron !: bioavailable fraction of iron |
---|
[6453] | 80 | #if defined key_ligand |
---|
| 81 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: plig !: proportion of iron organically complexed |
---|
| 82 | #endif |
---|
[1073] | 83 | |
---|
[1445] | 84 | !!* SMS for the organic matter |
---|
[2715] | 85 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xfracal !: ?? |
---|
| 86 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac !: ?? |
---|
[6453] | 87 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: orem !: ?? |
---|
[2715] | 88 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiss !: ?? |
---|
[3680] | 89 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodcal !: Calcite production |
---|
[6453] | 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 |
---|
[1073] | 94 | |
---|
[6453] | 95 | |
---|
[1445] | 96 | !!* Variable for chemistry of the CO2 cycle |
---|
[2715] | 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 !: ??? |
---|
[3294] | 101 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: excess !: ??? |
---|
[6455] | 102 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aphscale !: |
---|
[1073] | 103 | |
---|
[6455] | 104 | |
---|
[3294] | 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 | |
---|
[1073] | 109 | #if defined key_kriest |
---|
[1445] | 110 | !!* Kriest parameter for aggregation |
---|
[3780] | 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 |
---|
[1073] | 116 | #endif |
---|
| 117 | |
---|
[3680] | 118 | #endif |
---|
[6453] | 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 |
---|
[2715] | 131 | !!---------------------------------------------------------------------- |
---|
| 132 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
| 133 | !! $Id$ |
---|
| 134 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 135 | !!---------------------------------------------------------------------- |
---|
| 136 | CONTAINS |
---|
| 137 | |
---|
| 138 | INTEGER FUNCTION sms_pisces_alloc() |
---|
| 139 | !!---------------------------------------------------------------------- |
---|
| 140 | !! *** ROUTINE sms_pisces_alloc *** |
---|
| 141 | !!---------------------------------------------------------------------- |
---|
| 142 | USE lib_mpp , ONLY: ctl_warn |
---|
[6453] | 143 | #if defined key_pisces_quota |
---|
| 144 | INTEGER :: ierr(6) ! Local variables |
---|
| 145 | #else |
---|
[5385] | 146 | INTEGER :: ierr(5) ! Local variables |
---|
[6453] | 147 | #endif |
---|
[2715] | 148 | !!---------------------------------------------------------------------- |
---|
| 149 | ierr(:) = 0 |
---|
[3680] | 150 | !* Biological fluxes for light : shared variables for pisces & lobster |
---|
[6453] | 151 | ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj), & |
---|
| 152 | & heup_01(jpi,jpj), xksi(jpi,jpj), STAT=ierr(1) ) |
---|
[2715] | 153 | ! |
---|
[6453] | 154 | #if defined key_pisces || defined key_pisces_quota |
---|
[2715] | 155 | !* Biological fluxes for primary production |
---|
[3680] | 156 | ALLOCATE( xksimax(jpi,jpj) , biron (jpi,jpj,jpk), & |
---|
[6453] | 157 | #if defined key_ligand |
---|
| 158 | & plig(jpi,jpj,jpk) , & |
---|
| 159 | #endif |
---|
| 160 | & STAT=ierr(2) ) |
---|
[2715] | 161 | ! |
---|
| 162 | !* SMS for the organic matter |
---|
[6453] | 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) ) |
---|
[3680] | 168 | |
---|
[2715] | 169 | !* Variable for chemistry of the CO2 cycle |
---|
[6453] | 170 | ALLOCATE( ak13 (jpi,jpj,jpk) , & |
---|
[3294] | 171 | & ak23(jpi,jpj,jpk) , aksp (jpi,jpj,jpk) , & |
---|
[6455] | 172 | & hi (jpi,jpj,jpk) , excess(jpi,jpj,jpk) , & |
---|
| 173 | & aphscale(jpi,jpj,jpk), STAT=ierr(4) ) |
---|
[2715] | 174 | ! |
---|
[3294] | 175 | !* Temperature dependancy of SMS terms |
---|
[3680] | 176 | ALLOCATE( tgfunc(jpi,jpj,jpk) , tgfunc2(jpi,jpj,jpk) , STAT=ierr(5) ) |
---|
[3294] | 177 | ! |
---|
[3680] | 178 | #endif |
---|
[6453] | 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 | |
---|
[2715] | 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 | |
---|
[1073] | 193 | #else |
---|
| 194 | !!---------------------------------------------------------------------- |
---|
| 195 | !! Empty module : NO PISCES model |
---|
| 196 | !!---------------------------------------------------------------------- |
---|
| 197 | #endif |
---|
| 198 | |
---|
| 199 | !!====================================================================== |
---|
| 200 | END MODULE sms_pisces |
---|