[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 | !!---------------------------------------------------------------------- |
---|
[3680] | 9 | #if defined key_pisces || defined key_pisces_reduced |
---|
[1073] | 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! 'key_pisces' PISCES model |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
| 13 | USE par_oce |
---|
| 14 | USE par_trc |
---|
| 15 | |
---|
| 16 | IMPLICIT NONE |
---|
| 17 | PUBLIC |
---|
| 18 | |
---|
[3294] | 19 | INTEGER :: numnatp |
---|
| 20 | |
---|
[3680] | 21 | !!* Biological fluxes for light : variables shared by pisces & lobster |
---|
| 22 | INTEGER , ALLOCATABLE, SAVE, DIMENSION(:,:) :: neln !: number of T-levels + 1 in the euphotic layer |
---|
| 23 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: heup !: euphotic layer depth |
---|
| 24 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: etot !: par (photosynthetic available radiation) |
---|
| 25 | ! |
---|
| 26 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksi !: LOBSTER : zooplakton closure |
---|
| 27 | ! !: PISCES : silicon dependant half saturation |
---|
| 28 | |
---|
| 29 | #if defined key_pisces |
---|
[1445] | 30 | !!* Time variables |
---|
| 31 | INTEGER :: nrdttrc !: ??? |
---|
| 32 | INTEGER :: ndayflxtr !: ??? |
---|
| 33 | REAL(wp) :: rfact , rfactr !: ??? |
---|
| 34 | REAL(wp) :: rfact2, rfact2r !: ??? |
---|
[2528] | 35 | REAL(wp) :: xstep !: Time step duration for biology |
---|
[1073] | 36 | |
---|
[1445] | 37 | !!* Biological parameters |
---|
[3680] | 38 | INTEGER :: niter1max, niter2max !: Maximum number of iterations for sinking |
---|
[1445] | 39 | REAL(wp) :: rno3 !: ??? |
---|
| 40 | REAL(wp) :: o2ut !: ??? |
---|
| 41 | REAL(wp) :: po4r !: ??? |
---|
| 42 | REAL(wp) :: rdenit !: ??? |
---|
[3294] | 43 | REAL(wp) :: rdenita !: ??? |
---|
[1445] | 44 | REAL(wp) :: o2nit !: ??? |
---|
| 45 | REAL(wp) :: wsbio, wsbio2 !: ??? |
---|
| 46 | REAL(wp) :: xkmort !: ??? |
---|
| 47 | REAL(wp) :: ferat3 !: ??? |
---|
[1073] | 48 | |
---|
[3680] | 49 | !!* diagnostic parameters |
---|
| 50 | REAL(wp) :: tpp !: total primary production |
---|
| 51 | REAL(wp) :: t_oce_co2_exp !: total carbon export |
---|
| 52 | REAL(wp) :: t_oce_co2_flx !: Total ocean carbon flux |
---|
| 53 | REAL(wp) :: t_atm_co2_flx !: global mean of atmospheric pco2 |
---|
[1073] | 54 | |
---|
[3680] | 55 | !!* restoring |
---|
| 56 | LOGICAL :: ln_pisdmp !: restoring or not of nutrients to a mean value |
---|
| 57 | INTEGER :: nn_pisdmp !: frequency of relaxation or not of nutrients to a mean value |
---|
| 58 | LOGICAL :: ln_pisclo !: Restoring or not of nutrients to initial value on closed seas |
---|
[1073] | 59 | |
---|
[3680] | 60 | !!* Mass conservation |
---|
| 61 | LOGICAL :: ln_check_mass !: Flag to check mass conservation |
---|
| 62 | |
---|
[1445] | 63 | !!* Biological fluxes for primary production |
---|
[2715] | 64 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksimax !: ??? |
---|
| 65 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanono3 !: ??? |
---|
| 66 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiatno3 !: ??? |
---|
| 67 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanonh4 !: ??? |
---|
| 68 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiatnh4 !: ??? |
---|
| 69 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimphy !: ??? |
---|
| 70 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimdia !: ??? |
---|
| 71 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: concdfe !: ??? |
---|
| 72 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: concnfe !: ??? |
---|
[3294] | 73 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimnfe !: ??? |
---|
| 74 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimdfe !: ??? |
---|
| 75 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimsi !: ??? |
---|
[3680] | 76 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: biron !: bioavailable fraction of iron |
---|
[1073] | 77 | |
---|
[3294] | 78 | |
---|
[1445] | 79 | !!* SMS for the organic matter |
---|
[2715] | 80 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xfracal !: ?? |
---|
| 81 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac !: ?? |
---|
| 82 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimbac !: ?? |
---|
[3680] | 83 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimbacl !: ?? |
---|
[2715] | 84 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiss !: ?? |
---|
[3680] | 85 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodcal !: Calcite production |
---|
[1073] | 86 | |
---|
[1445] | 87 | !!* Variable for chemistry of the CO2 cycle |
---|
[2715] | 88 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: akb3 !: ??? |
---|
| 89 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak13 !: ??? |
---|
| 90 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak23 !: ??? |
---|
| 91 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aksp !: ??? |
---|
| 92 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: akw3 !: ??? |
---|
| 93 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: borat !: ??? |
---|
| 94 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hi !: ??? |
---|
[3294] | 95 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: excess !: ??? |
---|
[1073] | 96 | |
---|
[3294] | 97 | !!* Temperature dependancy of SMS terms |
---|
| 98 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc !: Temp. dependancy of various biological rates |
---|
| 99 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc2 !: Temp. dependancy of mesozooplankton rates |
---|
| 100 | |
---|
[2715] | 101 | !!* Array used to indicate negative tracer values |
---|
| 102 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnegtr !: ??? |
---|
| 103 | |
---|
[1073] | 104 | #if defined key_kriest |
---|
[1445] | 105 | !!* Kriest parameter for aggregation |
---|
| 106 | REAL(wp) :: xkr_eta !: ??? |
---|
| 107 | REAL(wp) :: xkr_zeta !: ??? |
---|
| 108 | REAL(wp) :: xkr_massp !: ??? |
---|
| 109 | REAL(wp) :: xkr_mass_min, xkr_mass_max !: ??? |
---|
[1073] | 110 | #endif |
---|
| 111 | |
---|
[3680] | 112 | #endif |
---|
[2715] | 113 | !!---------------------------------------------------------------------- |
---|
| 114 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
| 115 | !! $Id$ |
---|
| 116 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 117 | !!---------------------------------------------------------------------- |
---|
| 118 | CONTAINS |
---|
| 119 | |
---|
| 120 | INTEGER FUNCTION sms_pisces_alloc() |
---|
| 121 | !!---------------------------------------------------------------------- |
---|
| 122 | !! *** ROUTINE sms_pisces_alloc *** |
---|
| 123 | !!---------------------------------------------------------------------- |
---|
| 124 | USE lib_mpp , ONLY: ctl_warn |
---|
[3294] | 125 | INTEGER :: ierr(6) ! Local variables |
---|
[2715] | 126 | !!---------------------------------------------------------------------- |
---|
| 127 | ierr(:) = 0 |
---|
[3680] | 128 | !* Biological fluxes for light : shared variables for pisces & lobster |
---|
| 129 | ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj), xksi(jpi,jpj), STAT=ierr(1) ) |
---|
[2715] | 130 | ! |
---|
[3680] | 131 | #if defined key_pisces |
---|
[2715] | 132 | !* Biological fluxes for primary production |
---|
[3680] | 133 | ALLOCATE( xksimax(jpi,jpj) , biron (jpi,jpj,jpk), & |
---|
[3294] | 134 | & xnanono3(jpi,jpj,jpk), xdiatno3(jpi,jpj,jpk), & |
---|
| 135 | & xnanonh4(jpi,jpj,jpk), xdiatnh4(jpi,jpj,jpk), & |
---|
| 136 | & xlimphy (jpi,jpj,jpk), xlimdia (jpi,jpj,jpk), & |
---|
| 137 | & xlimnfe (jpi,jpj,jpk), xlimdfe (jpi,jpj,jpk), & |
---|
| 138 | & xlimsi (jpi,jpj,jpk), concdfe (jpi,jpj,jpk), & |
---|
[3680] | 139 | & concnfe (jpi,jpj,jpk), STAT=ierr(2) ) |
---|
[2715] | 140 | ! |
---|
| 141 | !* SMS for the organic matter |
---|
[3294] | 142 | ALLOCATE( xfracal (jpi,jpj,jpk), nitrfac(jpi,jpj,jpk), & |
---|
[3680] | 143 | & xlimbac (jpi,jpj,jpk), xdiss (jpi,jpj,jpk), & |
---|
| 144 | & xlimbacl(jpi,jpj,jpk), prodcal(jpi,jpj,jpk), STAT=ierr(3) ) |
---|
| 145 | |
---|
[2715] | 146 | !* Variable for chemistry of the CO2 cycle |
---|
[3294] | 147 | ALLOCATE( akb3(jpi,jpj,jpk) , ak13 (jpi,jpj,jpk) , & |
---|
| 148 | & ak23(jpi,jpj,jpk) , aksp (jpi,jpj,jpk) , & |
---|
| 149 | & akw3(jpi,jpj,jpk) , borat (jpi,jpj,jpk) , & |
---|
[3680] | 150 | & hi (jpi,jpj,jpk) , excess(jpi,jpj,jpk) , STAT=ierr(4) ) |
---|
[2715] | 151 | ! |
---|
[3294] | 152 | !* Temperature dependancy of SMS terms |
---|
[3680] | 153 | ALLOCATE( tgfunc(jpi,jpj,jpk) , tgfunc2(jpi,jpj,jpk) , STAT=ierr(5) ) |
---|
[3294] | 154 | ! |
---|
[2715] | 155 | !* Array used to indicate negative tracer values |
---|
[3680] | 156 | ALLOCATE( xnegtr(jpi,jpj,jpk) , STAT=ierr(6) ) |
---|
| 157 | #endif |
---|
[2715] | 158 | ! |
---|
| 159 | sms_pisces_alloc = MAXVAL( ierr ) |
---|
| 160 | ! |
---|
| 161 | IF( sms_pisces_alloc /= 0 ) CALL ctl_warn('sms_pisces_alloc: failed to allocate arrays') |
---|
| 162 | ! |
---|
| 163 | END FUNCTION sms_pisces_alloc |
---|
| 164 | |
---|
[1073] | 165 | #else |
---|
| 166 | !!---------------------------------------------------------------------- |
---|
| 167 | !! Empty module : NO PISCES model |
---|
| 168 | !!---------------------------------------------------------------------- |
---|
| 169 | #endif |
---|
| 170 | |
---|
| 171 | !!====================================================================== |
---|
| 172 | END MODULE sms_pisces |
---|