- 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/SAS_SRC/nemogcm.F90
r3769 r4147 151 151 !!---------------------------------------------------------------------- 152 152 INTEGER :: ji ! dummy loop indices 153 INTEGER :: ilocal_comm ! local integer 153 INTEGER :: ilocal_comm ! local integer 154 INTEGER :: ios 155 154 156 CHARACTER(len=80), DIMENSION(16) :: cltxt 155 157 !! … … 157 159 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 158 160 & nn_bench, nn_timing 159 !!---------------------------------------------------------------------- 160 ! 161 cltxt = '' 162 ! 163 ! ! open Namelist file 164 CALL ctl_opn( numnam, 'namelist', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 165 ! 166 READ( numnam, namctl ) ! Namelist namctl : Control prints & Benchmark 167 ! 161 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 162 & jpizoom, jpjzoom, jperio 163 !!---------------------------------------------------------------------- 164 ! 165 cltxt = '' ! 166 ! ! Open reference namelist and configuration namelist files 167 CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 168 CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 169 CALL ctl_opn( numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 170 ! 171 REWIND( numnam_ref ) ! Namelist namctl in reference namelist : Control prints & Benchmark 172 READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 173 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', lwp ) 174 175 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist : Control prints & Benchmark 176 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 177 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', lwp ) 178 WRITE( numond, namctl ) 179 ! 180 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist : Control prints & Benchmark 181 READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 182 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', lwp ) 183 184 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist : Control prints & Benchmark 185 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 186 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', lwp ) 187 WRITE( numond, namcfg ) 168 188 ! !--------------------------------------------! 169 189 ! ! set communicator & select the local node ! … … 173 193 CALL xios_initialize( "nemo",return_comm=ilocal_comm ) 174 194 ENDIF 175 narea = mynode ( cltxt, numnam, nstop, ilocal_comm )! Nodes selection195 narea = mynode ( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection 176 196 #else 177 197 ilocal_comm = 0 178 narea = mynode( cltxt, numnam , nstop )! Nodes selection (control print return in cltxt)198 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection (control print return in cltxt) 179 199 #endif 180 200 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) … … 300 320 jsplt = nn_jsplt 301 321 nbench = nn_bench 322 323 IF(lwp) THEN ! control print 324 WRITE(numout,*) 325 WRITE(numout,*) 'namcfg : configuration initialization through namelist read' 326 WRITE(numout,*) '~~~~~~~ ' 327 WRITE(numout,*) ' Namelist namcfg' 328 WRITE(numout,*) ' configuration name cp_cfg = ', TRIM(cp_cfg) 329 WRITE(numout,*) ' configuration zoom name cp_cfz = ', TRIM(cp_cfz) 330 WRITE(numout,*) ' configuration resolution jp_cfg = ', jp_cfg 331 WRITE(numout,*) ' 1st lateral dimension ( >= jpi ) jpidta = ', jpidta 332 WRITE(numout,*) ' 2nd " " ( >= jpj ) jpjdta = ', jpjdta 333 WRITE(numout,*) ' 3nd " " jpkdta = ', jpkdta 334 WRITE(numout,*) ' 1st dimension of global domain in i jpiglo = ', jpiglo 335 WRITE(numout,*) ' 2nd - - in j jpjglo = ', jpjglo 336 WRITE(numout,*) ' left bottom i index of the zoom (in data domain) jpizoom = ', jpizoom 337 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 338 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 339 ENDIF 302 340 ! ! Parameter control 303 341 ! … … 343 381 CASE ( 'gyre' ) ; CALL ctl_warn( ' The Benchmark is activated ' ) 344 382 CASE DEFAULT ; CALL ctl_stop( ' The Benchmark is based on the GYRE configuration:', & 345 & ' key_gyre must be usedor set nbench = 0' )383 & ' cp_cfg="gyre" in namelist &namcfg or set nbench = 0' ) 346 384 END SELECT 347 385 ENDIF … … 361 399 CALL iom_close ! close all input/output files managed by iom_* 362 400 ! 363 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file 364 IF( numnam /= -1 ) CLOSE( numnam ) ! oce namelist 365 IF( numnam_ice /= -1 ) CLOSE( numnam_ice ) ! ice namelist 366 IF( numevo_ice /= -1 ) CLOSE( numevo_ice ) ! ice variables (temp. evolution) 367 IF( numout /= 6 ) CLOSE( numout ) ! standard model output file 401 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file 402 IF( numnam_ref /= -1 ) CLOSE( numnam_ref ) ! oce reference namelist 403 IF( numnam_cfg /= -1 ) CLOSE( numnam_cfg ) ! oce configuration namelist 404 IF( numond /= -1 ) CLOSE( numond ) ! oce output namelist 405 IF( numnam_ice_ref /= -1 ) CLOSE( numnam_ice_ref ) ! ice reference namelist 406 IF( numnam_ice_cfg /= -1 ) CLOSE( numnam_ice_cfg ) ! ice configuration namelist 407 IF( numoni /= -1 ) CLOSE( numoni ) ! ice output namelist 408 IF( numevo_ice /= -1 ) CLOSE( numevo_ice ) ! ice variables (temp. evolution) 409 IF( numout /= 6 ) CLOSE( numout ) ! standard model output file 368 410 ! 369 411 numout = 6 ! redefine numout in case it is used after this point... … … 382 424 USE diawri , ONLY: dia_wri_alloc 383 425 USE dom_oce , ONLY: dom_oce_alloc 384 ! 385 INTEGER :: ierr 426 USE oce , ONLY : sshn, sshb, snwice_mass, snwice_mass_b, snwice_fmass 427 ! 428 INTEGER :: ierr,ierr4 386 429 !!---------------------------------------------------------------------- 387 430 ! … … 389 432 ierr = ierr + dom_oce_alloc () ! ocean domain 390 433 ierr = ierr + lib_mpp_alloc (numout) ! mpp exchanges 434 ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), & 435 & snwice_fmass(jpi,jpj), STAT= ierr4 ) 436 ierr = ierr + ierr4 391 437 ! 392 438 IF( lk_mpp ) CALL mpp_sum( ierr )
Note: See TracChangeset
for help on using the changeset viewer.