- Timestamp:
- 2013-11-04T12:51:55+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r3769 r4147 118 118 !!---------------------------------------------------------------------- 119 119 ! 120 120 121 #if defined key_agrif 121 122 CALL Agrif_Init_Grids() ! AGRIF: set the meshes … … 135 136 # endif 136 137 #endif 138 137 139 ! check that all process are still there... If some process have an error, 138 140 ! they will never enter in step and other processes will wait until the end of the cpu time! … … 161 163 162 164 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 165 163 166 #if defined key_agrif 164 167 CALL Agrif_Step( stp ) ! AGRIF: time stepping … … 166 169 CALL stp( istp ) ! standard time stepping 167 170 #endif 171 168 172 istp = istp + 1 169 173 IF( lk_mpp ) CALL mpp_max( nstop ) … … 218 222 INTEGER :: ji ! dummy loop indices 219 223 INTEGER :: ilocal_comm ! local integer 224 INTEGER :: ios 220 225 CHARACTER(len=80), DIMENSION(16) :: cltxt 221 226 !! 222 NAMELIST/namctl/ ln_ctl 227 NAMELIST/namctl/ ln_ctl, nn_print, nn_ictls, nn_ictle, & 223 228 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 224 229 & nn_bench, nn_timing 230 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 231 & jpizoom, jpjzoom, jperio 225 232 !!---------------------------------------------------------------------- 226 233 ! 227 234 cltxt = '' 228 235 ! 229 ! ! open Namelist file 230 CALL ctl_opn( numnam, 'namelist', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 231 ! 232 READ( numnam, namctl ) ! Namelist namctl : Control prints & Benchmark 236 ! ! Open reference namelist and configuration namelist files 237 CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 238 CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 239 CALL ctl_opn( numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 240 ! 241 REWIND( numnam_ref ) ! Namelist namctl in reference namelist : Control prints & Benchmark 242 READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 243 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', lwp ) 244 245 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist : Control prints & Benchmark 246 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 247 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', lwp ) 248 WRITE( numond, namctl ) 249 250 ! 251 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist : Control prints & Benchmark 252 READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 253 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', lwp ) 254 255 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist : Control prints & Benchmark 256 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 257 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', lwp ) 258 WRITE( numond, namcfg ) 259 ! Force values for AGRIF zoom (cf. agrif_user.F90) 260 #if defined key_agrif 261 IF( .NOT. Agrif_Root() ) THEN 262 jpiglo = nbcellsx + 2 + 2*nbghostcells 263 jpjglo = nbcellsy + 2 + 2*nbghostcells 264 jpi = ( jpiglo-2*jpreci + (jpni-1+0) ) / jpni + 2*jpreci 265 jpj = ( jpjglo-2*jprecj + (jpnj-1+0) ) / jpnj + 2*jprecj 266 jpidta = jpiglo 267 jpjdta = jpjglo 268 jpizoom = 1 269 jpjzoom = 1 270 nperio = 0 271 jperio = 0 272 ENDIF 273 #endif 233 274 ! 234 275 ! !--------------------------------------------! … … 244 285 # endif 245 286 ENDIF 246 narea = mynode( cltxt, numnam , nstop, ilocal_comm ) ! Nodes selection287 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection 247 288 #else 248 289 # if defined key_oasis3 || defined key_oasis4 … … 250 291 CALL cpl_prism_init( ilocal_comm ) ! nemo local communicator given by oasis 251 292 ENDIF 252 narea = mynode( cltxt, numnam , nstop, ilocal_comm ) ! Nodes selection (control print return in cltxt)293 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection (control print return in cltxt) 253 294 # else 254 295 ilocal_comm = 0 255 narea = mynode( cltxt, numnam , nstop ) ! Nodes selection (control print return in cltxt)296 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop ) ! Nodes selection (control print return in cltxt) 256 297 # endif 257 298 #endif … … 283 324 jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 284 325 #endif 326 ENDIF 285 327 jpk = jpkdta ! third dim 286 328 jpim1 = jpi-1 ! inner domain indices … … 288 330 jpkm1 = jpk-1 ! " " 289 331 jpij = jpi*jpj ! jpi x j 290 ENDIF291 332 292 333 IF(lwp) THEN ! open listing units … … 350 391 CALL sbc_init ! Forcings : surface module 351 392 ! ! Vertical physics 393 352 394 CALL zdf_init ! namelist read 395 353 396 CALL zdf_bfr_init ! bottom friction 397 354 398 IF( lk_zdfric ) CALL zdf_ric_init ! Richardson number dependent Kz 355 399 IF( lk_zdftke ) CALL zdf_tke_init ! TKE closure scheme … … 382 426 383 427 ! ! Misc. options 384 IF( nn_cla == 1 428 IF( nn_cla == 1 .AND. cp_cfg == 'orca' .AND. jp_cfg == 2 ) CALL cla_init ! Cross Land Advection 385 429 CALL icb_init( rdt, nit000) ! initialise icebergs instance 386 430 387 431 #if defined key_top 388 432 ! ! Passive tracers 389 433 CALL trc_init 390 434 #endif 391 ! ! Diagnostics 435 ! 436 437 ! Diagnostics 392 438 IF( lk_floats ) CALL flo_init ! drifting Floats 393 439 IF( lk_diaar5 ) CALL dia_ar5_init ! ar5 diag … … 441 487 jsplt = nn_jsplt 442 488 nbench = nn_bench 489 490 IF(lwp) THEN ! control print 491 WRITE(numout,*) 492 WRITE(numout,*) 'namcfg : configuration initialization through namelist read' 493 WRITE(numout,*) '~~~~~~~ ' 494 WRITE(numout,*) ' Namelist namcfg' 495 WRITE(numout,*) ' configuration name cp_cfg = ', TRIM(cp_cfg) 496 WRITE(numout,*) ' configuration zoom name cp_cfz = ', TRIM(cp_cfz) 497 WRITE(numout,*) ' configuration resolution jp_cfg = ', jp_cfg 498 WRITE(numout,*) ' 1st lateral dimension ( >= jpi ) jpidta = ', jpidta 499 WRITE(numout,*) ' 2nd " " ( >= jpj ) jpjdta = ', jpjdta 500 WRITE(numout,*) ' 3nd " " jpkdta = ', jpkdta 501 WRITE(numout,*) ' 1st dimension of global domain in i jpiglo = ', jpiglo 502 WRITE(numout,*) ' 2nd - - in j jpjglo = ', jpjglo 503 WRITE(numout,*) ' left bottom i index of the zoom (in data domain) jpizoom = ', jpizoom 504 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 505 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 506 ENDIF 443 507 ! ! Parameter control 444 508 ! … … 484 548 CASE ( 'gyre' ) ; CALL ctl_warn( ' The Benchmark is activated ' ) 485 549 CASE DEFAULT ; CALL ctl_stop( ' The Benchmark is based on the GYRE configuration:', & 486 & ' key_gyre must be usedor set nbench = 0' )550 & ' cp_cfg = "gyre" in namelist &namcfg or set nbench = 0' ) 487 551 END SELECT 488 552 ENDIF … … 510 574 CALL iom_close ! close all input/output files managed by iom_* 511 575 ! 512 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file 513 IF( numsol /= -1 ) CLOSE( numsol ) ! solver file 514 IF( numnam /= -1 ) CLOSE( numnam ) ! oce namelist 515 IF( numnam_ice /= -1 ) CLOSE( numnam_ice ) ! ice namelist 516 IF( numevo_ice /= -1 ) CLOSE( numevo_ice ) ! ice variables (temp. evolution) 517 IF( numout /= 6 ) CLOSE( numout ) ! standard model output file 518 IF( numdct_vol /= -1 ) CLOSE( numdct_vol ) ! volume transports 519 IF( numdct_heat /= -1 ) CLOSE( numdct_heat ) ! heat transports 520 IF( numdct_salt /= -1 ) CLOSE( numdct_salt ) ! salt transports 576 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file 577 IF( numsol /= -1 ) CLOSE( numsol ) ! solver file 578 IF( numnam_ref /= -1 ) CLOSE( numnam_ref ) ! oce reference namelist 579 IF( numnam_cfg /= -1 ) CLOSE( numnam_cfg ) ! oce configuration namelist 580 IF( numond /= -1 ) CLOSE( numond ) ! oce output namelist 581 IF( numnam_ice_ref /= -1 ) CLOSE( numnam_ice_ref ) ! ice reference namelist 582 IF( numnam_ice_cfg /= -1 ) CLOSE( numnam_ice_cfg ) ! ice configuration namelist 583 IF( numoni /= -1 ) CLOSE( numoni ) ! ice output namelist 584 IF( numevo_ice /= -1 ) CLOSE( numevo_ice ) ! ice variables (temp. evolution) 585 IF( numout /= 6 ) CLOSE( numout ) ! standard model output file 586 IF( numdct_vol /= -1 ) CLOSE( numdct_vol ) ! volume transports 587 IF( numdct_heat /= -1 ) CLOSE( numdct_heat ) ! heat transports 588 IF( numdct_salt /= -1 ) CLOSE( numdct_salt ) ! salt transports 521 589 522 590 !
Note: See TracChangeset
for help on using the changeset viewer.