[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 | !!---------------------------------------------------------------------- |
---|
[7041] | 9 | #if defined key_pisces |
---|
[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 | |
---|
[7041] | 31 | !!* Model used |
---|
| 32 | LOGICAL :: ln_p2z !: Flag to use LOBSTER model |
---|
| 33 | LOGICAL :: ln_p4z !: Flag to use PISCES model |
---|
| 34 | |
---|
| 35 | |
---|
[1445] | 36 | !!* Time variables |
---|
| 37 | INTEGER :: nrdttrc !: ??? |
---|
| 38 | INTEGER :: ndayflxtr !: ??? |
---|
| 39 | REAL(wp) :: rfact , rfactr !: ??? |
---|
| 40 | REAL(wp) :: rfact2, rfact2r !: ??? |
---|
[2528] | 41 | REAL(wp) :: xstep !: Time step duration for biology |
---|
[4996] | 42 | REAL(wp) :: ryyss !: number of seconds per year |
---|
| 43 | REAL(wp) :: r1_ryyss !: inverse number of seconds per year |
---|
[1073] | 44 | |
---|
[4996] | 45 | |
---|
[1445] | 46 | !!* Biological parameters |
---|
[3680] | 47 | INTEGER :: niter1max, niter2max !: Maximum number of iterations for sinking |
---|
[1445] | 48 | REAL(wp) :: rno3 !: ??? |
---|
| 49 | REAL(wp) :: o2ut !: ??? |
---|
| 50 | REAL(wp) :: po4r !: ??? |
---|
| 51 | REAL(wp) :: rdenit !: ??? |
---|
[3294] | 52 | REAL(wp) :: rdenita !: ??? |
---|
[1445] | 53 | REAL(wp) :: o2nit !: ??? |
---|
| 54 | REAL(wp) :: wsbio, wsbio2 !: ??? |
---|
| 55 | REAL(wp) :: xkmort !: ??? |
---|
| 56 | REAL(wp) :: ferat3 !: ??? |
---|
[1073] | 57 | |
---|
[3680] | 58 | !!* diagnostic parameters |
---|
| 59 | REAL(wp) :: tpp !: total primary production |
---|
| 60 | REAL(wp) :: t_oce_co2_exp !: total carbon export |
---|
| 61 | REAL(wp) :: t_oce_co2_flx !: Total ocean carbon flux |
---|
[4996] | 62 | REAL(wp) :: t_oce_co2_flx_cum !: Cumulative Total ocean carbon flux |
---|
[3680] | 63 | REAL(wp) :: t_atm_co2_flx !: global mean of atmospheric pco2 |
---|
[1073] | 64 | |
---|
[3680] | 65 | !!* restoring |
---|
| 66 | LOGICAL :: ln_pisdmp !: restoring or not of nutrients to a mean value |
---|
| 67 | INTEGER :: nn_pisdmp !: frequency of relaxation or not of nutrients to a mean value |
---|
[1073] | 68 | |
---|
[3680] | 69 | !!* Mass conservation |
---|
| 70 | LOGICAL :: ln_check_mass !: Flag to check mass conservation |
---|
| 71 | |
---|
[1445] | 72 | !!* Biological fluxes for primary production |
---|
[2715] | 73 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksimax !: ??? |
---|
| 74 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanono3 !: ??? |
---|
| 75 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiatno3 !: ??? |
---|
| 76 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanonh4 !: ??? |
---|
| 77 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiatnh4 !: ??? |
---|
[4529] | 78 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanopo4 !: ??? |
---|
| 79 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiatpo4 !: ??? |
---|
[2715] | 80 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimphy !: ??? |
---|
| 81 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimdia !: ??? |
---|
| 82 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: concdfe !: ??? |
---|
| 83 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: concnfe !: ??? |
---|
[3294] | 84 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimnfe !: ??? |
---|
| 85 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimdfe !: ??? |
---|
| 86 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimsi !: ??? |
---|
[3680] | 87 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: biron !: bioavailable fraction of iron |
---|
[1073] | 88 | |
---|
[3294] | 89 | |
---|
[1445] | 90 | !!* SMS for the organic matter |
---|
[2715] | 91 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xfracal !: ?? |
---|
| 92 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac !: ?? |
---|
| 93 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimbac !: ?? |
---|
[3680] | 94 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimbacl !: ?? |
---|
[2715] | 95 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiss !: ?? |
---|
[3680] | 96 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodcal !: Calcite production |
---|
[1073] | 97 | |
---|
[1445] | 98 | !!* Variable for chemistry of the CO2 cycle |
---|
[2715] | 99 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: akb3 !: ??? |
---|
| 100 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak13 !: ??? |
---|
| 101 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ak23 !: ??? |
---|
| 102 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aksp !: ??? |
---|
| 103 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: akw3 !: ??? |
---|
| 104 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: borat !: ??? |
---|
| 105 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hi !: ??? |
---|
[3294] | 106 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: excess !: ??? |
---|
[6291] | 107 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: aphscale !: |
---|
[1073] | 108 | |
---|
[6291] | 109 | |
---|
[3294] | 110 | !!* Temperature dependancy of SMS terms |
---|
| 111 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc !: Temp. dependancy of various biological rates |
---|
| 112 | REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tgfunc2 !: Temp. dependancy of mesozooplankton rates |
---|
| 113 | |
---|
[1073] | 114 | |
---|
[2715] | 115 | !!---------------------------------------------------------------------- |
---|
| 116 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
| 117 | !! $Id$ |
---|
| 118 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
| 119 | !!---------------------------------------------------------------------- |
---|
| 120 | CONTAINS |
---|
| 121 | |
---|
| 122 | INTEGER FUNCTION sms_pisces_alloc() |
---|
| 123 | !!---------------------------------------------------------------------- |
---|
| 124 | !! *** ROUTINE sms_pisces_alloc *** |
---|
| 125 | !!---------------------------------------------------------------------- |
---|
| 126 | USE lib_mpp , ONLY: ctl_warn |
---|
[5385] | 127 | INTEGER :: ierr(5) ! Local variables |
---|
[2715] | 128 | !!---------------------------------------------------------------------- |
---|
| 129 | ierr(:) = 0 |
---|
[3680] | 130 | !* Biological fluxes for light : shared variables for pisces & lobster |
---|
| 131 | ALLOCATE( etot(jpi,jpj,jpk), neln(jpi,jpj), heup(jpi,jpj), xksi(jpi,jpj), STAT=ierr(1) ) |
---|
[2715] | 132 | ! |
---|
[7041] | 133 | IF( ln_p4z ) THEN |
---|
| 134 | !* Biological fluxes for primary production |
---|
| 135 | ALLOCATE( xksimax(jpi,jpj) , biron (jpi,jpj,jpk), & |
---|
| 136 | & xnanono3(jpi,jpj,jpk), xdiatno3(jpi,jpj,jpk), & |
---|
| 137 | & xnanonh4(jpi,jpj,jpk), xdiatnh4(jpi,jpj,jpk), & |
---|
| 138 | & xnanopo4(jpi,jpj,jpk), xdiatpo4(jpi,jpj,jpk), & |
---|
| 139 | & xlimphy (jpi,jpj,jpk), xlimdia (jpi,jpj,jpk), & |
---|
| 140 | & xlimnfe (jpi,jpj,jpk), xlimdfe (jpi,jpj,jpk), & |
---|
| 141 | & xlimsi (jpi,jpj,jpk), concdfe (jpi,jpj,jpk), & |
---|
| 142 | & concnfe (jpi,jpj,jpk), STAT=ierr(2) ) |
---|
[2715] | 143 | ! |
---|
[7041] | 144 | !* SMS for the organic matter |
---|
| 145 | ALLOCATE( xfracal (jpi,jpj,jpk), nitrfac(jpi,jpj,jpk), & |
---|
| 146 | & xlimbac (jpi,jpj,jpk), xdiss (jpi,jpj,jpk), & |
---|
| 147 | & xlimbacl(jpi,jpj,jpk), prodcal(jpi,jpj,jpk), STAT=ierr(3) ) |
---|
[3680] | 148 | |
---|
[7041] | 149 | !* Variable for chemistry of the CO2 cycle |
---|
| 150 | ALLOCATE( akb3(jpi,jpj,jpk) , ak13 (jpi,jpj,jpk) , & |
---|
| 151 | & ak23(jpi,jpj,jpk) , aksp (jpi,jpj,jpk) , & |
---|
| 152 | & akw3(jpi,jpj,jpk) , borat (jpi,jpj,jpk) , & |
---|
| 153 | & hi (jpi,jpj,jpk) , excess(jpi,jpj,jpk) , & |
---|
| 154 | & aphscale(jpi,jpj,jpk), STAT=ierr(4) ) |
---|
| 155 | ! |
---|
| 156 | !* Temperature dependancy of SMS terms |
---|
| 157 | ALLOCATE( tgfunc(jpi,jpj,jpk) , tgfunc2(jpi,jpj,jpk) , STAT=ierr(5) ) |
---|
[2715] | 158 | ! |
---|
[7041] | 159 | ENDIF |
---|
[2715] | 160 | ! |
---|
| 161 | sms_pisces_alloc = MAXVAL( ierr ) |
---|
| 162 | ! |
---|
| 163 | IF( sms_pisces_alloc /= 0 ) CALL ctl_warn('sms_pisces_alloc: failed to allocate arrays') |
---|
| 164 | ! |
---|
| 165 | END FUNCTION sms_pisces_alloc |
---|
| 166 | |
---|
[1073] | 167 | #else |
---|
| 168 | !!---------------------------------------------------------------------- |
---|
| 169 | !! Empty module : NO PISCES model |
---|
| 170 | !!---------------------------------------------------------------------- |
---|
| 171 | #endif |
---|
| 172 | |
---|
| 173 | !!====================================================================== |
---|
| 174 | END MODULE sms_pisces |
---|