Changeset 335 for trunk/NEMO
- Timestamp:
- 2005-11-14T13:08:42+01:00 (19 years ago)
- Location:
- trunk/NEMO/TOP_SRC
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/TOP_SRC/initrc.F90
r274 r335 1 1 MODULE initrc 2 !!================================================ ===========================================2 !!================================================ 3 3 !! 4 4 !! *** MODULE initrc *** 5 5 !! Initialisation the tracer model 6 !!=========================================================================================== 7 8 !!---------------------------------------------------------------------- 9 !! TOP 1.0, LOCEAN-IPSL (2005) 10 !! $Header$ 11 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 12 !!---------------------------------------------------------------------- 13 14 !!---------------------------------------------------------------------- 15 !! * Modules used 16 !! ============== 17 USE oce_trc 18 USE trc 19 USE trcrst 20 USE trcctl 21 USE trclec 22 USE trcdtr 23 USE trcini 24 25 IMPLICIT NONE 26 PRIVATE 27 28 29 !! * Accessibility 30 PUBLIC ini_trc 31 32 CONTAINS 6 !!================================================ 33 7 34 8 #if defined key_passivetrc 35 9 36 SUBROUTINE ini_trc 37 !!--------------------------------------------------------------------- 38 !! 39 !! ROUTINE ini_trc 40 !! ****************** 41 !! 42 !! PURPOSE : 43 !! --------- 44 !! initialize the tracer model 45 !! 46 !! METHOD : 47 !! ------- 48 !! 49 !! 50 !! History: 51 !! ------- 52 !! original : 91-03 () 53 !! additions : 92-01 (C. Levy) 54 !! 05-03 (O. Aumont and A. El Moussaoui) F90 55 !!---------------------------------------------------------------------- 10 !!------------------------------------------------------- 11 !! TOP 1.0, LOCEAN-IPSL (2005) 12 !!------------------------------------------------------- 56 13 57 !!--------------------------------------------------------------------- 58 !! OPA.9, 03-2005 59 !!--------------------------------------------------------------------- 14 !!-------------------------------------------------------------- 15 !! * Modules used 16 !! ============== 17 USE oce_trc 18 USE trc 19 USE trcrst 20 USE trcctl 21 USE trclec 22 USE trcdtr 23 USE trcini 24 25 IMPLICIT NONE 26 PRIVATE 27 28 29 !! * Accessibility 30 PUBLIC ini_trc 31 32 CONTAINS 33 34 SUBROUTINE ini_trc 35 !!--------------------------------------------------------------------- 36 !! 37 !! ROUTINE ini_trc 38 !! ****************** 39 !! 40 !! PURPOSE : 41 !! --------- 42 !! initialize the tracer model 43 !! 44 !! METHOD : 45 !! ------- 46 !! 47 !! 48 !! History: 49 !! ------- 50 !! original : 91-03 () 51 !! additions : 92-01 (C. Levy) 52 !! 05-03 (O. Aumont and A. El Moussaoui) F90 53 !!---------------------------------------------------------------------- 60 54 61 !! 0.b PRINT the number of tracer 62 !! ------------------------------ 55 !!--------------------------------------------------------------------- 56 !! OPA.9, 03-2005 57 !!--------------------------------------------------------------------- 58 59 !! 0.b PRINT the number of tracer 60 !! ------------------------------ 63 61 64 62 IF(lwp) WRITE(numout,*) ' ' … … 66 64 IF(lwp) WRITE(numout,*) ' ' 67 65 68 ! 1. READ passive tracers namelists69 ! ---------------------------------66 ! 1. READ passive tracers namelists 67 ! --------------------------------- 70 68 71 69 CALL trc_lec 72 70 73 ! 2. control consistency between parameters, cpp key and namelists74 ! ----------------------------------------------------------------71 ! 2. control consistency between parameters, cpp key and namelists 72 ! ---------------------------------------------------------------- 75 73 76 74 CALL trc_ctl 77 75 78 ! 3. computes some initializations79 ! --------------------------------76 ! 3. computes some initializations 77 ! -------------------------------- 80 78 81 79 CALL trc_ini 82 80 83 ! 4. restart from a FILE (nutrst)84 ! ----------------------81 ! 4. restart from a FILE (nutrst) 82 ! ---------------------- 85 83 86 IF( lrsttr) THEN84 IF( lrsttr ) THEN 87 85 88 CALL trc_rst 86 87 CALL trc_rst 89 88 90 89 ELSE 91 90 92 ! start from anything ELSE91 ! start from anything ELSE 93 92 94 93 CALL trc_dtr 95 94 96 95 ENDIF 97 96 98 END SUBROUTINE ini_trc97 END SUBROUTINE ini_trc 99 98 100 99 #else 101 SUBROUTINE ini_trc 102 ! no passive tracers 103 END SUBROUTINE ini_trc 100 !!====================================================================== 101 !! Empty module : No passive tracer 102 !!====================================================================== 103 CONTAINS 104 SUBROUTINE ini_trc 105 106 END SUBROUTINE ini_trc 104 107 #endif 105 108 -
trunk/NEMO/TOP_SRC/oce_trc.F90
r281 r335 41 41 nwrite => nwrite, & !: frequency of OUTPUT file 42 42 nstock => nstock, & !: frequency of restart file 43 nprint => nprint, & !: level of print (0 no print) 43 44 lwp => lwp , & !: boolean term for mpp output 44 ln_ctl => ln_ctl , & !: = ln_ctl.AND.lwp (print control on the 1st proc) 45 nictle => nictle , & !: = max i indice to make the control SUM 46 njctle => njctle , & !: = max j indice to make the control SUM 45 ln_ctl => ln_ctl, & !: = ln_ctl.AND.lwp (print control on the 1st proc) 46 nictls => nictls, & !: Start i indice for the SUM control 47 nictle => nictle, & !: End i indice for the SUM control 48 njctls => njctls, & !: Start j indice for the SUM control 49 njctle => njctle, & !: End j indice for the SUM control 50 isplt => isplt , & !: number of processors following i 51 jsplt => jsplt , & !: number of processors following j 52 ijsplt => ijsplt, & !: nb of local domain = nb of processors 47 53 numout => numout !: logical unit for output print 54 48 55 49 56 !! run controm … … 73 80 nimpp => nimpp , & !: i index for mpp-subdomain left bottom 74 81 njmpp => njmpp , & !: j index for mpp-subdomain left bottom 82 nproc => nproc , & !: number for local processor 83 narea => narea , & !: number for local area 75 84 mig => mig , & !: local ==> global domain i-indice 76 85 mjg => mjg , & !: local ==> global domain i-indice … … 79 88 mj0 => mj0 , & !: global ==> local domain j-indice 80 89 mj1 => mj1 !: (mj0=1 and mj1=0 if the global indice is not in the local domain) 81 90 91 USE dom_oce , ONLY : & 92 nimppt => nimppt , & !:i-indexes for each processor 93 njmppt => njmppt , & !:j-indexes for each processor 94 ibonit => ibonit , & !:i-processor neighbour existence 95 ibonjt => ibonjt , & !:j- processor neighbour existence 96 nlcit => nlcit , & !:dimensions of every i-subdomain 97 nlcjt => nlcjt , & !:dimensions of every j-subdomain 98 nldit => nldit , & !:first indoor index for each i-domain 99 nleit => nleit , & !:last indoor index for each i-domain 100 nldjt => nldjt , & !:first indoor index for each j-domain 101 nlejt => nlejt !:last indoor index for each j-domain 102 103 82 104 !! horizontal curvilinear coordinate and scale factors 83 105 USE dom_oce , ONLY : & … … 198 220 tn => tn , & !: pot. temperature (celsius) 199 221 sn => sn , & !: salinity (psu) 200 rhop => rhop !: potential volumic mass (kg m-3) 222 rhop => rhop , & !: potential volumic mass (kg m-3) 223 rhd => rhd !: in situ density anomalie rhd=(rho-rau0)/rau0 (no units) 224 225 #if defined key_trc_diatrd 226 USE oce , ONLY : & 227 hdivn => hdivn !: horizontal divergence (1/s) 228 #endif 201 229 202 230 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily … … 214 242 USE trabbl , ONLY : & 215 243 atrbbl => atrbbl !: lateral coeff. for bottom boundary layer scheme (m2/s) 244 # if defined key_off_tra 245 USE trabbl, ONLY : & 246 bblx => bblx, & 247 bbly => bbly 248 # endif 216 249 #endif 217 250 … … 262 295 USE zdfmxl , ONLY : & 263 296 hmld => hmld , & !: mixing layer depth (turbocline) 264 hmlp => hmlp !: mixed layer depth (rho=rho0+zdcrit) (m) 297 hmlp => hmlp , & !: mixed layer depth (rho=rho0+zdcrit) (m) 298 hmlpt => hmlpt !: mixed layer depth at t-points (m) 265 299 266 300 USE ldfslp , ONLY : & -
trunk/NEMO/TOP_SRC/par_trc_trp.F90
r274 r335 8 8 !!---------------------------------------------------------------------- 9 9 !! TOP 1.0, LOCEAN-IPSL (2005) 10 !! $Header$11 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt12 10 !!---------------------------------------------------------------------- 13 11 #if defined key_passivetrc … … 23 21 !! jpdia3d : additional 3d output 24 22 25 #if defined key_trc_npzd 26 !!--------------------------------------------------------------------- 27 !! 'key_trc_npzd' : NPZD Source Minus Sink model 28 !!--------------------------------------------------------------------- 29 INTEGER, PUBLIC, PARAMETER :: jptra = 4 30 #if defined key_trc_diaadd 31 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1 32 INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1 33 #endif 34 #elif defined key_trc_lobster1 23 #if defined key_trc_lobster1 35 24 !!--------------------------------------------------------------------- 36 25 !! 'key_trc_lobster1' : LOBSTER1 Source Minus Sink model 37 26 !!--------------------------------------------------------------------- 38 27 INTEGER, PUBLIC, PARAMETER :: jptra = 6 39 # if defined key_trc_diaadd40 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1 828 # if defined key_trc_diaadd 29 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 19 41 30 INTEGER, PUBLIC, PARAMETER :: jpdia3d = 3 42 #endif 43 #elif defined key_trc_hamocc3 44 # if defined key_trc_p3zd 45 # if defined key_trc_biohamocc13 31 # endif 32 #elif defined key_cfc 46 33 !!--------------------------------------------------------------------- 47 !! 'key_ trc_p3zd && key_trc_biohamocc13' P3ZDSource Minus Sink model34 !! 'key_cfc' : CFC Source Minus Sink model 48 35 !!--------------------------------------------------------------------- 49 INTEGER, PUBLIC, PARAMETER :: jptra = 1150 # if defined key_trc_diaadd36 INTEGER, PUBLIC, PARAMETER :: jptra = 2 37 # if defined key_trc_diaadd 51 38 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1 52 39 INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1 53 #endif 54 !!--------------------------------------------------------------------- 55 !! 'key_trc_p3zd' : P3ZD Source Minus Sink model 56 !!--------------------------------------------------------------------- 57 # else 58 INTEGER, PUBLIC, PARAMETER :: jptra = 10 59 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1 60 INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1 61 # endif 62 # else 63 !!--------------------------------------------------------------------- 64 !! 'key_trc_hamocc3 && key_trc_biohamocc13' HAMMOCC Source Minus Sink model 65 !!--------------------------------------------------------------------- 66 # if defined key_trc_biohamocc13 67 INTEGER, PUBLIC, PARAMETER :: jptra = 8 68 #if defined key_trc_diaadd 69 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1 70 INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1 71 #endif 72 # else 73 !!--------------------------------------------------------------------- 74 !! 'key_trc_hamocc3 ' HAMMOCC Source Minus Sink model 75 !!--------------------------------------------------------------------- 76 INTEGER, PUBLIC, PARAMETER :: jptra = 7 77 #if defined key_trc_diaadd 78 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1 79 INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1 80 #endif 81 # endif 82 # endif 83 #elif defined key_cfc 84 !!--------------------------------------------------------------------- 85 !! 'key_trc_cfc' : CFC Source Minus Sink model 86 !!--------------------------------------------------------------------- 87 INTEGER, PUBLIC, PARAMETER :: jptra = 2 88 #if defined key_trc_diaadd 89 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1 90 INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1 91 #endif 92 #elif defined key_gosac 93 !!--------------------------------------------------------------------- 94 !! 'key_trc_gosac' : GOSAC Source Minus Sink model 95 !!--------------------------------------------------------------------- 96 INTEGER, PUBLIC, PARAMETER :: jptra = 2 97 #if defined key_trc_diaadd 98 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1 99 INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1 100 #endif 101 #elif defined key_trc_age 102 !!--------------------------------------------------------------------- 103 !! 'key_trc_age' : AGE Source Minus Sink model 104 !!--------------------------------------------------------------------- 105 INTEGER, PUBLIC, PARAMETER :: jptra = 2 106 #if defined key_trc_diaadd 107 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1 108 INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1 109 #endif 40 # endif 110 41 #elif defined key_trc_pisces 111 42 !!--------------------------------------------------------------------- … … 113 44 !!--------------------------------------------------------------------- 114 45 INTEGER, PUBLIC, PARAMETER :: jptra = 24 115 # if defined key_trc_diaadd46 # if defined key_trc_diaadd 116 47 INTEGER, PUBLIC, PARAMETER :: jpdia2d = 13 117 48 INTEGER, PUBLIC, PARAMETER :: jpdia3d = 11 118 # endif49 # endif 119 50 #else 120 51 !!--------------------------------------------------------------------- -
trunk/NEMO/TOP_SRC/trc.F90
r274 r335 11 11 !!---------------------------------------------------------------------- 12 12 !! TOP 1.0, LOCEAN-IPSL (2005) 13 !! $Header$14 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt15 13 !!---------------------------------------------------------------------- 16 14 #if defined key_passivetrc … … 193 191 #endif 194 192 195 !! Contral/debugging196 !! -----------------197 REAL(wp), PUBLIC, DIMENSION(jptra) :: &198 tra_ctl !!: sum of tra trend199 193 #else 200 194 !!====================================================================== -
trunk/NEMO/TOP_SRC/trcctl.F90
r274 r335 10 10 !!========================================================================= 11 11 !! TOP 1.0, LOCEAN-IPSL (2005) 12 !! $Header$13 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt14 12 !!---------------------------------------------------------------------- 15 !!---------------------------------------------------------------------- 16 !! * Modules used 17 !! ============== 18 USE oce_trc 19 USE trc 20 USE sms 21 USE trctrp_ctl 13 #if defined key_passivetrc 14 !!---------------------------------------------------------------------- 15 !! * Modules used 16 !! ============== 17 USE oce_trc 18 USE trc 19 USE sms 20 USE trctrp_ctl 22 21 23 24 22 IMPLICIT NONE 23 PRIVATE 25 24 26 27 25 !! * Accessibility 26 PUBLIC trc_ctl 28 27 29 28 CONTAINS 30 29 31 #if defined key_passivetrc 30 SUBROUTINE trc_ctl 31 !!=========================================================================================== 32 !! 33 !! 34 !! ROUTINE trcctl 35 !! ****************** 36 !! 37 !! we use IF/ENDIF inside #IF defined option-cpp 38 !! FILE name must not exceed 21 characters 39 !! 40 !!=========================================================================================== 41 42 !!---------------------------------------------------------------------- 43 !! local declarations 44 !! ================== 45 INTEGER :: istop, jn 46 47 !!--------------------------------------------------------------------- 48 !! OPA.9 03/2005 49 !!--------------------------------------------------------------------- 32 50 33 SUBROUTINE trc_ctl 34 !!=========================================================================================== 35 !! 36 !! 37 !! ROUTINE trcctl 38 !! ****************** 39 !! 40 !! we use IF/ENDIF inside #IF defined option-cpp 41 !! FILE name must not exceed 21 characters 42 !! 43 !!=========================================================================================== 44 45 !!---------------------------------------------------------------------- 46 !! local declarations 47 !! ================== 48 INTEGER :: istop, jn 49 50 !!!--------------------------------------------------------------------- 51 !!! OPA.9 03/2005 52 !!!--------------------------------------------------------------------- 53 54 ! 0. Parameter 55 ! ------------ 51 ! 0. Parameter 52 ! ------------ 56 53 istop = 0 57 54 58 ! 1. LOGICAL UNIT initialization for specifi! files for passive tracer59 ! --------------------------------------------------------------------60 ! nutwrs : OUTPUT for passive tracer restart UNIT (always used)61 ! nutrst : restart FILE INPUT UNIT (lrsttr=.TRUE.)62 ! nutini(jptra) : UNIT for initial FILE for tracer55 ! 1. LOGICAL UNIT initialization for specifi! files for passive tracer 56 ! -------------------------------------------------------------------- 57 ! nutwrs : OUTPUT for passive tracer restart UNIT (always used) 58 ! nutrst : restart FILE INPUT UNIT (lrsttr=.TRUE.) 59 ! nutini(jptra) : UNIT for initial FILE for tracer 63 60 64 61 nutwrs = 72 65 62 nutrst = 73 66 63 67 ! 2. restart for passive tracer (input)68 ! -----------------------------64 ! 2. restart for passive tracer (input) 65 ! ----------------------------- 69 66 70 67 IF(lwp) WRITE(numout,*) ' ' … … 78 75 79 76 IF(lrsttr) THEN 80 81 77 IF(lwp) WRITE(numout,*) ' READ a restart FILE for passive tracer' 78 IF(lwp) WRITE(numout,*) ' ' 82 79 ELSE 83 84 80 IF(lwp) WRITE(numout,*) ' no restart FILE' 81 IF(lwp) WRITE(numout,*) ' ' 85 82 86 ! 3. OPEN FILES for initial tracer value87 ! --------------------------------------88 83 ! 3. OPEN FILES for initial tracer value 84 ! -------------------------------------- 85 DO jn=1,jptra 89 86 90 ! OPEN input FILE only IF lutini(jn) is true91 ! ------------------------------------------87 ! OPEN input FILE only IF lutini(jn) is true 88 ! ------------------------------------------ 92 89 IF (lutini(jn)) THEN 93 90 94 ! prepare input FILE name a 95 ! ------------------------- 96 IF(lwp) WRITE(numout,*) & 97 ' READ an initial FILE :', & 98 ' for passive tracer number :',jn & 99 ,' traceur : ',ctrcnm(jn) 100 IF(lwp) WRITE(numout,*) ' ' 101 END IF 102 END DO 91 ! prepare input FILE name a 92 ! ------------------------- 93 IF(lwp) WRITE(numout,*) & 94 ' READ an initial FILE for passive tracer number :',jn & 95 ,' traceur : ',ctrcnm(jn) 96 IF(lwp) WRITE(numout,*) ' ' 97 END IF 98 END DO 103 99 ENDIF 104 100 105 ! 4. Don't USE non penetrative convective mixing option106 ! it's not implemented for passive tracer107 ! -----------------------------------------------------101 ! 4. Don't USE non penetrative convective mixing option 102 ! it's not implemented for passive tracer 103 ! ----------------------------------------------------- 108 104 109 105 IF( ln_zdfnpc) THEN 110 IF(lwp) WRITE (numout,*) ' ===>>>> : w a r n i n g '111 IF(lwp) WRITE (numout,*) ' ======= ============= '112 IF(lwp) WRITE (numout,*) ' STOP, this sheme is not implemented'113 IF(lwp) WRITE (numout,*) ' in passive tracer model:'114 IF(lwp) WRITE (numout,*) ' non penetrative convect. mixing scheme'115 istop = istop + 1106 IF(lwp) WRITE (numout,*) ' ===>>>> : w a r n i n g ' 107 IF(lwp) WRITE (numout,*) ' ======= ============= ' 108 IF(lwp) WRITE (numout,*) ' STOP, this sheme is not implemented' 109 IF(lwp) WRITE (numout,*) ' in passive tracer model:' 110 IF(lwp) WRITE (numout,*) ' non penetrative convect. mixing scheme' 111 istop = istop + 1 116 112 ENDIF 117 113 118 ! 5. transport scheme option119 ! --------------------------114 ! 5. transport scheme option 115 ! -------------------------- 120 116 121 117 IF(lwp) WRITE(numout,*) ' ' 122 118 CALL trc_trp_ctl 123 IF(lwp) WRITE(numout,*) ' '124 119 125 ! 6. SMS model 126 ! --------------------------------------------- 120 121 ! 6. SMS model 122 ! --------------------------------------------- 127 123 128 124 IF(lwp) WRITE(numout,*) ' ' … … 130 126 IF(lwp) WRITE(numout,*) ' ' 131 127 132 #if defined key_trc_npzd 133 #include "trcctl.npzd.h90" 134 #elif defined key_trc_lobster1 135 #include "trcctl.lobster1.h90" 128 129 #if defined key_trc_lobster1 130 # include "trcctl.lobster1.h90" 136 131 #elif defined key_trc_pisces 137 #include "trcctl.pisces.h90" 138 #elif defined key_trc_hamocc3 139 # if defined key_trc_p3zd 140 #include "trcctl.p3zd.h90" 141 # else 142 #include "trcctl.hamocc3.h90" 143 # endif 132 # include "trcctl.pisces.h90" 133 #elif defined key_cfc 134 # include "trcctl.cfc.h90" 144 135 #else 145 136 … … 148 139 #endif 149 140 150 ! E r r o r control151 ! ------------------141 ! E r r o r control 142 ! ------------------ 152 143 153 144 IF ( istop > 0 ) THEN 154 155 156 157 158 145 IF(lwp)WRITE(numout,*) 146 IF(lwp)WRITE(numout,*) istop,' E R R O R found : we stop' 147 IF(lwp)WRITE(numout,*) '**************************' 148 IF(lwp)WRITE(numout,*) 149 STOP 'trcctl' 159 150 ENDIF 160 151 161 END SUBROUTINE trc_ctl 152 END SUBROUTINE trc_ctl 162 153 163 154 #else 155 !!====================================================================== 156 !! Empty module : No passive tracer 157 !!====================================================================== 158 CONTAINS 159 SUBROUTINE trc_ctl 164 160 165 SUBROUTINE trc_ctl 166 !!============== 167 ! no passive tracers 168 !!============== 169 END SUBROUTINE trc_ctl 170 161 END SUBROUTINE trc_ctl 162 171 163 #endif 172 164 -
trunk/NEMO/TOP_SRC/trcdia.F90
r274 r335 7 7 !!========================================================================== 8 8 !! TOP 1.0, LOCEAN-IPSL (2005) 9 !! $Header$10 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt11 9 !!---------------------------------------------------------------------- 12 !!---------------------------------------------------------------------- 13 !! * Modules used 14 !! ============== 10 #if defined key_passivetrc 11 !!---------------------------------------------------------------------- 12 !! * Modules used 13 15 14 USE trcdit 16 15 … … 25 24 CONTAINS 26 25 27 SUBROUTINE trc_dia(kt,kindic)28 !!===========================================================================================29 !!30 !! ROUTINE trcdii_wr31 !!===========================================================================================26 SUBROUTINE trc_dia(kt,kindic) 27 !!=========================================================================================== 28 !! 29 !! ROUTINE trcdii_wr 30 !!=========================================================================================== 32 31 33 32 INTEGER, INTENT( in ) :: kt, kindic 34 33 35 ! outputs for tracer concentration36 ! --------------------------------34 ! outputs for tracer concentration 35 ! -------------------------------- 37 36 38 37 CALL trcdit_wr(kt,kindic) … … 40 39 #if defined key_trc_diatrd 41 40 42 ! outputs for dynamical trends43 ! ----------------------------41 ! outputs for dynamical trends 42 ! ---------------------------- 44 43 45 44 CALL trcdid_wr(kt,kindic) … … 48 47 #if defined key_trc_diaadd 49 48 50 ! outputs for additional arrays51 ! -----------------------------49 ! outputs for additional arrays 50 ! ----------------------------- 52 51 53 52 CALL trcdii_wr(kt,kindic) … … 56 55 #if defined key_trc_diabio 57 56 58 ! outputs for biological trends59 ! -----------------------------57 ! outputs for biological trends 58 ! ----------------------------- 60 59 61 60 CALL trcdib_wr(kt,kindic) … … 63 62 #endif 64 63 65 64 END SUBROUTINE trc_dia 66 65 67 END MODULE trcdia 66 #else 67 !!====================================================================== 68 !! Empty module : No passive tracer 69 !!====================================================================== 70 CONTAINS 71 SUBROUTINE trc_dia 72 73 END SUBROUTINE trc_dia 74 #endif 75 76 END MODULE trcdia -
trunk/NEMO/TOP_SRC/trcdit.F90
r274 r335 1 1 MODULE trcdit 2 3 2 !!---------------------------------------------------------------------- 4 3 !! TOP 1.0, LOCEAN-IPSL (2005) 5 !! $Header$6 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt7 4 !!---------------------------------------------------------------------- 8 !!---------------------------------------------------------------------- 9 !! * Modules used 10 !! ============== 5 !! * Modules used 6 !! ============== 11 7 USE oce_trc 12 8 USE trc … … 49 45 nitb , & !!: id for additional array output FILE 50 46 ndepitb , & !!: id for depth mesh 51 nhoritb , &!!: id for horizontal mesh47 nhoritb !!: id for horizontal mesh 52 48 # endif 53 49 … … 447 443 cltrau=ctrcun(jn) ! UNIT for tracer /trends 448 444 CALL histdef(nit6(jn), cltra, cltral, cltrau, jpi,jpj, & 449 & nhorit6(jn), ipk, 1, ipk, ndepit6(jn), 32, clop ,445 & nhorit6(jn), ipk, 1, ipk, ndepit6(jn), 32, clop , & 450 446 & zsto,zout) 451 447 END DO … … 809 805 !! Modules used 810 806 USE ioipsl 807 USE sms 811 808 812 809 !! * Arguments 813 810 INTEGER, INTENT( in ) :: kt,kindic ! ocean time-step 814 811 815 INTEGER :: ji, jj, jk, jn , jl812 INTEGER :: ji, jj, jk, jn 816 813 LOGICAL :: ll_print = .FALSE. 817 814 … … 821 818 822 819 REAL(wp) :: zsto, zout, zdt 823 REAL(wp) :: zsec824 820 INTEGER :: iimi, iima, ijmi, ijma, ipk, it 825 821 … … 848 844 849 845 ! Define indices of the horizontal output zoom and vertical limit storage iimi = 1 ; iima = jpi 846 iimi = 1 ; iima = jpi 850 847 ijmi = 1 ; ijma = jpj 851 848 ipk = jpk … … 895 892 ! SOME diagnostics to DO first time 896 893 897 # if defined key_trc_npzd ||defined key_trc_lobster1894 # if defined key_trc_lobster1 898 895 899 896 ! initial total nitrogen … … 947 944 DO jn=1,jpdiabio 948 945 cltra=ctrbio(jn) ! short title for biological diagnostic 949 CALL histwrite(nitb, cltra, zt, trbio(:,:,:,jn), ndimt50, & 950 & ndext50) 946 CALL histwrite(nitb, cltra, kt, trbio(:,:,:,jn), ndimt50,ndext50) 951 947 END DO 952 948 953 # if defined key_trc_npzd ||defined key_trc_lobster1949 # if defined key_trc_lobster1 954 950 955 951 IF( MOD(kt-nit000+1,nwritebio) == 0) THEN -
trunk/NEMO/TOP_SRC/trcdta.F90
r274 r335 5 5 !!===================================================================== 6 6 !! TOP 1.0, LOCEAN-IPSL (2005) 7 !! $Header$8 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt9 7 !!---------------------------------------------------------------------- 10 8 … … 16 14 !!---------------------------------------------------------------------- 17 15 !! * Modules used 18 19 20 21 16 USE oce_trc 17 USE trc 18 USE par_sms 19 USE lib_print 22 20 23 21 IMPLICIT NONE … … 51 49 !! Default case NetCDF file 52 50 !!---------------------------------------------------------------------- 53 51 54 52 SUBROUTINE dta_trc( kt ) 55 !!----------------------------------------------------------------------56 !! *** ROUTINE dta_trc ***57 !!58 !! ** Purpose : Reads passive tracer data (Levitus monthly data)59 !!60 !! ** Method : Read on unit numtr the interpolated tracer concentra-61 !! tion onto the global grid. Data begin at january.62 !! The value is centered at the middle of month.63 !! In the opa model, kt=1 agree with january 1.64 !! At each time step, a linear interpolation is applied between65 !! two monthly values.66 !!67 !! History :68 !! 8.2 ! 02-04 (O. Aumont) Original code69 !! 9.0 ! 04-03 (C. Ethe)70 !! 9.0 ! 05-03 (O. Aumont and A. El Moussaoui) F9071 !!----------------------------------------------------------------------72 !! * Modules used53 !!---------------------------------------------------------------------- 54 !! *** ROUTINE dta_trc *** 55 !! 56 !! ** Purpose : Reads passive tracer data (Levitus monthly data) 57 !! 58 !! ** Method : Read on unit numtr the interpolated tracer concentra- 59 !! tion onto the global grid. Data begin at january. 60 !! The value is centered at the middle of month. 61 !! In the opa model, kt=1 agree with january 1. 62 !! At each time step, a linear interpolation is applied between 63 !! two monthly values. 64 !! 65 !! History : 66 !! 8.2 ! 02-04 (O. Aumont) Original code 67 !! 9.0 ! 04-03 (C. Ethe) 68 !! 9.0 ! 05-03 (O. Aumont and A. El Moussaoui) F90 69 !!---------------------------------------------------------------------- 70 !! * Modules used 73 71 USE ioipsl 74 72 75 !! * Arguments73 !! * Arguments 76 74 !! * Arguments 77 75 INTEGER, INTENT( in ) :: kt ! ocean time-step 78 76 79 !! * Local declarations77 !! * Local declarations 80 78 INTEGER :: ji, jj, jn, jl 81 79 INTEGER, PARAMETER :: & … … 90 88 REAL(wp), DIMENSION (jpk) :: zlev 91 89 REAL(wp) :: zdate0, zxy, zl 92 !!----------------------------------------------------------------------90 !!---------------------------------------------------------------------- 93 91 94 92 DO jn = 1, jptra 95 93 96 IF( lutini(jn) ) THEN 97 98 IF ( kt == nit000 ) THEN 99 !! 3D tracer data 100 IF(lwp)WRITE(numout,*) 101 IF(lwp)WRITE(numout,*) ' trcdta: reading tracer' 102 IF(lwp)WRITE(numout,*) ' data file ', jn 103 IF(lwp)WRITE(numout,*) 104 nlectr(jn) = 0 105 ENDIF 106 ! Initialization 107 iman = jpmois 108 i15 = nday/16 109 imois = nmonth + i15 -1 110 IF( imois == 0 ) imois = iman 111 itime = jpmois 112 ipi = jpiglo 113 ipj = jpjglo 114 115 ! First call kt=nit000 116 ! -------------------- 117 118 IF ( kt == nit000 .AND. nlectr(jn) == 0 ) THEN 119 ntrc1(jn) = 0 120 IF(lwp) THEN 121 WRITE(numout,*) 122 WRITE(numout,*) ' Tracer monthly fields' 123 WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~' 124 WRITE(numout,*) ' NetCDF FORMAT' 125 WRITE(numout,*) 126 ENDIF 127 128 ! open file 129 130 clname(jn) = 'LEVITUS_'//ctrcnm(jn) 131 CALL flinopen(TRIM(clname(jn)),mig(1),nlci,mjg(1),nlcj, & 132 .FALSE.,ipi,ipj,ipk,zlon,zlat,zlev,itime, & 133 istep,zdate0,rdt,numtr(jn) ) 134 135 ! title, dimensions and tests 136 IF( itime /= jpmois ) THEN 94 IF( lutini(jn) ) THEN 95 96 IF ( kt == nit000 ) THEN 97 !! 3D tracer data 98 IF(lwp)WRITE(numout,*) 99 IF(lwp)WRITE(numout,*) ' trcdta: reading tracer' 100 IF(lwp)WRITE(numout,*) ' data file ', jn 101 IF(lwp)WRITE(numout,*) 102 nlectr(jn) = 0 103 ENDIF 104 ! Initialization 105 iman = jpmois 106 i15 = nday/16 107 imois = nmonth + i15 -1 108 IF( imois == 0 ) imois = iman 109 itime = jpmois 110 ipi = jpiglo 111 ipj = jpjglo 112 113 ! First call kt=nit000 114 ! -------------------- 115 116 IF ( kt == nit000 .AND. nlectr(jn) == 0 ) THEN 117 ntrc1(jn) = 0 118 IF(lwp) THEN 119 WRITE(numout,*) 120 WRITE(numout,*) ' Tracer monthly fields' 121 WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~' 122 WRITE(numout,*) ' NetCDF FORMAT' 123 WRITE(numout,*) 124 ENDIF 125 126 ! open file 127 128 clname(jn) = 'LEVITUS_'//ctrcnm(jn) 129 CALL flinopen(TRIM(clname(jn)),mig(1),nlci,mjg(1),nlcj, & 130 .FALSE.,ipi,ipj,ipk,zlon,zlat,zlev,itime, & 131 istep,zdate0,rdt,numtr(jn) ) 132 133 ! title, dimensions and tests 134 IF( itime /= jpmois ) THEN 135 IF(lwp) THEN 136 WRITE(numout,*) ' ' 137 WRITE(numout,*) 'problem with time coordinates' 138 WRITE(numout,*) ' itime ',itime,' jpmois ',jpmois 139 ENDIF 140 STOP 'trc_dta' 141 ENDIF 142 143 IF( ipi /= jpidta .OR. ipj /= jpjdta .OR. ipk /= jpk ) THEN 144 IF(lwp) THEN 145 WRITE(numout,*) ' ' 146 WRITE(numout,*) 'problem with dimensions' 147 WRITE(numout,*) ' ipi ',ipi,' jpidta ',jpidta 148 WRITE(numout,*) ' ipj ',ipj,' jpjdta ',jpjdta 149 WRITE(numout,*) ' ipk ',ipk,' jpk ',jpk 150 ENDIF 151 STOP 'trc_dta' 152 ENDIF 153 IF(lwp)WRITE(numout,*) itime,istep,zdate0,rdt,numtr(jn) 154 trdta(:,:,:,jn) = 0. 155 156 ENDIF 157 158 159 ! Read montly file 160 IF( ( kt == nit000 .AND. nlectr(jn) == 0) & 161 .OR. imois /= ntrc1(jn) ) THEN 162 nlectr(jn) = 1 163 164 ! Calendar computation 165 166 ! ntrc1 number of the first file record used in the simulation 167 ! ntrc2 number of the last file record 168 169 ntrc1(jn) = imois 170 ntrc2(jn) = ntrc1(jn) + 1 171 ntrc1(jn) = MOD( ntrc1(jn), iman ) 172 IF ( ntrc1(jn) == 0 ) ntrc1(jn) = iman 173 ntrc2(jn) = MOD( ntrc2(jn), iman ) 174 IF ( ntrc2(jn) == 0 ) ntrc2(jn) = iman 175 IF(lwp) WRITE(numout,*) 'first record file used ntrc1 ', ntrc1(jn) 176 IF(lwp) WRITE(numout,*) 'last record file used ntrc2 ', ntrc2(jn) 177 178 ! Read montly passive tracer data Levitus 179 180 CALL flinget( numtr(jn),ctrcnm(jn),jpidta,jpjdta,jpk, & 181 jpmois,ntrc1(jn),ntrc1(jn),mig(1),nlci,mjg(1),nlcj, & 182 tracdta(1:nlci,1:nlcj,1:jpk,jn,1) ) 183 184 CALL flinget( numtr(jn),ctrcnm(jn),jpidta,jpjdta,jpk, & 185 jpmois,ntrc2(jn),ntrc2(jn),mig(1),nlci,mjg(1),nlcj, & 186 tracdta(1:nlci,1:nlcj,1:jpk,jn,2) ) 187 188 IF(lwp) THEN 189 WRITE(numout,*) 190 WRITE(numout,*) ' read tracer data ', ctrcnm(jn),' ok' 191 WRITE(numout,*) 192 ENDIF 193 194 ! Apply Mask 195 DO jl = 1, 2 196 tracdta(:,:,: ,jn,jl) = tracdta(:,:,:,jn,jl) * tmask(:,:,:) 197 tracdta(:,:,jpk,jn,jl) = 0. 198 IF( lk_zps ) THEN ! z-coord. with partial steps 199 DO jj = 1, jpj ! interpolation of temperature at the last level 200 DO ji = 1, jpi 201 ik = mbathy(ji,jj) - 1 202 IF( ik > 2 ) THEN 203 zl = ( gdept(ik) - fsdept(ji,jj,ik) ) / ( gdept(ik) - gdept(ik-1) ) 204 tracdta(ji,jj,ik,jn,jl) = (1.-zl) * tracdta(ji,jj,ik,jn,jl) + zl * tracdta(ji,jj,ik-1,jn,jl) 205 ENDIF 206 END DO 207 END DO 208 ENDIF 209 210 END DO 211 212 ENDIF 213 137 214 IF(lwp) THEN 138 WRITE(numout,*) ' ' 139 WRITE(numout,*) 'problem with time coordinates' 140 WRITE(numout,*) ' itime ',itime,' jpmois ',jpmois 141 ENDIF 142 STOP 'trc_dta' 143 ENDIF 144 145 IF( ipi /= jpidta .OR. ipj /= jpjdta .OR. ipk /= jpk ) THEN 146 IF(lwp) THEN 147 WRITE(numout,*) ' ' 148 WRITE(numout,*) 'problem with dimensions' 149 WRITE(numout,*) ' ipi ',ipi,' jpidta ',jpidta 150 WRITE(numout,*) ' ipj ',ipj,' jpjdta ',jpjdta 151 WRITE(numout,*) ' ipk ',ipk,' jpk ',jpk 152 ENDIF 153 STOP 'trc_dta' 154 ENDIF 155 IF(lwp)WRITE(numout,*) itime,istep,zdate0,rdt,numtr(jn) 156 trdta(:,:,:,jn) = 0. 157 158 ENDIF 159 160 161 ! Read montly file 162 IF( ( kt == nit000 .AND. nlectr(jn) == 0) & 163 .OR. imois /= ntrc1(jn) ) THEN 164 nlectr(jn) = 1 165 166 ! Calendar computation 167 168 ! ntrc1 number of the first file record used in the simulation 169 ! ntrc2 number of the last file record 170 171 ntrc1(jn) = imois 172 ntrc2(jn) = ntrc1(jn) + 1 173 ntrc1(jn) = MOD( ntrc1(jn), iman ) 174 IF ( ntrc1(jn) == 0 ) ntrc1(jn) = iman 175 ntrc2(jn) = MOD( ntrc2(jn), iman ) 176 IF ( ntrc2(jn) == 0 ) ntrc2(jn) = iman 177 IF(lwp) WRITE(numout,*) 'first record file used ntrc1 ', ntrc1(jn) 178 IF(lwp) WRITE(numout,*) 'last record file used ntrc2 ', ntrc2(jn) 179 180 ! Read montly passive tracer data Levitus 181 182 CALL flinget( numtr(jn),ctrcnm(jn),jpidta,jpjdta,jpk, & 183 jpmois,ntrc1(jn),ntrc1(jn),mig(1),nlci,mjg(1),nlcj, & 184 tracdta(1:nlci,1:nlcj,1:jpk,jn,1) ) 185 186 CALL flinget( numtr(jn),ctrcnm(jn),jpidta,jpjdta,jpk, & 187 jpmois,ntrc2(jn),ntrc2(jn),mig(1),nlci,mjg(1),nlcj, & 188 tracdta(1:nlci,1:nlcj,1:jpk,jn,2) ) 189 190 IF(lwp) THEN 191 WRITE(numout,*) 192 WRITE(numout,*) ' read tracer data ', ctrcnm(jn),' ok' 193 WRITE(numout,*) 194 ENDIF 195 196 ! Apply Mask 197 DO jl = 1, 2 198 tracdta(:,:,: ,jn,jl) = tracdta(:,:,:,jn,jl) * tmask(:,:,:) 199 tracdta(:,:,jpk,jn,jl) = 0. 200 IF( lk_zps ) THEN ! z-coord. with partial steps 201 DO jj = 1, jpj ! interpolation of temperature at the last level 202 DO ji = 1, jpi 203 ik = mbathy(ji,jj) - 1 204 IF( ik > 2 ) THEN 205 zl = ( gdept(ik) - fsdept(ji,jj,ik) ) / ( gdept(ik) - gdept(ik-1) ) 206 tracdta(ji,jj,ik,jn,jl) = (1.-zl) * tracdta(ji,jj,ik,jn,jl) + zl * tracdta(ji,jj,ik-1,jn,jl) 207 ENDIF 208 END DO 209 END DO 210 ENDIF 211 212 END DO 213 214 ENDIF 215 216 IF(lwp) THEN 217 WRITE(numout,*) ctrcnm(jn), 'Levitus month ', ntrc1(jn), & 218 ntrc2(jn) 219 WRITE(numout,*) 220 WRITE(numout,*) ' Levitus month = ', ntrc1(jn), & 215 WRITE(numout,*) ctrcnm(jn), 'Levitus month ', ntrc1(jn), & 216 ntrc2(jn) 217 WRITE(numout,*) 218 WRITE(numout,*) ' Levitus month = ', ntrc1(jn), & 221 219 ' level = 1' 222 CALL prihre( tracdta(1,1,1,jn,1), jpi, jpj, 1, jpi, 20, 1 &220 CALL prihre( tracdta(1,1,1,jn,1), jpi, jpj, 1, jpi, 20, 1 & 223 221 ,jpj, 20, 1., numout ) 224 WRITE(numout,*) ' Levitus month = ', ntrc1(jn), &222 WRITE(numout,*) ' Levitus month = ', ntrc1(jn), & 225 223 ' level = ',jpk/2 226 CALL prihre( tracdta(1,1,jpk/2,jn,1), jpi, jpj, 1, jpi, &224 CALL prihre( tracdta(1,1,jpk/2,jn,1), jpi, jpj, 1, jpi, & 227 225 20, 1, jpj, 20, 1., numout ) 228 WRITE(numout,*) ' Levitus month = ',ntrc1(jn) &226 WRITE(numout,*) ' Levitus month = ',ntrc1(jn) & 229 227 ,' level = ',jpkm1 230 CALL prihre( tracdta(1,1,jpkm1,jn,1), jpi, jpj, 1, jpi, &228 CALL prihre( tracdta(1,1,jpkm1,jn,1), jpi, jpj, 1, jpi, & 231 229 20, 1, jpj, 20, 1., numout ) 232 ENDIF233 234 ! At every time step compute temperature data235 236 zxy = FLOAT( nday + 15 - 30 * i15 ) / 30.237 trdta(:,:,:,jn)= ( 1. - zxy ) * tracdta(:,:,:,jn,1) &238 239 240 IF( jn == jpno3) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 7.6E-6241 IF( jn == jpdic) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6242 IF( jn == jptal) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6243 IF( jn == jpoxy) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 44.6E-6244 IF( jn == jpsil) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6245 246 247 ENDIF230 ENDIF 231 232 ! At every time step compute temperature data 233 234 zxy = FLOAT( nday + 15 - 30 * i15 ) / 30. 235 trdta(:,:,:,jn)= ( 1. - zxy ) * tracdta(:,:,:,jn,1) & 236 + zxy * tracdta(:,:,:,jn,2) 237 238 IF( jn == jpno3) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 7.6E-6 239 IF( jn == jpdic) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6 240 IF( jn == jptal) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6 241 IF( jn == jpoxy) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 44.6E-6 242 IF( jn == jpsil) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6 243 244 245 ENDIF 248 246 249 247 END DO -
trunk/NEMO/TOP_SRC/trcdtr.F90
r274 r335 61 61 !! ================== 62 62 INTEGER :: ji,jj,jk,jn 63 #if defined key_trc_pisces 63 64 REAL(wp) :: alka0,oxyg0,calc0,bioma0, & 64 silic1,po4,no3, & 65 caralk,bicarb, & 66 ztraa, ztrab, ztran 65 silic1,po4,no3,caralk,bicarb 66 #endif 67 67 !!--------------------------------------------------------------------- 68 68 !! OPA.9 … … 76 76 IF(lwp) WRITE(numout,*) ' ' 77 77 78 #if defined key_trc_hamocc3 79 sco2 = 2.15e-3 80 alka0 = 2.45e-3 81 oxyg0 = 2.e-4 82 po4 = 2.1e-6/po4r 83 bioma0 = 1.e-8 84 silic1 = 85.e-6 85 calc0 = 1.e-5 86 87 trn(:,:,:,jpdic) = sco2 88 trn(:,:,:,jptal) = alka0 89 trn(:,:,:,jpoxy) = oxyg0 90 trn(:,:,:,jppo4) = po4 91 trn(:,:,:,jppoc) = bioma0 92 trn(:,:,:,jpsil) = silic1 93 trn(:,:,:,jpcal) = calc0 94 #if defined key_trc_p3zd 95 trn(:,:,:,jpphy) = bioma0 96 trn(:,:,:,jpzoo) = bioma0 97 trn(:,:,:,jpdoc) = bioma0 98 #endif 99 100 DO jk = 1, jpk 101 DO jj = 1, jpj 102 DO ji = 1, jpi 103 caralk = trn(ji,jj,jk,jptal)- 104 & bor/(1.+1.E-7/akb3(ji,jj,jk)) 105 co3(ji,jj,jk) = caralk-trn(ji,jj,jk,jpdic) 106 bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk) 107 hi(ji,jj,jk) = ak23(ji,jj,jk)*bicarb/co3(ji,jj,jk) 108 ENDDO 109 ENDDO 110 ENDDO 111 112 h2co3(:,:) = 1.e-5 113 114 !! initialize Silicate and Calcite in sediments 115 !! -------------------------------------------- 116 117 sedcal = 0. 118 sedsil = 0. 119 120 IF(lwp) WRITE(numout,*) 'Initialization of P3ZD tracers done' 121 IF(lwp) WRITE(numout,*) '-----------------------------------' 122 123 #elif defined key_cfc 78 79 #if defined key_cfc 124 80 trn(:,:,:,:)=0.0 125 #elif defined key_gosac126 trn(:,:,:,1)=1895.*1.e-6*1028.*tmask(:,:,:)127 trn(:,:,:,2)=0.9*1895.*1.e-6*1028.*tmask(:,:,:)128 129 #elif defined key_trc_age130 trn(:,:,:,1)=1.131 trn(:,:,:,2)=0.132 133 #elif defined key_trc_lobster1 && (defined key_eel_r6 || defined key_eel_r2)134 ! analytical initialisation used in Levy et al. (2001)135 136 DO jk=1,7137 trn(:,:,jk,jpdet)=0.016*tmask(:,:,jk)138 trn(:,:,jk,jpzoo)=0.018*tmask(:,:,jk)139 trn(:,:,jk,jpphy)=0.036*tmask(:,:,jk)140 trn(:,:,jk,jpno3)=1.e-5*tmask(:,:,jk)141 trn(:,:,jk,jpnh4)=0.0005*tmask(:,:,jk)142 trn(:,:,jk,jpdom)=0.017*tmask(:,:,jk)143 END DO144 145 trn(:,:,8,jpdet)=0.020*tmask(:,:,1)146 trn(:,:,8,jpzoo)=0.027*tmask(:,:,1)147 trn(:,:,8,jpphy)=0.041*tmask(:,:,1)148 trn(:,:,8,jpno3)=0.00022*tmask(:,:,1)149 trn(:,:,8,jpnh4)=0.0033*tmask(:,:,1)150 trn(:,:,8,jpdom)=0.021*tmask(:,:,1)151 152 trn(:,:,9,jpdet)=0.0556*tmask(:,:,1)153 trn(:,:,9,jpzoo)=0.123*tmask(:,:,1)154 trn(:,:,9,jpphy)=0.122*tmask(:,:,1)155 trn(:,:,9,jpno3)=0.028*tmask(:,:,1)156 trn(:,:,9,jpnh4)=0.024*tmask(:,:,1)157 trn(:,:,9,jpdom)=0.06*tmask(:,:,1)158 159 trn(:,:,10,jpdet)=0.025*tmask(:,:,1)160 trn(:,:,10,jpzoo)=0.016*tmask(:,:,1)161 trn(:,:,10,jpphy)=0.029*tmask(:,:,1)162 trn(:,:,10,jpno3)=2.462*tmask(:,:,1)163 trn(:,:,10,jpnh4)=0.04*tmask(:,:,1)164 trn(:,:,10,jpdom)=0.022*tmask(:,:,1)165 166 trn(:,:,11,jpdet)=0.0057*tmask(:,:,1)167 trn(:,:,11,jpzoo)=0.0005*tmask(:,:,1)168 trn(:,:,11,jpphy)=0.0006*tmask(:,:,1)169 trn(:,:,11,jpno3)=3.336*tmask(:,:,1)170 trn(:,:,11,jpnh4)=0.005*tmask(:,:,1)171 trn(:,:,11,jpdom)=0.004*tmask(:,:,1)172 173 trn(:,:,12,jpdet)=0.002*tmask(:,:,1)174 trn(:,:,12,jpzoo)=1.e-6*tmask(:,:,1)175 trn(:,:,12,jpphy)=5.e-6*tmask(:,:,1)176 trn(:,:,12,jpno3)=4.24*tmask(:,:,1)177 trn(:,:,12,jpnh4)=0.001*tmask(:,:,1)178 trn(:,:,12,jpdom)=3.e-5*tmask(:,:,1)179 180 DO jk=13,jpk181 trn(:,:,jk,jpdet)=0.0182 trn(:,:,jk,jpzoo)=0.0183 trn(:,:,jk,jpphy)=0.0184 trn(:,:,jk,jpnh4)=0.0185 trn(:,:,jk,jpdom)=0.0186 END DO187 188 trn(:,:,13,jpno3)=5.31*tmask(:,:,13)189 trn(:,:,14,jpno3)=6.73*tmask(:,:,14)190 trn(:,:,15,jpno3)=8.32*tmask(:,:,15)191 trn(:,:,16,jpno3)=10.13*tmask(:,:,16)192 trn(:,:,17,jpno3)=11.95*tmask(:,:,17)193 trn(:,:,18,jpno3)=13.57*tmask(:,:,18)194 trn(:,:,19,jpno3)=15.08*tmask(:,:,19)195 trn(:,:,20,jpno3)=16.41*tmask(:,:,20)196 trn(:,:,21,jpno3)=17.47*tmask(:,:,21)197 trn(:,:,22,jpno3)=18.29*tmask(:,:,22)198 trn(:,:,23,jpno3)=18.88*tmask(:,:,23)199 trn(:,:,24,jpno3)=19.30*tmask(:,:,24)200 trn(:,:,25,jpno3)=19.68*tmask(:,:,25)201 trn(:,:,26,jpno3)=19.91*tmask(:,:,26)202 trn(:,:,27,jpno3)=19.99*tmask(:,:,27)203 trn(:,:,28,jpno3)=20.01*tmask(:,:,28)204 trn(:,:,29,jpno3)=20.01*tmask(:,:,29)205 trn(:,:,30,jpno3)=20.01*tmask(:,:,30)206 207 81 #elif defined key_trc_pisces 208 82 … … 265 139 xksi(:,:)=2.E-6 266 140 267 !! initialize Silicate and Calcite in sediments268 !! -------------------------------------------- 141 !! initialize Silicate and Calcite and POC in sediments 142 !! --------------------------------------------------- 269 143 sedcal(:,:) = 0. 270 144 sedsil(:,:) = 0. 145 sedpoc(:,:) = 0. 271 146 272 147 IF(lwp) WRITE(numout,*) 'Initialization of PISCES tracers done' 273 148 IF(lwp) WRITE(numout,*) ' ' 149 150 #elif defined key_trc_lobster1 && ( defined key_eel_r6 || defined key_eel_r2 ) 151 ! analytical initialisation used in Levy et al. (2001) 152 153 DO jk=1,7 154 trn(:,:,jk,jpdet)=0.016*tmask(:,:,jk) 155 trn(:,:,jk,jpzoo)=0.018*tmask(:,:,jk) 156 trn(:,:,jk,jpphy)=0.036*tmask(:,:,jk) 157 trn(:,:,jk,jpno3)=1.e-5*tmask(:,:,jk) 158 trn(:,:,jk,jpnh4)=0.0005*tmask(:,:,jk) 159 trn(:,:,jk,jpdom)=0.017*tmask(:,:,jk) 160 END DO 161 162 trn(:,:,8,jpdet)=0.020*tmask(:,:,1) 163 trn(:,:,8,jpzoo)=0.027*tmask(:,:,1) 164 trn(:,:,8,jpphy)=0.041*tmask(:,:,1) 165 trn(:,:,8,jpno3)=0.00022*tmask(:,:,1) 166 trn(:,:,8,jpnh4)=0.0033*tmask(:,:,1) 167 trn(:,:,8,jpdom)=0.021*tmask(:,:,1) 168 169 trn(:,:,9,jpdet)=0.0556*tmask(:,:,1) 170 trn(:,:,9,jpzoo)=0.123*tmask(:,:,1) 171 trn(:,:,9,jpphy)=0.122*tmask(:,:,1) 172 trn(:,:,9,jpno3)=0.028*tmask(:,:,1) 173 trn(:,:,9,jpnh4)=0.024*tmask(:,:,1) 174 trn(:,:,9,jpdom)=0.06*tmask(:,:,1) 175 176 trn(:,:,10,jpdet)=0.025*tmask(:,:,1) 177 trn(:,:,10,jpzoo)=0.016*tmask(:,:,1) 178 trn(:,:,10,jpphy)=0.029*tmask(:,:,1) 179 trn(:,:,10,jpno3)=2.462*tmask(:,:,1) 180 trn(:,:,10,jpnh4)=0.04*tmask(:,:,1) 181 trn(:,:,10,jpdom)=0.022*tmask(:,:,1) 182 183 trn(:,:,11,jpdet)=0.0057*tmask(:,:,1) 184 trn(:,:,11,jpzoo)=0.0005*tmask(:,:,1) 185 trn(:,:,11,jpphy)=0.0006*tmask(:,:,1) 186 trn(:,:,11,jpno3)=3.336*tmask(:,:,1) 187 trn(:,:,11,jpnh4)=0.005*tmask(:,:,1) 188 trn(:,:,11,jpdom)=0.004*tmask(:,:,1) 189 190 trn(:,:,12,jpdet)=0.002*tmask(:,:,1) 191 trn(:,:,12,jpzoo)=1.e-6*tmask(:,:,1) 192 trn(:,:,12,jpphy)=5.e-6*tmask(:,:,1) 193 trn(:,:,12,jpno3)=4.24*tmask(:,:,1) 194 trn(:,:,12,jpnh4)=0.001*tmask(:,:,1) 195 trn(:,:,12,jpdom)=3.e-5*tmask(:,:,1) 196 197 DO jk=13,jpk 198 trn(:,:,jk,jpdet)=0.0 199 trn(:,:,jk,jpzoo)=0.0 200 trn(:,:,jk,jpphy)=0.0 201 trn(:,:,jk,jpnh4)=0.0 202 trn(:,:,jk,jpdom)=0.0 203 END DO 204 205 trn(:,:,13,jpno3)=5.31*tmask(:,:,13) 206 trn(:,:,14,jpno3)=6.73*tmask(:,:,14) 207 trn(:,:,15,jpno3)=8.32*tmask(:,:,15) 208 trn(:,:,16,jpno3)=10.13*tmask(:,:,16) 209 trn(:,:,17,jpno3)=11.95*tmask(:,:,17) 210 trn(:,:,18,jpno3)=13.57*tmask(:,:,18) 211 trn(:,:,19,jpno3)=15.08*tmask(:,:,19) 212 trn(:,:,20,jpno3)=16.41*tmask(:,:,20) 213 trn(:,:,21,jpno3)=17.47*tmask(:,:,21) 214 trn(:,:,22,jpno3)=18.29*tmask(:,:,22) 215 trn(:,:,23,jpno3)=18.88*tmask(:,:,23) 216 trn(:,:,24,jpno3)=19.30*tmask(:,:,24) 217 trn(:,:,25,jpno3)=19.68*tmask(:,:,25) 218 trn(:,:,26,jpno3)=19.91*tmask(:,:,26) 219 trn(:,:,27,jpno3)=19.99*tmask(:,:,27) 220 trn(:,:,28,jpno3)=20.01*tmask(:,:,28) 221 trn(:,:,29,jpno3)=20.01*tmask(:,:,29) 222 trn(:,:,30,jpno3)=20.01*tmask(:,:,30) 223 224 #elif defined key_trc_lobster1 && defined key_gyre 225 ! init NO3=f(density) by asklod AS Kremeur 2005-07 226 trn(:,:,:,jpdet)=0.1*tmask(:,:,:) 227 trn(:,:,:,jpzoo)=0.1*tmask(:,:,:) 228 trn(:,:,:,jpnh4)=0.1*tmask(:,:,:) 229 trn(:,:,:,jpphy)=0.1*tmask(:,:,:) 230 trn(:,:,:,jpdom)=1.*tmask(:,:,:) 231 DO jk=1,jpk 232 DO jj=1,jpj 233 DO ji=1,jpi 234 IF (rhd(ji,jj,jk).LE.24.5e-3) THEN 235 trn(ji,jj,jk,jpno3)=2.*tmask(ji,jj,jk) 236 ELSE 237 trn(ji,jj,jk,jpno3)=(13.24*(rhd(ji,jj,jk)*1000)-324.4)*tmask(ji,jj,jk) 238 ENDIF 239 END DO 240 END DO 241 END DO 274 242 275 243 #else … … 298 266 trb(:,:,:,:) = trn(:,:,:,:) 299 267 300 IF(lwp) WRITE(numout,*) ' ' 301 DO jn = 1, jptra 302 IF( ln_ctl .AND. lwp ) THEN ! print mean trends (used for debugging) 303 ztraa = SUM( tra(1:nictle,1:njctle,1:jpk,jn) * & 304 tmask(1:nictle,1:njctle,1:jpk) ) 305 ztrab = SUM( trb(1:nictle,1:njctle,1:jpk,jn) * & 306 tmask(1:nictle,1:njctle,1:jpk) ) 307 ztran = SUM( trn(1:nictle,1:njctle,1:jpk,jn) * & 308 tmask(1:nictle,1:njctle,1:jpk) ) 309 WRITE(numout,*) ' trcdtr - ',ctrcnm(jn), & 310 ' : ', ztraa, ' ', ztrab, ' ', ztran 311 ENDIF 312 END DO 313 268 #if defined key_trc_lobster1 314 269 !! initialize the POC in sediments 315 # if defined key_trc_npzd || defined key_trc_lobster1 || defined key_trc_hamocc3 || defined key_trc_pisces 316 317 sedpoc(:,:) = 0. 318 319 # endif 270 271 sedpocb(:,:) = 0. 272 sedpocn(:,:) = 0. 273 sedpoca(:,:) = 0. 274 #endif 275 320 276 END SUBROUTINE trc_dtr 321 277 -
trunk/NEMO/TOP_SRC/trcini.F90
r274 r335 1 1 MODULE trcini 2 2 !!========================================================================== 3 !! 4 !! *** MODULE trcini *** 5 !! 6 !! Initialization for passive tracer (for restart or not) 7 !! 8 !!========================================================================= 9 !! TOP 1.0, LOCEAN-IPSL (2005) 10 !! $Header$ 11 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 3 !! *** MODULE trcini *** 4 !! Ocean passive tracers: Manage the passive tracer initialization 5 !!========================================================================= 6 #if defined key_passivetrc 12 7 !!---------------------------------------------------------------------- 13 14 !! * Modules used 15 !! ============== 16 USE ioipsl 17 USE oce_trc 18 USE trc 19 USE sms 20 USE lib_mpp 8 !! trc_ini : Initialization for passive tracer 9 !!---------------------------------------------------------------------- 10 !! * Modules used 11 USE ioipsl 12 USE oce_trc 13 USE trc 14 USE sms 15 USE lib_mpp 16 USE lbclnk 21 17 22 23 18 IMPLICIT NONE 19 PRIVATE 24 20 25 !! * Accessibility 26 PUBLIC trc_ini 21 !! * Accessibility 22 PUBLIC trc_ini 23 24 #if defined key_trc_lobster1 25 !!---------------------------------------------------------------------- 26 !! 'key_trc_lobster1' LOBSTER1 biological model 27 !!---------------------------------------------------------------------- 28 # include "trcini.lobster1.h90" 29 30 #elif defined key_trc_pisces 31 !!---------------------------------------------------------------------- 32 !! 'key_trc_pisces' PISCES biological model 33 !!---------------------------------------------------------------------- 34 # include "trcini.pisces.h90" 35 36 #elif defined key_cfc 37 !!---------------------------------------------------------------------- 38 !! 'key_cfc ' CFC model 39 !!---------------------------------------------------------------------- 40 # include "trcini.cfc.h90" 41 42 #else 43 !!---------------------------------------------------------------------- 44 !! Default option 45 !!---------------------------------------------------------------------- 27 46 28 47 CONTAINS 29 48 30 #if defined key_passivetrc 49 SUBROUTINE trc_ini 50 !!--------------------------------------------------------------------- 51 !! *** ROUTINE trc_ini *** 52 !! 53 !! ** Purpose : Initialization for passive tracer 54 !! for restart or not 55 !! 56 !! History : 57 !! ! 00-04 O. Aumont, M.A. Foujols HAMOCC3 and P3ZD 58 !! 8.5 ! 05-03 O.Aumont and A.El Moussaoui F90 59 !! 9.0 ! 05-10 C. Ethe Modularity 60 !!---------------------------------------------------------------------- 61 !! * local declarations 62 INTEGER :: & 63 ji ,jj ,jk ,jn, jl ! dummy loop indices 64 !!--------------------------------------------------------------------- 31 65 32 SUBROUTINE trc_ini33 !!---------------------------------------------------------------------34 !! ROUTINE trcini35 !! ******************36 !! PURPOSE :37 !! ---------38 !! initialization for passive tracer39 !! for restart or not40 !!41 !! WORKSPACE :42 !! ---------43 !! ji jj jk44 !!45 !! History:46 !! --------47 !! 04/00 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD48 !! 03/05 O.Aumont and A.El Moussaoui F9049 !!----------------------------------------------------------------------50 !!----------------------------------------------------------------------51 !! local declarations52 !! ==================53 66 54 INTEGER :: ji,jj,jk,jn,jl 55 56 !!---------------------------------------------------------------------- 57 !! statement functions 58 !! =================== 59 60 #include "passivetrc_substitute.h90" 61 62 !!--------------------------------------------------------------------- 63 !! OPA.9 64 !!--------------------------------------------------------------------- 65 66 # if defined key_trc_npzd 67 # include "trcini.npzd.h90" 68 # elif defined key_trc_lobster1 69 # include "trcini.lobster1.h90" 70 # elif defined key_trc_hamocc3 71 # include "trcini.hamocc3.h90" 72 # elif defined key_trc_pisces 73 # include "trcini.pisces.h90" 74 # else 75 76 ! Specific initialization to do 77 !!----------------------------- 78 # endif 79 80 !! 1. initialization of passives tracers field 81 !! ------------------------------------------- 82 DO jn=1,jptra 83 trn(:,:,:,jn)=0.e0 84 tra(:,:,:,jn)=0.e0 67 !! 1. initialization of passives tracers field 68 !! ------------------------------------------- 69 DO jn = 1, jptra 70 trn(:,:,:,jn)=0.e0 71 tra(:,:,:,jn)=0.e0 85 72 END DO 86 73 87 74 #if defined key_trc_diaadd 88 !! initialization of output 2d and 3d arrays75 !! initialization of output 2d and 3d arrays 89 76 90 DO jn =1,jpdia2d91 77 DO jn = 1, jpdia2d 78 trc2d(:,:,jn)=0.e0 92 79 END DO 93 DO jn=1,jpdia3d 94 trc3d(:,:,:,jn)=0.e0 80 81 DO jn = 1, jpdia3d 82 trc3d(:,:,:,jn)=0.e0 95 83 END DO 96 84 #endif 97 85 98 86 #if defined key_trc_diabio 99 !! initialization of biological trends87 !! initialization of biological trends 100 88 DO jn=1,jpdiabio 101 trbio(ji,jj,jk,jn)=0.e089 trbio(:,:,:,jn) = 0.e0 102 90 END DO 103 91 #endif 104 92 105 93 #if defined key_trc_diatrd 106 !! initialization of tracer trends107 DO jl =1,jpdiatrc108 DO jn=1,jptra109 trtrd(:,:,:,jn,jl)=0.e0110 END DO94 !! initialization of tracer trends 95 DO jl = 1, jpdiatrc 96 DO jn = 1, jptra 97 trtrd(:,:,:,jn,jl) = 0.e0 98 END DO 111 99 END DO 112 100 #endif 113 114 IF( lwp) THEN115 116 117 101 102 IF( lwp ) THEN 103 WRITE(numout,*) ' ' 104 WRITE(numout,*) ' trcini: generic initialisation done ' 105 WRITE(numout,*) ' ' 118 106 ENDIF 119 107 120 END SUBROUTINE trc_ini 121 122 #else 123 124 SUBROUTINE trc_ini 125 126 !! no passive tracers 127 !!=================== 128 END SUBROUTINE trc_ini 108 END SUBROUTINE trc_ini 129 109 130 110 #endif 131 111 112 #else 113 !!---------------------------------------------------------------------- 114 !! Dummy module : NO passive tracer 115 !!---------------------------------------------------------------------- 116 CONTAINS 117 SUBROUTINE trc_ini ! Empty routine 118 119 END SUBROUTINE trc_ini 120 #endif 121 122 !!====================================================================== 132 123 END MODULE trcini -
trunk/NEMO/TOP_SRC/trclec.F90
r274 r335 7 7 !!========================================================================= 8 8 !! TOP 1.0, LOCEAN-IPSL (2005) 9 !! $Header$10 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt11 9 !!---------------------------------------------------------------------- 12 13 !! * Modules used 14 !! ============== 15 USE oce_trc 16 USE trc 17 USE trctrp_lec 18 USE trclsm 19 20 IMPLICIT NONE 21 PRIVATE 22 23 !! * Accessibility 24 PUBLIC trc_lec 10 #if defined key_passivetrc 11 !! * Modules used 12 !! ============== 13 USE oce_trc 14 USE trc 15 USE trctrp_lec 16 USE trclsm 17 18 IMPLICIT NONE 19 PRIVATE 20 21 !! * Accessibility 22 PUBLIC trc_lec 23 24 #include "passivetrc_substitute.h90" 25 25 26 26 CONTAINS 27 27 28 #if defined key_passivetrc 29 30 SUBROUTINE trc_lec 31 !!--------------------------------------------------------------------- 32 !! ROUTINE trclec 33 !! ****************** 34 !! PURPOSE : 35 !! --------- 36 !! READ and PRINT options for the passive tracer run (namelist) 37 !! 38 !! History: 39 !! -------- 40 !! original : 96-11 (M.A. Foujols, M. Levy) passive tracer 41 !! modification : 98-04 (M.A Foujols, L. Bopp) ahtrb0 for isopycnal 42 !! diffusion 43 !! modification : 99-10(M.A. Foujols, M. Levy) separation of sms 44 !! additions : 00-05(A. Estublier) TVD Limiter Scheme : Tests 45 !! on ndttrc 46 !! additions : 00-06(A. Estublier) MUSCL Scheme : Tests 47 !! on ndttrc 48 !! additions : 00-07(A. Estublier) PPM Scheme : Tests on ndttrc 49 !! modification : 00-11 (M.A Foujols, E Kestenare) trcrat, ahtrc0 and aeivtr0 50 !! modification : 01-01 (E Kestenare) suppress ndttrc=1 51 !! for Arakawa and TVD schemes 52 !! O.Aumont and A.El Moussaoui 03/05 F90 53 !!---------------------------------------------------------------------- 54 55 !! local declarations 56 !! ================== 28 SUBROUTINE trc_lec 29 !!--------------------------------------------------------------------- 30 !! ROUTINE trclec 31 !! ****************** 32 !! PURPOSE : 33 !! --------- 34 !! READ and PRINT options for the passive tracer run (namelist) 35 !! 36 !! History: 37 !! -------- 38 !! original : 96-11 (M.A. Foujols, M. Levy) passive tracer 39 !! modification : 98-04 (M.A Foujols, L. Bopp) ahtrb0 for isopycnal 40 !! diffusion 41 !! modification : 99-10(M.A. Foujols, M. Levy) separation of sms 42 !! additions : 00-05(A. Estublier) TVD Limiter Scheme : Tests 43 !! on ndttrc 44 !! additions : 00-06(A. Estublier) MUSCL Scheme : Tests 45 !! on ndttrc 46 !! additions : 00-07(A. Estublier) PPM Scheme : Tests on ndttrc 47 !! modification : 00-11 (M.A Foujols, E Kestenare) trcrat, ahtrc0 and aeivtr0 48 !! modification : 01-01 (E Kestenare) suppress ndttrc=1 49 !! for Arakawa and TVD schemes 50 !! O.Aumont and A.El Moussaoui 03/05 F90 51 !!---------------------------------------------------------------------- 52 53 !! local declarations 54 !! ================== 57 55 58 56 INTEGER :: ji 59 57 CHARACTER (len=32) :: clname 60 58 61 !!---------------------------------------------------------------------- 62 !! statement functions 63 !! =================== 64 65 #include "passivetrc_substitute.h90" 66 67 !! 68 !!--------------------------------------------------------------------- 69 !! OPA.90 03/2005 70 !!--------------------------------------------------------------------- 71 72 !! 0. initializations 73 !! ------------------ 59 !!--------------------------------------------------------------------- 60 !! OPA.90 03/2005 61 !!--------------------------------------------------------------------- 62 63 !! 0. initializations 64 !! ------------------ 74 65 75 66 namelist/nattrc/nwritetrc,lrsttr,nrsttr, ctrcnm,ctrcnl,ctrcun,lutini !general … … 83 74 #if defined key_trc_diaadd 84 75 namelist/natadd/ctrc3d,ctrc3l,ctrc2d,ctrc2l, ctrc3u, ctrc2u, & 85 86 #endif 87 88 IF(lwp) THEN 89 90 91 92 93 94 95 76 nwriteadd !additional diagnostics 77 #endif 78 79 IF(lwp) THEN 80 WRITE(numout,*) ' ' 81 WRITE(numout,*) ' ROUTINE trclec' 82 WRITE(numout,*) ' **************' 83 WRITE(numout,*) ' ' 84 WRITE(numout,*) ' namelist for passive tracer' 85 WRITE(numout,*) ' ***************************' 86 WRITE(numout,*) ' ' 96 87 ENDIF 97 88 … … 102 93 OPEN( numnat, FILE= clname, FORM='formatted', STATUS = 'old') 103 94 104 !! 1., 2. & 3. initialization with namelist files105 !! ----------------------------------------------106 !! 1.0 namelist nattrc :95 !! 1., 2. & 3. initialization with namelist files 96 !! ---------------------------------------------- 97 !! 1.0 namelist nattrc : 107 98 108 99 nwritetrc = 10 … … 111 102 112 103 DO ji=1,jptra 113 WRITE (ctrcnm(ji),'("TR_",I1)') ji114 WRITE (ctrcnl(ji),'("TRACER NUMBER ",I1)') ji115 ctrcun(ji)='mmole/m3'116 lutini(ji)=.FALSE.104 WRITE (ctrcnm(ji),'("TR_",I1)') ji 105 WRITE (ctrcnl(ji),'("TRACER NUMBER ",I1)') ji 106 ctrcun(ji)='mmole/m3' 107 lutini(ji)=.FALSE. 117 108 END DO 118 109 … … 122 113 123 114 IF(lwp) THEN 124 125 126 127 128 129 130 131 & lrsttr132 133 & nrsttr134 115 WRITE(numout,*) ' ' 116 WRITE(numout,*) 'nattrc' 117 WRITE(numout,*) ' ' 118 WRITE(numout,*) & 119 ' frequency of outputs for passive tracers nwritetrc = ' & 120 ,nwritetrc 121 WRITE(numout,*) ' restart LOGICAL for passive tr. lrsttr = ', & 122 & lrsttr 123 WRITE(numout,*) ' control of time step for p. tr. nrsttr = ', & 124 & nrsttr 125 DO ji=1,jptra 135 126 WRITE(numout,*) ' tracer nb: ',ji,' name = ',ctrcnm(ji) & 136 & ,ctrcnl(ji)127 & ,ctrcnl(ji) 137 128 WRITE(numout,*) ' in unit = ',ctrcun(ji) 138 129 WRITE(numout,*) ' initial value in FILE : ',lutini(ji) 139 130 WRITE(numout,*) ' ' 140 141 131 END DO 132 WRITE(numout,*) ' ' 142 133 ENDIF 143 134 144 135 #if defined key_trc_diatrd 145 136 146 !! 1.2 namelist nattrd : passive tracers dynamical trends137 !! 1.2 namelist nattrd : passive tracers dynamical trends 147 138 148 139 nwritetrd=10 149 140 150 !! default : no dynamical trend recording151 !! --------------------------------------141 !! default : no dynamical trend recording 142 !! -------------------------------------- 152 143 DO ji=1,jptra 153 luttrd(ji) = .FALSE.154 END DO 144 luttrd(ji) = .FALSE. 145 END DO 155 146 156 147 REWIND(numnat) … … 158 149 159 150 IF(lwp) THEN 160 161 162 163 164 165 151 WRITE(numout,*) 'natrtd' 152 WRITE(numout,*) ' ' 153 WRITE(numout,*) & 154 ' frequency of outputs for dynamical trends nwritetrd = ' & 155 ,nwritetrd 156 DO ji=1,jptra 166 157 WRITE(numout,*) & 167 158 ' keep dynamical trends for tracer number :',ji & 168 159 ,luttrd(ji) 169 END DO170 ENDIF 171 #endif 172 173 !!1.3 namelist natadd : passive tracers diagnostics174 !!-------------------------------------------------160 END DO 161 ENDIF 162 #endif 163 164 !!1.3 namelist natadd : passive tracers diagnostics 165 !!------------------------------------------------- 175 166 176 167 #if defined key_trc_diaadd … … 178 169 nwriteadd = 10 179 170 180 !! default value for 3D output arrays : short and long name, units171 !! default value for 3D output arrays : short and long name, units 181 172 182 173 DO ji=1,jpdia3d 183 WRITE (ctrc3d(ji),'("3D_",I1)') ji184 WRITE (ctrc3l(ji),'("3D DIAGNOSTIC NUMBER ",I2)') ji185 ctrc3u(ji)=' '186 END DO 187 188 189 !! default value for 2D output arrays : short and long name, units190 !! ---------------------------------------------------------------174 WRITE (ctrc3d(ji),'("3D_",I1)') ji 175 WRITE (ctrc3l(ji),'("3D DIAGNOSTIC NUMBER ",I2)') ji 176 ctrc3u(ji)=' ' 177 END DO 178 179 180 !! default value for 2D output arrays : short and long name, units 181 !! --------------------------------------------------------------- 191 182 DO ji=1,jpdia2d 192 WRITE (ctrc2d(ji),'("2D_",I1)') ji193 WRITE (ctrc2l(ji),'("2D DIAGNOSTIC NUMBER ",I2)') ji194 ctrc2u(ji)=' '195 END DO 183 WRITE (ctrc2d(ji),'("2D_",I1)') ji 184 WRITE (ctrc2l(ji),'("2D DIAGNOSTIC NUMBER ",I2)') ji 185 ctrc2u(ji)=' ' 186 END DO 196 187 197 188 REWIND(numnat) … … 199 190 200 191 IF(lwp) THEN 201 202 203 204 205 206 192 WRITE(numout,*) ' natadd' 193 WRITE(numout,*) ' ' 194 WRITE(numout,*) & 195 ' frequency of outputs for additional arrays nwriteadd = ' & 196 ,nwriteadd 197 DO ji=1,jpdia3d 207 198 WRITE(numout,*) & 208 199 'name of 3d output field number :',ji,' : ',ctrc3d(ji) 209 200 WRITE(numout,*) ctrc3l(ji) 210 201 WRITE(numout,*) ' in unit = ',ctrc3u(ji) 211 END DO212 213 202 END DO 203 WRITE(numout,*) ' ' 204 DO ji=1,jpdia2d 214 205 WRITE(numout,*) & 215 206 'name of 2d output field number :',ji,' : ',ctrc2d(ji) 216 207 WRITE(numout,*) ctrc2l(ji) 217 208 WRITE(numout,*) ' in unit = ',ctrc2u(ji) 218 END DO219 220 ENDIF 221 #endif 222 223 !! 1.1 namelist natnum :224 !! ---------------------209 END DO 210 WRITE(numout,*) ' ' 211 ENDIF 212 #endif 213 214 !! 1.1 namelist natnum : 215 !! --------------------- 225 216 rsc=1. 226 217 rtrn=1.e-15 … … 236 227 237 228 IF(lwp) THEN 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 ENDIF 254 255 256 !! namelist of transport257 !! ---------------------229 WRITE(numout,*) ' ' 230 WRITE(numout,*) 'natnum' 231 WRITE(numout,*) ' ' 232 WRITE(numout,*) ' tuning coefficient rsc = ', & 233 rsc 234 WRITE(numout,*) ' truncation value rtrn = ', & 235 rtrn 236 WRITE(numout,*) ' number of corrective phase ncortrc = ', & 237 ncortrc 238 WRITE(numout,*) ' time step freq. for pass. trac. ndttrc = ', & 239 ndttrc 240 WRITE(numout,*) ' 1st time step for pass. trac. nittrc000 = ', & 241 nittrc000 242 WRITE(numout,*) ' computes or not crossterms crosster = ', & 243 crosster 244 ENDIF 245 246 247 !! namelist of transport 248 !! --------------------- 258 249 CALL trc_trp_lec 259 250 260 !! namelist of SMS261 !! ---------------251 !! namelist of SMS 252 !! --------------- 262 253 CALL trc_lsm 263 254 264 END SUBROUTINE trc_lec 255 END SUBROUTINE trc_lec 265 256 266 257 #else 267 268 SUBROUTINE trc_lec 269 !!============== 270 !! no passive tracers 271 !!============== 272 END SUBROUTINE trc_lec 258 !!====================================================================== 259 !! Empty module : No passive tracer 260 !!====================================================================== 261 CONTAINS 262 263 SUBROUTINE trc_lec 264 265 END SUBROUTINE trc_lec 273 266 274 267 #endif -
trunk/NEMO/TOP_SRC/trclsm.F90
r274 r335 1 1 MODULE trclsm 2 !!=============================================================== ========================2 !!=============================================================== 3 3 !! 4 4 !! *** MODULE trclsm **** … … 6 6 !! READS specific NAMELIST for sms terms 7 7 !! 8 !!================================================================= ======================8 !!================================================================= 9 9 !! TOP 1.0, LOCEAN-IPSL (2005) 10 !! $Header$ 11 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 10 !!----------------------------------------------------------------- 11 #if defined key_passivetrc 12 !!------------------------------------------------------------- 13 !! * Modules used 14 !! ============== 15 USE oce_trc 16 USE trc 17 USE sms 18 19 20 IMPLICIT NONE 21 PRIVATE 22 23 !! * Accessibility 24 PUBLIC trc_lsm 25 26 27 #if defined key_trc_lobster1 12 28 !!---------------------------------------------------------------------- 13 !!---------------------------------------------------------------------- 14 !! * Modules used 15 !! ============== 16 USE oce_trc 17 USE trc 18 USE sms 29 !! 'key_trc_lobster1' LOBSTER1 biological model 30 !!---------------------------------------------------------------------- 31 # include "trclsm.lobster1.h90" 19 32 20 21 IMPLICIT NONE 22 PRIVATE 33 #elif defined key_trc_pisces 34 !!---------------------------------------------------------------------- 35 !! 'key_trc_pisces' PISCES biological model 36 !!---------------------------------------------------------------------- 37 # include "trclsm.pisces.h90" 23 38 24 !! * Accessibility 25 PUBLIC trc_lsm 39 #elif defined key_cfc 40 !!---------------------------------------------------------------------- 41 !! 'key_cfc ' CFC model 42 !!---------------------------------------------------------------------- 43 # include "trclsm.cfc.h90" 44 45 !!---------------------------------------------------------------------- 46 !! Default option 47 !!---------------------------------------------------------------------- 48 # endif 49 50 #else 26 51 27 52 CONTAINS 28 53 29 #if defined key_passivetrc 30 31 SUBROUTINE trc_lsm 32 !!--------------------------------------------------------------------- 33 !! 34 !! ROUTINE trclsm 35 !! ****************** 36 !! PURPOSE : 37 !! --------- 38 !! READS specific NAMELIST for sms terms 39 !! 40 !! History: 41 !! -------- 42 !! original : 99-10 (M.A. Foujols, M. Levy) passive tracer 43 !! 00-04 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD 44 !! 02-05 (O. Aumont) AGE TRACER 45 !! 03/2005 O. Aumont and A. El Moussaoui F90 46 !!---------------------------------------------------------------------- 47 48 # if defined key_trc_npzd 49 # include "trclsm.npzd.h90" 50 # elif defined key_trc_lobster1 51 # include "trclsm.lobster1.h90" 52 # elif defined key_trc_hamocc3 53 # include "trclsm.hamocc3.h90" 54 # elif defined key_trc_age 55 # include "trclsm.age.h90" 56 # elif defined key_trc_pisces 57 # include "trclsm.pisces.h90" 58 # else 59 !! user can define here his own sms namelist 60 # endif 61 62 END SUBROUTINE trc_lsm 63 64 #else 65 66 SUBROUTINE trc_lsm 67 !!================ 68 !! no passive tracers 69 END SUBROUTINE trc_lsm 54 SUBROUTINE trc_lsm 55 !!================ 56 !! no passive tracers 57 END SUBROUTINE trc_lsm 70 58 71 59 #endif -
trunk/NEMO/TOP_SRC/trcrst.F90
r274 r335 1 1 MODULE trcrst 2 !!====================================================================== =====================2 !!====================================================================== 3 3 !! 4 4 !! *** MODULE trcrst *** … … 6 6 !! Read the restart files for passive tracers 7 7 !! 8 !!====================================================================== =====================8 !!====================================================================== 9 9 !! TOP 1.0, LOCEAN-IPSL (2005) 10 !! $Header$11 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt12 10 !!---------------------------------------------------------------------- 13 !!---------------------------------------------------------------------- 14 !! * Modules used 15 !! ============== 16 USE oce_trc 17 USE trc 18 USE sms 19 USE trctrp_lec 20 21 IMPLICIT NONE 22 PRIVATE 23 11 #if defined key_passivetrc 12 !!---------------------------------------------------------------------- 13 !! * Modules used 14 !! ============== 15 USE oce_trc 16 USE trc 17 USE sms 18 USE trctrp_lec 19 20 IMPLICIT NONE 21 PRIVATE 22 24 23 !! * Accessibility 25 24 PUBLIC trc_rst 26 25 PUBLIC trc_wri 27 26 28 27 !! * Module variables 29 28 CHARACTER (len=48) :: & 30 29 trestart = 'initial.trc.nc' ! restart file name 31 30 32 31 CONTAINS 33 32 … … 37 36 !!---------------------------------------------------------------------- 38 37 #include "trcrst_fdir.h90" 39 40 #else 41 !! USE ioipsl 42 #if defined key_passivetrc 43 44 SUBROUTINE trc_rst 45 !!=========================================================================================== 46 !! 47 !! ROUTINE trc_rst 48 !! ******************* 49 !! 50 !! PURPOSE : 51 !! --------- 52 !! READ files for restart for passive tracer 53 !! 54 !! METHOD : 55 !! ------- 56 !! READ the previous fields on the FILE nutrst 57 !! the first record indicates previous characterics 58 !! after control with the present run, we READ : 59 !! - prognostic variables on the second and more record 60 !! 61 !! History: 62 !! -------- 63 !! original : 96-11 64 !! 00-05 (A. Estublier) TVD Limiter Scheme key_trc_tvd 65 !! 00-12 (O. Aumont, E. Kestenare) read restart file for sediments 66 !! 01-05 (O. Aumont, E. Kestenare) read restart file for calcite and silicate sediments 67 !! 05-03 (O. Aumont and A. El Moussaoui) F90 68 !!------------------------------------------------------------------------ 69 !! * Modules used 38 39 #else 40 41 SUBROUTINE trc_rst 42 !!=========================================================================================== 43 !! 44 !! ROUTINE trc_rst 45 !! ******************* 46 !! 47 !! PURPOSE : 48 !! --------- 49 !! READ files for restart for passive tracer 50 !! 51 !! METHOD : 52 !! ------- 53 !! READ the previous fields on the FILE nutrst 54 !! the first record indicates previous characterics 55 !! after control with the present run, we READ : 56 !! - prognostic variables on the second and more record 57 !! 58 !! History: 59 !! -------- 60 !! original : 96-11 61 !! 00-05 (A. Estublier) TVD Limiter Scheme key_trc_tvd 62 !! 00-12 (O. Aumont, E. Kestenare) read restart file for sediments 63 !! 01-05 (O. Aumont, E. Kestenare) read restart file for calcite and silicate sediments 64 !! 05-03 (O. Aumont and A. El Moussaoui) F90 65 !!------------------------------------------------------------------------ 66 !! * Modules used 70 67 USE ioipsl 71 68 72 69 73 !! local declarations74 !! ==================75 LOGICAL :: llog !!!76 CHARACTER (len=32) :: clname1,clname277 CHARACTER (len=32) :: clname = 'restart.trc'78 CHARACTER (len=12) :: clvnames(80)79 80 INTEGER :: ino1,jn,iarak0,iarak1, &81 82 83 REAL(wp) :: caralk,bicarb,zdt, &84 85 REAL(wp) :: zdept(jpk), zlamt(jpi,jpj), zphit(jpi,jpj)86 87 REAL(wp), DIMENSION(3) :: zinfo88 89 !!---------------------------------------------------------------------90 !! OPA.9 03-200591 !!---------------------------------------------------------------------92 !! 0. initialisations93 !!------------------70 !! local declarations 71 !! ================== 72 LOGICAL :: llog !!! 73 CHARACTER (len=32) :: clname1,clname2 74 CHARACTER (len=32) :: clname = 'restart.trc' 75 CHARACTER (len=12) :: clvnames(80) 76 77 INTEGER :: ino1,jn,iarak0,iarak1, & 78 ji, jj, jk, & 79 itime, ibvar 80 REAL(wp) :: caralk,bicarb,zdt, & 81 zdate0 82 REAL(wp) :: zdept(jpk), zlamt(jpi,jpj), zphit(jpi,jpj) 83 84 REAL(wp), DIMENSION(3) :: zinfo 85 86 !!--------------------------------------------------------------------- 87 !! OPA.9 03-2005 88 !!--------------------------------------------------------------------- 89 !! 0. initialisations 90 !!------------------ 94 91 95 92 96 93 IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN 97 94 iarak0 = 1 98 95 ELSE 99 96 iarak0=0 100 97 ENDIF 101 98 … … 108 105 IF(lwp) WRITE(numout,*) ' with the time nit000 : ',nit000 109 106 IF(lwp) THEN 110 111 112 ENDIF113 107 IF(iarak0.eq.1) then 108 WRITE(numout,*) ' and before fields for Arakawa sheme ' 109 ENDIF 110 WRITE(numout,*) ' ' 114 111 ENDIF 115 112 … … 133 130 134 131 135 !! 1. READ nutrst136 !! --------------137 !! ... first information138 !! ---------------------132 !! 1. READ nutrst 133 !! -------------- 134 !! ... first information 135 !! --------------------- 139 136 itime=0 140 137 llog=.false. !!! … … 143 140 zdept(:) = 0.e0 144 141 CALL restini(clname,jpi,jpj,zlamt,zphit,jpk,zdept,clname & 145 & ,itime,zdate0,zdt,nutrst)142 & ,itime,zdate0,zdt,nutrst) 146 143 147 144 CALL ioget_vname(nutrst, ibvar, clvnames) … … 155 152 IF(lwp) WRITE(numout,*) ' with the time it : ',nint(zinfo(2)) 156 153 IF(lwp) THEN 157 158 159 ENDIF154 IF(iarak1.eq.1) then 155 WRITE(numout,*) ' and before fields for Arakawa sheme ' 156 ENDIF 160 157 ENDIF 161 158 IF(lwp) WRITE(numout,*) ' number of variables : ', ibvar … … 164 161 IF(lwp) WRITE(numout,*) ' ' 165 162 166 !! 1.2 control of date167 !! -------------------163 !! 1.2 control of date 164 !! ------------------- 168 165 169 166 IF( nit000- NINT( zinfo(2) ) /= 1 .AND. nrsttr /= 0 ) THEN 170 171 172 173 174 175 176 177 178 179 180 181 ENDIF 182 183 !! 1.3 Control of the sheme184 !! ------------------------167 IF(lwp) THEN 168 WRITE(numout,*) ' ===>>>> : problem with nit000 for the', & 169 ' passive tracer restart' 170 WRITE(numout,*) ' ======= ', & 171 ' ======================' 172 WRITE(numout,*) ' we stop. verify the FILE' 173 WRITE(numout,*) ' or rerun with the value 0 for the' 174 WRITE(numout,*) ' control of time PARAMETER nrstdt' 175 WRITE(numout,*) ' ' 176 ENDIF 177 STOP 'trc_rst' !! 178 ENDIF 179 180 !! 1.3 Control of the sheme 181 !! ------------------------ 185 182 186 183 IF(iarak0.ne.iarak1) THEN 187 188 189 190 191 192 193 194 195 196 197 198 199 ENDIF 200 201 202 !! ... READ prognostic variables and computes diagnostic variable203 !! ---------------------------------------------------------------204 205 184 IF(lwp) THEN 185 WRITE(numout,*) ' ===>>>> : problem with the', & 186 ' passive tracer restart file' 187 WRITE(numout,*) ' ======= ', & 188 ' ===========================' 189 WRITE(numout,*) ' we stop. verify the FILE' 190 WRITE(numout,*) ' before field required IF 1=',iarak0 191 WRITE(numout,*) ' before field present in file IF 1=', & 192 iarak1 193 WRITE(numout,*) ' ' 194 ENDIF 195 STOP 'trc_rst' !!!!! AVERIFIER AU NIV F90' 196 ENDIF 197 198 199 !! ... READ prognostic variables and computes diagnostic variable 200 !! --------------------------------------------------------------- 201 202 DO jn=1,jptra 206 203 clname='TRN'//ctrcnm(jn) 207 204 CALL restget(nutrst,clname,jpi,jpj,jpk,0,llog,trn(:,:,:,jn)) 208 209 210 205 END DO 206 207 DO jn=1,jptra 211 208 clname='TRB'//ctrcnm(jn) 212 209 CALL restget(nutrst,clname,jpi,jpj,jpk,0,llog,trb(:,:,:,jn)) 213 END DO 214 215 #if defined key_trc_hamocc3 216 clname='SED'//ctrcnm(jppoc) 217 clname1='SED'//ctrcnm(jpcal) 218 clname2='SED'//ctrcnm(jpsil) 219 CALL restget(nutrst,clname1,jpi,jpj,1,0,llog,sedcal(:,:)) 220 CALL restget(nutrst,clname2,jpi,jpj,1,0,llog,sedsil(:,:)) 221 CALL restget(nutrst,clname,jpi,jpj,1,0,llog,sedpoc(:,:)) 222 #elif defined key_trc_npzd || defined key_trc_lobster1 223 clname='SED'//ctrcnm(jpdet) 224 CALL restget(nutrst,clname,jpi,jpj,1,0,llog,sedpoc(:,:)) 210 END DO 211 212 213 #if defined key_trc_lobster1 214 clname='SEDB'//ctrcnm(jpdet) 215 clname1='SEDN'//ctrcnm(jpdet) 216 CALL restget(nutrst,clname,jpi,jpj,1,0,llog,sedpocb(:,:)) 217 CALL restget(nutrst,clname1,jpi,jpj,1,0,llog,sedpocn(:,:)) 225 218 #elif defined key_trc_pisces 226 227 clname='Silicalim' 228 CALL restget(nutrst,clname,jpi,jpj,1,0,llog,xksi) 229 xksimax=xksi 230 231 clname='SED'//ctrcnm(jppoc) 232 clname1='SED'//ctrcnm(jpcal) 233 clname2='SED'//ctrcnm(jpsil) 234 CALL restget(nutrst,clname1,jpi,jpj,1,0,llog,sedcal(:,:)) 235 CALL restget(nutrst,clname2,jpi,jpj,1,0,llog,sedsil(:,:)) 236 CALL restget(nutrst,clname,jpi,jpj,1,0,llog,sedpoc(:,:)) 219 clname='Silicalim' 220 CALL restget(nutrst,clname,jpi,jpj,1,0,llog,xksi) 221 xksimax=xksi 222 223 clname='SED'//ctrcnm(jppoc) 224 clname1='SED'//ctrcnm(jpcal) 225 clname2='SED'//ctrcnm(jpsil) 226 CALL restget(nutrst,clname1,jpi,jpj,1,0,llog,sedcal(:,:)) 227 CALL restget(nutrst,clname2,jpi,jpj,1,0,llog,sedsil(:,:)) 228 CALL restget(nutrst,clname,jpi,jpj,1,0,llog,sedpoc(:,:)) 229 230 #elif defined key_cfc 231 clname='qint' 232 CALL restget(nutrst,clname,jpi,jpj,jptra,0,llog,qint(:,:,:)) 233 clname1='qtr' 234 CALL restget(nutrst,clname1,jpi,jpj,jptra,0,llog,qtr(:,:,:)) 237 235 #endif 238 236 239 #if defined key_trc_hamocc3 || defined key_trc_pisces 240 241 242 !! Initialization of chemical variables of the carbon cycle 243 !! -------------------------------------------------------- 244 245 DO jk = 1,jpk 246 DO jj = 1,jpj 237 #if defined key_trc_pisces 238 !! Initialization of chemical variables of the carbon cycle 239 !! -------------------------------------------------------- 240 241 DO jk = 1,jpk 242 DO jj = 1,jpj 247 243 DO ji = 1,jpi 248 caralk = trn(ji,jj,jk,jptal)- &249 & borat(ji,jj,jk)/(1.+1.E-8/(rtrn+akb3(ji,jj,jk)))250 co3(ji,jj,jk)=(caralk-trn(ji,jj,jk,jpdic))*tmask(ji,jj,jk) &251 & +(1.-tmask(ji,jj,jk))*.5e-3252 bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk)253 hi(ji,jj,jk) = (ak23(ji,jj,jk)*bicarb/co3(ji,jj,jk)) &254 & *tmask(ji,jj,jk)+(1.-tmask(ji,jj,jk))*1.e-9255 h2co3(ji,jj) = 1.e-5244 caralk = trn(ji,jj,jk,jptal)- & 245 & borat(ji,jj,jk)/(1.+1.E-8/(rtrn+akb3(ji,jj,jk))) 246 co3(ji,jj,jk)=(caralk-trn(ji,jj,jk,jpdic))*tmask(ji,jj,jk) & 247 & +(1.-tmask(ji,jj,jk))*.5e-3 248 bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk) 249 hi(ji,jj,jk) = (ak23(ji,jj,jk)*bicarb/co3(ji,jj,jk)) & 250 & *tmask(ji,jj,jk)+(1.-tmask(ji,jj,jk))*1.e-9 251 h2co3(ji,jj) = 1.e-5 256 252 ENDDO 257 258 253 ENDDO 254 ENDDO 259 255 #endif 260 256 261 END SUBROUTINE trc_rst262 263 SUBROUTINE trc_wri(kt)264 !! ==================================================================================265 !!266 !! ROUTINE trc_wri267 !! ******************268 !!269 !! PURPOSE :270 !! ---------271 !! WRITE restart fields in nutwrs272 !! METHOD :273 !! -------274 !!275 !! nutwrs FILE:276 !! each nstock time step , SAVE fields which are necessary for277 !! passive tracer restart278 !!279 !!280 !! INPUT :281 !! -----282 !! argument283 !! kt : time step284 !! COMMON285 !! /cottrc/ : passive tracers fields (before,now286 !! ,after)287 !!288 !! OUTPUT :289 !! ------290 !! FILE291 !! nutwrs : standard restart fields OUTPUT292 !!293 !! WORKSPACE :294 !! ---------295 !! ji,jj,jk,jl,ino0,it0,iarak0296 !!297 !! History:298 !! --------299 !! original : 96-12300 !! addition : 99-12 (M.-A. Foujols) NetCDF FORMAT with ioipsl301 !! additions : 00-05 (A. Estublier)302 !! TVD Limiter Scheme : key_trc_tvd303 !! additions : 01-01 (M.A Foujols, E. Kestenare) bug fix: restclo304 !! additions : 01-01 (O. Aumont, E. Kestenare)305 !! write restart file for sediments306 !! additions : 01-05 (O. Aumont, E. Kestenare)307 !! write restart file for calcite and silicate sediments308 !! 05-03 (O. Aumont and A. El Moussaoui) F90309 !!========================================================================================!257 END SUBROUTINE trc_rst 258 259 SUBROUTINE trc_wri(kt) 260 !! ================================================================================== 261 !! 262 !! ROUTINE trc_wri 263 !! ****************** 264 !! 265 !! PURPOSE : 266 !! --------- 267 !! WRITE restart fields in nutwrs 268 !! METHOD : 269 !! ------- 270 !! 271 !! nutwrs FILE: 272 !! each nstock time step , SAVE fields which are necessary for 273 !! passive tracer restart 274 !! 275 !! 276 !! INPUT : 277 !! ----- 278 !! argument 279 !! kt : time step 280 !! COMMON 281 !! /cottrc/ : passive tracers fields (before,now 282 !! ,after) 283 !! 284 !! OUTPUT : 285 !! ------ 286 !! FILE 287 !! nutwrs : standard restart fields OUTPUT 288 !! 289 !! WORKSPACE : 290 !! --------- 291 !! ji,jj,jk,jl,ino0,it0,iarak0 292 !! 293 !! History: 294 !! -------- 295 !! original : 96-12 296 !! addition : 99-12 (M.-A. Foujols) NetCDF FORMAT with ioipsl 297 !! additions : 00-05 (A. Estublier) 298 !! TVD Limiter Scheme : key_trc_tvd 299 !! additions : 01-01 (M.A Foujols, E. Kestenare) bug fix: restclo 300 !! additions : 01-01 (O. Aumont, E. Kestenare) 301 !! write restart file for sediments 302 !! additions : 01-05 (O. Aumont, E. Kestenare) 303 !! write restart file for calcite and silicate sediments 304 !! 05-03 (O. Aumont and A. El Moussaoui) F90 305 !!========================================================================================! 310 306 !! * Modules used 311 307 USE ioipsl 312 308 313 !! * Arguments309 !! * Arguments 314 310 !! ----------- 315 311 INTEGER, INTENT( in ) :: kt … … 322 318 323 319 INTEGER :: jn, & 324 325 326 320 ino0,it0,iarak0, & 321 ic,jc,ji,jj,jk, & 322 itime 327 323 328 324 REAL(wp) :: zdate0, zinfo(3),zdiag_var, & 329 330 331 332 !! 1. OUTPUT of restart fields (nutwrs)333 !! ---------------------------325 zdiag_varmin, zdiag_varmax 326 327 328 !! 1. OUTPUT of restart fields (nutwrs) 329 !! --------------------------- 334 330 335 331 IF( kt == nit000 ) THEN … … 342 338 IF( MOD(kt,nstock) == 0 .OR. kt == nitend ) THEN 343 339 344 !! 0. initialisations345 !! ------------------340 !! 0. initialisations 341 !! ------------------ 346 342 347 343 IF(lwp) WRITE(numout,*) ' ' 348 344 IF(lwp) WRITE(numout,*) 'trc_wri : write the passive tracer restart file in NetCDF format ', & 349 345 'at it= ',kt,' date= ',ndastp 350 346 IF(lwp) WRITE(numout,*) '~~~~~~~~~' 351 347 352 348 353 354 355 #if defined key_trc_cen2 || defined key_trc_tvd 356 iarak0=1357 #else 358 iarak0=0359 #endif 360 361 362 363 364 365 !! 1. WRITE in nutwrs366 !! ------------------367 !!... first information368 369 370 371 372 373 374 375 376 349 ino0 =no 350 it0 =kt 351 IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN 352 iarak0 = 1 353 ELSE 354 iarak0=0 355 ENDIF 356 357 zinfo(1)=FLOAT(ino0) 358 zinfo(2)=FLOAT(it0) 359 zinfo(3)=FLOAT(iarak0) 360 361 !! 1. WRITE in nutwrs 362 !! ------------------ 363 !!... first information 364 365 INQUIRE (FILE=trestart,EXIST=clbon) 366 IF(clbon) THEN 367 OPEN(UNIT=nutwrs,FILE=trestart,STATUS='old') 368 CLOSE(nutwrs,STATUS='delete') 369 ENDIF 370 371 ic=1 372 DO jc=1,16 377 373 IF(cexper(jc:jc) /= ' ') ic = jc 378 379 380 381 382 374 END DO 375 WRITE(cln,'("_",i2.2,i2.2,i2.2,"_restart.trc")') nyear, nmonth, nday 376 clname=cexper(1:ic)//cln 377 ic=1 378 DO jc=1,48 383 379 IF(clname(jc:jc) /= ' ') ic=jc 384 385 386 387 388 389 & ,itime,zdate0,rdt*nstock,nutwrs)390 391 392 393 ! prognostic variables394 ! --------------------380 END DO 381 trestart=clname(1:ic)//".nc" 382 itime=0 383 CALL ymds2ju(nyear,nmonth,nday,0.0,zdate0) 384 CALL restini('NONE',jpi,jpj,glamt,gphit,jpk,gdept,clname & 385 & ,itime,zdate0,rdt*nstock,nutwrs) 386 387 CALL restput(nutwrs,'info',1,1,3,0,zinfo) 388 389 ! prognostic variables 390 ! -------------------- 395 391 396 392 DO jn=1,jptra … … 398 394 CALL restput(nutwrs,clname,jpi,jpj,jpk,0,trn(:,:,:,jn)) 399 395 400 zdiag_var=0. 401 zdiag_varmin=0. 402 zdiag_varmax=0. 403 IF (lwp) WRITE(numout,*) '----TRACER STAT----' 404 405 DO ji=1,jpi 406 DO jj=1,jpj 407 DO jk=1,jpk 408 409 zdiag_var=zdiag_var+tmask(ji,jj,jk)*trn(ji,jj,jk,jn) 410 411 IF (tmask(ji,jj,jk).EQ.1.) THEN 412 IF (zdiag_varmin.GT.trn(ji,jj,jk,jn)) & 413 zdiag_varmin = trn(ji,jj,jk,jn) 414 IF (zdiag_varmax.LT.trn(ji,jj,jk,jn)) & 415 zdiag_varmax = trn(ji,jj,jk,jn) 416 417 ENDIF 418 419 END DO 396 zdiag_var=0. 397 zdiag_varmin=0. 398 zdiag_varmax=0. 399 IF (lwp) WRITE(numout,*) '----TRACER STAT----' 400 401 DO ji=1,jpi 402 DO jj=1,jpj 403 DO jk=1,jpk 404 405 zdiag_var=zdiag_var+tmask(ji,jj,jk)*trn(ji,jj,jk,jn) 406 407 IF (tmask(ji,jj,jk).EQ.1.) THEN 408 IF (zdiag_varmin.GT.trn(ji,jj,jk,jn)) & 409 zdiag_varmin = trn(ji,jj,jk,jn) 410 IF (zdiag_varmax.LT.trn(ji,jj,jk,jn)) & 411 zdiag_varmax = trn(ji,jj,jk,jn) 412 413 ENDIF 414 415 END DO 416 END DO 420 417 END DO 418 419 420 zdiag_var=zdiag_var/(jpi*jpj*jpk) 421 422 IF(lwp) WRITE(numout,*) 'MEAN NO ',jn,' =',zdiag_var,'MIN= ' & 423 ,zdiag_varmin,'MAX= ',zdiag_varmax 424 421 425 END DO 422 426 423 424 zdiag_var=zdiag_var/(jpi*jpj*jpk) 425 426 IF(lwp) WRITE(numout,*) 'MEAN NO ',jn,' =',zdiag_var,'MIN= ' & 427 ,zdiag_varmin,'MAX= ',zdiag_varmax 428 429 END DO 430 431 DO jn=1,jptra 427 DO jn=1,jptra 432 428 clname='TRB'//ctrcnm(jn) 433 429 CALL restput(nutwrs,clname,jpi,jpj,jpk,0,trb(:,:,:,jn)) 434 END DO 435 436 #if defined key_trc_hamocc3 437 clname='SED'//ctrcnm(jppoc) 438 clname1='SED'//ctrcnm(jpcal) 439 clname2='SED'//ctrcnm(jpsil) 440 CALL restput(nutwrs,clname1,jpi,jpj,1,0,sedcal(:,:)) 441 CALL restput(nutwrs,clname2,jpi,jpj,1,0,sedsil(:,:)) 442 CALL restput(nutwrs,clname,jpi,jpj,1,0,sedpoc(:,:)) 443 #elif defined key_trc_npzd || defined key_trc_lobster1 444 clname='SED'//ctrcnm(jpdet) 445 CALL restput(nutwrs,clname,jpi,jpj,1,0,sedpoc(:,:)) 430 END DO 431 432 433 #if defined key_trc_lobster1 434 clname='SEDB'//ctrcnm(jpdet) 435 clname1='SEDN'//ctrcnm(jpdet) 436 CALL restput(nutwrs,clname,jpi,jpj,1,0,sedpocb(:,:)) 437 CALL restput(nutwrs,clname1,jpi,jpj,1,0,sedpocn(:,:)) 446 438 #elif defined key_trc_pisces 447 clname='SED'//ctrcnm(jppoc) 448 clname1='SED'//ctrcnm(jpcal) 449 clname2='SED'//ctrcnm(jpsil) 450 CALL restput(nutwrs,clname1,jpi,jpj,1,0,sedcal(:,:)) 451 CALL restput(nutwrs,clname2,jpi,jpj,1,0,sedsil(:,:)) 452 CALL restput(nutwrs,clname,jpi,jpj,1,0,sedpoc(:,:)) 453 454 clname='Silicalim' 455 CALL restput(nutwrs,clname,jpi,jpj,1,0,xksi(:,:)) 439 clname='SED'//ctrcnm(jppoc) 440 clname1='SED'//ctrcnm(jpcal) 441 clname2='SED'//ctrcnm(jpsil) 442 CALL restput(nutwrs,clname1,jpi,jpj,1,0,sedcal(:,:)) 443 CALL restput(nutwrs,clname2,jpi,jpj,1,0,sedsil(:,:)) 444 CALL restput(nutwrs,clname,jpi,jpj,1,0,sedpoc(:,:)) 445 446 clname='Silicalim' 447 CALL restput(nutwrs,clname,jpi,jpj,1,0,xksi(:,:)) 448 #elif defined key_cfc 449 clname='qint' 450 CALL restput(nutwrs,clname,jpi,jpj,jptra,0,qint(:,:,:)) 451 clname1='qtr' 452 CALL restput(nutwrs,clname1,jpi,jpj,jptra,0,qtr(:,:,:)) 456 453 #endif 457 454 458 CALL restclo(nutwrs) 459 460 ENDIF 461 462 END SUBROUTINE trc_wri 455 456 CALL restclo(nutwrs) 457 458 ENDIF 459 460 END SUBROUTINE trc_wri 461 462 #endif 463 463 464 464 #else 465 466 SUBROUTINE trc_rst 467 !! no passive tracers 468 END SUBROUTINE trc_rst 469 470 SUBROUTINE trc_wri(kt) 471 !!! no passive tracers 472 INTEGER, INTENT ( in ) :: kt 465 !!====================================================================== 466 !! Empty module : No passive tracer 467 !!====================================================================== 468 CONTAINS 469 470 SUBROUTINE trc_rst 471 !! no passive tracers 472 END SUBROUTINE trc_rst 473 474 SUBROUTINE trc_wri(kt) 475 !! no passive tracers 476 INTEGER, INTENT ( in ) :: kt 473 477 WRITE(*,*) 'trc_wri: You should not have seen this print! error?', kt 474 END SUBROUTINE trc_wri 475 476 #endif 477 478 END SUBROUTINE trc_wri 479 478 480 #endif 479 480 481 END MODULE trcrst 481 482 END MODULE trcrst -
trunk/NEMO/TOP_SRC/trcrst_fdir.h90
r274 r335 1 SUBROUTINE trc_rst 2 !!=========================================================================================== 3 !! 4 !! ROUTINE trc_rst 5 !! ******************* 6 !! 7 !!------------------------------------------------------------------------ 8 !! TOP 1.0, LOCEAN-IPSL (2005) 9 !! $Header$ 10 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 11 !!---------------------------------------------------------------------- 12 1 SUBROUTINE trc_rst 2 !!=========================================================================================== 3 !! 4 !! ROUTINE trc_rst 5 !! ******************* 6 !! 7 !!------------------------------------------------------------------------ 8 !! TOP 1.0, LOCEAN-IPSL (2005) 9 !!---------------------------------------------------------------------- 10 13 11 !! * Local declarations 14 12 INTEGER :: ino0,ino1,it0,it1,idast1,jn,iarak0,iarak1 15 13 INTEGER :: ibloc, ilglo 16 14 INTEGER :: inum ! temporary logical unit 17 15 REAL(wp),DIMENSION(jpi,jpj) :: zq 18 16 ! open restart file 19 17 ibloc = 4096 20 18 ilglo = ibloc*((jpiglo*jpjglo*jpbyt-1 )/ibloc+1) 21 19 CALL ctlopn(inum,'restarti.trc','OLD','UNFORMATTED','DIRECT', & 22 20 ilglo,numout,lwp,1) 23 21 ! restart options 24 22 IF(nrsttr == 0) THEN … … 38 36 it0 =nit000 39 37 40 #if defined key_trc_cen2 41 iarak0=142 #else 43 iarak0=044 #endif 38 IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN 39 iarak0 = 1 40 ELSE 41 iarak0=0 42 ENDIF 45 43 46 44 IF(lwp) THEN 47 48 49 50 51 52 53 54 55 ENDIF56 45 WRITE(numout,*) ' ' 46 WRITE(numout,*) ' *** trcrst beginning of restart for' 47 WRITE(numout,*) ' passive tracer' 48 WRITE(numout,*) ' the present run :' 49 WRITE(numout,*) ' number job is : ',no 50 WRITE(numout,*) ' with the time nit000 : ',nit000 51 IF(iarak0.eq.1) then 52 WRITE(numout,*) ' and before fields for Arakawa sheme ' 53 ENDIF 54 WRITE(numout,*) ' ' 57 55 ENDIF 58 56 … … 65 63 66 64 IF(lwp) THEN 67 68 69 70 71 72 73 ENDIF74 65 WRITE(numout,*) ' ' 66 WRITE(numout,*) ' READ nutrst with ' 67 WRITE(numout,*) ' number job is : ',ino1 68 WRITE(numout,*) ' with the time it : ',it1 69 IF(iarak1.eq.1) then 70 WRITE(numout,*) ' and before fields for Arakawa sheme ' 71 ENDIF 72 WRITE(numout,*) ' ' 75 73 ENDIF 76 74 … … 78 76 79 77 IF((it0-it1) /= 1 .AND. ABS(nrsttr) == 1) THEN 80 81 82 83 84 85 86 87 88 89 90 78 IF(lwp) THEN 79 WRITE(numout,*) ' ===>>>> : problem with nit000 for the', & 80 ' passive tracer restart' 81 WRITE(numout,*) ' ======= ', & 82 ' ======================' 83 WRITE(numout,*) ' we stop. verify the FILE' 84 WRITE(numout,*) ' or rerun with the value 0 for the' 85 WRITE(numout,*) ' control of time PARAMETER nrstdt' 86 WRITE(numout,*) ' ' 87 ENDIF 88 STOP 'trc_rst' 91 89 ENDIF 92 90 … … 94 92 95 93 IF (iarak0 /= iarak1) THEN 96 97 98 99 100 101 102 103 104 105 106 107 94 IF(lwp) THEN 95 WRITE(numout,*) ' ===>>>> : problem with the', & 96 ' passive tracer restart file' 97 WRITE(numout,*) ' ======= ', & 98 ' ===========================' 99 WRITE(numout,*) ' we stop. verify the FILE' 100 WRITE(numout,*) ' before field required IF 1=',iarak0 101 WRITE(numout,*) ' before field present in file IF 1=', & 102 iarak1 103 WRITE(numout,*) ' ' 104 ENDIF 105 STOP 'trc_rst' 108 106 ENDIF 109 107 … … 112 110 113 111 DO jn=1,jptra 114 CALL read3(inum,trn(1,1,1,jn), jn + 1 )112 CALL read3(inum,trn(1,1,1,jn), jn + 1 ) 115 113 END DO 116 114 117 115 DO jn=1,jptra 118 CALL read3(inum,trb(1,1,1,jn), jptra + jn + 1 )116 CALL read3(inum,trb(1,1,1,jn), jptra + jn + 1 ) 119 117 END DO 120 118 121 #if defined key_trc_hamocc3 122 CALL read2(inum,sedcal(:,:),jpk,2*jptra+2) 123 CALL read2(inum,sedsil(:,:),jpk,2*jptra+3) 124 CALL read2(inum,sedpoc(:,:),jpk,2*jptra+4) 125 #elif defined key_trc_npzd || defined key_trc_lobster1 126 CALL read2(inum,sedpoc(:,:),jpk,2*jptra+2) 119 #if defined key_trc_lobster1 120 CALL read2(inum,sedpocb(:,:),jpk,2*jptra+2) 121 CALL read2(inum,sedpocn(:,:),jpk,2*jptra+3) 127 122 #elif defined key_trc_pisces 128 123 … … 133 128 CALL read2(inum,sedsil(:,:),jpk,2*jptra+4) 134 129 CALL read2(inum,sedpoc(:,:),jpk,2*jptra+5) 130 131 #elif defined key_cfc 132 DO jn=1,jptra 133 CALL read2(inum,zq(:,:),jpk,2*jptra+2) 134 qint(:,:,jn) = zq(:,:) 135 CALL read2(inum,zq(:,:),jpk,2*jptra+3) 136 qtr(:,:,jn)=zq(:,:) 137 ENDDO 135 138 #endif 136 139 137 #if defined key_trc_hamocc3 ||defined key_trc_pisces138 139 140 !! Initialization of chemical variables of the carbon cycle141 !! --------------------------------------------------------142 143 144 140 #if defined key_trc_pisces 141 142 143 !! Initialization of chemical variables of the carbon cycle 144 !! -------------------------------------------------------- 145 146 DO jk = 1,jpk 147 DO jj = 1,jpj 145 148 DO ji = 1,jpi 146 caralk = trn(ji,jj,jk,jptal)- &147 & borat(ji,jj,jk)/(1.+1.E-8/(rtrn+akb3(ji,jj,jk)))148 co3(ji,jj,jk)=(caralk-trn(ji,jj,jk,jpdic))*tmask(ji,jj,jk) &149 & +(1.-tmask(ji,jj,jk))*.5e-3150 bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk)151 hi(ji,jj,jk) = (ak23(ji,jj,jk)*bicarb/co3(ji,jj,jk)) &152 & *tmask(ji,jj,jk)+(1.-tmask(ji,jj,jk))*1.e-9153 h2co3(ji,jj) = 1.e-5149 caralk = trn(ji,jj,jk,jptal)- & 150 & borat(ji,jj,jk)/(1.+1.E-8/(rtrn+akb3(ji,jj,jk))) 151 co3(ji,jj,jk)=(caralk-trn(ji,jj,jk,jpdic))*tmask(ji,jj,jk) & 152 & +(1.-tmask(ji,jj,jk))*.5e-3 153 bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk) 154 hi(ji,jj,jk) = (ak23(ji,jj,jk)*bicarb/co3(ji,jj,jk)) & 155 & *tmask(ji,jj,jk)+(1.-tmask(ji,jj,jk))*1.e-9 156 h2co3(ji,jj) = 1.e-5 154 157 ENDDO 155 156 158 ENDDO 159 ENDDO 157 160 #endif 158 161 … … 161 164 END SUBROUTINE trc_rst 162 165 163 SUBROUTINE trc_wri(kt)164 !! ==================================================================================165 !!166 !! ROUTINE trc_wri167 !! ******************168 !!169 !!========================================================================================!170 !! * Arguments166 SUBROUTINE trc_wri(kt) 167 !! ================================================================================== 168 !! 169 !! ROUTINE trc_wri 170 !! ****************** 171 !! 172 !!========================================================================================! 173 !! * Arguments 171 174 !! ----------- 172 175 INTEGER, INTENT( in ) :: kt … … 175 178 INTEGER :: jn 176 179 INTEGER :: ino0,it0,iarak0 180 REAL(wp),DIMENSION(jpi,jpj) :: zq 177 181 178 182 IF( kt == nit000 ) THEN … … 190 194 ! ------------------ 191 195 192 IF(lwp) THEN 193 WRITE(numout,*) ' ' 194 WRITE(numout,*) & 195 & ' trcwri: restart OUTPUT done in nutwrs = ',nutwrs & 196 & ,' at it= ',kt,' date= ',ndastp 197 WRITE(numout,*) ' -------' 198 ENDIF 199 200 ino0 =no 201 it0 =kt 202 203 #if defined key_trc_cen2 204 iarak0=1 205 #else 206 iarak0=0 207 #endif 196 IF(lwp) THEN 197 WRITE(numout,*) ' ' 198 WRITE(numout,*) & 199 & ' trcwri: restart OUTPUT done in nutwrs = ',nutwrs & 200 & ,' at it= ',kt,' date= ',ndastp 201 WRITE(numout,*) ' -------' 202 ENDIF 203 204 ino0 =no 205 it0 =kt 206 IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN 207 iarak0 = 1 208 ELSE 209 iarak0=0 210 ENDIF 208 211 209 212 ! 1. Write in nutwrs … … 213 216 ino0, it0, iarak0 214 217 215 218 DO jn=1,jptra 216 219 CALL write3(nutwrs,trn(1,1,1,jn), jn + 1 ) 217 218 219 220 END DO 221 222 DO jn=1,jptra 220 223 CALL write3(nutwrs,trb(1,1,1,jn), jptra + jn + 1 ) 221 END DO 222 223 #if defined key_trc_hamocc3 224 CALL write2(nutwrs,sedcal,jpk,2*jptra+2) 225 CALL write2(nutwrs,sedsil,jpk,2*jptra+3) 226 CALL write2(nutwrs,sedpoc,jpk,2*jptra+4) 227 #elif defined key_trc_npzd || defined key_trc_lobster1 228 CALL write2(nutwrs,sedpoc,jpk,2*jptra+2) 224 END DO 225 226 #if defined key_trc_lobster1 227 CALL write2(nutwrs,sedpocb,jpk,2*jptra+2) 228 CALL write2(nutwrs,sedpocn,jpk,2*jptra+3) 229 229 #elif defined key_trc_pisces 230 CALL write2(nutwrs,xksi,jpk,2*jptra+2) 231 232 CALL write2(nutwrs,sedcal,jpk,2*jptra+3) 233 CALL write2(nutwrs,sedsil,jpk,2*jptra+4) 234 CALL write2(nutwrs,sedpoc,jpk,2*jptra+5) 230 CALL write2(nutwrs,xksi,jpk,2*jptra+2) 231 232 CALL write2(nutwrs,sedcal,jpk,2*jptra+3) 233 CALL write2(nutwrs,sedsil,jpk,2*jptra+4) 234 CALL write2(nutwrs,sedpoc,jpk,2*jptra+5) 235 #elif defined key_cfc 236 DO jn=1,jptra 237 zq(:,:)=qint(:,:,jn) 238 CALL write2(nutwrs,zq,jpk,2*jptra+2) 239 zq(:,:)=qtr(:,:,jn) 240 CALL write2(nutwrs,zq,jpk,2*jptra+3) 241 ENDDO 235 242 #endif 236 243 ENDIF -
trunk/NEMO/TOP_SRC/trcsms.F90
r274 r335 8 8 !!=========================================================================================== 9 9 !! TOP 1.0, LOCEAN-IPSL (2005) 10 !! $Header$11 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt12 10 !!---------------------------------------------------------------------- 11 #if defined key_passivetrc 12 !! * Modules used 13 !! ============== 14 USE oce_trc 15 USE trc 16 USE trcfreons 13 17 14 !! * Modules used 15 !! ============== 16 USE oce_trc 17 USE trc 18 19 IMPLICIT NONE 20 PRIVATE 18 IMPLICIT NONE 19 PRIVATE 21 20 22 21 !! * Accessibility 23 22 PUBLIC trc_sms 24 23 25 #if defined key_passivetrc26 27 24 CONTAINS 28 25 29 SUBROUTINE trc_sms( kt )30 !!===========================================================================================31 !!32 !! ROUTINE trcsms33 !! *****************34 !!35 !! PURPOSE :36 !! ---------37 !! time loop of opa for passive tracer38 !!39 !! METHOD :40 !! -------41 !! compute the well/spring evolution42 !!43 !! INPUT :44 !! -----45 !! argument46 !! ktask : task identificator47 !! kt : time step48 !! COMMON49 !! all the COMMON defined in opa50 !!51 !!52 !! OUTPUT : : no53 !! ------54 !!55 !! WORKSPACE :56 !! ---------57 !!58 !! EXTERNAL :59 !! --------60 !! trcbio, trcsed, trcopt for NPZD or LOBSTER1 models61 !!62 !! h3cprg for HAMOC3 and P3ZD models63 !!64 !!65 !! History:66 !! --------67 !! original : 96-1168 !! additions : 99-07 (M. Levy)69 !! 04-00 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD70 !! 12-00 (O. Aumont, E. Kestenare) add trcexp for instantaneous export71 !! 05-03 (O. Aumont and A. El Moussaoui) F9072 !! -------------------------------------------------------------------------------------26 SUBROUTINE trc_sms( kt ) 27 !!=========================================================================================== 28 !! 29 !! ROUTINE trcsms 30 !! ***************** 31 !! 32 !! PURPOSE : 33 !! --------- 34 !! time loop of opa for passive tracer 35 !! 36 !! METHOD : 37 !! ------- 38 !! compute the well/spring evolution 39 !! 40 !! INPUT : 41 !! ----- 42 !! argument 43 !! ktask : task identificator 44 !! kt : time step 45 !! COMMON 46 !! all the COMMON defined in opa 47 !! 48 !! 49 !! OUTPUT : : no 50 !! ------ 51 !! 52 !! WORKSPACE : 53 !! --------- 54 !! 55 !! EXTERNAL : 56 !! -------- 57 !! trcbio, trcsed, trcopt for NPZD or LOBSTER1 models 58 !! 59 !! h3cprg for HAMOC3 and P3ZD models 60 !! 61 !! 62 !! History: 63 !! -------- 64 !! original : 96-11 65 !! additions : 99-07 (M. Levy) 66 !! 04-00 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD 67 !! 12-00 (O. Aumont, E. Kestenare) add trcexp for instantaneous export 68 !! 05-03 (O. Aumont and A. El Moussaoui) F90 69 !! ------------------------------------------------------------------------------------- 73 70 74 !! * Arguments75 !! -----------71 !! * Arguments 72 !! ----------- 76 73 INTEGER, INTENT( in ) :: kt ! ocean time-step index 77 74 78 !! this ROUTINE is called only every ndttrc time step79 !! --------------------------------------------------75 !! this ROUTINE is called only every ndttrc time step 76 !! -------------------------------------------------- 80 77 81 78 IF ( MOD(kt,ndttrc) /= 0) RETURN 82 79 83 !! this first routines are parallelized on vertical slab84 !! ------------------------------------------------------80 !! this first routines are parallelized on vertical slab 81 !! ------------------------------------------------------ 85 82 86 #if defined key_trc_ npzd || defined key_trc_lobster183 #if defined key_trc_lobster1 87 84 88 !! tracers: optical model89 !! ----------------------85 !! tracers: optical model 86 !! ---------------------- 90 87 91 88 CALL trcopt( kt) 92 89 93 !! tracers: biological model94 !! -------------------------90 !! tracers: biological model 91 !! ------------------------- 95 92 96 93 CALL trcbio( kt) 97 94 98 !! tracers: sedimentation model99 !! ----------------------------95 !! tracers: sedimentation model 96 !! ---------------------------- 100 97 101 102 CALL trcexp98 CALL trcsed(kt) 99 CALL trcexp(kt) 103 100 104 #elif defined key_trc_hamocc3105 101 106 !! h3cprg: main PROGRAM for HAMOCC3 or P3ZD models107 !! -----------------------------------------------108 CALL h3cprg(kt)109 102 110 103 #elif defined key_trc_pisces 111 104 112 !! p4zprg: main PROGRAM for PISCES 113 !! ------------------------------- 114 CALL p4zprg(kt) 115 #else 105 !! p4zprg: main PROGRAM for PISCES 106 !! ------------------------------- 107 CALL p4zprg(kt) 116 108 117 !! SMS to DO109 !! SMS to DO 118 110 119 # if defined key_cfc111 #elif defined key_cfc 120 112 121 !! CFC's code taken from K. Rodgers113 !! CFC's code taken from K. Rodgers 122 114 123 !! This part is still experimental124 !! -------------------------------115 !! This part is still experimental 116 !! ------------------------------- 125 117 126 CALL trcfreons(kt) 127 128 #elif defined key_gosac 129 130 !! C14 tracer modeled according to the OCMIP protocol 131 !! This part has not been really tested in this configuration 132 133 !! Compute the alkalinity 134 135 CALL alkal(kt) 136 137 !! Compute the radioactive decay 138 139 CALL decay 140 141 !! Tracers: surface flux 142 143 CALL dicgasflux(kt) 118 CALL trc_freons(kt) 144 119 145 120 #endif 146 121 147 #endif148 122 149 #if defined key_trc_age150 123 151 !! Age Tracer 152 153 CALL trcage(kt) 154 #endif 155 156 END SUBROUTINE trc_sms 124 END SUBROUTINE trc_sms 157 125 158 126 #else 127 !!====================================================================== 128 !! Empty module : No passive tracer 129 !!====================================================================== 130 CONTAINS 159 131 160 SUBROUTINE trc_sms( kt )132 SUBROUTINE trc_sms( kt ) 161 133 162 ! no passive tracers134 ! no passive tracers 163 135 INTEGER, INTENT( in ) :: kt 164 136 WRITE(*,*) 'trc_sms: You should not have seen this print! error?', kt 165 END SUBROUTINE trc_sms137 END SUBROUTINE trc_sms 166 138 167 139 #endif
Note: See TracChangeset
for help on using the changeset viewer.