[1073] | 1 | MODULE sms_pisces |
---|
| 2 | !!---------------------------------------------------------------------- |
---|
| 3 | !! *** sms_pisces.F90 *** |
---|
[12537] | 4 | !! TOP : PISCES Source Minus Sink variables are declared and allocated |
---|
[1073] | 5 | !!---------------------------------------------------------------------- |
---|
| 6 | !! History : 1.0 ! 2000-02 (O. Aumont) original code |
---|
[1445] | 7 | !! 3.2 ! 2009-04 (C. Ethe & NEMO team) style |
---|
[1073] | 8 | !!---------------------------------------------------------------------- |
---|
| 9 | USE par_oce |
---|
| 10 | USE par_trc |
---|
| 11 | |
---|
| 12 | IMPLICIT NONE |
---|
| 13 | PUBLIC |
---|
| 14 | |
---|
[12537] | 15 | INTEGER :: numnatp_ref = -1 !: Logical units for namelist pisces |
---|
| 16 | INTEGER :: numnatp_cfg = -1 !: Logical units for namelist pisces |
---|
| 17 | INTEGER :: numonp = -1 !: Logical unit for namelist pisces output |
---|
[3294] | 18 | |
---|
[7646] | 19 | !!* Model used |
---|
| 20 | LOGICAL :: ln_p2z !: Flag to use LOBSTER model |
---|
| 21 | LOGICAL :: ln_p4z !: Flag to use PISCES model |
---|
| 22 | LOGICAL :: ln_p5z !: Flag to use PISCES quota model |
---|
| 23 | LOGICAL :: ln_ligand !: Flag to enable organic ligands |
---|
[10222] | 24 | LOGICAL :: ln_sediment !: Flag to enable sediment module |
---|
[7646] | 25 | |
---|
[1445] | 26 | !!* Time variables |
---|
[12537] | 27 | INTEGER :: nrdttrc !: ??? |
---|
| 28 | REAL(wp) :: rfact , rfactr !: time step duration (in seconds) |
---|
| 29 | REAL(wp) :: rfact2, rfact2r !: time step duration (in seconds) when timesplitting is activated for PISCES |
---|
| 30 | REAL(wp) :: xstep !: Time step duration for biology |
---|
| 31 | REAL(wp) :: ryyss !: number of seconds per year |
---|
| 32 | REAL(wp) :: r1_ryyss !: inverse number of seconds per year |
---|
[1073] | 33 | |
---|
[1445] | 34 | !!* Biological parameters |
---|
[12537] | 35 | REAL(wp) :: rno3 !: C/N stoichiometric ratio |
---|
| 36 | REAL(wp) :: o2ut !: O2/N stoichiometric ratio for ammonification |
---|
| 37 | REAL(wp) :: po4r !: C/P stoichiometric ratio |
---|
| 38 | REAL(wp) :: rdenit !: C/N ratio for denitrification |
---|
| 39 | REAL(wp) :: rdenita !: C/N ratio for denitrification |
---|
| 40 | REAL(wp) :: o2nit !: O2/N ratio for nitrification |
---|
| 41 | REAL(wp) :: wsbio, wsbio2 !: Sinking speeds of particles |
---|
| 42 | REAL(wp) :: wsbio2max !: Maximum sinking speed of the largest particles |
---|
| 43 | REAL(wp) :: wsbio2scale !: Length scale for the variations of wsbio2 |
---|
| 44 | REAL(wp) :: xkmort !: Mortality half-saturation constant |
---|
| 45 | REAL(wp) :: ferat3 !: Fe/C in heterotrophic organisms |
---|
| 46 | REAL(wp) :: ldocp !: Ligand production ratio during PP |
---|
| 47 | REAL(wp) :: ldocz !: Ligand production ratio by grazing |
---|
| 48 | REAL(wp) :: lthet !: Uptake of ligand by phytoplankton |
---|
| 49 | REAL(wp) :: no3rat3 !: C/N ratio of zooplankton |
---|
| 50 | REAL(wp) :: po4rat3 !: C/P ratio of zooplankton |
---|
[1073] | 51 | |
---|
[3680] | 52 | !!* diagnostic parameters |
---|
[12537] | 53 | REAL(wp) :: tpp !: total primary production |
---|
| 54 | REAL(wp) :: t_oce_co2_exp !: total carbon export |
---|
| 55 | REAL(wp) :: t_oce_co2_flx !: Total ocean carbon flux |
---|
| 56 | REAL(wp) :: t_oce_co2_flx_cum !: Cumulative Total ocean carbon flux |
---|
| 57 | REAL(wp) :: t_atm_co2_flx !: global mean of atmospheric pco2 |
---|
[1073] | 58 | |
---|
[3680] | 59 | !!* restoring |
---|
[12537] | 60 | LOGICAL :: ln_pisdmp !: restoring or not of nutrients to a mean value |
---|
| 61 | INTEGER :: nn_pisdmp !: frequency of relaxation or not of nutrients to a mean value |
---|
[1073] | 62 | |
---|
[3680] | 63 | !!* Mass conservation |
---|
[12537] | 64 | LOGICAL :: ln_check_mass !: Flag to check mass conservation |
---|
| 65 | LOGICAL, PUBLIC :: ln_ironice !: boolean for Fe input from sea ice |
---|
[3680] | 66 | |
---|
[7646] | 67 | !!* Biological fluxes for light : variables shared by pisces & lobster |
---|
| 68 | INTEGER , ALLOCATABLE, SAVE, DIMENSION(:,:) :: neln !: number of T-levels + 1 in the euphotic layer |
---|
| 69 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: heup !: euphotic layer depth |
---|
| 70 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: etot !: par (photosynthetic available radiation) |
---|
| 71 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: etot_ndcy !: PAR over 24h in case of diurnal cycle |
---|
| 72 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: enano, ediat !: PAR for phyto, nano and diat |
---|
[12537] | 73 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: enanom, ediatm !: mean PAR for phyto, nano and diat |
---|
[7646] | 74 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: epico !: PAR for pico |
---|
[12537] | 75 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: epicom !: mean PAR for pico |
---|
[7646] | 76 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: emoy !: averaged PAR in the mixed layer |
---|
| 77 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: heup_01 !: Absolute euphotic layer depth |
---|
[12537] | 78 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksi !: Half-saturation con,stant for diatoms |
---|
[7646] | 79 | |
---|
[1445] | 80 | !!* Biological fluxes for primary production |
---|
[12537] | 81 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksimax !: Maximum half-saturation constant over the year (Si) |
---|
[3680] | 82 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: biron !: bioavailable fraction of iron |
---|
[7646] | 83 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: plig !: proportion of iron organically complexed |
---|
[1073] | 84 | |
---|
[7646] | 85 | !!* Sinking speed |
---|
| 86 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsbio3 !: POC sinking speed |
---|
| 87 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsbio4 !: GOC sinking speed |
---|
[3294] | 88 | |
---|
[1445] | 89 | !!* SMS for the organic matter |
---|
[12537] | 90 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xfracal !: Fraction of nanophytoplankton that are calcifying organisms |
---|
| 91 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac !: OMZ |
---|
| 92 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac2 !: N depleted indice |
---|
| 93 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: orem !: oxic remineralisation |
---|
| 94 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiss !: Shear rate |
---|
[3680] | 95 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodcal !: Calcite production |
---|
[12537] | 96 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodpoc !: POC production |
---|
| 97 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: conspoc !: POC consumption |
---|
| 98 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodgoc !: GOC production |
---|
| 99 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: consgoc !: GOC consumption |
---|
[10362] | 100 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: blim !: bacterial production factor |
---|
[12349] | 101 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizen !: size of nanophyto |
---|
| 102 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizep !: size of picophyto |
---|
[7646] | 103 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sized !: size of diatoms |
---|
[12349] | 104 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizena !: size of nanophytoplankton, after |
---|
| 105 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizepa !: size of picophyto, after |
---|
| 106 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizeda !: size of diatomss, after |
---|
[7646] | 107 | |
---|
[1445] | 108 | !!* Variable for chemistry of the CO2 cycle |
---|
[12537] | 109 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak13 !: Carbonate chemistry constant |
---|
| 110 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak23 !: Carbonate chemistry constant |
---|
| 111 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aksp !: Solubility product of CaCO3 |
---|
| 112 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hi !: Proton concentration |
---|
| 113 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: excess !: CO3 saturation |
---|
[6291] | 114 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aphscale !: |
---|
[1073] | 115 | |
---|
[6291] | 116 | |
---|
[3294] | 117 | !!* Temperature dependancy of SMS terms |
---|
| 118 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc !: Temp. dependancy of various biological rates |
---|
| 119 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc2 !: Temp. dependancy of mesozooplankton rates |
---|
[12349] | 120 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc3 !: Temp. dependancy of picophytoplankton rates |
---|
[3294] | 121 | |
---|
[2715] | 122 | !!---------------------------------------------------------------------- |
---|
[10067] | 123 | !! NEMO/TOP 4.0 , NEMO Consortium (2018) |
---|
[2715] | 124 | !! $Id$ |
---|
[10068] | 125 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[2715] | 126 | !!---------------------------------------------------------------------- |
---|
| 127 | CONTAINS |
---|
| 128 | |
---|
| 129 | INTEGER FUNCTION sms_pisces_alloc() |
---|
| 130 | !!---------------------------------------------------------------------- |
---|
| 131 | !! *** ROUTINE sms_pisces_alloc *** |
---|
| 132 | !!---------------------------------------------------------------------- |
---|
[10425] | 133 | USE lib_mpp , ONLY: ctl_stop |
---|
[7646] | 134 | INTEGER :: ierr(10) ! Local variables |
---|
[2715] | 135 | !!---------------------------------------------------------------------- |
---|
| 136 | ierr(:) = 0 |
---|
[7646] | 137 | ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj), & |
---|
| 138 | & heup_01(jpi,jpj) , xksi(jpi,jpj) , STAT=ierr(1) ) |
---|
[2715] | 139 | ! |
---|
[7646] | 140 | |
---|
| 141 | IF( ln_p4z .OR. ln_p5z ) THEN |
---|
[12537] | 142 | |
---|
| 143 | !* Optics |
---|
[7646] | 144 | ALLOCATE( enano(jpi,jpj,jpk) , ediat(jpi,jpj,jpk) , & |
---|
[10362] | 145 | & enanom(jpi,jpj,jpk) , ediatm(jpi,jpj,jpk), & |
---|
[7646] | 146 | & etot_ndcy(jpi,jpj,jpk), emoy(jpi,jpj,jpk) , STAT=ierr(2) ) |
---|
| 147 | |
---|
[12537] | 148 | !* Biological SMS |
---|
[7646] | 149 | ALLOCATE( xksimax(jpi,jpj) , biron(jpi,jpj,jpk) , STAT=ierr(3) ) |
---|
[12537] | 150 | |
---|
| 151 | ! Biological SMS |
---|
[8533] | 152 | ALLOCATE( xfracal (jpi,jpj,jpk), orem(jpi,jpj,jpk) , & |
---|
[12537] | 153 | & nitrfac(jpi,jpj,jpk) , nitrfac2(jpi,jpj,jpk), & |
---|
[8533] | 154 | & prodcal(jpi,jpj,jpk) , xdiss (jpi,jpj,jpk), & |
---|
[7646] | 155 | & prodpoc(jpi,jpj,jpk) , conspoc(jpi,jpj,jpk) , & |
---|
[10362] | 156 | & prodgoc(jpi,jpj,jpk) , consgoc(jpi,jpj,jpk) , & |
---|
| 157 | & blim (jpi,jpj,jpk) , STAT=ierr(4) ) |
---|
[3680] | 158 | |
---|
[12537] | 159 | !* Carbonate chemistry |
---|
| 160 | ALLOCATE( ak13 (jpi,jpj,jpk) , & |
---|
[7646] | 161 | & ak23(jpi,jpj,jpk) , aksp (jpi,jpj,jpk) , & |
---|
| 162 | & hi (jpi,jpj,jpk) , excess(jpi,jpj,jpk) , & |
---|
| 163 | & aphscale(jpi,jpj,jpk), STAT=ierr(5) ) |
---|
[2715] | 164 | ! |
---|
[12537] | 165 | !* Temperature dependency of SMS terms |
---|
[12349] | 166 | ALLOCATE( tgfunc (jpi,jpj,jpk) , tgfunc2(jpi,jpj,jpk), & |
---|
| 167 | & tgfunc3(jpi,jpj,jpk) , STAT=ierr(6) ) |
---|
[3294] | 168 | ! |
---|
[12537] | 169 | !* Sinking speed |
---|
[7646] | 170 | ALLOCATE( wsbio3 (jpi,jpj,jpk) , wsbio4 (jpi,jpj,jpk), & |
---|
[10362] | 171 | & STAT=ierr(7) ) |
---|
[7646] | 172 | ! |
---|
[12537] | 173 | !* Prognostic ligand |
---|
[7646] | 174 | IF( ln_ligand ) THEN |
---|
[10416] | 175 | ALLOCATE( plig(jpi,jpj,jpk) , STAT=ierr(8) ) |
---|
[7646] | 176 | ENDIF |
---|
| 177 | ENDIF |
---|
[2715] | 178 | ! |
---|
[7646] | 179 | IF( ln_p5z ) THEN |
---|
[12537] | 180 | ! PISCES-QUOTA specific part |
---|
[10362] | 181 | ALLOCATE( epico(jpi,jpj,jpk) , epicom(jpi,jpj,jpk) , STAT=ierr(9) ) |
---|
[7646] | 182 | |
---|
| 183 | !* Size of phytoplankton cells |
---|
| 184 | ALLOCATE( sizen(jpi,jpj,jpk), sizep(jpi,jpj,jpk), & |
---|
[12349] | 185 | & sized(jpi,jpj,jpk), sizena(jpi,jpj,jpk), & |
---|
| 186 | & sizepa(jpi,jpj,jpk), sizeda(jpi,jpj,jpk), STAT=ierr(10) ) |
---|
[7646] | 187 | ENDIF |
---|
| 188 | ! |
---|
[2715] | 189 | sms_pisces_alloc = MAXVAL( ierr ) |
---|
| 190 | ! |
---|
[10425] | 191 | IF( sms_pisces_alloc /= 0 ) CALL ctl_stop( 'STOP', 'sms_pisces_alloc: failed to allocate arrays' ) |
---|
[2715] | 192 | ! |
---|
| 193 | END FUNCTION sms_pisces_alloc |
---|
| 194 | |
---|
[1073] | 195 | !!====================================================================== |
---|
| 196 | END MODULE sms_pisces |
---|