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