[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 | !!---------------------------------------------------------------------- |
---|
| 9 | USE par_oce |
---|
| 10 | USE par_trc |
---|
| 11 | |
---|
| 12 | IMPLICIT NONE |
---|
| 13 | PUBLIC |
---|
| 14 | |
---|
[4147] | 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 | |
---|
[3680] | 19 | ! !: PISCES : silicon dependant half saturation |
---|
| 20 | |
---|
[7646] | 21 | !!* Model used |
---|
| 22 | LOGICAL :: ln_p2z !: Flag to use LOBSTER model |
---|
| 23 | LOGICAL :: ln_p4z !: Flag to use PISCES model |
---|
| 24 | LOGICAL :: ln_p5z !: Flag to use PISCES quota model |
---|
| 25 | LOGICAL :: ln_ligand !: Flag to enable organic ligands |
---|
| 26 | |
---|
[1445] | 27 | !!* Time variables |
---|
| 28 | INTEGER :: nrdttrc !: ??? |
---|
| 29 | REAL(wp) :: rfact , rfactr !: ??? |
---|
| 30 | REAL(wp) :: rfact2, rfact2r !: ??? |
---|
[2528] | 31 | REAL(wp) :: xstep !: Time step duration for biology |
---|
[4996] | 32 | REAL(wp) :: ryyss !: number of seconds per year |
---|
| 33 | REAL(wp) :: r1_ryyss !: inverse number of seconds per year |
---|
[1073] | 34 | |
---|
[4996] | 35 | |
---|
[1445] | 36 | !!* Biological parameters |
---|
[3680] | 37 | INTEGER :: niter1max, niter2max !: Maximum number of iterations for sinking |
---|
[1445] | 38 | REAL(wp) :: rno3 !: ??? |
---|
| 39 | REAL(wp) :: o2ut !: ??? |
---|
| 40 | REAL(wp) :: po4r !: ??? |
---|
| 41 | REAL(wp) :: rdenit !: ??? |
---|
[3294] | 42 | REAL(wp) :: rdenita !: ??? |
---|
[1445] | 43 | REAL(wp) :: o2nit !: ??? |
---|
| 44 | REAL(wp) :: wsbio, wsbio2 !: ??? |
---|
[7646] | 45 | REAL(wp) :: wsbio2max !: ??? |
---|
| 46 | REAL(wp) :: wsbio2scale !: ??? |
---|
[1445] | 47 | REAL(wp) :: xkmort !: ??? |
---|
| 48 | REAL(wp) :: ferat3 !: ??? |
---|
[7646] | 49 | REAL(wp) :: wfep !: ??? |
---|
| 50 | REAL(wp) :: ldocp !: ??? |
---|
| 51 | REAL(wp) :: ldocz !: ??? |
---|
| 52 | REAL(wp) :: lthet !: ??? |
---|
| 53 | REAL(wp) :: no3rat3 !: ??? |
---|
| 54 | REAL(wp) :: po4rat3 !: ??? |
---|
[1073] | 55 | |
---|
[7646] | 56 | |
---|
[3680] | 57 | !!* diagnostic parameters |
---|
| 58 | REAL(wp) :: tpp !: total primary production |
---|
| 59 | REAL(wp) :: t_oce_co2_exp !: total carbon export |
---|
| 60 | REAL(wp) :: t_oce_co2_flx !: Total ocean carbon flux |
---|
[4996] | 61 | REAL(wp) :: t_oce_co2_flx_cum !: Cumulative Total ocean carbon flux |
---|
[3680] | 62 | REAL(wp) :: t_atm_co2_flx !: global mean of atmospheric pco2 |
---|
[1073] | 63 | |
---|
[3680] | 64 | !!* restoring |
---|
| 65 | LOGICAL :: ln_pisdmp !: restoring or not of nutrients to a mean value |
---|
| 66 | INTEGER :: nn_pisdmp !: frequency of relaxation or not of nutrients to a mean value |
---|
[1073] | 67 | |
---|
[3680] | 68 | !!* Mass conservation |
---|
| 69 | LOGICAL :: ln_check_mass !: Flag to check mass conservation |
---|
| 70 | |
---|
[7646] | 71 | !!* Biological fluxes for light : variables shared by pisces & lobster |
---|
| 72 | INTEGER , ALLOCATABLE, SAVE, DIMENSION(:,:) :: neln !: number of T-levels + 1 in the euphotic layer |
---|
| 73 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: heup !: euphotic layer depth |
---|
| 74 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: etot !: par (photosynthetic available radiation) |
---|
| 75 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: etot_ndcy !: PAR over 24h in case of diurnal cycle |
---|
| 76 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: enano, ediat !: PAR for phyto, nano and diat |
---|
| 77 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: epico !: PAR for pico |
---|
| 78 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: emoy !: averaged PAR in the mixed layer |
---|
| 79 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: heup_01 !: Absolute euphotic layer depth |
---|
| 80 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksi !: LOBSTER : zooplakton closure |
---|
| 81 | |
---|
[1445] | 82 | !!* Biological fluxes for primary production |
---|
[7646] | 83 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksimax !: ??? |
---|
[3680] | 84 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: biron !: bioavailable fraction of iron |
---|
[7646] | 85 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: plig !: proportion of iron organically complexed |
---|
[1073] | 86 | |
---|
[7646] | 87 | !!* Sinking speed |
---|
| 88 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsbio3 !: POC sinking speed |
---|
| 89 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsbio4 !: GOC sinking speed |
---|
| 90 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wscal !: Calcite and BSi sinking speeds |
---|
| 91 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: wsfep |
---|
[3294] | 92 | |
---|
[7646] | 93 | |
---|
| 94 | |
---|
[1445] | 95 | !!* SMS for the organic matter |
---|
[2715] | 96 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xfracal !: ?? |
---|
| 97 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac !: ?? |
---|
[8533] | 98 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac2 !: ?? |
---|
[7646] | 99 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: orem !: ?? |
---|
[2715] | 100 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiss !: ?? |
---|
[3680] | 101 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodcal !: Calcite production |
---|
[7646] | 102 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodpoc !: Calcite production |
---|
| 103 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: conspoc !: Calcite production |
---|
| 104 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodgoc !: Calcite production |
---|
| 105 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: consgoc !: Calcite production |
---|
[1073] | 106 | |
---|
[7646] | 107 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizen !: size of diatoms |
---|
| 108 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sizep !: size of diatoms |
---|
| 109 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sized !: size of diatoms |
---|
| 110 | |
---|
| 111 | |
---|
[1445] | 112 | !!* Variable for chemistry of the CO2 cycle |
---|
[2715] | 113 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak13 !: ??? |
---|
| 114 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak23 !: ??? |
---|
| 115 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aksp !: ??? |
---|
| 116 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hi !: ??? |
---|
[3294] | 117 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: excess !: ??? |
---|
[6291] | 118 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aphscale !: |
---|
[1073] | 119 | |
---|
[6291] | 120 | |
---|
[3294] | 121 | !!* Temperature dependancy of SMS terms |
---|
| 122 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc !: Temp. dependancy of various biological rates |
---|
| 123 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc2 !: Temp. dependancy of mesozooplankton rates |
---|
| 124 | |
---|
[7646] | 125 | #if defined key_sed |
---|
| 126 | LOGICAL, PUBLIC, PARAMETER :: lk_sed = .TRUE. !: sediment flag |
---|
| 127 | #else |
---|
| 128 | LOGICAL, PUBLIC, PARAMETER :: lk_sed = .FALSE. !: sediment flag |
---|
[1073] | 129 | #endif |
---|
| 130 | |
---|
[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 |
---|
[7646] | 143 | INTEGER :: ierr(10) ! Local variables |
---|
[2715] | 144 | !!---------------------------------------------------------------------- |
---|
| 145 | ierr(:) = 0 |
---|
[3680] | 146 | !* Biological fluxes for light : shared variables for pisces & lobster |
---|
[7646] | 147 | ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj), & |
---|
| 148 | & heup_01(jpi,jpj) , xksi(jpi,jpj) , STAT=ierr(1) ) |
---|
[2715] | 149 | ! |
---|
[7646] | 150 | |
---|
| 151 | IF( ln_p4z .OR. ln_p5z ) THEN |
---|
| 152 | !* Biological fluxes for light |
---|
| 153 | ALLOCATE( enano(jpi,jpj,jpk) , ediat(jpi,jpj,jpk) , & |
---|
| 154 | & etot_ndcy(jpi,jpj,jpk), emoy(jpi,jpj,jpk) , STAT=ierr(2) ) |
---|
| 155 | |
---|
| 156 | !* Biological fluxes for primary production |
---|
| 157 | ALLOCATE( xksimax(jpi,jpj) , biron(jpi,jpj,jpk) , STAT=ierr(3) ) |
---|
[2715] | 158 | ! |
---|
[7646] | 159 | !* SMS for the organic matter |
---|
[8533] | 160 | ALLOCATE( xfracal (jpi,jpj,jpk), orem(jpi,jpj,jpk) , & |
---|
| 161 | & nitrfac(jpi,jpj,jpk), nitrfac2(jpi,jpj,jpk) , & |
---|
| 162 | & prodcal(jpi,jpj,jpk) , xdiss (jpi,jpj,jpk), & |
---|
[7646] | 163 | & prodpoc(jpi,jpj,jpk) , conspoc(jpi,jpj,jpk) , & |
---|
| 164 | & prodgoc(jpi,jpj,jpk) , consgoc(jpi,jpj,jpk) , STAT=ierr(4) ) |
---|
[3680] | 165 | |
---|
[7646] | 166 | !* Variable for chemistry of the CO2 cycle |
---|
| 167 | ALLOCATE( ak13 (jpi,jpj,jpk) , & |
---|
| 168 | & ak23(jpi,jpj,jpk) , aksp (jpi,jpj,jpk) , & |
---|
| 169 | & hi (jpi,jpj,jpk) , excess(jpi,jpj,jpk) , & |
---|
| 170 | & aphscale(jpi,jpj,jpk), STAT=ierr(5) ) |
---|
[2715] | 171 | ! |
---|
[7646] | 172 | !* Temperature dependancy of SMS terms |
---|
| 173 | ALLOCATE( tgfunc(jpi,jpj,jpk) , tgfunc2(jpi,jpj,jpk), STAT=ierr(6) ) |
---|
[3294] | 174 | ! |
---|
[7646] | 175 | !* Sinkong speed |
---|
| 176 | ALLOCATE( wsbio3 (jpi,jpj,jpk) , wsbio4 (jpi,jpj,jpk), & |
---|
| 177 | & wscal(jpi,jpj,jpk) , STAT=ierr(7) ) |
---|
| 178 | ! |
---|
| 179 | IF( ln_ligand ) THEN |
---|
| 180 | ALLOCATE( plig(jpi,jpj,jpk) , wsfep(jpi,jpj,jpk) , STAT=ierr(8) ) |
---|
| 181 | ENDIF |
---|
| 182 | ! |
---|
| 183 | ENDIF |
---|
[2715] | 184 | ! |
---|
[7646] | 185 | IF( ln_p5z ) THEN |
---|
| 186 | ! |
---|
| 187 | ALLOCATE( epico(jpi,jpj,jpk) , STAT=ierr(9) ) |
---|
| 188 | |
---|
| 189 | !* Size of phytoplankton cells |
---|
| 190 | ALLOCATE( sizen(jpi,jpj,jpk), sizep(jpi,jpj,jpk), & |
---|
| 191 | & sized(jpi,jpj,jpk), STAT=ierr(10) ) |
---|
| 192 | ENDIF |
---|
| 193 | ! |
---|
[2715] | 194 | sms_pisces_alloc = MAXVAL( ierr ) |
---|
| 195 | ! |
---|
| 196 | IF( sms_pisces_alloc /= 0 ) CALL ctl_warn('sms_pisces_alloc: failed to allocate arrays') |
---|
| 197 | ! |
---|
| 198 | END FUNCTION sms_pisces_alloc |
---|
| 199 | |
---|
[1073] | 200 | !!====================================================================== |
---|
| 201 | END MODULE sms_pisces |
---|