[2038] | 1 | MODULE trcnam |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trcnam *** |
---|
| 4 | !! TOP : Read and print options for the passive tracer run (namelist) |
---|
| 5 | !!====================================================================== |
---|
| 6 | !! History : - ! 1996-11 (M.A. Foujols, M. Levy) original code |
---|
| 7 | !! - ! 1998-04 (M.A Foujols, L. Bopp) ahtrb0 for isopycnal mixing |
---|
| 8 | !! - ! 1999-10 (M.A. Foujols, M. Levy) separation of sms |
---|
| 9 | !! - ! 2000-07 (A. Estublier) add TVD and MUSCL : Tests on ndttrc |
---|
| 10 | !! - ! 2000-11 (M.A Foujols, E Kestenare) trcrat, ahtrc0 and aeivtr0 |
---|
| 11 | !! - ! 2001-01 (E Kestenare) suppress ndttrc=1 for CEN2 and TVD schemes |
---|
| 12 | !! 1.0 ! 2005-03 (O. Aumont, A. El Moussaoui) F90 |
---|
[5841] | 13 | !! - ! 2014-06 (A. Yool, J. Palmieri) adding MEDUSA-2 |
---|
[2038] | 14 | !!---------------------------------------------------------------------- |
---|
| 15 | #if defined key_top |
---|
| 16 | !!---------------------------------------------------------------------- |
---|
| 17 | !! 'key_top' TOP models |
---|
| 18 | !!---------------------------------------------------------------------- |
---|
| 19 | !! trc_nam : Read and print options for the passive tracer run (namelist) |
---|
| 20 | !!---------------------------------------------------------------------- |
---|
[3294] | 21 | USE oce_trc ! shared variables between ocean and passive tracers |
---|
| 22 | USE trc ! passive tracers common variables |
---|
[2038] | 23 | USE trcnam_trp ! Transport namelist |
---|
| 24 | USE trcnam_pisces ! PISCES namelist |
---|
| 25 | USE trcnam_cfc ! CFC SMS namelist |
---|
| 26 | USE trcnam_c14b ! C14 SMS namelist |
---|
[8213] | 27 | USE trcnam_age ! AGE SMS namelist |
---|
[2038] | 28 | USE trcnam_my_trc ! MY_TRC SMS namelist |
---|
[8213] | 29 | USE trcnam_idtra ! Idealise tracer namelist |
---|
[5726] | 30 | USE trcnam_medusa ! MEDUSA namelist |
---|
[4990] | 31 | USE trd_oce |
---|
| 32 | USE trdtrc_oce |
---|
[3294] | 33 | USE iom ! I/O manager |
---|
[2038] | 34 | |
---|
| 35 | IMPLICIT NONE |
---|
| 36 | PRIVATE |
---|
| 37 | |
---|
[4152] | 38 | PUBLIC trc_nam_run ! called in trcini |
---|
[2038] | 39 | PUBLIC trc_nam ! called in trcini |
---|
| 40 | |
---|
| 41 | !! * Substitutions |
---|
| 42 | # include "top_substitute.h90" |
---|
| 43 | !!---------------------------------------------------------------------- |
---|
[2287] | 44 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
[5341] | 45 | !! $Id$ |
---|
[2287] | 46 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[2038] | 47 | !!---------------------------------------------------------------------- |
---|
| 48 | |
---|
| 49 | CONTAINS |
---|
| 50 | |
---|
[4152] | 51 | |
---|
[2038] | 52 | SUBROUTINE trc_nam |
---|
| 53 | !!--------------------------------------------------------------------- |
---|
| 54 | !! *** ROUTINE trc_nam *** |
---|
| 55 | !! |
---|
| 56 | !! ** Purpose : READ and PRINT options for the passive tracer run (namelist) |
---|
| 57 | !! |
---|
| 58 | !! ** Method : - read passive tracer namelist |
---|
| 59 | !! - read namelist of each defined SMS model |
---|
[6715] | 60 | !! ( (PISCES, CFC, MY_TRC, MEDUSA, IDTRA, Age ) |
---|
[2038] | 61 | !!--------------------------------------------------------------------- |
---|
[5726] | 62 | INTEGER :: jn, jk ! dummy loop indice |
---|
[4152] | 63 | ! ! Parameters of the run |
---|
| 64 | IF( .NOT. lk_offline ) CALL trc_nam_run |
---|
| 65 | |
---|
| 66 | ! ! passive tracer informations |
---|
| 67 | CALL trc_nam_trc |
---|
| 68 | |
---|
| 69 | ! ! Parameters of additional diagnostics |
---|
| 70 | CALL trc_nam_dia |
---|
[2038] | 71 | |
---|
[4152] | 72 | ! ! namelist of transport |
---|
| 73 | CALL trc_nam_trp |
---|
[2038] | 74 | |
---|
| 75 | |
---|
[4152] | 76 | IF( ln_rsttr ) ln_trcdta = .FALSE. ! restart : no need of clim data |
---|
| 77 | ! |
---|
| 78 | IF( ln_trcdmp .OR. ln_trcdmp_clo ) ln_trcdta = .TRUE. ! damping : need to have clim data |
---|
| 79 | ! |
---|
| 80 | IF( .NOT.ln_trcdta ) THEN |
---|
| 81 | ln_trc_ini(:) = .FALSE. |
---|
| 82 | ENDIF |
---|
[2038] | 83 | |
---|
[4152] | 84 | IF(lwp) THEN ! control print |
---|
[2038] | 85 | WRITE(numout,*) |
---|
| 86 | WRITE(numout,*) ' Namelist : namtrc' |
---|
[3319] | 87 | WRITE(numout,*) ' Read inputs data from file (y/n) ln_trcdta = ', ln_trcdta |
---|
| 88 | WRITE(numout,*) ' Damping of passive tracer (y/n) ln_trcdmp = ', ln_trcdmp |
---|
[4148] | 89 | WRITE(numout,*) ' Restoring of tracer on closed seas ln_trcdmp_clo = ', ln_trcdmp_clo |
---|
[2038] | 90 | WRITE(numout,*) ' ' |
---|
| 91 | DO jn = 1, jptra |
---|
[3294] | 92 | WRITE(numout,*) ' tracer nb : ', jn, ' short name : ', ctrcnm(jn) |
---|
[2038] | 93 | END DO |
---|
[3294] | 94 | WRITE(numout,*) ' ' |
---|
[2038] | 95 | ENDIF |
---|
| 96 | |
---|
[3294] | 97 | IF(lwp) THEN ! control print |
---|
| 98 | IF( ln_rsttr ) THEN |
---|
| 99 | WRITE(numout,*) |
---|
[4148] | 100 | WRITE(numout,*) ' Read a restart file for passive tracer : ', TRIM( cn_trcrst_in ) |
---|
[3294] | 101 | WRITE(numout,*) |
---|
| 102 | ENDIF |
---|
[4148] | 103 | IF( ln_trcdta .AND. .NOT.ln_rsttr ) THEN |
---|
| 104 | WRITE(numout,*) |
---|
| 105 | WRITE(numout,*) ' Some of the passive tracers are initialised from climatologies ' |
---|
| 106 | WRITE(numout,*) |
---|
| 107 | ENDIF |
---|
| 108 | IF( .NOT.ln_trcdta ) THEN |
---|
| 109 | WRITE(numout,*) |
---|
| 110 | WRITE(numout,*) ' All the passive tracers are initialised with constant values ' |
---|
| 111 | WRITE(numout,*) |
---|
| 112 | ENDIF |
---|
[3294] | 113 | ENDIF |
---|
| 114 | |
---|
[5726] | 115 | # if defined key_debug_medusa |
---|
| 116 | DO jk = 1, jpk |
---|
| 117 | WRITE(numout,*) ' level number: ', jk, 'rdttrc: ',rdttrc(jk),'rdttra: ', rdttra(jk),'nn_dttrc: ', nn_dttrc |
---|
| 118 | END DO |
---|
| 119 | CALL flush(numout) |
---|
| 120 | # endif |
---|
[4152] | 121 | |
---|
| 122 | rdttrc(:) = rdttra(:) * FLOAT( nn_dttrc ) ! vertical profile of passive tracer time-step |
---|
| 123 | |
---|
| 124 | IF(lwp) THEN ! control print |
---|
| 125 | WRITE(numout,*) |
---|
| 126 | WRITE(numout,*) ' Passive Tracer time step rdttrc = ', rdttrc(1) |
---|
| 127 | WRITE(numout,*) |
---|
| 128 | ENDIF |
---|
[3294] | 129 | |
---|
[4152] | 130 | |
---|
[4990] | 131 | #if defined key_trdmxl_trc || defined key_trdtrc |
---|
[3294] | 132 | |
---|
[4147] | 133 | REWIND( numnat_ref ) ! Namelist namtrc_trd in reference namelist : Passive tracer trends |
---|
| 134 | READ ( numnat_ref, namtrc_trd, IOSTAT = ios, ERR = 905) |
---|
| 135 | 905 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_trd in reference namelist', lwp ) |
---|
[3294] | 136 | |
---|
[4147] | 137 | REWIND( numnat_cfg ) ! Namelist namtrc_trd in configuration namelist : Passive tracer trends |
---|
| 138 | READ ( numnat_cfg, namtrc_trd, IOSTAT = ios, ERR = 906 ) |
---|
| 139 | 906 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_trd in configuration namelist', lwp ) |
---|
[4624] | 140 | IF(lwm) WRITE ( numont, namtrc_trd ) |
---|
[4147] | 141 | |
---|
[3294] | 142 | IF(lwp) THEN |
---|
| 143 | WRITE(numout,*) |
---|
[4990] | 144 | WRITE(numout,*) ' trd_mxl_trc_init : read namelist namtrc_trd ' |
---|
[3294] | 145 | WRITE(numout,*) ' ~~~~~~~~~~~~~~~~ ' |
---|
| 146 | WRITE(numout,*) ' * frequency of trends diagnostics nn_trd_trc = ', nn_trd_trc |
---|
| 147 | WRITE(numout,*) ' * control surface type nn_ctls_trc = ', nn_ctls_trc |
---|
[4990] | 148 | WRITE(numout,*) ' * restart for ML diagnostics ln_trdmxl_trc_restart = ', ln_trdmxl_trc_restart |
---|
[3294] | 149 | WRITE(numout,*) ' * flag to diagnose trends of ' |
---|
[4990] | 150 | WRITE(numout,*) ' instantantaneous or mean ML T/S ln_trdmxl_trc_instant = ', ln_trdmxl_trc_instant |
---|
[3294] | 151 | WRITE(numout,*) ' * unit conversion factor rn_ucf_trc = ', rn_ucf_trc |
---|
| 152 | DO jn = 1, jptra |
---|
| 153 | IF( ln_trdtrc(jn) ) WRITE(numout,*) ' compute ML trends for tracer number :', jn |
---|
| 154 | END DO |
---|
[5726] | 155 | WRITE(numout,*) ' ' |
---|
| 156 | CALL flush(numout) |
---|
[3294] | 157 | ENDIF |
---|
| 158 | #endif |
---|
| 159 | |
---|
| 160 | |
---|
[5385] | 161 | ! Call the ice module for tracers |
---|
| 162 | ! ------------------------------- |
---|
| 163 | CALL trc_nam_ice |
---|
| 164 | |
---|
[2038] | 165 | ! namelist of SMS |
---|
| 166 | ! --------------- |
---|
| 167 | IF( lk_pisces ) THEN ; CALL trc_nam_pisces ! PISCES bio-model |
---|
| 168 | ELSE ; IF(lwp) WRITE(numout,*) ' PISCES not used' |
---|
| 169 | ENDIF |
---|
[8213] | 170 | |
---|
[5726] | 171 | IF( lk_medusa ) THEN ; CALL trc_nam_medusa ! MEDUSA tracers |
---|
| 172 | ELSE ; IF(lwp) WRITE(numout,*) ' MEDUSA not used' |
---|
| 173 | ENDIF |
---|
[8213] | 174 | |
---|
[5726] | 175 | IF( lk_idtra ) THEN ; CALL trc_nam_idtra ! Idealize tracers |
---|
| 176 | ELSE ; IF(lwp) WRITE(numout,*) ' Idealize tracers not used' |
---|
| 177 | ENDIF |
---|
[8213] | 178 | |
---|
[6164] | 179 | IF( lk_cfc ) THEN ; CALL trc_nam_cfc ! CFC tracers |
---|
| 180 | ELSE ; IF(lwp) WRITE(numout,*) ' CFC not used' |
---|
| 181 | ENDIF |
---|
[8213] | 182 | |
---|
[6164] | 183 | IF( lk_c14b ) THEN ; CALL trc_nam_c14b ! C14 bomb tracers |
---|
| 184 | ELSE ; IF(lwp) WRITE(numout,*) ' C14 not used' |
---|
| 185 | ENDIF |
---|
[8213] | 186 | |
---|
[6715] | 187 | IF( lk_age ) THEN ; CALL trc_nam_age ! AGE tracer |
---|
| 188 | ELSE ; IF(lwp) WRITE(numout,*) ' AGE not used' |
---|
| 189 | ENDIF |
---|
[8213] | 190 | |
---|
[6164] | 191 | IF( lk_my_trc ) THEN ; CALL trc_nam_my_trc ! MY_TRC tracers |
---|
| 192 | ELSE ; IF(lwp) WRITE(numout,*) ' MY_TRC not used' |
---|
| 193 | ENDIF |
---|
| 194 | |
---|
[5726] | 195 | IF(lwp) CALL flush(numout) |
---|
[2038] | 196 | END SUBROUTINE trc_nam |
---|
| 197 | |
---|
[4152] | 198 | SUBROUTINE trc_nam_run |
---|
| 199 | !!--------------------------------------------------------------------- |
---|
| 200 | !! *** ROUTINE trc_nam *** |
---|
| 201 | !! |
---|
| 202 | !! ** Purpose : read options for the passive tracer run (namelist) |
---|
| 203 | !! |
---|
| 204 | !!--------------------------------------------------------------------- |
---|
| 205 | NAMELIST/namtrc_run/ nn_dttrc, nn_writetrc, ln_rsttr, nn_rsttr, ln_top_euler, & |
---|
[5341] | 206 | & cn_trcrst_indir, cn_trcrst_outdir, cn_trcrst_in, cn_trcrst_out |
---|
[4152] | 207 | |
---|
[5341] | 208 | |
---|
[4154] | 209 | INTEGER :: ios ! Local integer output status for namelist read |
---|
| 210 | |
---|
[4152] | 211 | !!--------------------------------------------------------------------- |
---|
| 212 | |
---|
| 213 | |
---|
| 214 | IF(lwp) WRITE(numout,*) 'trc_nam : read the passive tracer namelists' |
---|
| 215 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
| 216 | |
---|
[4290] | 217 | CALL ctl_opn( numnat_ref, 'namelist_top_ref' , 'OLD' , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) |
---|
| 218 | CALL ctl_opn( numnat_cfg, 'namelist_top_cfg' , 'OLD' , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) |
---|
[4624] | 219 | IF(lwm) CALL ctl_opn( numont, 'output.namelist.top', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., 1 ) |
---|
[4152] | 220 | |
---|
| 221 | REWIND( numnat_ref ) ! Namelist namtrc in reference namelist : Passive tracer variables |
---|
| 222 | READ ( numnat_ref, namtrc_run, IOSTAT = ios, ERR = 901) |
---|
| 223 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) |
---|
| 224 | |
---|
| 225 | REWIND( numnat_cfg ) ! Namelist namtrc in configuration namelist : Passive tracer variables |
---|
| 226 | READ ( numnat_cfg, namtrc_run, IOSTAT = ios, ERR = 902 ) |
---|
| 227 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) |
---|
[4624] | 228 | IF(lwm) WRITE ( numont, namtrc_run ) |
---|
[4152] | 229 | |
---|
| 230 | ! computes the first time step of tracer model |
---|
| 231 | nittrc000 = nit000 + nn_dttrc - 1 |
---|
| 232 | |
---|
| 233 | IF(lwp) THEN ! control print |
---|
| 234 | WRITE(numout,*) |
---|
[4159] | 235 | WRITE(numout,*) ' Namelist : namtrc_run' |
---|
[4152] | 236 | WRITE(numout,*) ' time step freq. for passive tracer nn_dttrc = ', nn_dttrc |
---|
| 237 | WRITE(numout,*) ' restart for passive tracer ln_rsttr = ', ln_rsttr |
---|
| 238 | WRITE(numout,*) ' control of time step for passive tracer nn_rsttr = ', nn_rsttr |
---|
| 239 | WRITE(numout,*) ' first time step for pass. trac. nittrc000 = ', nittrc000 |
---|
[4159] | 240 | WRITE(numout,*) ' frequency of outputs for passive tracers nn_writetrc = ', nn_writetrc |
---|
| 241 | WRITE(numout,*) ' Use euler integration for TRC (y/n) ln_top_euler = ', ln_top_euler |
---|
[4152] | 242 | WRITE(numout,*) ' ' |
---|
[5726] | 243 | CALL flush(numout) |
---|
[4152] | 244 | ENDIF |
---|
| 245 | ! |
---|
| 246 | END SUBROUTINE trc_nam_run |
---|
| 247 | |
---|
[5385] | 248 | SUBROUTINE trc_nam_ice |
---|
| 249 | !!--------------------------------------------------------------------- |
---|
| 250 | !! *** ROUTINE trc_nam_ice *** |
---|
| 251 | !! |
---|
| 252 | !! ** Purpose : Read the namelist for the ice effect on tracers |
---|
| 253 | !! |
---|
| 254 | !! ** Method : - |
---|
| 255 | !! |
---|
| 256 | !!--------------------------------------------------------------------- |
---|
| 257 | ! --- Variable declarations --- ! |
---|
| 258 | INTEGER :: jn ! dummy loop indices |
---|
| 259 | INTEGER :: ios ! Local integer output status for namelist read |
---|
[4152] | 260 | |
---|
[5385] | 261 | ! --- Namelist declarations --- ! |
---|
| 262 | TYPE(TRC_I_NML), DIMENSION(jptra) :: sn_tri_tracer |
---|
| 263 | NAMELIST/namtrc_ice/ nn_ice_tr, sn_tri_tracer |
---|
| 264 | |
---|
| 265 | IF(lwp) THEN |
---|
| 266 | WRITE(numout,*) |
---|
| 267 | WRITE(numout,*) 'trc_nam_ice : Read the namelist for trc_ice' |
---|
| 268 | WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' |
---|
| 269 | ENDIF |
---|
| 270 | |
---|
| 271 | IF( nn_timing == 1 ) CALL timing_start('trc_nam_ice') |
---|
| 272 | |
---|
| 273 | ! |
---|
| 274 | REWIND( numnat_ref ) ! Namelist namtrc_ice in reference namelist : Passive tracer input data |
---|
| 275 | READ ( numnat_ref, namtrc_ice, IOSTAT = ios, ERR = 901) |
---|
| 276 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtrc_ice in reference namelist ', lwp ) |
---|
| 277 | |
---|
| 278 | REWIND( numnat_cfg ) ! Namelist namtrc_ice in configuration namelist : Pisces external sources of nutrients |
---|
| 279 | READ ( numnat_cfg, namtrc_ice, IOSTAT = ios, ERR = 902 ) |
---|
| 280 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ice in configuration namelist', lwp ) |
---|
| 281 | |
---|
[5411] | 282 | IF( lwp ) THEN |
---|
| 283 | WRITE(numout,*) ' ' |
---|
| 284 | WRITE(numout,*) ' Sea ice tracers option (nn_ice_tr) : ', nn_ice_tr |
---|
| 285 | WRITE(numout,*) ' ' |
---|
| 286 | ENDIF |
---|
[5385] | 287 | |
---|
| 288 | ! Assign namelist stuff |
---|
| 289 | DO jn = 1, jptra |
---|
| 290 | trc_ice_ratio(jn) = sn_tri_tracer(jn)%trc_ratio |
---|
| 291 | trc_ice_prescr(jn) = sn_tri_tracer(jn)%trc_prescr |
---|
| 292 | cn_trc_o (jn) = sn_tri_tracer(jn)%ctrc_o |
---|
| 293 | END DO |
---|
| 294 | |
---|
| 295 | IF( nn_timing == 1 ) CALL timing_stop('trc_nam_ice') |
---|
| 296 | ! |
---|
| 297 | END SUBROUTINE trc_nam_ice |
---|
| 298 | |
---|
[4152] | 299 | SUBROUTINE trc_nam_trc |
---|
| 300 | !!--------------------------------------------------------------------- |
---|
| 301 | !! *** ROUTINE trc_nam *** |
---|
| 302 | !! |
---|
| 303 | !! ** Purpose : read options for the passive tracer run (namelist) |
---|
| 304 | !! |
---|
| 305 | !!--------------------------------------------------------------------- |
---|
| 306 | TYPE(PTRACER), DIMENSION(jptra) :: sn_tracer ! type of tracer for saving if not key_iomput |
---|
| 307 | !! |
---|
| 308 | NAMELIST/namtrc/ sn_tracer, ln_trcdta,ln_trcdmp, ln_trcdmp_clo |
---|
[4154] | 309 | |
---|
| 310 | INTEGER :: ios ! Local integer output status for namelist read |
---|
| 311 | INTEGER :: jn ! dummy loop indice |
---|
[4152] | 312 | !!--------------------------------------------------------------------- |
---|
| 313 | IF(lwp) WRITE(numout,*) |
---|
| 314 | IF(lwp) WRITE(numout,*) 'trc_nam : read the passive tracer namelists' |
---|
| 315 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
| 316 | |
---|
| 317 | |
---|
| 318 | REWIND( numnat_ref ) ! Namelist namtrc in reference namelist : Passive tracer variables |
---|
| 319 | READ ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) |
---|
| 320 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) |
---|
| 321 | |
---|
| 322 | REWIND( numnat_cfg ) ! Namelist namtrc in configuration namelist : Passive tracer variables |
---|
| 323 | READ ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) |
---|
| 324 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) |
---|
[4624] | 325 | IF(lwm) WRITE ( numont, namtrc ) |
---|
[4152] | 326 | |
---|
| 327 | DO jn = 1, jptra |
---|
| 328 | ctrcnm (jn) = TRIM( sn_tracer(jn)%clsname ) |
---|
| 329 | ctrcln (jn) = TRIM( sn_tracer(jn)%cllname ) |
---|
| 330 | ctrcun (jn) = TRIM( sn_tracer(jn)%clunit ) |
---|
| 331 | ln_trc_ini(jn) = sn_tracer(jn)%llinit |
---|
| 332 | ln_trc_wri(jn) = sn_tracer(jn)%llsave |
---|
| 333 | END DO |
---|
[5726] | 334 | IF(lwp) CALL flush(numout) |
---|
| 335 | |
---|
[4152] | 336 | END SUBROUTINE trc_nam_trc |
---|
| 337 | |
---|
| 338 | |
---|
| 339 | SUBROUTINE trc_nam_dia |
---|
| 340 | !!--------------------------------------------------------------------- |
---|
| 341 | !! *** ROUTINE trc_nam_dia *** |
---|
| 342 | !! |
---|
| 343 | !! ** Purpose : read options for the passive tracer diagnostics |
---|
| 344 | !! |
---|
| 345 | !! ** Method : - read passive tracer namelist |
---|
| 346 | !! - read namelist of each defined SMS model |
---|
| 347 | !! ( (PISCES, CFC, MY_TRC ) |
---|
| 348 | !!--------------------------------------------------------------------- |
---|
| 349 | INTEGER :: ierr |
---|
[4990] | 350 | #if defined key_trdmxl_trc || defined key_trdtrc |
---|
[4152] | 351 | NAMELIST/namtrc_trd/ nn_trd_trc, nn_ctls_trc, rn_ucf_trc, & |
---|
[4990] | 352 | & ln_trdmxl_trc_restart, ln_trdmxl_trc_instant, & |
---|
[4152] | 353 | & cn_trdrst_trc_in, cn_trdrst_trc_out, ln_trdtrc |
---|
| 354 | #endif |
---|
| 355 | NAMELIST/namtrc_dia/ ln_diatrc, ln_diabio, nn_writedia, nn_writebio |
---|
| 356 | |
---|
[4154] | 357 | INTEGER :: ios ! Local integer output status for namelist read |
---|
[4152] | 358 | !!--------------------------------------------------------------------- |
---|
| 359 | |
---|
| 360 | IF(lwp) WRITE(numout,*) |
---|
| 361 | IF(lwp) WRITE(numout,*) 'trc_nam_dia : read the passive tracer diagnostics options' |
---|
| 362 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
| 363 | |
---|
| 364 | IF(lwp) WRITE(numout,*) |
---|
| 365 | IF(lwp) WRITE(numout,*) 'trc_nam_dia : read the passive tracer diagnostics options' |
---|
| 366 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
| 367 | |
---|
| 368 | REWIND( numnat_ref ) ! Namelist namtrc_dia in reference namelist : Passive tracer diagnostics |
---|
| 369 | READ ( numnat_ref, namtrc_dia, IOSTAT = ios, ERR = 903) |
---|
| 370 | 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in reference namelist', lwp ) |
---|
| 371 | |
---|
| 372 | REWIND( numnat_cfg ) ! Namelist namtrc_dia in configuration namelist : Passive tracer diagnostics |
---|
| 373 | READ ( numnat_cfg, namtrc_dia, IOSTAT = ios, ERR = 904 ) |
---|
| 374 | 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in configuration namelist', lwp ) |
---|
[4624] | 375 | IF(lwm) WRITE ( numont, namtrc_dia ) |
---|
[4152] | 376 | |
---|
| 377 | IF(lwp) THEN |
---|
| 378 | WRITE(numout,*) |
---|
| 379 | WRITE(numout,*) |
---|
| 380 | WRITE(numout,*) ' Namelist : namtrc_dia' |
---|
| 381 | WRITE(numout,*) ' save additionnal diagnostics arrays ln_diatrc = ', ln_diatrc |
---|
| 382 | WRITE(numout,*) ' save additionnal biology diagnostics arrays ln_diabio = ', ln_diabio |
---|
| 383 | WRITE(numout,*) ' frequency of outputs for additional arrays nn_writedia = ', nn_writedia |
---|
| 384 | WRITE(numout,*) ' frequency of outputs for biological trends nn_writebio = ', nn_writebio |
---|
| 385 | WRITE(numout,*) ' ' |
---|
[5726] | 386 | CALL flush(numout) |
---|
[4152] | 387 | ENDIF |
---|
[8213] | 388 | |
---|
[5939] | 389 | IF( ( ln_diatrc .AND. .NOT. lk_iomput ) .OR. ( ln_diatrc .AND. lk_medusa ) ) THEN |
---|
[4152] | 390 | ALLOCATE( trc2d(jpi,jpj,jpdia2d), trc3d(jpi,jpj,jpk,jpdia3d), & |
---|
| 391 | & ctrc2d(jpdia2d), ctrc2l(jpdia2d), ctrc2u(jpdia2d) , & |
---|
| 392 | & ctrc3d(jpdia3d), ctrc3l(jpdia3d), ctrc3u(jpdia3d) , STAT = ierr ) |
---|
| 393 | IF( ierr > 0 ) CALL ctl_stop( 'STOP', 'trcnam: unable to allocate add. diag. array' ) |
---|
| 394 | ! |
---|
| 395 | trc2d(:,:,: ) = 0._wp ; ctrc2d(:) = ' ' ; ctrc2l(:) = ' ' ; ctrc2u(:) = ' ' |
---|
| 396 | trc3d(:,:,:,:) = 0._wp ; ctrc3d(:) = ' ' ; ctrc3l(:) = ' ' ; ctrc3u(:) = ' ' |
---|
| 397 | ! |
---|
| 398 | ENDIF |
---|
| 399 | |
---|
| 400 | IF( ( ln_diabio .AND. .NOT. lk_iomput ) .OR. l_trdtrc ) THEN |
---|
| 401 | ALLOCATE( trbio (jpi,jpj,jpk,jpdiabio) , & |
---|
| 402 | & ctrbio(jpdiabio), ctrbil(jpdiabio), ctrbiu(jpdiabio), STAT = ierr ) |
---|
| 403 | IF( ierr > 0 ) CALL ctl_stop( 'STOP', 'trcnam: unable to allocate bio. diag. array' ) |
---|
| 404 | ! |
---|
| 405 | trbio(:,:,:,:) = 0._wp ; ctrbio(:) = ' ' ; ctrbil(:) = ' ' ; ctrbiu(:) = ' ' |
---|
| 406 | ! |
---|
| 407 | ENDIF |
---|
| 408 | ! |
---|
| 409 | END SUBROUTINE trc_nam_dia |
---|
| 410 | |
---|
[2038] | 411 | #else |
---|
| 412 | !!---------------------------------------------------------------------- |
---|
| 413 | !! Dummy module : No passive tracer |
---|
| 414 | !!---------------------------------------------------------------------- |
---|
| 415 | CONTAINS |
---|
| 416 | SUBROUTINE trc_nam ! Empty routine |
---|
| 417 | END SUBROUTINE trc_nam |
---|
[4152] | 418 | SUBROUTINE trc_nam_run ! Empty routine |
---|
| 419 | END SUBROUTINE trc_nam_run |
---|
[2038] | 420 | #endif |
---|
| 421 | |
---|
[2104] | 422 | !!---------------------------------------------------------------------- |
---|
[2287] | 423 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
[5341] | 424 | !! $Id$ |
---|
[2287] | 425 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[2038] | 426 | !!====================================================================== |
---|
[8213] | 427 | END MODULE trcnam |
---|