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