Changeset 3680 for branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC
- Timestamp:
- 2012-11-27T15:42:24+01:00 (11 years ago)
- Location:
- branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC
- Files:
-
- 18 deleted
- 35 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/C14b/par_c14b.F90
r2715 r3680 6 6 !! History : 2.0 ! 2008-12 (C. Ethe, G. Madec) revised architecture 7 7 !!---------------------------------------------------------------------- 8 USE par_lobster, ONLY : jp_lobster !: number of tracers in LOBSTER9 USE par_lobster, ONLY : jp_lobster_2d !: number of 2D diag in LOBSTER10 USE par_lobster, ONLY : jp_lobster_3d !: number of 3D diag in LOBSTER11 USE par_lobster, ONLY : jp_lobster_trd !: number of biological diag in LOBSTER12 13 8 USE par_pisces , ONLY : jp_pisces !: number of tracers in PISCES 14 9 USE par_pisces , ONLY : jp_pisces_2d !: number of 2D diag in PISCES … … 24 19 IMPLICIT NONE 25 20 26 INTEGER, PARAMETER :: jp_lb = jp_lobster +jp_pisces + jp_cfc !: cum. number of pass. tracers27 INTEGER, PARAMETER :: jp_lb_2d = jp_lobster_2d +jp_pisces_2d + jp_cfc_2d !:28 INTEGER, PARAMETER :: jp_lb_3d = jp_lobster_3d +jp_pisces_3d + jp_cfc_3d !:29 INTEGER, PARAMETER :: jp_lb_trd = jp_lobster_trd +jp_pisces_trd + jp_cfc_trd !:21 INTEGER, PARAMETER :: jp_lb = jp_pisces + jp_cfc !: cum. number of pass. tracers 22 INTEGER, PARAMETER :: jp_lb_2d = jp_pisces_2d + jp_cfc_2d !: 23 INTEGER, PARAMETER :: jp_lb_3d = jp_pisces_3d + jp_cfc_3d !: 24 INTEGER, PARAMETER :: jp_lb_trd = jp_pisces_trd + jp_cfc_trd !: 30 25 31 26 #if defined key_c14b -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90
r3294 r3680 125 125 xdecay = EXP( - xlambda * rdt ) 126 126 xaccum = 1._wp - xdecay 127 ! 128 IF( ln_rsttr ) THEN 129 IF(lwp) WRITE(numout,*) 130 IF(lwp) WRITE(numout,*) ' Read specific variables from C14b model ' 131 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 132 CALL iom_get( numrtr, jpdom_autoglo, 'qint_c14', qint_c14 ) 133 ENDIF 134 ! 135 IF(lwp) WRITE(numout,*) 136 ! 127 137 ENDIF 128 138 … … 271 281 END DO 272 282 283 ! 284 IF( lrst_trc ) THEN 285 IF(lwp) WRITE(numout,*) 286 IF(lwp) WRITE(numout,*) 'trc_sms_c14b : cumulated input function fields written in ocean restart file ', & 287 & 'at it= ', kt,' date= ', ndastp 288 IF(lwp) WRITE(numout,*) '~~~~' 289 CALL iom_rstput( kt, nitrst, numrtw, 'qint_c14', qint_c14 ) 290 ENDIF 291 ! 273 292 IF( ln_diatrc ) THEN 274 293 IF( lk_iomput ) THEN -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/CFC/par_cfc.F90
r3294 r3680 10 10 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 11 11 !!---------------------------------------------------------------------- 12 USE par_lobster, ONLY : jp_lobster !: number of tracers in LOBSTER13 USE par_lobster, ONLY : jp_lobster_2d !: number of 2D diag in LOBSTER14 USE par_lobster, ONLY : jp_lobster_3d !: number of 3D diag in LOBSTER15 USE par_lobster, ONLY : jp_lobster_trd !: number of biological diag in LOBSTER16 17 12 USE par_pisces , ONLY : jp_pisces !: number of tracers in PISCES 18 13 USE par_pisces , ONLY : jp_pisces_2d !: number of 2D diag in PISCES … … 22 17 IMPLICIT NONE 23 18 24 INTEGER, PARAMETER :: jp_lc = jp_lobster +jp_pisces !: cumulative number of passive tracers25 INTEGER, PARAMETER :: jp_lc_2d = jp_lobster_2d +jp_pisces_2d !:26 INTEGER, PARAMETER :: jp_lc_3d = jp_lobster_3d +jp_pisces_3d !:27 INTEGER, PARAMETER :: jp_lc_trd = jp_lobster_trd +jp_pisces_trd !:19 INTEGER, PARAMETER :: jp_lc = jp_pisces !: cumulative number of passive tracers 20 INTEGER, PARAMETER :: jp_lc_2d = jp_pisces_2d !: 21 INTEGER, PARAMETER :: jp_lc_3d = jp_pisces_3d !: 22 INTEGER, PARAMETER :: jp_lc_trd = jp_pisces_trd !: 28 23 29 24 #if defined key_cfc -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
r3294 r3680 13 13 !!---------------------------------------------------------------------- 14 14 !! trc_sms_cfc : compute and add CFC suface forcing to CFC trends 15 !! trc_cfc_cst: sets constants for CFC surface forcing computation15 !! cfc_init : sets constants for CFC surface forcing computation 16 16 !!---------------------------------------------------------------------- 17 17 USE oce_trc ! Ocean variables … … 99 99 ENDIF 100 100 101 IF( kt == nittrc000 ) CALL trc_cfc_cst101 IF( kt == nittrc000 ) CALL cfc_init 102 102 103 103 ! Temporal interpolation … … 176 176 ! !----------------! 177 177 END DO ! end CFC loop ! 178 ! !----------------! 178 ! 179 IF( lrst_trc ) THEN 180 IF(lwp) WRITE(numout,*) 181 IF(lwp) WRITE(numout,*) 'trc_sms_cfc : cumulated input function fields written in ocean restart file ', & 182 & 'at it= ', kt,' date= ', ndastp 183 IF(lwp) WRITE(numout,*) '~~~~' 184 DO jn = jp_cfc0, jp_cfc1 185 CALL iom_rstput( kt, nitrst, numrtw, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) 186 END DO 187 ENDIF 188 ! 179 189 IF( ln_diatrc ) THEN 180 190 ! … … 200 210 201 211 202 SUBROUTINE trc_cfc_cst212 SUBROUTINE cfc_init 203 213 !!--------------------------------------------------------------------- 204 !! *** trc_cfc_cst ***214 !! *** cfc_init *** 205 215 !! 206 216 !! ** Purpose : sets constants for CFC model 207 217 !!--------------------------------------------------------------------- 218 INTEGER :: jn 208 219 209 220 ! coefficient for CFC11 … … 245 256 sca(4,2) = -0.067430 246 257 247 END SUBROUTINE trc_cfc_cst 258 IF( ln_rsttr ) THEN 259 IF(lwp) WRITE(numout,*) 260 IF(lwp) WRITE(numout,*) ' Read specific variables from CFC model ' 261 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 262 ! 263 DO jn = jp_cfc0, jp_cfc1 264 CALL iom_get( numrtr, jpdom_autoglo, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) ) 265 END DO 266 ENDIF 267 IF(lwp) WRITE(numout,*) 268 ! 269 END SUBROUTINE cfc_init 248 270 249 271 -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/MY_TRC/par_my_trc.F90
r2528 r3680 10 10 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 11 11 !!---------------------------------------------------------------------- 12 USE par_lobster, ONLY : jp_lobster !: number of tracers in LOBSTER13 USE par_lobster, ONLY : jp_lobster_2d !: number of 2D diag in LOBSTER14 USE par_lobster, ONLY : jp_lobster_3d !: number of 3D diag in LOBSTER15 USE par_lobster, ONLY : jp_lobster_trd !: number of biological diag in LOBSTER16 17 12 USE par_pisces , ONLY : jp_pisces !: number of tracers in PISCES 18 13 USE par_pisces , ONLY : jp_pisces_2d !: number of 2D diag in PISCES … … 32 27 IMPLICIT NONE 33 28 34 INTEGER, PARAMETER :: jp_lm = jp_lobster +jp_pisces + jp_cfc + jp_c14b !:35 INTEGER, PARAMETER :: jp_lm_2d = jp_lobster_2d +jp_pisces_2d + jp_cfc_2d + jp_c14b_2d !:36 INTEGER, PARAMETER :: jp_lm_3d = jp_lobster_3d +jp_pisces_3d + jp_cfc_3d + jp_c14b_3d !:37 INTEGER, PARAMETER :: jp_lm_trd = jp_lobster_trd +jp_pisces_trd + jp_cfc_trd + jp_c14b_trd !:29 INTEGER, PARAMETER :: jp_lm = jp_pisces + jp_cfc + jp_c14b !: 30 INTEGER, PARAMETER :: jp_lm_2d = jp_pisces_2d + jp_cfc_2d + jp_c14b_2d !: 31 INTEGER, PARAMETER :: jp_lm_3d = jp_pisces_3d + jp_cfc_3d + jp_c14b_3d !: 32 INTEGER, PARAMETER :: jp_lm_trd = jp_pisces_trd + jp_cfc_trd + jp_c14b_trd !: 38 33 39 34 #if defined key_my_trc … … 42 37 !!--------------------------------------------------------------------- 43 38 LOGICAL, PUBLIC, PARAMETER :: lk_my_trc = .TRUE. !: PTS flag 44 INTEGER, PUBLIC, PARAMETER :: jp_my_trc = 2!: number of PTS tracers39 INTEGER, PUBLIC, PARAMETER :: jp_my_trc = 1 !: number of PTS tracers 45 40 INTEGER, PUBLIC, PARAMETER :: jp_my_trc_2d = 0 !: additional 2d output arrays ('key_trc_diaadd') 46 41 INTEGER, PUBLIC, PARAMETER :: jp_my_trc_3d = 0 !: additional 3d output arrays ('key_trc_diaadd') … … 49 44 ! assign an index in trc arrays for each PTS prognostic variables 50 45 INTEGER, PUBLIC, PARAMETER :: jpmyt1 = jp_lm + 1 !: 1st MY_TRC tracer 51 INTEGER, PUBLIC, PARAMETER :: jpmyt2 = jp_lm + 2 !: 2nd MY_TRC tracer52 46 53 47 #else -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcnam_my_trc.F90
r2528 r3680 2 2 !!====================================================================== 3 3 !! *** MODULE trcnam_my_trc *** 4 !! TOP : initialisation of some run parameters for LOBSTERbio-model4 !! TOP : initialisation of some run parameters for MY_TRC bio-model 5 5 !!====================================================================== 6 6 !! History : 2.0 ! 2007-12 (C. Ethe, G. Madec) Original code -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90
r3294 r3680 62 62 END WHERE 63 63 64 WHERE( ((glamt <= -165) .OR. (glamt >= 160)) .AND. (gphit <= -76) .AND. (gphit >=-80))65 trn(:,:,1,jpmyt2) = 1._wp66 trb(:,:,1,jpmyt2) = 1._wp67 tra(:,:,1,jpmyt2) = 0._wp68 END WHERE69 70 64 IF( l_trdtrc ) THEN ! Save the trends in the ixed layer 71 65 DO jn = jp_myt0, jp_myt1 -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
r3531 r3680 105 105 DO ji = 1, jpi 106 106 zdep = rfact2 / fse3t(ji,jj,1) 107 zwflux = ( emps(ji,jj) - emp(ji,jj) ) & 108 & * tsn(ji,jj,1,jp_sal) / ( tsn(ji,jj,1,jp_sal) - 6.0 ) / 1000. 107 ! zwflux = ( emps(ji,jj) - emp(ji,jj) ) & 108 ! & * tsn(ji,jj,1,jp_sal) / ( tsn(ji,jj,1,jp_sal) - 6.0 ) / 1000. 109 zwflux = 0. 109 110 zfminus = MIN( 0., -zwflux ) * trn(ji,jj,1,jpfer) * zdep 110 111 zfplus = MAX( 0., -zwflux ) * 10E-9 * zdep -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/par_pisces.F90
r3295 r3680 10 10 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 11 11 !!---------------------------------------------------------------------- 12 USE par_lobster, ONLY : jp_lobster !: number of tracers in LOBSTER13 USE par_lobster, ONLY : jp_lobster_2d !: number of 2D diag in LOBSTER14 USE par_lobster, ONLY : jp_lobster_3d !: number of 3D diag in LOBSTER15 USE par_lobster, ONLY : jp_lobster_trd !: number of biological diag in LOBSTER16 12 17 13 IMPLICIT NONE 18 14 19 INTEGER, PUBLIC, PARAMETER :: jp_lp = jp_lobster !: cumulative number of already defined TRC 20 INTEGER, PUBLIC, PARAMETER :: jp_lp_2d = jp_lobster_2d !: 21 INTEGER, PUBLIC, PARAMETER :: jp_lp_3d = jp_lobster_3d !: 22 INTEGER, PUBLIC, PARAMETER :: jp_lp_trd = jp_lobster_trd !: 15 #if defined key_pisces_reduced 16 !!--------------------------------------------------------------------- 17 !! 'key_pisces_reduced' : LOBSTER bio-model 18 !!--------------------------------------------------------------------- 19 LOGICAL, PUBLIC, PARAMETER :: lk_pisces = .TRUE. !: PISCES flag 20 LOGICAL, PUBLIC, PARAMETER :: lk_p4z = .FALSE. !: p4z flag 21 INTEGER, PUBLIC, PARAMETER :: jp_pisces = 6 !: number of passive tracers 22 INTEGER, PUBLIC, PARAMETER :: jp_pisces_2d = 19 !: additional 2d output 23 INTEGER, PUBLIC, PARAMETER :: jp_pisces_3d = 3 !: additional 3d output 24 INTEGER, PUBLIC, PARAMETER :: jp_pisces_trd = 17 !: number of sms trends for PISCES 23 25 24 #if defined key_pisces && defined key_kriest 26 ! assign an index in trc arrays for each LOBSTER prognostic variables 27 INTEGER, PUBLIC, PARAMETER :: jpdet = 1 !: detritus [mmoleN/m3] 28 INTEGER, PUBLIC, PARAMETER :: jpzoo = 2 !: zooplancton concentration [mmoleN/m3] 29 INTEGER, PUBLIC, PARAMETER :: jpphy = 3 !: phytoplancton concentration [mmoleN/m3] 30 INTEGER, PUBLIC, PARAMETER :: jpno3 = 4 !: nitrate concentration [mmoleN/m3] 31 INTEGER, PUBLIC, PARAMETER :: jpnh4 = 5 !: ammonium concentration [mmoleN/m3] 32 INTEGER, PUBLIC, PARAMETER :: jpdom = 6 !: dissolved organic matter [mmoleN/m3] 33 34 ! productive layer depth 35 INTEGER, PUBLIC, PARAMETER :: jpkb = 12 !: first vertical layers where biology is active 36 INTEGER, PUBLIC, PARAMETER :: jpkbm1 = jpkb - 1 !: first vertical layers where biology is active 37 38 #elif defined key_pisces && defined key_kriest 25 39 !!--------------------------------------------------------------------- 26 40 !! 'key_pisces' & 'key_kriest' PISCES bio-model + ??? 27 41 !!--------------------------------------------------------------------- 28 42 LOGICAL, PUBLIC, PARAMETER :: lk_pisces = .TRUE. !: PISCES flag 43 LOGICAL, PUBLIC, PARAMETER :: lk_p4z = .TRUE. !: p4z flag 29 44 LOGICAL, PUBLIC, PARAMETER :: lk_kriest = .TRUE. !: Kriest flag 30 45 INTEGER, PUBLIC, PARAMETER :: jp_pisces = 23 !: number of passive tracers … … 36 51 ! WARNING: be carefull about the order when reading the restart 37 52 ! !!gm this warning should be obsolet with IOM 38 INTEGER, PUBLIC, PARAMETER :: jpdic = jp_lp +1 !: dissolved inoganic carbon concentration39 INTEGER, PUBLIC, PARAMETER :: jptal = jp_lp +2 !: total alkalinity40 INTEGER, PUBLIC, PARAMETER :: jpoxy = jp_lp +3 !: oxygen carbon concentration41 INTEGER, PUBLIC, PARAMETER :: jpcal = jp_lp +4 !: calcite concentration42 INTEGER, PUBLIC, PARAMETER :: jppo4 = jp_lp +5 !: phosphate concentration43 INTEGER, PUBLIC, PARAMETER :: jppoc = jp_lp +6 !: small particulate organic phosphate concentration44 INTEGER, PUBLIC, PARAMETER :: jpsil = jp_lp +7 !: silicate concentration45 INTEGER, PUBLIC, PARAMETER :: jpphy = jp_lp +8 !: phytoplancton concentration46 INTEGER, PUBLIC, PARAMETER :: jpzoo = jp_lp +9 !: zooplancton concentration47 INTEGER, PUBLIC, PARAMETER :: jpdoc = jp_lp +10 !: dissolved organic carbon concentration48 INTEGER, PUBLIC, PARAMETER :: jpdia = jp_lp +11 !: Diatoms Concentration49 INTEGER, PUBLIC, PARAMETER :: jpmes = jp_lp +12 !: Mesozooplankton Concentration50 INTEGER, PUBLIC, PARAMETER :: jpdsi = jp_lp +13 !: (big) Silicate Concentration51 INTEGER, PUBLIC, PARAMETER :: jpfer = jp_lp +14 !: Iron Concentration52 INTEGER, PUBLIC, PARAMETER :: jpnum = jp_lp +15 !: Big iron particles Concentration53 INTEGER, PUBLIC, PARAMETER :: jpsfe = jp_lp +16 !: number of particulate organic phosphate concentration54 INTEGER, PUBLIC, PARAMETER :: jpdfe = jp_lp +17 !: Diatoms iron Concentration55 INTEGER, PUBLIC, PARAMETER :: jpgsi = jp_lp +18 !: Diatoms Silicate Concentration56 INTEGER, PUBLIC, PARAMETER :: jpnfe = jp_lp +19 !: Nano iron Concentration57 INTEGER, PUBLIC, PARAMETER :: jpnch = jp_lp +20 !: Nano Chlorophyll Concentration58 INTEGER, PUBLIC, PARAMETER :: jpdch = jp_lp +21 !: Diatoms Chlorophyll Concentration59 INTEGER, PUBLIC, PARAMETER :: jpno3 = jp_lp +22 !: Nitrates Concentration60 INTEGER, PUBLIC, PARAMETER :: jpnh4 = jp_lp +23 !: Ammonium Concentration53 INTEGER, PUBLIC, PARAMETER :: jpdic = 1 !: dissolved inoganic carbon concentration 54 INTEGER, PUBLIC, PARAMETER :: jptal = 2 !: total alkalinity 55 INTEGER, PUBLIC, PARAMETER :: jpoxy = 3 !: oxygen carbon concentration 56 INTEGER, PUBLIC, PARAMETER :: jpcal = 4 !: calcite concentration 57 INTEGER, PUBLIC, PARAMETER :: jppo4 = 5 !: phosphate concentration 58 INTEGER, PUBLIC, PARAMETER :: jppoc = 6 !: small particulate organic phosphate concentration 59 INTEGER, PUBLIC, PARAMETER :: jpsil = 7 !: silicate concentration 60 INTEGER, PUBLIC, PARAMETER :: jpphy = 8 !: phytoplancton concentration 61 INTEGER, PUBLIC, PARAMETER :: jpzoo = 9 !: zooplancton concentration 62 INTEGER, PUBLIC, PARAMETER :: jpdoc = 10 !: dissolved organic carbon concentration 63 INTEGER, PUBLIC, PARAMETER :: jpdia = 11 !: Diatoms Concentration 64 INTEGER, PUBLIC, PARAMETER :: jpmes = 12 !: Mesozooplankton Concentration 65 INTEGER, PUBLIC, PARAMETER :: jpdsi = 13 !: (big) Silicate Concentration 66 INTEGER, PUBLIC, PARAMETER :: jpfer = 14 !: Iron Concentration 67 INTEGER, PUBLIC, PARAMETER :: jpnum = 15 !: Big iron particles Concentration 68 INTEGER, PUBLIC, PARAMETER :: jpsfe = 16 !: number of particulate organic phosphate concentration 69 INTEGER, PUBLIC, PARAMETER :: jpdfe = 17 !: Diatoms iron Concentration 70 INTEGER, PUBLIC, PARAMETER :: jpgsi = 18 !: Diatoms Silicate Concentration 71 INTEGER, PUBLIC, PARAMETER :: jpnfe = 19 !: Nano iron Concentration 72 INTEGER, PUBLIC, PARAMETER :: jpnch = 20 !: Nano Chlorophyll Concentration 73 INTEGER, PUBLIC, PARAMETER :: jpdch = 21 !: Diatoms Chlorophyll Concentration 74 INTEGER, PUBLIC, PARAMETER :: jpno3 = 22 !: Nitrates Concentration 75 INTEGER, PUBLIC, PARAMETER :: jpnh4 = 23 !: Ammonium Concentration 61 76 62 77 #elif defined key_pisces … … 65 80 !!--------------------------------------------------------------------- 66 81 LOGICAL, PUBLIC, PARAMETER :: lk_pisces = .TRUE. !: PISCES flag 82 LOGICAL, PUBLIC, PARAMETER :: lk_p4z = .TRUE. !: p4z flag 67 83 LOGICAL, PUBLIC, PARAMETER :: lk_kriest = .FALSE. !: Kriest flag 68 84 INTEGER, PUBLIC, PARAMETER :: jp_pisces = 24 !: number of PISCES passive tracers … … 74 90 ! WARNING: be carefull about the order when reading the restart 75 91 ! !!gm this warning should be obsolet with IOM 76 INTEGER, PUBLIC, PARAMETER :: jpdic = jp_lp +1 !: dissolved inoganic carbon concentration77 INTEGER, PUBLIC, PARAMETER :: jptal = jp_lp +2 !: total alkalinity78 INTEGER, PUBLIC, PARAMETER :: jpoxy = jp_lp +3 !: oxygen carbon concentration79 INTEGER, PUBLIC, PARAMETER :: jpcal = jp_lp +4 !: calcite concentration80 INTEGER, PUBLIC, PARAMETER :: jppo4 = jp_lp +5 !: phosphate concentration81 INTEGER, PUBLIC, PARAMETER :: jppoc = jp_lp +6 !: small particulate organic phosphate concentration82 INTEGER, PUBLIC, PARAMETER :: jpsil = jp_lp +7 !: silicate concentration83 INTEGER, PUBLIC, PARAMETER :: jpphy = jp_lp +8 !: phytoplancton concentration84 INTEGER, PUBLIC, PARAMETER :: jpzoo = jp_lp +9 !: zooplancton concentration85 INTEGER, PUBLIC, PARAMETER :: jpdoc = jp_lp +10 !: dissolved organic carbon concentration86 INTEGER, PUBLIC, PARAMETER :: jpdia = jp_lp +11 !: Diatoms Concentration87 INTEGER, PUBLIC, PARAMETER :: jpmes = jp_lp +12 !: Mesozooplankton Concentration88 INTEGER, PUBLIC, PARAMETER :: jpdsi = jp_lp +13 !: (big) Silicate Concentration89 INTEGER, PUBLIC, PARAMETER :: jpfer = jp_lp +14 !: Iron Concentration90 INTEGER, PUBLIC, PARAMETER :: jpbfe = jp_lp +15 !: Big iron particles Concentration91 INTEGER, PUBLIC, PARAMETER :: jpgoc = jp_lp +16 !: big particulate organic phosphate concentration92 INTEGER, PUBLIC, PARAMETER :: jpsfe = jp_lp +17 !: Small iron particles Concentration93 INTEGER, PUBLIC, PARAMETER :: jpdfe = jp_lp +18 !: Diatoms iron Concentration94 INTEGER, PUBLIC, PARAMETER :: jpgsi = jp_lp +19 !: Diatoms Silicate Concentration95 INTEGER, PUBLIC, PARAMETER :: jpnfe = jp_lp +20 !: Nano iron Concentration96 INTEGER, PUBLIC, PARAMETER :: jpnch = jp_lp +21 !: Nano Chlorophyll Concentration97 INTEGER, PUBLIC, PARAMETER :: jpdch = jp_lp +22 !: Diatoms Chlorophyll Concentration98 INTEGER, PUBLIC, PARAMETER :: jpno3 = jp_lp +23 !: Nitrates Concentration99 INTEGER, PUBLIC, PARAMETER :: jpnh4 = jp_lp +24 !: Ammonium Concentration92 INTEGER, PUBLIC, PARAMETER :: jpdic = 1 !: dissolved inoganic carbon concentration 93 INTEGER, PUBLIC, PARAMETER :: jptal = 2 !: total alkalinity 94 INTEGER, PUBLIC, PARAMETER :: jpoxy = 3 !: oxygen carbon concentration 95 INTEGER, PUBLIC, PARAMETER :: jpcal = 4 !: calcite concentration 96 INTEGER, PUBLIC, PARAMETER :: jppo4 = 5 !: phosphate concentration 97 INTEGER, PUBLIC, PARAMETER :: jppoc = 6 !: small particulate organic phosphate concentration 98 INTEGER, PUBLIC, PARAMETER :: jpsil = 7 !: silicate concentration 99 INTEGER, PUBLIC, PARAMETER :: jpphy = 8 !: phytoplancton concentration 100 INTEGER, PUBLIC, PARAMETER :: jpzoo = 9 !: zooplancton concentration 101 INTEGER, PUBLIC, PARAMETER :: jpdoc = 10 !: dissolved organic carbon concentration 102 INTEGER, PUBLIC, PARAMETER :: jpdia = 11 !: Diatoms Concentration 103 INTEGER, PUBLIC, PARAMETER :: jpmes = 12 !: Mesozooplankton Concentration 104 INTEGER, PUBLIC, PARAMETER :: jpdsi = 13 !: (big) Silicate Concentration 105 INTEGER, PUBLIC, PARAMETER :: jpfer = 14 !: Iron Concentration 106 INTEGER, PUBLIC, PARAMETER :: jpbfe = 15 !: Big iron particles Concentration 107 INTEGER, PUBLIC, PARAMETER :: jpgoc = 16 !: big particulate organic phosphate concentration 108 INTEGER, PUBLIC, PARAMETER :: jpsfe = 17 !: Small iron particles Concentration 109 INTEGER, PUBLIC, PARAMETER :: jpdfe = 18 !: Diatoms iron Concentration 110 INTEGER, PUBLIC, PARAMETER :: jpgsi = 19 !: Diatoms Silicate Concentration 111 INTEGER, PUBLIC, PARAMETER :: jpnfe = 20 !: Nano iron Concentration 112 INTEGER, PUBLIC, PARAMETER :: jpnch = 21 !: Nano Chlorophyll Concentration 113 INTEGER, PUBLIC, PARAMETER :: jpdch = 22 !: Diatoms Chlorophyll Concentration 114 INTEGER, PUBLIC, PARAMETER :: jpno3 = 23 !: Nitrates Concentration 115 INTEGER, PUBLIC, PARAMETER :: jpnh4 = 24 !: Ammonium Concentration 100 116 101 117 #else … … 103 119 !! Default No CFC geochemical model 104 120 !!--------------------------------------------------------------------- 105 LOGICAL, PUBLIC, PARAMETER :: lk_pisces = .FALSE. !: CFCflag106 LOGICAL, PUBLIC, PARAMETER :: lk_ kriest = .FALSE. !: Kriestflag121 LOGICAL, PUBLIC, PARAMETER :: lk_pisces = .FALSE. !: PISCES flag 122 LOGICAL, PUBLIC, PARAMETER :: lk_p4z = .FALSE. !: p4z flag 107 123 INTEGER, PUBLIC, PARAMETER :: jp_pisces = 0 !: No CFC tracers 108 124 INTEGER, PUBLIC, PARAMETER :: jp_pisces_2d = 0 !: No CFC additional 2d output arrays … … 112 128 113 129 ! Starting/ending PISCES do-loop indices (N.B. no PISCES : jpl_pcs < jpf_pcs the do-loop are never done) 114 INTEGER, PUBLIC, PARAMETER :: jp_pcs0 = jp_lp +1 !: First index of PISCES tracers115 INTEGER, PUBLIC, PARAMETER :: jp_pcs1 = jp_ lp + jp_pisces !: Last index of PISCES tracers116 INTEGER, PUBLIC, PARAMETER :: jp_pcs0_2d = jp_lp_2d +1 !: First index of 2D diag117 INTEGER, PUBLIC, PARAMETER :: jp_pcs1_2d = jp_ lp_2d + jp_pisces_2d !: Last index of 2D diag118 INTEGER, PUBLIC, PARAMETER :: jp_pcs0_3d = jp_lp_3d +1 !: First index of 3D diag119 INTEGER, PUBLIC, PARAMETER :: jp_pcs1_3d = jp_ lp_3d + jp_pisces_3d !: Last index of 3d diag120 INTEGER, PUBLIC, PARAMETER :: jp_pcs0_trd = jp_lp_trd +1 !: First index of bio diag121 INTEGER, PUBLIC, PARAMETER :: jp_pcs1_trd = jp_ lp_trd + jp_pisces_trd !: Last index of bio diag130 INTEGER, PUBLIC, PARAMETER :: jp_pcs0 = 1 !: First index of PISCES tracers 131 INTEGER, PUBLIC, PARAMETER :: jp_pcs1 = jp_pisces !: Last index of PISCES tracers 132 INTEGER, PUBLIC, PARAMETER :: jp_pcs0_2d = 1 !: First index of 2D diag 133 INTEGER, PUBLIC, PARAMETER :: jp_pcs1_2d = jp_pisces_2d !: Last index of 2D diag 134 INTEGER, PUBLIC, PARAMETER :: jp_pcs0_3d = 1 !: First index of 3D diag 135 INTEGER, PUBLIC, PARAMETER :: jp_pcs1_3d = jp_pisces_3d !: Last index of 3d diag 136 INTEGER, PUBLIC, PARAMETER :: jp_pcs0_trd = 1 !: First index of bio diag 137 INTEGER, PUBLIC, PARAMETER :: jp_pcs1_trd = jp_pisces_trd !: Last index of bio diag 122 138 123 139 -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90
r3294 r3680 7 7 !! 3.2 ! 2009-04 (C. Ethe & NEMO team) style 8 8 !!---------------------------------------------------------------------- 9 #if defined key_pisces 9 #if defined key_pisces || defined key_pisces_reduced 10 10 !!---------------------------------------------------------------------- 11 11 !! 'key_pisces' PISCES model … … 19 19 INTEGER :: numnatp 20 20 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 21 30 !!* Time variables 22 31 INTEGER :: nrdttrc !: ??? … … 27 36 28 37 !!* Biological parameters 38 INTEGER :: niter1max, niter2max !: Maximum number of iterations for sinking 29 39 REAL(wp) :: rno3 !: ??? 30 40 REAL(wp) :: o2ut !: ??? … … 37 47 REAL(wp) :: ferat3 !: ??? 38 48 39 !!* Damping40 LOGICAL :: ln_pisdmp !: relaxation or not of nutrients to a mean value41 INTEGER :: nn_pisdmp !: frequency of relaxation or not of nutrients to a mean value42 LOGICAL :: ln_pisclo !: Restoring or not of nutrients to initial value43 !: on close seas49 !!* 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 44 54 45 !!* Biological fluxes for light 46 INTEGER , ALLOCATABLE, SAVE, DIMENSION(:,:) :: neln !: number of T-levels + 1 in the euphotic layer 47 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: heup !: euphotic layer depth 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 59 60 !!* Mass conservation 61 LOGICAL :: ln_check_mass !: Flag to check mass conservation 48 62 49 63 !!* Biological fluxes for primary production 50 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksi !: ???51 64 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: xksimax !: ??? 52 65 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xnanono3 !: ??? … … 61 74 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimdfe !: ??? 62 75 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimsi !: ??? 76 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: biron !: bioavailable fraction of iron 63 77 64 78 … … 67 81 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrfac !: ?? 68 82 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimbac !: ?? 83 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xlimbacl !: ?? 69 84 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xdiss !: ?? 70 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodcal !: Calcite production 71 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: grazing !: Total zooplankton grazing 85 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: prodcal !: Calcite production 72 86 73 87 !!* Variable for chemistry of the CO2 cycle … … 96 110 #endif 97 111 112 #endif 98 113 !!---------------------------------------------------------------------- 99 114 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 111 126 !!---------------------------------------------------------------------- 112 127 ierr(:) = 0 113 !* Biological fluxes for light 114 ALLOCATE( neln(jpi,jpj), heup(jpi,jpj),STAT=ierr(1) )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) ) 115 130 ! 131 #if defined key_pisces 116 132 !* Biological fluxes for primary production 117 ALLOCATE( xksimax(jpi,jpj) , xksi(jpi,jpj), &133 ALLOCATE( xksimax(jpi,jpj) , biron (jpi,jpj,jpk), & 118 134 & xnanono3(jpi,jpj,jpk), xdiatno3(jpi,jpj,jpk), & 119 135 & xnanonh4(jpi,jpj,jpk), xdiatnh4(jpi,jpj,jpk), & … … 121 137 & xlimnfe (jpi,jpj,jpk), xlimdfe (jpi,jpj,jpk), & 122 138 & xlimsi (jpi,jpj,jpk), concdfe (jpi,jpj,jpk), & 123 & concnfe (jpi,jpj,jpk), STAT=ierr(2) )139 & concnfe (jpi,jpj,jpk), STAT=ierr(2) ) 124 140 ! 125 141 !* SMS for the organic matter 126 142 ALLOCATE( xfracal (jpi,jpj,jpk), nitrfac(jpi,jpj,jpk), & 127 & prodcal(jpi,jpj,jpk) , grazing(jpi,jpj,jpk), &128 & xlimbac (jpi,jpj,jpk), xdiss (jpi,jpj,jpk), STAT=ierr(3) )129 ! 143 & xlimbac (jpi,jpj,jpk), xdiss (jpi,jpj,jpk), & 144 & xlimbacl(jpi,jpj,jpk), prodcal(jpi,jpj,jpk), STAT=ierr(3) ) 145 130 146 !* Variable for chemistry of the CO2 cycle 131 147 ALLOCATE( akb3(jpi,jpj,jpk) , ak13 (jpi,jpj,jpk) , & 132 148 & ak23(jpi,jpj,jpk) , aksp (jpi,jpj,jpk) , & 133 149 & akw3(jpi,jpj,jpk) , borat (jpi,jpj,jpk) , & 134 & hi (jpi,jpj,jpk) , excess(jpi,jpj,jpk) , STAT=ierr(4) )150 & hi (jpi,jpj,jpk) , excess(jpi,jpj,jpk) , STAT=ierr(4) ) 135 151 ! 136 152 !* Temperature dependancy of SMS terms 137 ALLOCATE( tgfunc(jpi,jpj,jpk) , tgfunc2(jpi,jpj,jpk) , STAT=ierr(5) )153 ALLOCATE( tgfunc(jpi,jpj,jpk) , tgfunc2(jpi,jpj,jpk) , STAT=ierr(5) ) 138 154 ! 139 155 !* Array used to indicate negative tracer values 140 ALLOCATE( xnegtr(jpi,jpj,jpk) , STAT=ierr(6) ) 156 ALLOCATE( xnegtr(jpi,jpj,jpk) , STAT=ierr(6) ) 157 #endif 141 158 ! 142 159 sms_pisces_alloc = MAXVAL( ierr ) -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90
r3295 r3680 9 9 !! 1.0 ! 2005-03 (O. Aumont, A. El Moussaoui) F90 10 10 !! 2.0 ! 2007-12 (C. Ethe, G. Madec) from trcini.pisces.h90 11 !!---------------------------------------------------------------------- 12 #if defined key_pisces 11 !! 3.5 ! 2012-05 (C. Ethe) Merge PISCES-LOBSTER 12 !!---------------------------------------------------------------------- 13 #if defined key_pisces || defined key_pisces_reduced 13 14 !!---------------------------------------------------------------------- 14 15 !! 'key_pisces' PISCES bio-model … … 20 21 USE trc ! passive tracers common variables 21 22 USE sms_pisces ! PISCES Source Minus Sink variables 22 USE p4zche ! Chemical model23 USE p4zsink ! vertical flux of particulate matter due to sinking24 USE p4zopt ! optical model25 USE p4zrem ! Remineralisation of organic matter26 USE p4zflx ! Gas exchange27 USE p4zsed ! Sedimentation28 USE p4zlim ! Co-limitations of differents nutrients29 USE p4zprod ! Growth rate of the 2 phyto groups30 USE p4zmicro ! Sources and sinks of microzooplankton31 USE p4zmeso ! Sources and sinks of mesozooplankton32 USE p4zmort ! Mortality terms for phytoplankton33 USE p4zlys ! Calcite saturation34 USE p4zsed ! Sedimentation35 23 36 24 IMPLICIT NONE … … 39 27 PUBLIC trc_ini_pisces ! called by trcini.F90 module 40 28 41 REAL(wp) :: sco2 = 2.312e-3_wp42 REAL(wp) :: alka0 = 2.423e-3_wp43 REAL(wp) :: oxyg0 = 177.6e-6_wp44 REAL(wp) :: po4 = 2.174e-6_wp45 REAL(wp) :: bioma0 = 1.000e-8_wp46 REAL(wp) :: silic1 = 91.65e-6_wp47 REAL(wp) :: no3 = 31.04e-6_wp * 7.625_wp48 29 49 30 # include "top_substitute.h90" … … 61 42 !! ** Purpose : Initialisation of the PISCES biochemical model 62 43 !!---------------------------------------------------------------------- 63 ! 64 INTEGER :: ji, jj, jk 44 45 IF( lk_pisces ) THEN ; CALL p4z_ini ! PISCES 46 ELSE ; CALL p2z_ini ! LOBSTER 47 ENDIF 48 49 END SUBROUTINE trc_ini_pisces 50 51 SUBROUTINE p4z_ini 52 !!---------------------------------------------------------------------- 53 !! *** ROUTINE p4z_ini *** 54 !! 55 !! ** Purpose : Initialisation of the PISCES biochemical model 56 !!---------------------------------------------------------------------- 57 #if defined key_pisces 58 ! 59 USE p4zsms ! Main P4Z routine 60 USE p4zche ! Chemical model 61 USE p4zsink ! vertical flux of particulate matter due to sinking 62 USE p4zopt ! optical model 63 USE p4zsbc ! Boundary conditions 64 USE p4zfechem ! Iron chemistry 65 USE p4zrem ! Remineralisation of organic matter 66 USE p4zflx ! Gas exchange 67 USE p4zlim ! Co-limitations of differents nutrients 68 USE p4zprod ! Growth rate of the 2 phyto groups 69 USE p4zmicro ! Sources and sinks of microzooplankton 70 USE p4zmeso ! Sources and sinks of mesozooplankton 71 USE p4zmort ! Mortality terms for phytoplankton 72 USE p4zlys ! Calcite saturation 73 ! 74 REAL(wp), SAVE :: sco2 = 2.312e-3_wp 75 REAL(wp), SAVE :: alka0 = 2.423e-3_wp 76 REAL(wp), SAVE :: oxyg0 = 177.6e-6_wp 77 REAL(wp), SAVE :: po4 = 2.174e-6_wp 78 REAL(wp), SAVE :: bioma0 = 1.000e-8_wp 79 REAL(wp), SAVE :: silic1 = 91.65e-6_wp 80 REAL(wp), SAVE :: no3 = 31.04e-6_wp * 7.625_wp 81 ! 82 INTEGER :: ji, jj, jk, ierr 65 83 REAL(wp) :: zcaralk, zbicarb, zco3 66 84 REAL(wp) :: ztmas, ztmas1 67 85 !!---------------------------------------------------------------------- 86 68 87 IF(lwp) WRITE(numout,*) 69 IF(lwp) WRITE(numout,*) ' trc_ini_pisces: PISCES biochemical model initialisation'88 IF(lwp) WRITE(numout,*) ' p4z_ini : PISCES biochemical model initialisation' 70 89 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 71 90 72 CALL pisces_alloc() ! Allocate PISCES arrays 73 91 ! Allocate PISCES arrays 92 ierr = sms_pisces_alloc() 93 ierr = ierr + p4z_che_alloc() 94 ierr = ierr + p4z_sink_alloc() 95 ierr = ierr + p4z_opt_alloc() 96 ierr = ierr + p4z_prod_alloc() 97 ierr = ierr + p4z_rem_alloc() 98 ierr = ierr + p4z_flx_alloc() 99 ! 100 IF( lk_mpp ) CALL mpp_sum( ierr ) 101 IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'pisces_alloc: unable to allocate PISCES arrays' ) 102 ! 103 104 CALL p4z_sms_init ! Maint routine 74 105 ! ! Time-step 75 106 rfact = rdttrc(1) ! --------- … … 132 163 xksimax(:,:) = xksi(:,:) 133 164 134 ENDIF135 136 IF( .NOT. ln_rsttr ) THEN137 165 ! Initialization of chemical variables of the carbon cycle 138 166 ! -------------------------------------------------------- … … 159 187 CALL p4z_lim_init ! co-limitations by the various nutrients 160 188 CALL p4z_prod_init ! phytoplankton growth rate over the global ocean. 189 CALL p4z_sbc_init ! boundary conditions 190 CALL p4z_fechem_init ! Iron chemistry 161 191 CALL p4z_rem_init ! remineralisation 162 192 CALL p4z_mort_init ! phytoplankton mortality 163 193 CALL p4z_micro_init ! microzooplankton 164 194 CALL p4z_meso_init ! mesozooplankton 165 CALL p4z_sed_init ! sedimentation166 195 CALL p4z_lys_init ! calcite saturation 167 196 CALL p4z_flx_init ! gas exchange … … 172 201 IF(lwp) WRITE(numout,*) 'Initialization of PISCES tracers done' 173 202 IF(lwp) WRITE(numout,*) 174 ! 175 END SUBROUTINE trc_ini_pisces176 177 178 SUBROUTINE p isces_alloc179 !!---------------------------------------------------------------------- 180 !! *** ROUTINE pisces_alloc***203 #endif 204 ! 205 END SUBROUTINE p4z_ini 206 207 SUBROUTINE p2z_ini 208 !!---------------------------------------------------------------------- 209 !! *** ROUTINE p2z_ini *** 181 210 !! 182 !! ** Purpose : Allocate all the dynamic arrays of PISCES 183 !!---------------------------------------------------------------------- 184 ! 185 INTEGER :: ierr 186 !!---------------------------------------------------------------------- 187 ! 188 ierr = sms_pisces_alloc() ! Start of PISCES-related alloc routines... 189 ierr = ierr + p4z_che_alloc() 190 ierr = ierr + p4z_sink_alloc() 191 ierr = ierr + p4z_opt_alloc() 192 ierr = ierr + p4z_prod_alloc() 193 ierr = ierr + p4z_rem_alloc() 194 ierr = ierr + p4z_sed_alloc() 195 ierr = ierr + p4z_flx_alloc() 211 !! ** Purpose : Initialisation of the LOBSTER biochemical model 212 !!---------------------------------------------------------------------- 213 #if defined key_pisces_reduced 214 ! 215 USE p2zopt 216 USE p2zexp 217 USE p2zbio 218 USE p2zsed 219 ! 220 INTEGER :: ji, jj, jk, ierr 221 !!---------------------------------------------------------------------- 222 223 IF(lwp) WRITE(numout,*) 224 IF(lwp) WRITE(numout,*) ' p2z_ini : LOBSTER biochemical model initialisation' 225 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 226 227 ierr = sms_pisces_alloc() 228 ierr = ierr + p2z_exp_alloc() 196 229 ! 197 230 IF( lk_mpp ) CALL mpp_sum( ierr ) 198 IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'pisces_alloc: unable to allocate PISCES arrays' ) 199 ! 200 END SUBROUTINE pisces_alloc 201 231 IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'p2z_ini: unable to allocate LOBSTER arrays' ) 232 233 ! LOBSTER initialisation for GYRE : init NO3=f(density) by asklod AS Kremeur 2005-07 234 ! ---------------------- 235 IF( .NOT. ln_rsttr ) THEN ! in case of no restart 236 trn(:,:,:,jpdet) = 0.1 * tmask(:,:,:) 237 trn(:,:,:,jpzoo) = 0.1 * tmask(:,:,:) 238 trn(:,:,:,jpnh4) = 0.1 * tmask(:,:,:) 239 trn(:,:,:,jpphy) = 0.1 * tmask(:,:,:) 240 trn(:,:,:,jpdom) = 1.0 * tmask(:,:,:) 241 WHERE( rhd(:,:,:) <= 24.5e-3 ) ; trn(:,:,:,jpno3 ) = 2._wp * tmask(:,:,:) 242 ELSE WHERE ; trn(:,:,:,jpno3) = ( 15.55 * ( rhd(:,:,:) * 1000. ) - 380.11 ) * tmask(:,:,:) 243 END WHERE 244 ENDIF 245 ! ! Namelist read 246 CALL p2z_opt_init ! Optics parameters 247 CALL p2z_sed_init ! sedimentation 248 CALL p2z_bio_init ! biology 249 CALL p2z_exp_init ! export 250 ! 251 IF(lwp) WRITE(numout,*) 252 IF(lwp) WRITE(numout,*) 'Initialization of LOBSTER tracers done' 253 IF(lwp) WRITE(numout,*) 254 #endif 255 ! 256 END SUBROUTINE p2z_ini 202 257 #else 203 258 !!---------------------------------------------------------------------- -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90
r3294 r3680 1 1 MODULE trcnam_pisces 2 2 !!====================================================================== 3 !! *** MODULE trcnam_ lobster***3 !! *** MODULE trcnam_pisces *** 4 4 !! TOP : initialisation of some run parameters for PISCES bio-model 5 5 !!====================================================================== … … 9 9 !! 2.0 ! 2007-12 (C. Ethe, G. Madec) from trcnam.pisces.h90 10 10 !!---------------------------------------------------------------------- 11 #if defined key_pisces 11 #if defined key_pisces || defined key_pisces_reduced 12 12 !!---------------------------------------------------------------------- 13 13 !! 'key_pisces' : PISCES bio-model … … 19 19 USE trc ! TOP variables 20 20 USE sms_pisces ! sms trends 21 USE trdmod_trc_oce 21 22 USE iom ! I/O manager 22 23 … … 48 49 !! 49 50 INTEGER :: jl, jn 50 TYPE(DIAG), DIMENSION(jp_pisces_2d) :: pisdia2d 51 TYPE(DIAG), DIMENSION(jp_pisces_3d) :: pisdia3d 51 TYPE(DIAG), DIMENSION(jp_pisces_2d) :: pisdia2d 52 TYPE(DIAG), DIMENSION(jp_pisces_3d) :: pisdia3d 53 TYPE(DIAG), DIMENSION(jp_pisces_trd) :: pisdiabio 54 CHARACTER(LEN=20) :: clname 52 55 !! 53 NAMELIST/nampis bio/ nrdttrc, wsbio, xkmort, ferat3, wsbio254 #if defined key_ kriest55 NAMELIST/nampis krp/ xkr_eta, xkr_zeta, xkr_mass_min, xkr_mass_max56 NAMELIST/nampisdia/ pisdia3d, pisdia2d ! additional diagnostics 57 #if defined key_pisces_reduced 58 NAMELIST/nampisdbi/ pisdiabio 56 59 #endif 57 NAMELIST/nampisdia/ pisdia3d, pisdia2d ! additional diagnostics58 NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp, ln_pisclo59 60 60 61 !!---------------------------------------------------------------------- 61 62 62 63 IF(lwp) WRITE(numout,*) 63 IF(lwp) WRITE(numout,*) ' trc_nam_pisces : read PISCES namelists' 64 clname = 'namelist_pisces' 65 #if defined key_pisces 66 IF(lwp) WRITE(numout,*) ' trc_nam_pisces : read PISCES namelist' 67 #else 68 IF(lwp) WRITE(numout,*) ' trc_nam_pisces : read LOBSTER namelist' 69 #endif 64 70 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 71 CALL ctl_opn( numnatp, TRIM( clname ), 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 65 72 66 67 ! ! Open the namelist file68 ! ! ----------------------69 CALL ctl_opn( numnatp, 'namelist_pisces', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )70 71 REWIND( numnatp )72 READ ( numnatp, nampisbio )73 74 IF(lwp) THEN ! control print75 WRITE(numout,*) ' Namelist : nampisbio'76 WRITE(numout,*) ' frequence pour la biologie nrdttrc =', nrdttrc77 WRITE(numout,*) ' POC sinking speed wsbio =', wsbio78 WRITE(numout,*) ' half saturation constant for mortality xkmort =', xkmort79 WRITE(numout,*) ' Fe/C in zooplankton ferat3 =', ferat380 WRITE(numout,*) ' Big particles sinking speed wsbio2 =', wsbio281 ENDIF82 83 #if defined key_kriest84 85 ! ! nampiskrp : kriest parameters86 ! ! -----------------------------87 xkr_eta = 0.6288 xkr_zeta = 1.6289 xkr_mass_min = 0.000290 xkr_mass_max = 1.91 92 REWIND( numnatp ) ! read natkriest93 READ ( numnatp, nampiskrp )94 95 IF(lwp) THEN96 WRITE(numout,*)97 WRITE(numout,*) ' Namelist : nampiskrp'98 WRITE(numout,*) ' Sinking exponent xkr_eta = ', xkr_eta99 WRITE(numout,*) ' N content exponent xkr_zeta = ', xkr_zeta100 WRITE(numout,*) ' Minimum mass for Aggregates xkr_mass_min = ', xkr_mass_min101 WRITE(numout,*) ' Maximum mass for Aggregates xkr_mass_max = ', xkr_mass_max102 WRITE(numout,*)103 ENDIF104 105 106 ! Computation of some variables107 xkr_massp = 5.7E-6 * 7.6 * xkr_mass_min**xkr_zeta108 109 #endif110 73 ! 111 74 IF( .NOT.lk_iomput .AND. ln_diatrc ) THEN … … 162 125 ENDIF 163 126 164 REWIND( numnatp ) 165 READ ( numnatp, nampisdmp ) 127 #if defined key_pisces_reduced 166 128 167 IF(lwp) THEN ! control print 168 WRITE(numout,*) 169 WRITE(numout,*) ' Namelist : nampisdmp' 170 WRITE(numout,*) ' Relaxation of tracer to glodap mean value ln_pisdmp =', ln_pisdmp 171 WRITE(numout,*) ' Frequency of Relaxation nn_pisdmp =', nn_pisdmp 172 WRITE(numout,*) ' Restoring of tracer to initial value on closed seas ln_pisclo =', ln_pisclo 173 WRITE(numout,*) ' ' 174 ENDIF 129 IF( ( .NOT.lk_iomput .AND. ln_diabio ) .OR. lk_trdmld_trc ) THEN 130 ! 131 ! Namelist nampisdbi 132 ! ------------------- 133 DO jl = 1, jp_pisces_trd 134 IF( jl < 10 ) THEN ; WRITE (pisdiabio(jl)%sname,'("BIO_",I1)') jl ! short name 135 ELSEIF (jl < 100 ) THEN ; WRITE (pisdiabio(jl)%sname,'("BIO_",I2)') jl 136 ELSE ; WRITE (pisdiabio(jl)%sname,'("BIO_",I3)') jl 137 ENDIF 138 WRITE(pisdiabio(jl)%lname,'("BIOLOGICAL TREND NUMBER ",I2)') jl ! long name 139 pisdiabio(jl)%units = 'mmoleN/m3/s ' ! units 140 END DO 141 142 REWIND( numnatp ) 143 READ ( numnatp, nampisdbi ) 144 145 DO jl = 1, jp_pisces_trd 146 jn = jp_pcs0_trd + jl - 1 147 ctrbio(jl) = pisdiabio(jl)%sname 148 ctrbil(jl) = pisdiabio(jl)%lname 149 ctrbiu(jl) = pisdiabio(jl)%units 150 END DO 151 152 IF(lwp) THEN ! control print 153 WRITE(numout,*) 154 WRITE(numout,*) ' Namelist : nampisdbi' 155 DO jl = 1, jp_pisces_trd 156 jn = jp_pcs0_trd + jl - 1 157 WRITE(numout,*) ' biological trend No : ', jn, ' short name : ', ctrbio(jn), & 158 & ' long name : ', ctrbio(jn), ' unit : ', ctrbio(jn) 159 END DO 160 WRITE(numout,*) ' ' 161 END IF 162 ! 163 END IF 164 165 #endif 175 166 176 167 END SUBROUTINE trc_nam_pisces -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90
r3320 r3680 7 7 !! 2.0 ! 2007-12 (C. Ethe, G. Madec) F90 8 8 !!---------------------------------------------------------------------- 9 #if defined key_pisces 9 #if defined key_pisces || defined key_pisces_reduced 10 10 !!---------------------------------------------------------------------- 11 11 !! 'key_pisces' PISCES bio-model … … 13 13 !! trcsms_pisces : Time loop of passive tracers sms 14 14 !!---------------------------------------------------------------------- 15 USE oce_trc ! shared variables between ocean and passive tracers 16 USE trc ! passive tracers common variables 17 USE sms_pisces ! PISCES Source Minus Sink variables 18 USE p4zbio ! Biological model 19 USE p4zche ! Chemical model 20 USE p4zlys ! Calcite saturation 21 USE p4zflx ! Gas exchange 22 USE p4zsed ! Sedimentation 23 USE p4zint ! time interpolation 24 USE trdmod_oce ! Ocean trends variables 25 USE trdmod_trc ! TOP trends variables 26 USE sedmodel ! Sediment model 27 USE prtctl_trc ! print control for debugging 15 USE par_pisces 16 USE p4zsms 17 USE p2zsms 28 18 29 19 IMPLICIT NONE … … 31 21 32 22 PUBLIC trc_sms_pisces ! called in trcsms.F90 33 34 LOGICAL :: ln_check_mass = .false. !: Flag to check mass conservation35 36 INTEGER :: numno3 !: logical unit for NO3 budget37 INTEGER :: numalk !: logical unit for talk budget38 INTEGER :: numsil !: logical unit for Si budget39 40 23 !!---------------------------------------------------------------------- 41 24 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 46 29 CONTAINS 47 30 31 !!---------------------------------------------------------------------- 32 !! *** ROUTINE trc_ini_pisces *** 33 !! 34 !! ** Purpose : Initialisation of the PISCES biochemical model 35 !!---------------------------------------------------------------------- 36 37 48 38 SUBROUTINE trc_sms_pisces( kt ) 49 39 !!--------------------------------------------------------------------- … … 51 41 !! 52 42 !! ** Purpose : Managment of the call to Biological sources and sinks 53 !! routines of PISCES bio-model 54 !! 55 !! ** Method : - at each new day ... 56 !! - several calls of bio and sed ??? 57 !! - ... 58 !!--------------------------------------------------------------------- 59 ! 60 INTEGER, INTENT( in ) :: kt ! ocean time-step index 61 !! 62 INTEGER :: jnt, jn, jl 63 CHARACTER (len=25) :: charout 64 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrdpis 65 !!--------------------------------------------------------------------- 66 ! 67 IF( nn_timing == 1 ) CALL timing_start('trc_sms_pisces') 68 ! 69 IF( ln_pisdmp .AND. MOD( kt - nn_dttrc, nn_pisdmp ) == 0 ) CALL trc_sms_pisces_dmp( kt ) ! Relaxation of some tracers 70 CALL trc_sms_pisces_mass_conserv( kt ) ! Mass conservation checking 71 IF( l_trdtrc ) THEN 72 CALL wrk_alloc( jpi, jpj, jpk, jp_pisces, ztrdpis ) 73 DO jn = 1, jp_pisces 74 jl = jn + jp_pcs0 - 1 75 ztrdpis(:,:,:,jn) = trn(:,:,:,jl) 76 ENDDO 77 ENDIF 78 79 IF( ndayflxtr /= nday_year ) THEN ! New days 80 ! 81 ndayflxtr = nday_year 82 83 IF(lwp) write(numout,*) 84 IF(lwp) write(numout,*) ' New chemical constants and various rates for biogeochemistry at new day : ', nday_year 85 IF(lwp) write(numout,*) '~~~~~~' 86 87 CALL p4z_che ! computation of chemical constants 88 CALL p4z_int ! computation of various rates for biogeochemistry 89 ! 90 ENDIF 91 92 93 DO jnt = 1, nrdttrc ! Potential time splitting if requested 94 ! 95 CALL p4z_bio (kt, jnt) ! Compute soft tissue production (POC) 96 CALL p4z_sed (kt, jnt) ! compute soft tissue remineralisation 97 ! 98 DO jn = jp_pcs0, jp_pcs1 99 trb(:,:,:,jn) = trn(:,:,:,jn) 100 ENDDO 101 ! 102 END DO 103 104 IF( l_trdtrc ) THEN 105 DO jn = 1, jp_pisces 106 jl = jn + jp_pcs0 - 1 107 ztrdpis(:,:,:,jn) = ( ztrdpis(:,:,:,jn) - trn(:,:,:,jl) ) * rfact2r 108 ENDDO 109 ENDIF 110 111 CALL p4z_lys( kt ) ! Compute CaCO3 saturation 112 CALL p4z_flx( kt ) ! Compute surface fluxes 113 114 DO jn = jp_pcs0, jp_pcs1 115 CALL lbc_lnk( trn(:,:,:,jn), 'T', 1. ) 116 CALL lbc_lnk( trb(:,:,:,jn), 'T', 1. ) 117 CALL lbc_lnk( tra(:,:,:,jn), 'T', 1. ) 118 END DO 119 120 IF( l_trdtrc ) THEN 121 DO jn = 1, jp_pisces 122 jl = jn + jp_pcs0 - 1 123 ztrdpis(:,:,:,jn) = ztrdpis(:,:,:,jn) + tra(:,:,:,jl) 124 CALL trd_mod_trc( ztrdpis(:,:,:,jn), jn, jptra_trd_sms, kt ) ! save trends 125 END DO 126 CALL wrk_dealloc( jpi, jpj, jpk, jp_pisces, ztrdpis ) 127 END IF 128 129 IF( lk_sed ) THEN 130 ! 131 CALL sed_model( kt ) ! Main program of Sediment model 132 ! 133 DO jn = jp_pcs0, jp_pcs1 134 CALL lbc_lnk( trn(:,:,:,jn), 'T', 1. ) 135 END DO 136 ! 137 ENDIF 138 ! 139 IF( nn_timing == 1 ) CALL timing_stop('trc_sms_pisces') 140 ! 141 END SUBROUTINE trc_sms_pisces 142 143 SUBROUTINE trc_sms_pisces_dmp( kt ) 144 !!---------------------------------------------------------------------- 145 !! *** trc_sms_pisces_dmp *** 146 !! 147 !! ** purpose : Relaxation of some tracers 148 !!---------------------------------------------------------------------- 149 ! 150 INTEGER, INTENT( in ) :: kt ! time step 151 ! 152 REAL(wp) :: alkmean = 2426. ! mean value of alkalinity ( Glodap ; for Goyet 2391. ) 153 REAL(wp) :: po4mean = 2.165 ! mean value of phosphates 154 REAL(wp) :: no3mean = 30.90 ! mean value of nitrate 155 REAL(wp) :: silmean = 91.51 ! mean value of silicate 156 ! 157 REAL(wp) :: zarea, zalksum, zpo4sum, zno3sum, zsilsum 158 !!--------------------------------------------------------------------- 159 160 161 IF(lwp) WRITE(numout,*) 162 IF(lwp) WRITE(numout,*) ' trc_sms_pisces_dmp : Relaxation of nutrients at time-step kt = ', kt 163 IF(lwp) WRITE(numout,*) 164 165 IF( cp_cfg == "orca" .AND. .NOT. lk_c1d ) THEN ! ORCA condiguration (not 1D) ! 166 ! ! --------------------------- ! 167 ! set total alkalinity, phosphate, nitrate & silicate 168 zarea = 1._wp / glob_sum( cvol(:,:,:) ) * 1e6 169 170 zalksum = glob_sum( trn(:,:,:,jptal) * cvol(:,:,:) ) * zarea 171 zpo4sum = glob_sum( trn(:,:,:,jppo4) * cvol(:,:,:) ) * zarea / 122. 172 zno3sum = glob_sum( trn(:,:,:,jpno3) * cvol(:,:,:) ) * zarea / 7.6 173 zsilsum = glob_sum( trn(:,:,:,jpsil) * cvol(:,:,:) ) * zarea 174 175 IF(lwp) WRITE(numout,*) ' TALK mean : ', zalksum 176 trn(:,:,:,jptal) = trn(:,:,:,jptal) * alkmean / zalksum 177 178 IF(lwp) WRITE(numout,*) ' PO4 mean : ', zpo4sum 179 trn(:,:,:,jppo4) = trn(:,:,:,jppo4) * po4mean / zpo4sum 180 181 IF(lwp) WRITE(numout,*) ' NO3 mean : ', zno3sum 182 trn(:,:,:,jpno3) = trn(:,:,:,jpno3) * no3mean / zno3sum 183 184 IF(lwp) WRITE(numout,*) ' SiO3 mean : ', zsilsum 185 trn(:,:,:,jpsil) = MIN( 400.e-6,trn(:,:,:,jpsil) * silmean / zsilsum ) 186 ! 187 ENDIF 188 189 END SUBROUTINE trc_sms_pisces_dmp 190 191 SUBROUTINE trc_sms_pisces_mass_conserv ( kt ) 192 !!---------------------------------------------------------------------- 193 !! *** ROUTINE trc_sms_pisces_mass_conserv *** 194 !! 195 !! ** Purpose : Mass conservation check 43 !! routines of PISCES or LOBSTER bio-model 196 44 !! 197 45 !!--------------------------------------------------------------------- 198 46 ! 199 47 INTEGER, INTENT( in ) :: kt ! ocean time-step index 200 !! 201 REAL(wp) :: zalkbudget, zno3budget, zsilbudget 48 !!--------------------------------------------------------------------- 202 49 ! 203 NAMELIST/nampismass/ ln_check_mass 204 !!--------------------------------------------------------------------- 205 206 IF( kt == nittrc000 ) THEN 207 REWIND( numnatp ) 208 READ ( numnatp, nampismass ) 209 IF(lwp) THEN ! control print 210 WRITE(numout,*) ' ' 211 WRITE(numout,*) ' Namelist parameter for mass conservation checking' 212 WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' 213 WRITE(numout,*) ' Flag to check mass conservation of NO3/Si/TALK ln_check_mass = ', ln_check_mass 214 ENDIF 215 216 IF( ln_check_mass .AND. lwp) THEN ! Open budget file of NO3, ALK, Si 217 CALL ctl_opn( numno3, 'no3.budget' , 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 218 CALL ctl_opn( numsil, 'sil.budget' , 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 219 CALL ctl_opn( numalk, 'talk.budget', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 220 ENDIF 50 IF( lk_p4z ) THEN ; CALL p4z_sms( kt ) ! PISCES 51 ELSE ; CALL p2z_sms( kt ) ! LOBSTER 221 52 ENDIF 222 223 IF( ln_check_mass ) THEN ! Compute the budget of NO3, ALK, Si 224 zno3budget = glob_sum( ( trn(:,:,:,jpno3) + trn(:,:,:,jpnh4) & 225 & + trn(:,:,:,jpphy) + trn(:,:,:,jpdia) & 226 & + trn(:,:,:,jpzoo) + trn(:,:,:,jpmes) & 227 & + trn(:,:,:,jppoc) + trn(:,:,:,jpgoc) & 228 & + trn(:,:,:,jpdoc) ) * cvol(:,:,:) ) 229 ! 230 zsilbudget = glob_sum( ( trn(:,:,:,jpsil) + trn(:,:,:,jpgsi) & 231 & + trn(:,:,:,jpdsi) ) * cvol(:,:,:) ) 232 ! 233 zalkbudget = glob_sum( ( trn(:,:,:,jpno3) * rno3 & 234 & + trn(:,:,:,jptal) & 235 & + trn(:,:,:,jpcal) * 2. ) * cvol(:,:,:) ) 236 237 IF( lwp ) THEN 238 WRITE(numno3,9500) kt, zno3budget / areatot 239 WRITE(numsil,9500) kt, zsilbudget / areatot 240 WRITE(numalk,9500) kt, zalkbudget / areatot 241 ENDIF 242 ENDIF 243 9500 FORMAT(i10,e18.10) 244 ! 245 END SUBROUTINE trc_sms_pisces_mass_conserv 53 ! 54 END SUBROUTINE trc_sms_pisces 246 55 247 56 #else -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90
r3295 r3680 6 6 !! History : 1.0 ! 2009-05 (C. Ethe) Original code 7 7 !!---------------------------------------------------------------------- 8 #if defined key_top && key_pisces && defined key_iomput8 #if defined key_top && defined key_iomput && ( defined key_pisces || defined key_pisces_reduced ) 9 9 !!---------------------------------------------------------------------- 10 !! 'key_pisces 'PISCES model10 !! 'key_pisces or key_pisces_reduced' PISCES model 11 11 !!---------------------------------------------------------------------- 12 12 !! trc_wri_pisces : outputs of concentration fields 13 13 !!---------------------------------------------------------------------- 14 14 USE trc ! passive tracers common variables 15 USE sms_pisces ! PISCES variables 15 16 USE iom ! I/O manager 16 17 … … 35 36 ! write the tracer concentrations in the file 36 37 ! --------------------------------------- 37 DO jn = 1, jptra 38 zrfact = 1.0e+6 39 IF( jn == jpno3 .OR. jn == jpnh4 ) zrfact = 1.0e+6 / 7.6 40 IF( jn == jppo4 ) zrfact = 1.0e+6 / 122. 38 #if defined key_pisces_reduced 39 DO jn = jp_pcs0, jp_pcs1 41 40 cltra = TRIM( ctrcnm(jn) ) ! short title for tracer 42 41 CALL iom_put( cltra, trn(:,:,:,jn) * zrfact ) 43 42 END DO 43 #else 44 DO jn = jp_pcs0, jp_pcs1 45 zrfact = 1.0e+6 46 IF( jn == jpno3 .OR. jn == jpnh4 ) zrfact = rno3 * 1.0e+6 47 IF( jn == jppo4 ) zrfact = po4r * 1.0e+6 48 cltra = TRIM( ctrcnm(jn) ) ! short title for tracer 49 CALL iom_put( cltra, trn(:,:,:,jn) * zrfact ) 50 END DO 51 #endif 44 52 ! 45 53 END SUBROUTINE trc_wri_pisces -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90
r3294 r3680 82 82 IF( kt == nittrc000 ) CALL trc_adv_ctl ! initialisation & control of options 83 83 84 #if ! defined key_pisces 85 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ! at nittrc000 86 r2dt(:) = rdttrc(:) ! = rdttrc (restarting with Euler time stepping) 87 ELSEIF( kt <= nittrc000 + 1 ) THEN ! at nittrc000 or nittrc000+1 88 r2dt(:) = 2. * rdttrc(:) ! = 2 rdttrc (leapfrog) 84 IF( ln_top_euler) THEN 85 r2dt(:) = rdttrc(:) ! = rdttrc (use Euler time stepping) 86 ELSE 87 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ! at nittrc000 88 r2dt(:) = rdttrc(:) ! = rdttrc (restarting with Euler time stepping) 89 ELSEIF( kt <= nittrc000 + 1 ) THEN ! at nittrc000 or nittrc000+1 90 r2dt(:) = 2. * rdttrc(:) ! = 2 rdttrc (leapfrog) 91 ENDIF 89 92 ENDIF 90 #else91 r2dt(:) = rdttrc(:) ! = rdttrc (for PISCES use Euler time stepping)92 #endif93 93 94 94 ! ! effective transport -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trcnam_trp.F90
r3294 r3680 81 81 NAMELIST/namtrc_rad/ ln_trcrad 82 82 #if defined key_trcdmp 83 NAMELIST/namtrc_dmp/ nn_hdmp_tr, nn_zdmp_tr, rn_surf_tr, &83 NAMELIST/namtrc_dmp/ ln_trcdmp, nn_hdmp_tr, nn_zdmp_tr, rn_surf_tr, & 84 84 & rn_bot_tr , rn_dep_tr , nn_file_tr 85 85 #endif … … 156 156 WRITE(numout,*) '~~~~~~~' 157 157 WRITE(numout,*) ' Namelist namtrc_dmp : set damping parameter' 158 WRITE(numout,*) ' add a damping term or not ln_trcdmp = ', ln_trcdmp 158 159 WRITE(numout,*) ' tracer damping option nn_hdmp_tr = ', nn_hdmp_tr 159 160 WRITE(numout,*) ' mixed layer damping option nn_zdmp_tr = ', nn_zdmp_tr, '(zoom: forced to 0)' -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
r3294 r3680 34 34 USE tranxt 35 35 # if defined key_agrif 36 USE agrif_top_update37 36 USE agrif_top_interp 38 37 # endif … … 146 145 ENDIF 147 146 148 #if defined key_agrif149 ! Update tracer at AGRIF zoom boundaries150 IF( .NOT.Agrif_Root() ) CALL Agrif_Update_Trc( kt ) ! children only151 #endif152 153 147 ! trends computation 154 148 IF( l_trdtrc ) THEN ! trends -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90
r3294 r3680 63 63 IF( lk_cfc ) CALL trc_rad_sms( kt, trb, trn, jp_cfc0 , jp_cfc1 ) ! CFC model 64 64 IF( lk_c14b ) CALL trc_rad_sms( kt, trb, trn, jp_c14b0, jp_c14b1 ) ! bomb C14 65 IF( lk_lobster ) CALL trc_rad_sms( kt, trb, trn, jp_lob0 , jp_lob1, cpreserv='Y' ) ! LOBSTER model66 65 IF( lk_pisces ) CALL trc_rad_sms( kt, trb, trn, jp_pcs0 , jp_pcs1, cpreserv='Y' ) ! PISCES model 67 66 IF( lk_my_trc ) CALL trc_rad_sms( kt, trb, trn, jp_myt0 , jp_myt1 ) ! MY_TRC model -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
r3625 r3680 50 50 !! tra = tra + emp * trn / e3t for k=1 51 51 !! where emp, the surface freshwater budget (evaporation minus 52 !! precipitation minus runoff) given in kg/m2/s is divided52 !! precipitation ) given in kg/m2/s is divided 53 53 !! by 1035 kg/m3 (density of ocean water) to obtain m/s. 54 54 !! … … 79 79 ENDIF 80 80 81 ! Coupling online : river runoff is added to the horizontal divergence (hdivn) in the subroutine sbc_rnf_div 82 ! one only consider the concentration/dilution effect due to evaporation minus precipitation + freezing/melting of sea-ice 81 83 82 IF( lk_offline ) THEN ! sfx in dynamical files contains sfx - rnf 83 zsfx(:,:) = sfx(:,:) 84 ELSE ! Concentration dilution effect on tracer due to evaporation, precipitation, and river runoff 85 IF( lk_vvl ) THEN ! volume variable 86 zsfx(:,:) = sfx(:,:) - emp(:,:) 87 !!ch zsfx(:,:) = 0. 88 ELSE ! linear free surface 89 IF( ln_rnf ) THEN ; zsfx(:,:) = sfx(:,:) - rnf(:,:) ! E-P-R 90 ELSE ; zsfx(:,:) = sfx(:,:) 91 ENDIF 92 ENDIF 93 ENDIF 84 IF( .NOT. lk_offline .AND. lk_vvl ) THEN ! online coupling + volume variable 85 zemps(:,:) = sfx(:,:) - emp(:,:) 86 ELSE 87 zemps(:,:) = emp(:,:) 88 ENDIF 94 89 95 90 ! 0. initialization -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
r3294 r3680 29 29 30 30 #if defined key_agrif 31 USE agrif_top_sponge ! Momemtum and tracers sponges 31 USE agrif_top_sponge ! tracers sponges 32 USE agrif_top_update ! tracers updates 32 33 #endif 33 34 … … 76 77 CALL trc_nxt( kstp ) ! tracer fields at next time step 77 78 IF( ln_trcrad ) CALL trc_rad( kstp ) ! Correct artificial negative concentrations 79 80 #if defined key_agrif 81 IF( .NOT. Agrif_Root()) CALL Agrif_Update_Trc( kstp ) ! Update tracer at AGRIF zoom boundaries : children only 82 #endif 78 83 IF( ln_zps ) CALL zps_hde( kstp, jptra, trn, gtru, gtrv ) ! Partial steps: now horizontal gradient of passive 79 84 ! tracers at the bottom ocean level … … 98 103 !!---------------------------------------------------------------------- 99 104 CONTAINS 100 SUBROUTINE trc_trp( k t) ! Empty routine101 INTEGER, INTENT(in) :: k t102 WRITE(*,*) 'trc_trp: You should not have seen this print! error?', k t105 SUBROUTINE trc_trp( kstp ) ! Empty routine 106 INTEGER, INTENT(in) :: kstp 107 WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kstp 103 108 END SUBROUTINE trc_trp 104 109 #endif -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
r3632 r3680 73 73 IF( kt == nittrc000 ) CALL zdf_ctl ! initialisation & control of options 74 74 75 #if ! defined key_pisces 76 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ! at nittrc000 77 r2dt(:) = rdttrc(:) ! = rdttrc (restarting with Euler time stepping) 78 ELSEIF( kt <= nittrc000 + 1 ) THEN ! at nittrc000 or nittrc000+1 79 r2dt(:) = 2. * rdttrc(:) ! = 2 rdttrc (leapfrog) 75 IF( ln_top_euler) THEN 76 r2dt(:) = rdttrc(:) ! = rdttrc (use Euler time stepping) 77 ELSE 78 IF( neuler == 0 .AND. kt == nittrc000 ) THEN ! at nittrc000 79 r2dt(:) = rdttrc(:) ! = rdttrc (restarting with Euler time stepping) 80 ELSEIF( kt <= nittrc000 + 1 ) THEN ! at nittrc000 or nittrc000+1 81 r2dt(:) = 2. * rdttrc(:) ! = 2 rdttrc (leapfrog) 82 ENDIF 80 83 ENDIF 81 #else82 r2dt(:) = rdttrc(:) ! = rdttrc (for PISCES use Euler time stepping)83 #endif84 84 85 85 IF( l_trdtrc ) THEN -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trdmld_trc.F90
r3320 r3680 34 34 USE prtctl ! print control 35 35 USE sms_pisces ! PISCES bio-model 36 USE sms_lobster ! LOBSTER bio-model37 36 USE wrk_nemo ! Memory allocation 38 37 … … 53 52 INTEGER :: ndimtrd1 54 53 INTEGER, SAVE :: ionce, icount 55 #if defined key_ lobster54 #if defined key_pisces_reduced 56 55 INTEGER :: nidtrdbio, nh_tb 57 56 INTEGER, SAVE :: ioncebio, icountbio … … 62 61 63 62 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: ztmltrd2 ! 64 #if defined key_ lobster63 #if defined key_pisces_reduced 65 64 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ztmltrdbio2 ! only needed for mean diagnostics in trd_mld_bio() 66 65 #endif … … 81 80 !!---------------------------------------------------------------------- 82 81 ALLOCATE( ztmltrd2(jpi,jpj,jpltrd_trc,jptra) , & 83 #if defined key_ lobster82 #if defined key_pisces_reduced 84 83 & ztmltrdbio2(jpi,jpj,jpdiabio) , & 85 84 #endif … … 133 132 SELECT CASE ( nn_ctls_trc ) ! choice of the control surface 134 133 CASE ( -2 ) ; STOP 'trdmld_trc : not ready ' ! -> isopycnal surface (see ???) 135 #if defined key_pisces || defined key_ lobster134 #if defined key_pisces || defined key_pisces_reduced 136 135 CASE ( -1 ) ; nmld_trc(:,:) = neln(:,:) ! -> euphotic layer with light criterion 137 136 #endif … … 232 231 INTEGER , INTENT(in) :: ktrd ! bio trend index 233 232 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in) :: ptrc_trdmld ! passive trc trend 234 #if defined key_ lobster233 #if defined key_pisces_reduced 235 234 ! 236 235 INTEGER :: ji, jj, jk, isum … … 940 939 !!---------------------------------------------------------------------- 941 940 INTEGER, INTENT( in ) :: kt ! ocean time-step index 942 #if defined key_ lobster941 #if defined key_pisces_reduced 943 942 INTEGER :: jl, it, itmod 944 943 LOGICAL :: llwarn = .TRUE., lldebug = .TRUE. … … 1217 1216 tmltrd_csum_ln_trc (:,:,:,:) = 0.e0 ; rmld_sum_trc (:,:) = 0.e0 1218 1217 1219 #if defined key_ lobster1218 #if defined key_pisces_reduced 1220 1219 nmoymltrdbio = 0 1221 1220 tmltrd_sum_bio (:,:,:) = 0.e0 ; tmltrd_csum_ln_bio (:,:,:) = 0.e0 1222 DO jl = 1, jp_ lobster_trd1221 DO jl = 1, jp_pisces_trd 1223 1222 ctrd_bio(jl,1) = ctrbil(jl) ! long name 1224 1223 ctrd_bio(jl,2) = ctrbio(jl) ! short name … … 1234 1233 tml_sumb_trc (:,:,:) = 0.e0 ; tmltrd_csum_ub_trc (:,:,:,:) = 0.e0 ! mean 1235 1234 tmltrd_atf_sumb_trc(:,:,:) = 0.e0 ; tmltrd_rad_sumb_trc(:,:,:) = 0.e0 1236 #if defined key_ lobster1235 #if defined key_pisces_reduced 1237 1236 tmltrd_csum_ub_bio (:,:,:) = 0.e0 1238 1237 #endif … … 1242 1241 icount = 1 ; ionce = 1 ! open specifier 1243 1242 1244 #if defined key_ lobster1243 #if defined key_pisces_reduced 1245 1244 icountbio = 1 ; ioncebio = 1 ! open specifier 1246 1245 #endif … … 1337 1336 END DO 1338 1337 1339 #if defined key_ lobster1338 #if defined key_pisces_reduced 1340 1339 !-- Create a NetCDF file and enter the define mode 1341 1340 CALL dia_nam( clhstnam, nn_trd_trc, 'trdbio' ) … … 1383 1382 END DO 1384 1383 1385 #if defined key_ lobster1386 DO jl = 1, jp_ lobster_trd1384 #if defined key_pisces_reduced 1385 DO jl = 1, jp_pisces_trd 1387 1386 CALL histdef(nidtrdbio, TRIM("ML_"//ctrd_bio(jl,2)), TRIM(clmxl//" ML_"//ctrd_bio(jl,1)) , & 1388 1387 & cltrcu, jpi, jpj, nh_tb, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) ! IOIPSL: time mean … … 1395 1394 END DO 1396 1395 1397 #if defined key_ lobster1396 #if defined key_pisces_reduced 1398 1397 !-- Leave IOIPSL/NetCDF define mode 1399 1398 CALL histend( nidtrdbio, snc4set ) -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trdmld_trc_rst.F90
r2528 r3680 105 105 END DO ! tracer loop 106 106 ! ! =========== 107 #if defined key_ lobster108 DO jl = 1, jp_ lobster_trd107 #if defined key_pisces_reduced 108 DO jl = 1, jp_pisces_trd 109 109 CALL iom_rstput( kt, nitrst, nummldw_trc, 'tmltrd_csum_ub_bio'//ctrd_bio(jl,2), tmltrd_csum_ub_bio(:,:,jl) ) 110 110 ENDDO … … 190 190 ! ! =========== 191 191 192 #if defined key_ lobster193 DO jl = 1, jp_ lobster_trd192 #if defined key_pisces_reduced 193 DO jl = 1, jp_pisces_trd 194 194 CALL iom_get( inum, jpdom_autoglo, 'tmltrd_csum_ub_bio'//ctrd_bio(jl,2), tmltrd_csum_ub_bio(:,:,jl) ) 195 195 ENDDO -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/TRP/trdmod_trc_oce.F90
r3320 r3680 106 106 # endif 107 107 108 # if defined key_ lobster108 # if defined key_pisces_reduced 109 109 CHARACTER(LEN=80) :: clname_bio, ctrd_bio(jpdiabio,2) 110 110 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: & … … 154 154 #endif 155 155 ! 156 # if defined key_ lobster156 # if defined key_pisces_reduced 157 157 ALLOCATE( tmltrd_bio (jpi,jpj,jpdiabio) , & 158 158 & tmltrd_sum_bio (jpi,jpj,jpdiabio) , & -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90
r3625 r3680 56 56 57 57 !* model domain * 58 USE dom_oce , ONLY : lzoom => lzoom !: zoom flag 59 USE dom_oce , ONLY : lzoom_e => lzoom_e !: East zoom type flag 60 USE dom_oce , ONLY : lzoom_w => lzoom_w !: West zoom type flag 61 USE dom_oce , ONLY : lzoom_s => lzoom_s !: South zoom type flag 62 USE dom_oce , ONLY : lzoom_n => lzoom_n !: North zoom type flag 63 USE dom_oce , ONLY : lzoom_arct => lzoom_arct !: ORCA arctic zoom flag 64 USE dom_oce , ONLY : lzoom_anta => lzoom_anta !: ORCA antarctic zoom flag 65 USE dom_oce , ONLY : nperio => nperio !: type of lateral boundary condition 66 USE dom_oce , ONLY : nimpp => nimpp !: i index for mpp-subdomain left bottom 67 USE dom_oce , ONLY : njmpp => njmpp !: j index for mpp-subdomain left bottom 68 USE dom_oce , ONLY : nproc => nproc !: number for local processor 69 USE dom_oce , ONLY : narea => narea !: number for local area 70 USE dom_oce , ONLY : mig => mig !: local ==> global domain i-indice 71 USE dom_oce , ONLY : mjg => mjg !: local ==> global domain i-indice 72 USE dom_oce , ONLY : mi0 => mi0 !: global ==> local domain i-indice 73 USE dom_oce , ONLY : mi1 => mi1 !: (mi0=1 and mi1=0 if the global indice is not in the local one) 74 USE dom_oce , ONLY : mj0 => mj0 !: global ==> local domain j-indice 75 USE dom_oce , ONLY : mj1 => mj1 !: (mj0=1 and mj1=0 if the global indice is not in the local one) 76 USE dom_oce , ONLY : nidom => nidom 77 USE dom_oce , ONLY : nimppt => nimppt !:i-indexes for each processor 78 USE dom_oce , ONLY : njmppt => njmppt !:j-indexes for each processor 79 USE dom_oce , ONLY : ibonit => ibonit !:i-processor neighbour existence 80 USE dom_oce , ONLY : ibonjt => ibonjt !:j- processor neighbour existence 81 USE dom_oce , ONLY : nlci => nlci !:i- & j-dimensions of the local subdomain 82 USE dom_oce , ONLY : nlcj => nlcj !: 83 USE dom_oce , ONLY : nldi => nldi !:first and last indoor i- and j-indexes 84 USE dom_oce , ONLY : nlei => nlei !: 85 USE dom_oce , ONLY : nldj => nldj !: 86 USE dom_oce , ONLY : nlej => nlej !: 87 USE dom_oce , ONLY : nlcit => nlcit !:dimensions of every i-subdomain 88 USE dom_oce , ONLY : nlcjt => nlcjt !:dimensions of every j-subdomain 89 USE dom_oce , ONLY : nldit => nldit !:first indoor index for each i-domain 90 USE dom_oce , ONLY : nleit => nleit !:last indoor index for each i-domain 91 USE dom_oce , ONLY : nldjt => nldjt !:first indoor index for each j-domain 92 USE dom_oce , ONLY : nlejt => nlejt !:last indoor index for each j-domain 93 94 !* horizontal mesh * 95 USE dom_oce , ONLY : glamt => glamt !: longitude of t-point (degre) 96 USE dom_oce , ONLY : glamu => glamu !: longitude of t-point (degre) 97 USE dom_oce , ONLY : glamv => glamv !: longitude of t-point (degre) 98 USE dom_oce , ONLY : glamf => glamf !: longitude of t-point (degre) 99 USE dom_oce , ONLY : gphit => gphit !: latitude of t-point (degre) 100 USE dom_oce , ONLY : gphiu => gphiu !: latitude of t-point (degre) 101 USE dom_oce , ONLY : gphiv => gphiv !: latitude of t-point (degre) 102 USE dom_oce , ONLY : gphif => gphif !: latitude of t-point (degre) 103 USE dom_oce , ONLY : e1t => e1t !: horizontal scale factors at t-point (m) 104 USE dom_oce , ONLY : e2t => e2t !: horizontal scale factors at t-point (m) 105 USE dom_oce , ONLY : e1e2t => e1e2t !: cell surface at t-point (m2) 106 USE dom_oce , ONLY : e1u => e1u !: horizontal scale factors at u-point (m) 107 USE dom_oce , ONLY : e2u => e2u !: horizontal scale factors at u-point (m) 108 USE dom_oce , ONLY : e1v => e1v !: horizontal scale factors at v-point (m) 109 USE dom_oce , ONLY : e2v => e2v !: horizontal scale factors at v-point (m) 110 111 !* vertical mesh * 112 USE dom_oce , ONLY : gdept_0 => gdept_0 !: reference depth of t-points (m) 113 USE dom_oce , ONLY : e3t_0 => e3t_0 !: reference depth of t-points (m) 114 USE dom_oce , ONLY : e3w_0 => e3w_0 !: reference depth of w-points (m) 115 USE dom_oce , ONLY : gdepw_0 => gdepw_0 !: reference depth of w-points (m) 116 # if ! defined key_zco 117 USE dom_oce , ONLY : gdep3w => gdep3w !: ??? 118 USE dom_oce , ONLY : gdept => gdept !: depth of t-points (m) 119 USE dom_oce , ONLY : gdepw => gdepw !: depth of t-points (m) 120 USE dom_oce , ONLY : e3t => e3t !: vertical scale factors at t- 121 USE dom_oce , ONLY : e3u => e3u !: vertical scale factors at u- 122 USE dom_oce , ONLY : e3v => e3v !: vertical scale factors v- 123 USE dom_oce , ONLY : e3w => e3w !: w-points (m) 124 USE dom_oce , ONLY : e3f => e3f !: f-points (m) 125 USE dom_oce , ONLY : e3uw => e3uw !: uw-points (m) 126 USE dom_oce , ONLY : e3vw => e3vw !: vw-points (m) 127 # endif 128 USE dom_oce , ONLY : ln_zps => ln_zps !: partial steps flag 129 USE dom_oce , ONLY : ln_sco => ln_sco !: s-coordinate flag 130 USE dom_oce , ONLY : ln_zco => ln_zco !: z-coordinate flag 131 USE dom_oce , ONLY : hbatt => hbatt !: ocean depth at the vertical of t-point (m) 132 USE dom_oce , ONLY : hbatu => hbatu !: ocean depth at the vertical of u-point (m) 133 USE dom_oce , ONLY : hbatv => hbatv !: ocean depth at the vertical of w-point (m) 134 USE dom_oce , ONLY : gsigt => gsigt !: model level depth coefficient at T-levels 135 USE dom_oce , ONLY : gsigw => gsigw !: model level depth coefficient at W-levels 136 USE dom_oce , ONLY : gsi3w => gsi3w !: model level depth coef at w-levels (defined as the sum of e3w) 137 USE dom_oce , ONLY : esigt => esigt !: vertical scale factor coef. at t-levels 138 USE dom_oce , ONLY : esigw => esigw !: vertical scale factor coef. at w-levels 139 USE dom_oce , ONLY : lk_vvl => lk_vvl !: variable grid flag 140 # if defined key_vvl 141 USE dom_oce , ONLY : gdep3w_1 => gdep3w_1 !: ??? 142 USE dom_oce , ONLY : gdept_1 => gdept_1 !: depth of t-points (m) 143 USE dom_oce , ONLY : gdepw_1 => gdepw_1 !: depth of t-points (m) 144 USE dom_oce , ONLY : e3t_1 => e3t_1 !: vertical scale factors at t- 145 USE dom_oce , ONLY : e3u_1 => e3u_1 !: vertical scale factors at u- 146 USE dom_oce , ONLY : e3v_1 => e3v_1 !: vertical scale factors v- 147 USE dom_oce , ONLY : e3w_1 => e3w_1 !: w-points (m) 148 USE dom_oce , ONLY : e3f_1 => e3f_1 !: f-points (m) 149 USE dom_oce , ONLY : e3uw_1 => e3uw_1 !: uw-points (m) 150 USE dom_oce , ONLY : e3vw_1 => e3vw_1 !: vw-points (m) 151 # endif 152 !* masks, bathymetry * 153 USE dom_oce , ONLY : mbkt => mbkt !: vertical index of the bottom last T- ocean level 154 USE dom_oce , ONLY : mbku => mbku !: vertical index of the bottom last U- ocean level 155 USE dom_oce , ONLY : mbkv => mbkv !: vertical index of the bottom last V- ocean level 156 USE dom_oce , ONLY : tmask_i => tmask_i !: Interior mask at t-points 157 USE dom_oce , ONLY : tmask => tmask !: land/ocean mask at t-points 158 USE dom_oce , ONLY : umask => umask !: land/ocean mask at u-points 159 USE dom_oce , ONLY : vmask => vmask !: land/ocean mask at v-points 160 USE dom_oce , ONLY : fmask => fmask !: land/ocean mask at f-points 161 162 !* time domain * 163 USE dom_oce , ONLY : neuler => neuler !: restart euler forward option (0=Euler) 164 USE dom_oce , ONLY : rdt => rdt !: time step for the dynamics 165 USE dom_oce , ONLY : atfp => atfp !: asselin time filter parameter 166 USE dom_oce , ONLY : atfp1 => atfp1 !: asselin time filter coeff. (atfp1= 1-2*atfp) 167 USE dom_oce , ONLY : rdttra => rdttra !: vertical profile of tracer time step 168 ! !: it is the accumulated duration of previous runs 169 ! !: that may have been run with different time steps. 170 !* calendar variables * 171 USE dom_oce , ONLY : nyear => nyear !: current year 172 USE dom_oce , ONLY : nmonth => nmonth !: current month 173 USE dom_oce , ONLY : nday => nday !: current day of the month 174 USE dom_oce , ONLY : ndastp => ndastp !: time step date in yyyymmdd format 175 USE dom_oce , ONLY : nday_year => nday_year !: current day counted from jan 1st of the current year 176 USE dom_oce , ONLY : nsec_year => nsec_year !: current time step counted in second since 00h jan 1st of the current year 177 USE dom_oce , ONLY : nsec_month => nsec_month !: current time step counted in second since 00h 1st day of the current month 178 USE dom_oce , ONLY : nsec_day => nsec_day !: current time step counted in second since 00h of the current day 179 USE dom_oce , ONLY : fjulday => fjulday !: julian day 180 USE dom_oce , ONLY : adatrj => adatrj !: number of elapsed days since the begining of the whole simulation 181 !: (cumulative duration of previous runs 182 !: that may have used different time-step size) 183 USE dom_oce , ONLY : nyear_len => nyear_len !: length in days of the previous/current year 184 USE dom_oce , ONLY : nmonth_len => nmonth_len !: length in days of the months of the current year 58 USE dom_oce 185 59 186 60 … … 217 91 USE oce , ONLY : grv => grv !: 218 92 #endif 219 220 USE dom_oce , ONLY : nn_cla => nn_cla !: flag (0/1) for cross land advection221 93 222 94 !* surface fluxes * -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/par_trc.F90
r2528 r3680 5 5 !!====================================================================== 6 6 !! History : - ! 1996-01 (M. Levy) original code 7 !! - ! 1999-07 (M. Levy) for LOBSTER1 or NPZD model8 7 !! - ! 2000-04 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD 9 8 !! 1.0 ! 2004-03 (C. Ethe) Free form and module … … 12 11 USE par_kind ! kind parameters 13 12 ! 14 USE par_lobster ! LOBSTER model15 13 USE par_pisces ! PISCES model 16 14 USE par_c14b ! C14 bomb tracer … … 22 20 ! Passive tracers : Total size 23 21 ! --------------- ! total number of passive tracers, of 2d and 3d output and trend arrays 24 INTEGER, PUBLIC, PARAMETER :: jptra = jp_ lobster + jp_pisces + jp_cfc + jp_c14b + jp_my_trc25 INTEGER, PUBLIC, PARAMETER :: jpdia2d = jp_ lobster_2d + jp_pisces_2d + jp_cfc_2d + jp_c14b_2d + jp_my_trc_2d26 INTEGER, PUBLIC, PARAMETER :: jpdia3d = jp_ lobster_3d + jp_pisces_3d + jp_cfc_3d + jp_c14b_3d + jp_my_trc_3d22 INTEGER, PUBLIC, PARAMETER :: jptra = jp_pisces + jp_cfc + jp_c14b + jp_my_trc 23 INTEGER, PUBLIC, PARAMETER :: jpdia2d = jp_pisces_2d + jp_cfc_2d + jp_c14b_2d + jp_my_trc_2d 24 INTEGER, PUBLIC, PARAMETER :: jpdia3d = jp_pisces_3d + jp_cfc_3d + jp_c14b_3d + jp_my_trc_3d 27 25 ! ! total number of sms diagnostic arrays 28 INTEGER, PUBLIC, PARAMETER :: jpdiabio = jp_lobster_trd +jp_pisces_trd + jp_cfc_trd + jp_c14b_trd + jp_my_trc_trd26 INTEGER, PUBLIC, PARAMETER :: jpdiabio = jp_pisces_trd + jp_cfc_trd + jp_c14b_trd + jp_my_trc_trd 29 27 30 28 ! 1D configuration ("key_c1d") -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/prtctl_trc.F90
r3294 r3680 17 17 USE par_trc ! TOP parameters 18 18 USE oce_trc ! ocean space and time domain variables 19 USE prtctl ! print control for OPA 19 20 20 21 IMPLICIT NONE … … 296 297 END SUBROUTINE prt_ctl_trc_init 297 298 298 299 SUBROUTINE sub_dom300 !!----------------------------------------------------------------------301 !! *** ROUTINE sub_dom ***302 !!303 !! ** Purpose : Lay out the global domain over processors.304 !! CAUTION:305 !! This part has been extracted from the mpp_init306 !! subroutine and names of variables/arrays have been307 !! slightly changed to avoid confusion but the computation308 !! is exactly the same. Any modification about indices of309 !! each sub-domain in the mppini.F90 module should be reported310 !! here.311 !!312 !! ** Method : Global domain is distributed in smaller local domains.313 !! Periodic condition is a function of the local domain position314 !! (global boundary or neighbouring domain) and of the global315 !! periodic316 !! Type : jperio global periodic condition317 !! nperio local periodic condition318 !!319 !! ** Action : - set domain parameters320 !! nimpp : longitudinal index321 !! njmpp : latitudinal index322 !! nperio : lateral condition type323 !! narea : number for local area324 !! nlcil : first dimension325 !! nlcjl : second dimension326 !! nbondil : mark for "east-west local boundary"327 !! nbondjl : mark for "north-south local boundary"328 !!----------------------------------------------------------------------329 INTEGER :: ji, jj, js ! dummy loop indices330 INTEGER :: ii, ij ! temporary integers331 INTEGER :: irestil, irestjl ! " "332 INTEGER :: ijpi , ijpj, nlcil ! temporary logical unit333 INTEGER :: nlcjl , nbondil, nbondjl334 INTEGER :: nrecil, nrecjl, nldil, nleil, nldjl, nlejl335 REAL(wp) :: zidom, zjdom ! temporary scalars336 INTEGER, POINTER, DIMENSION(:,:) :: iimpptl, ijmpptl, ilcitl, ilcjtl ! temporary workspace337 !!----------------------------------------------------------------------338 !339 CALL wrk_alloc( isplt, jsplt, ilcitl, ilcjtl, iimpptl, ijmpptl )340 !341 ! Dimension arrays for subdomains342 ! -------------------------------343 ! Computation of local domain sizes ilcitl() ilcjtl()344 ! These dimensions depend on global sizes isplt,jsplt and jpiglo,jpjglo345 ! The subdomains are squares leeser than or equal to the global346 ! dimensions divided by the number of processors minus the overlap347 ! array (cf. par_oce.F90).348 349 ijpi = ( jpiglo-2*jpreci + (isplt-1) ) / isplt + 2*jpreci350 ijpj = ( jpjglo-2*jprecj + (jsplt-1) ) / jsplt + 2*jprecj351 352 nrecil = 2 * jpreci353 nrecjl = 2 * jprecj354 irestil = MOD( jpiglo - nrecil , isplt )355 irestjl = MOD( jpjglo - nrecjl , jsplt )356 357 IF( irestil == 0 ) irestil = isplt358 DO jj = 1, jsplt359 DO ji = 1, irestil360 ilcitl(ji,jj) = ijpi361 END DO362 DO ji = irestil+1, isplt363 ilcitl(ji,jj) = ijpi -1364 END DO365 END DO366 367 IF( irestjl == 0 ) irestjl = jsplt368 DO ji = 1, isplt369 DO jj = 1, irestjl370 ilcjtl(ji,jj) = ijpj371 END DO372 DO jj = irestjl+1, jsplt373 ilcjtl(ji,jj) = ijpj -1374 END DO375 END DO376 377 zidom = nrecil378 DO ji = 1, isplt379 zidom = zidom + ilcitl(ji,1) - nrecil380 END DO381 382 zjdom = nrecjl383 DO jj = 1, jsplt384 zjdom = zjdom + ilcjtl(1,jj) - nrecjl385 END DO386 387 ! Index arrays for subdomains388 ! ---------------------------389 390 iimpptl(:,:) = 1391 ijmpptl(:,:) = 1392 393 IF( isplt > 1 ) THEN394 DO jj = 1, jsplt395 DO ji = 2, isplt396 iimpptl(ji,jj) = iimpptl(ji-1,jj) + ilcitl(ji-1,jj) - nrecil397 END DO398 END DO399 ENDIF400 401 IF( jsplt > 1 ) THEN402 DO jj = 2, jsplt403 DO ji = 1, isplt404 ijmpptl(ji,jj) = ijmpptl(ji,jj-1)+ilcjtl(ji,jj-1)-nrecjl405 END DO406 END DO407 ENDIF408 409 ! Subdomain description410 ! ---------------------411 412 DO js = 1, ijsplt413 ii = 1 + MOD( js-1, isplt )414 ij = 1 + (js-1) / isplt415 nimpptl(js) = iimpptl(ii,ij)416 njmpptl(js) = ijmpptl(ii,ij)417 nlcitl (js) = ilcitl (ii,ij)418 nlcil = nlcitl (js)419 nlcjtl (js) = ilcjtl (ii,ij)420 nlcjl = nlcjtl (js)421 nbondjl = -1 ! general case422 IF( js > isplt ) nbondjl = 0 ! first row of processor423 IF( js > (jsplt-1)*isplt ) nbondjl = 1 ! last row of processor424 IF( jsplt == 1 ) nbondjl = 2 ! one processor only in j-direction425 ibonjtl(js) = nbondjl426 427 nbondil = 0 !428 IF( MOD( js, isplt ) == 1 ) nbondil = -1 !429 IF( MOD( js, isplt ) == 0 ) nbondil = 1 !430 IF( isplt == 1 ) nbondil = 2 ! one processor only in i-direction431 ibonitl(js) = nbondil432 433 nldil = 1 + jpreci434 nleil = nlcil - jpreci435 IF( nbondil == -1 .OR. nbondil == 2 ) nldil = 1436 IF( nbondil == 1 .OR. nbondil == 2 ) nleil = nlcil437 nldjl = 1 + jprecj438 nlejl = nlcjl - jprecj439 IF( nbondjl == -1 .OR. nbondjl == 2 ) nldjl = 1440 IF( nbondjl == 1 .OR. nbondjl == 2 ) nlejl = nlcjl441 nlditl(js) = nldil442 nleitl(js) = nleil443 nldjtl(js) = nldjl444 nlejtl(js) = nlejl445 END DO446 !447 CALL wrk_dealloc( isplt, jsplt, ilcitl, ilcjtl, iimpptl, ijmpptl )448 !449 END SUBROUTINE sub_dom450 451 299 #else 452 300 !!---------------------------------------------------------------------- -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trc.F90
r3625 r3680 5 5 !!====================================================================== 6 6 !! History : OPA ! 1996-01 (M. Levy) Original code 7 !! - ! 1999-07 (M. Levy) for LOBSTER1 or NPZD model8 7 !! - ! 2000-04 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD 9 8 !! NEMO 1.0 ! 2004-03 (C. Ethe) Free form and module … … 25 24 INTEGER, PUBLIC :: numnat !: logicla unit for the passive tracer NAMELIST 26 25 INTEGER, PUBLIC :: numstr !: logical unit for tracer statistics 26 INTEGER, PUBLIC :: numrtr !: logical unit for trc restart (read ) 27 INTEGER, PUBLIC :: numrtw !: logical unit for trc restart ( write ) 28 LOGICAL, PUBLIC :: ln_top_euler !: boolean term for euler integration in the first timestep 27 29 28 30 !! passive tracers fields (before,now,after) … … 68 70 CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcln !: trccer field long name 69 71 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcun !: tracer unit 70 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_ini !: Initialisation from data input file71 72 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_wri !: save the tracer or not 72 73 … … 76 77 CHARACTER(len = 20) :: units !: unit 77 78 END TYPE DIAG 79 80 !! information for inputs 81 !! -------------------------------------------------- 82 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_ini !: Initialisation from data input file 83 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_obc !: Use open boundary condition data 84 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_sbc !: Use surface boundary condition data 85 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_cbc !: Use coastal boundary condition data 78 86 79 87 !! additional 2D/3D outputs namelist -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r3294 r3680 21 21 USE trcnam ! Namelist read 22 22 USE trcini_cfc ! CFC initialisation 23 USE trcini_lobster ! LOBSTER initialisation24 23 USE trcini_pisces ! PISCES initialisation 25 24 USE trcini_c14b ! C14 bomb initialisation … … 70 69 CALL top_alloc() ! allocate TOP arrays 71 70 72 IF( ln_dm2dc .AND. ( lk_pisces .OR. lk_lobster )) &73 & CALL ctl_stop( ' The diurnal cycle is not compatible with PISCES or LOBSTER' )71 IF( ln_dm2dc .AND. lk_pisces ) & 72 & CALL ctl_stop( ' The diurnal cycle is not compatible with PISCES ' ) 74 73 75 74 IF( nn_cla == 1 ) & … … 101 100 areatot = glob_sum( cvol(:,:,:) ) 102 101 103 IF( lk_lobster ) CALL trc_ini_lobster ! LOBSTER bio-model104 102 IF( lk_pisces ) CALL trc_ini_pisces ! PISCES bio-model 105 103 IF( lk_cfc ) CALL trc_ini_cfc ! CFC tracers -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
r3319 r3680 21 21 USE trc ! passive tracers common variables 22 22 USE trcnam_trp ! Transport namelist 23 USE trcnam_lobster ! LOBSTER namelist24 23 USE trcnam_pisces ! PISCES namelist 25 24 USE trcnam_cfc ! CFC SMS namelist … … 53 52 !! ** Method : - read passive tracer namelist 54 53 !! - read namelist of each defined SMS model 55 !! ( ( LOBSTER,PISCES, CFC, MY_TRC )54 !! ( (PISCES, CFC, MY_TRC ) 56 55 !!--------------------------------------------------------------------- 57 56 INTEGER :: jn, ierr … … 60 59 !! 61 60 NAMELIST/namtrc/ nn_dttrc, nn_writetrc, ln_rsttr, nn_rsttr, & 62 & cn_trcrst_in, cn_trcrst_out, sn_tracer, ln_trcdta, ln_trcdmp 61 & cn_trcrst_in, cn_trcrst_out, sn_tracer, ln_trcdta, ln_trcdmp, & 62 & ln_top_euler 63 63 #if defined key_trdmld_trc || defined key_trdtrc 64 64 NAMELIST/namtrc_trd/ nn_trd_trc, nn_ctls_trc, rn_ucf_trc, & … … 79 79 nn_dttrc = 1 ! default values 80 80 nn_writetrc = 10 81 ln_top_euler = .FALSE. 81 82 ln_rsttr = .FALSE. 82 83 nn_rsttr = 0 … … 120 121 WRITE(numout,*) ' Read inputs data from file (y/n) ln_trcdta = ', ln_trcdta 121 122 WRITE(numout,*) ' Damping of passive tracer (y/n) ln_trcdmp = ', ln_trcdmp 123 WRITE(numout,*) ' Use euler integration for TRC (y/n) ln_top_euler = ', ln_top_euler 122 124 WRITE(numout,*) ' ' 123 125 DO jn = 1, jptra … … 234 236 ! namelist of SMS 235 237 ! --------------- 236 IF( lk_lobster ) THEN ; CALL trc_nam_lobster ! LOBSTER bio-model237 ELSE ; IF(lwp) WRITE(numout,*) ' LOBSTER not used'238 ENDIF239 240 238 IF( lk_pisces ) THEN ; CALL trc_nam_pisces ! PISCES bio-model 241 239 ELSE ; IF(lwp) WRITE(numout,*) ' PISCES not used' -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r3294 r3680 27 27 USE trcnam_trp 28 28 USE iom 29 USE trcrst_cfc ! CFC30 USE trcrst_lobster ! LOBSTER restart31 USE trcrst_pisces ! PISCES restart32 USE trcrst_c14b ! C14 bomb restart33 USE trcrst_my_trc ! MY_TRC restart34 29 USE daymod 35 30 IMPLICIT NONE … … 40 35 PUBLIC trc_rst_wri ! called by ??? 41 36 PUBLIC trc_rst_cal 42 43 INTEGER, PUBLIC :: numrtr, numrtw !: logical unit for trc restart (read and write)44 37 45 38 !! * Substitutions … … 115 108 CALL iom_get( numrtr, jpdom_autoglo, 'TRB'//ctrcnm(jn), trb(:,:,:,jn) ) 116 109 END DO 117 118 IF( lk_lobster ) CALL trc_rst_read_lobster( numrtr ) ! LOBSTER bio-model119 IF( lk_pisces ) CALL trc_rst_read_pisces ( numrtr ) ! PISCES bio-model120 IF( lk_cfc ) CALL trc_rst_read_cfc ( numrtr ) ! CFC tracers121 IF( lk_c14b ) CALL trc_rst_read_c14b ( numrtr ) ! C14 bomb tracer122 IF( lk_my_trc ) CALL trc_rst_read_my_trc ( numrtr ) ! MY_TRC tracers123 124 CALL iom_close( numrtr )125 110 ! 126 111 END SUBROUTINE trc_rst_read … … 138 123 !!---------------------------------------------------------------------- 139 124 ! 140 CALL trc_rst_cal( kt, 'WRITE' ) ! calendar141 125 CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rdttrc(1) ) ! surface passive tracer time step 142 126 ! prognostic variables … … 149 133 CALL iom_rstput( kt, nitrst, numrtw, 'TRB'//ctrcnm(jn), trb(:,:,:,jn) ) 150 134 END DO 151 152 IF( lk_lobster ) CALL trc_rst_wri_lobster( kt, nitrst, numrtw ) ! LOBSTER bio-model 153 IF( lk_pisces ) CALL trc_rst_wri_pisces ( kt, nitrst, numrtw ) ! PISCES bio-model 154 IF( lk_cfc ) CALL trc_rst_wri_cfc ( kt, nitrst, numrtw ) ! CFC tracers 155 IF( lk_c14b ) CALL trc_rst_wri_c14b ( kt, nitrst, numrtw ) ! C14 bomb tracer 156 IF( lk_my_trc ) CALL trc_rst_wri_my_trc ( kt, nitrst, numrtw ) ! MY_TRC tracers 157 135 ! 158 136 IF( kt == nitrst ) THEN 159 137 CALL trc_rst_stat ! statistics -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcsms.F90
r3294 r3680 15 15 USE oce_trc ! 16 16 USE trc ! 17 USE trcsms_lobster ! LOBSTER bio-model18 17 USE trcsms_pisces ! PISCES biogeo-model 19 18 USE trcsms_cfc ! CFC 11 & 12 … … 49 48 IF( nn_timing == 1 ) CALL timing_start('trc_sms') 50 49 ! 51 IF( lk_lobster ) CALL trc_sms_lobster( kt ) ! main program of LOBSTER52 50 IF( lk_pisces ) CALL trc_sms_pisces ( kt ) ! main program of PISCES 53 51 IF( lk_cfc ) CALL trc_sms_cfc ( kt ) ! surface fluxes of CFC -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
r3319 r3680 78 78 ! 79 79 CALL trc_rst_opn ( kt ) ! Open tracer restart file 80 IF( lrst_trc ) CALL trc_rst_cal ( kt, 'WRITE' ) ! calendar 80 81 IF( lk_iomput ) THEN ; CALL trc_wri ( kt ) ! output of passive tracers with iom I/O manager 81 82 ELSE ; CALL trc_dia ( kt ) ! output of passive tracers with old I/O manager … … 83 84 CALL trc_sms ( kt ) ! tracers: sinks and sources 84 85 CALL trc_trp ( kt ) ! transport of passive tracers 86 IF( kt == nittrc000 ) CALL iom_close( numrtr ) ! close input tracer restart file 85 87 IF( lrst_trc ) CALL trc_rst_wri ( kt ) ! write tracer restart file 86 88 IF( lk_trdmld_trc ) CALL trd_mld_trc ( kt ) ! trends: Mixed-layer -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
r3625 r3680 29 29 USE sbc_oce ! surface boundary condition: ocean 30 30 USE bdy_oce 31 #if defined key_obc 32 USE obc_oce, ONLY: obctmsk 33 #endif 31 34 #if defined key_agrif 32 35 USE agrif_opa_update -
branches/2012/dev_MERGE_2012/NEMOGCM/NEMO/TOP_SRC/trcwri.F90
r3295 r3680 18 18 USE dianam ! Output file name 19 19 USE trcwri_pisces 20 USE trcwri_cfc 21 USE trcwri_c14b 22 USE trcwri_my_trc 20 23 21 24 IMPLICIT NONE … … 69 72 ! write the tracer concentrations in the file 70 73 ! --------------------------------------- 71 IF( lk_pisces ) THEN 72 CALL trc_wri_pisces 73 ELSE 74 DO jn = 1, jptra 75 cltra = TRIM( ctrcnm(jn) ) ! short title for tracer 76 CALL iom_put( cltra, trn(:,:,:,jn) ) 77 END DO 78 ENDIF 74 IF( lk_pisces ) CALL trc_wri_pisces ! PISCES 75 IF( lk_cfc ) CALL trc_wri_cfc ! surface fluxes of CFC 76 IF( lk_c14b ) CALL trc_wri_c14b ! surface fluxes of C14 77 IF( lk_my_trc ) CALL trc_wri_my_trc ! MY_TRC tracers 79 78 ! 80 79 END SUBROUTINE trc_wri_trc
Note: See TracChangeset
for help on using the changeset viewer.