[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 |
---|
[8280] | 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 |
---|
[8434] | 27 | USE trcnam_age ! AGE SMS namelist |
---|
[2038] | 28 | USE trcnam_my_trc ! MY_TRC SMS namelist |
---|
[8434] | 29 | USE trcnam_idtra ! Idealise tracer namelist |
---|
[8280] | 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 |
---|
[8280] | 60 | !! ( (PISCES, CFC, MY_TRC, MEDUSA, IDTRA, Age ) |
---|
[2038] | 61 | !!--------------------------------------------------------------------- |
---|
[8280] | 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 | |
---|
[8280] | 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 |
---|
| 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 |
---|
[8434] | 168 | |
---|
[2038] | 169 | IF( lk_cfc ) THEN ; CALL trc_nam_cfc ! CFC tracers |
---|
| 170 | ELSE ; IF(lwp) WRITE(numout,*) ' CFC not used' |
---|
| 171 | ENDIF |
---|
[8434] | 172 | |
---|
[7203] | 173 | IF( lk_c14b ) THEN ; CALL trc_nam_c14b ! C14 bomb tracers |
---|
| 174 | ELSE ; IF(lwp) WRITE(numout,*) ' C14 not used' |
---|
[2038] | 175 | ENDIF |
---|
[8434] | 176 | |
---|
[8280] | 177 | IF( lk_age ) THEN ; CALL trc_nam_age ! AGE tracer |
---|
| 178 | ELSE ; IF(lwp) WRITE(numout,*) ' AGE not used' |
---|
| 179 | ENDIF |
---|
[8434] | 180 | |
---|
[7203] | 181 | IF( lk_my_trc ) THEN ; CALL trc_nam_my_trc ! MY_TRC tracers |
---|
| 182 | ELSE ; IF(lwp) WRITE(numout,*) ' MY_TRC not used' |
---|
[2038] | 183 | ENDIF |
---|
[8434] | 184 | |
---|
| 185 | IF( lk_idtra ) THEN ; CALL trc_nam_idtra ! Idealize tracers |
---|
| 186 | ELSE ; IF(lwp) WRITE(numout,*) ' Idealize tracers not used' |
---|
| 187 | ENDIF |
---|
| 188 | |
---|
| 189 | IF( lk_medusa ) THEN ; CALL trc_nam_medusa ! MEDUSA tracers |
---|
| 190 | ELSE ; IF(lwp) WRITE(numout,*) ' MEDUSA not used' |
---|
| 191 | ENDIF |
---|
| 192 | ! |
---|
[2038] | 193 | END SUBROUTINE trc_nam |
---|
| 194 | |
---|
[4152] | 195 | SUBROUTINE trc_nam_run |
---|
| 196 | !!--------------------------------------------------------------------- |
---|
| 197 | !! *** ROUTINE trc_nam *** |
---|
| 198 | !! |
---|
| 199 | !! ** Purpose : read options for the passive tracer run (namelist) |
---|
| 200 | !! |
---|
| 201 | !!--------------------------------------------------------------------- |
---|
| 202 | NAMELIST/namtrc_run/ nn_dttrc, nn_writetrc, ln_rsttr, nn_rsttr, ln_top_euler, & |
---|
[5341] | 203 | & cn_trcrst_indir, cn_trcrst_outdir, cn_trcrst_in, cn_trcrst_out |
---|
[4152] | 204 | |
---|
[5341] | 205 | |
---|
[4154] | 206 | INTEGER :: ios ! Local integer output status for namelist read |
---|
| 207 | |
---|
[4152] | 208 | !!--------------------------------------------------------------------- |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | IF(lwp) WRITE(numout,*) 'trc_nam : read the passive tracer namelists' |
---|
| 212 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
| 213 | |
---|
[4290] | 214 | CALL ctl_opn( numnat_ref, 'namelist_top_ref' , 'OLD' , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) |
---|
| 215 | CALL ctl_opn( numnat_cfg, 'namelist_top_cfg' , 'OLD' , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) |
---|
[4624] | 216 | IF(lwm) CALL ctl_opn( numont, 'output.namelist.top', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., 1 ) |
---|
[4152] | 217 | |
---|
| 218 | REWIND( numnat_ref ) ! Namelist namtrc in reference namelist : Passive tracer variables |
---|
| 219 | READ ( numnat_ref, namtrc_run, IOSTAT = ios, ERR = 901) |
---|
| 220 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) |
---|
| 221 | |
---|
| 222 | REWIND( numnat_cfg ) ! Namelist namtrc in configuration namelist : Passive tracer variables |
---|
| 223 | READ ( numnat_cfg, namtrc_run, IOSTAT = ios, ERR = 902 ) |
---|
| 224 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) |
---|
[4624] | 225 | IF(lwm) WRITE ( numont, namtrc_run ) |
---|
[4152] | 226 | |
---|
| 227 | ! computes the first time step of tracer model |
---|
| 228 | nittrc000 = nit000 + nn_dttrc - 1 |
---|
| 229 | |
---|
| 230 | IF(lwp) THEN ! control print |
---|
| 231 | WRITE(numout,*) |
---|
[4159] | 232 | WRITE(numout,*) ' Namelist : namtrc_run' |
---|
[4152] | 233 | WRITE(numout,*) ' time step freq. for passive tracer nn_dttrc = ', nn_dttrc |
---|
| 234 | WRITE(numout,*) ' restart for passive tracer ln_rsttr = ', ln_rsttr |
---|
| 235 | WRITE(numout,*) ' control of time step for passive tracer nn_rsttr = ', nn_rsttr |
---|
| 236 | WRITE(numout,*) ' first time step for pass. trac. nittrc000 = ', nittrc000 |
---|
[4159] | 237 | WRITE(numout,*) ' frequency of outputs for passive tracers nn_writetrc = ', nn_writetrc |
---|
| 238 | WRITE(numout,*) ' Use euler integration for TRC (y/n) ln_top_euler = ', ln_top_euler |
---|
[4152] | 239 | WRITE(numout,*) ' ' |
---|
[8280] | 240 | CALL flush(numout) |
---|
[4152] | 241 | ENDIF |
---|
| 242 | ! |
---|
| 243 | END SUBROUTINE trc_nam_run |
---|
| 244 | |
---|
[5385] | 245 | SUBROUTINE trc_nam_ice |
---|
| 246 | !!--------------------------------------------------------------------- |
---|
| 247 | !! *** ROUTINE trc_nam_ice *** |
---|
| 248 | !! |
---|
| 249 | !! ** Purpose : Read the namelist for the ice effect on tracers |
---|
| 250 | !! |
---|
| 251 | !! ** Method : - |
---|
| 252 | !! |
---|
| 253 | !!--------------------------------------------------------------------- |
---|
| 254 | ! --- Variable declarations --- ! |
---|
| 255 | INTEGER :: jn ! dummy loop indices |
---|
| 256 | INTEGER :: ios ! Local integer output status for namelist read |
---|
[4152] | 257 | |
---|
[5385] | 258 | ! --- Namelist declarations --- ! |
---|
| 259 | TYPE(TRC_I_NML), DIMENSION(jptra) :: sn_tri_tracer |
---|
| 260 | NAMELIST/namtrc_ice/ nn_ice_tr, sn_tri_tracer |
---|
| 261 | |
---|
| 262 | IF(lwp) THEN |
---|
| 263 | WRITE(numout,*) |
---|
| 264 | WRITE(numout,*) 'trc_nam_ice : Read the namelist for trc_ice' |
---|
| 265 | WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' |
---|
| 266 | ENDIF |
---|
| 267 | |
---|
| 268 | IF( nn_timing == 1 ) CALL timing_start('trc_nam_ice') |
---|
| 269 | |
---|
| 270 | ! |
---|
| 271 | REWIND( numnat_ref ) ! Namelist namtrc_ice in reference namelist : Passive tracer input data |
---|
| 272 | READ ( numnat_ref, namtrc_ice, IOSTAT = ios, ERR = 901) |
---|
| 273 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtrc_ice in reference namelist ', lwp ) |
---|
| 274 | |
---|
| 275 | REWIND( numnat_cfg ) ! Namelist namtrc_ice in configuration namelist : Pisces external sources of nutrients |
---|
| 276 | READ ( numnat_cfg, namtrc_ice, IOSTAT = ios, ERR = 902 ) |
---|
| 277 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ice in configuration namelist', lwp ) |
---|
| 278 | |
---|
[5411] | 279 | IF( lwp ) THEN |
---|
| 280 | WRITE(numout,*) ' ' |
---|
| 281 | WRITE(numout,*) ' Sea ice tracers option (nn_ice_tr) : ', nn_ice_tr |
---|
| 282 | WRITE(numout,*) ' ' |
---|
| 283 | ENDIF |
---|
[5385] | 284 | |
---|
| 285 | ! Assign namelist stuff |
---|
| 286 | DO jn = 1, jptra |
---|
| 287 | trc_ice_ratio(jn) = sn_tri_tracer(jn)%trc_ratio |
---|
| 288 | trc_ice_prescr(jn) = sn_tri_tracer(jn)%trc_prescr |
---|
| 289 | cn_trc_o (jn) = sn_tri_tracer(jn)%ctrc_o |
---|
| 290 | END DO |
---|
| 291 | |
---|
| 292 | IF( nn_timing == 1 ) CALL timing_stop('trc_nam_ice') |
---|
| 293 | ! |
---|
| 294 | END SUBROUTINE trc_nam_ice |
---|
| 295 | |
---|
[4152] | 296 | SUBROUTINE trc_nam_trc |
---|
| 297 | !!--------------------------------------------------------------------- |
---|
| 298 | !! *** ROUTINE trc_nam *** |
---|
| 299 | !! |
---|
| 300 | !! ** Purpose : read options for the passive tracer run (namelist) |
---|
| 301 | !! |
---|
| 302 | !!--------------------------------------------------------------------- |
---|
| 303 | TYPE(PTRACER), DIMENSION(jptra) :: sn_tracer ! type of tracer for saving if not key_iomput |
---|
| 304 | !! |
---|
| 305 | NAMELIST/namtrc/ sn_tracer, ln_trcdta,ln_trcdmp, ln_trcdmp_clo |
---|
[4154] | 306 | |
---|
| 307 | INTEGER :: ios ! Local integer output status for namelist read |
---|
| 308 | INTEGER :: jn ! dummy loop indice |
---|
[4152] | 309 | !!--------------------------------------------------------------------- |
---|
| 310 | IF(lwp) WRITE(numout,*) |
---|
| 311 | IF(lwp) WRITE(numout,*) 'trc_nam : read the passive tracer namelists' |
---|
| 312 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
| 313 | |
---|
| 314 | |
---|
| 315 | REWIND( numnat_ref ) ! Namelist namtrc in reference namelist : Passive tracer variables |
---|
| 316 | READ ( numnat_ref, namtrc, IOSTAT = ios, ERR = 901) |
---|
| 317 | 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in reference namelist', lwp ) |
---|
| 318 | |
---|
| 319 | REWIND( numnat_cfg ) ! Namelist namtrc in configuration namelist : Passive tracer variables |
---|
| 320 | READ ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 ) |
---|
| 321 | 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp ) |
---|
[4624] | 322 | IF(lwm) WRITE ( numont, namtrc ) |
---|
[4152] | 323 | |
---|
| 324 | DO jn = 1, jptra |
---|
| 325 | ctrcnm (jn) = TRIM( sn_tracer(jn)%clsname ) |
---|
| 326 | ctrcln (jn) = TRIM( sn_tracer(jn)%cllname ) |
---|
| 327 | ctrcun (jn) = TRIM( sn_tracer(jn)%clunit ) |
---|
| 328 | ln_trc_ini(jn) = sn_tracer(jn)%llinit |
---|
| 329 | ln_trc_wri(jn) = sn_tracer(jn)%llsave |
---|
| 330 | END DO |
---|
[8434] | 331 | |
---|
[4152] | 332 | END SUBROUTINE trc_nam_trc |
---|
| 333 | |
---|
| 334 | |
---|
| 335 | SUBROUTINE trc_nam_dia |
---|
| 336 | !!--------------------------------------------------------------------- |
---|
| 337 | !! *** ROUTINE trc_nam_dia *** |
---|
| 338 | !! |
---|
| 339 | !! ** Purpose : read options for the passive tracer diagnostics |
---|
| 340 | !! |
---|
| 341 | !! ** Method : - read passive tracer namelist |
---|
| 342 | !! - read namelist of each defined SMS model |
---|
| 343 | !! ( (PISCES, CFC, MY_TRC ) |
---|
| 344 | !!--------------------------------------------------------------------- |
---|
| 345 | INTEGER :: ierr |
---|
[4990] | 346 | #if defined key_trdmxl_trc || defined key_trdtrc |
---|
[4152] | 347 | NAMELIST/namtrc_trd/ nn_trd_trc, nn_ctls_trc, rn_ucf_trc, & |
---|
[4990] | 348 | & ln_trdmxl_trc_restart, ln_trdmxl_trc_instant, & |
---|
[4152] | 349 | & cn_trdrst_trc_in, cn_trdrst_trc_out, ln_trdtrc |
---|
| 350 | #endif |
---|
| 351 | NAMELIST/namtrc_dia/ ln_diatrc, ln_diabio, nn_writedia, nn_writebio |
---|
| 352 | |
---|
[4154] | 353 | INTEGER :: ios ! Local integer output status for namelist read |
---|
[4152] | 354 | !!--------------------------------------------------------------------- |
---|
| 355 | |
---|
| 356 | IF(lwp) WRITE(numout,*) |
---|
| 357 | IF(lwp) WRITE(numout,*) 'trc_nam_dia : read the passive tracer diagnostics options' |
---|
| 358 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
| 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 | REWIND( numnat_ref ) ! Namelist namtrc_dia in reference namelist : Passive tracer diagnostics |
---|
| 365 | READ ( numnat_ref, namtrc_dia, IOSTAT = ios, ERR = 903) |
---|
| 366 | 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in reference namelist', lwp ) |
---|
| 367 | |
---|
| 368 | REWIND( numnat_cfg ) ! Namelist namtrc_dia in configuration namelist : Passive tracer diagnostics |
---|
| 369 | READ ( numnat_cfg, namtrc_dia, IOSTAT = ios, ERR = 904 ) |
---|
| 370 | 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in configuration namelist', lwp ) |
---|
[4624] | 371 | IF(lwm) WRITE ( numont, namtrc_dia ) |
---|
[4152] | 372 | |
---|
| 373 | IF(lwp) THEN |
---|
| 374 | WRITE(numout,*) |
---|
| 375 | WRITE(numout,*) |
---|
| 376 | WRITE(numout,*) ' Namelist : namtrc_dia' |
---|
| 377 | WRITE(numout,*) ' save additionnal diagnostics arrays ln_diatrc = ', ln_diatrc |
---|
| 378 | WRITE(numout,*) ' save additionnal biology diagnostics arrays ln_diabio = ', ln_diabio |
---|
| 379 | WRITE(numout,*) ' frequency of outputs for additional arrays nn_writedia = ', nn_writedia |
---|
| 380 | WRITE(numout,*) ' frequency of outputs for biological trends nn_writebio = ', nn_writebio |
---|
| 381 | WRITE(numout,*) ' ' |
---|
[8280] | 382 | CALL flush(numout) |
---|
[4152] | 383 | ENDIF |
---|
[8434] | 384 | |
---|
[8280] | 385 | IF( ( ln_diatrc .AND. .NOT. lk_iomput ) .OR. ( ln_diatrc .AND. lk_medusa ) ) THEN |
---|
[4152] | 386 | ALLOCATE( trc2d(jpi,jpj,jpdia2d), trc3d(jpi,jpj,jpk,jpdia3d), & |
---|
| 387 | & ctrc2d(jpdia2d), ctrc2l(jpdia2d), ctrc2u(jpdia2d) , & |
---|
| 388 | & ctrc3d(jpdia3d), ctrc3l(jpdia3d), ctrc3u(jpdia3d) , STAT = ierr ) |
---|
| 389 | IF( ierr > 0 ) CALL ctl_stop( 'STOP', 'trcnam: unable to allocate add. diag. array' ) |
---|
| 390 | ! |
---|
| 391 | trc2d(:,:,: ) = 0._wp ; ctrc2d(:) = ' ' ; ctrc2l(:) = ' ' ; ctrc2u(:) = ' ' |
---|
| 392 | trc3d(:,:,:,:) = 0._wp ; ctrc3d(:) = ' ' ; ctrc3l(:) = ' ' ; ctrc3u(:) = ' ' |
---|
| 393 | ! |
---|
| 394 | ENDIF |
---|
| 395 | |
---|
| 396 | IF( ( ln_diabio .AND. .NOT. lk_iomput ) .OR. l_trdtrc ) THEN |
---|
| 397 | ALLOCATE( trbio (jpi,jpj,jpk,jpdiabio) , & |
---|
| 398 | & ctrbio(jpdiabio), ctrbil(jpdiabio), ctrbiu(jpdiabio), STAT = ierr ) |
---|
| 399 | IF( ierr > 0 ) CALL ctl_stop( 'STOP', 'trcnam: unable to allocate bio. diag. array' ) |
---|
| 400 | ! |
---|
| 401 | trbio(:,:,:,:) = 0._wp ; ctrbio(:) = ' ' ; ctrbil(:) = ' ' ; ctrbiu(:) = ' ' |
---|
| 402 | ! |
---|
| 403 | ENDIF |
---|
| 404 | ! |
---|
| 405 | END SUBROUTINE trc_nam_dia |
---|
| 406 | |
---|
[2038] | 407 | #else |
---|
| 408 | !!---------------------------------------------------------------------- |
---|
| 409 | !! Dummy module : No passive tracer |
---|
| 410 | !!---------------------------------------------------------------------- |
---|
| 411 | CONTAINS |
---|
| 412 | SUBROUTINE trc_nam ! Empty routine |
---|
| 413 | END SUBROUTINE trc_nam |
---|
[4152] | 414 | SUBROUTINE trc_nam_run ! Empty routine |
---|
| 415 | END SUBROUTINE trc_nam_run |
---|
[2038] | 416 | #endif |
---|
| 417 | |
---|
[2104] | 418 | !!---------------------------------------------------------------------- |
---|
[2287] | 419 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
[5341] | 420 | !! $Id$ |
---|
[2287] | 421 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[2038] | 422 | !!====================================================================== |
---|
[6487] | 423 | END MODULE trcnam |
---|