- Timestamp:
- 2016-10-03T18:23:58+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90
r6596 r6979 19 19 USE domcfg ! domain configuration (dom_cfg routine) 20 20 USE domain ! domain initialization from coordinate & bathymetry (dom_init routine) 21 USE domrea ! domain initialization from mesh_mask (dom_init routine)21 ! USE domrea ! domain initialization from mesh_mask (dom_init routine) 22 22 USE eosbn2 ! equation of state (eos bn2 routine) 23 23 ! ! ocean physics … … 54 54 USE sbc_oce, ONLY: ln_rnf 55 55 USE sbcrnf 56 USE usrdef_nam ! user defined configuration 57 56 58 57 59 IMPLICIT NONE … … 147 149 INTEGER :: ji ! dummy loop indices 148 150 INTEGER :: ilocal_comm ! local integer 149 INTEGER :: ios 150 LOGICAL :: llexist151 CHARACTER(len= 80), DIMENSION(16) :: cltxt151 INTEGER :: ios, inum 152 REAL(wp) :: ziglo, zjglo, zkglo, zperio ! local scalars 153 CHARACTER(len=120), DIMENSION(30) :: cltxt, cltxt2, clnam 152 154 !! 153 155 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 154 156 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 155 & nn_bench, nn_timing, nn_diacfl 156 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 157 & jperio, ln_use_jattr 158 !!---------------------------------------------------------------------- 159 cltxt = '' 157 & nn_timing, nn_diacfl 158 159 NAMELIST/namcfg/ ln_read_cfg, ln_write_cfg, cp_cfg, jp_cfg, ln_use_jattr 160 !!---------------------------------------------------------------------- 161 cltxt = '' 162 cltxt2 = '' 163 clnam = '' 160 164 cxios_context = 'nemo' 161 165 ! … … 181 185 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 182 186 187 188 ! !--------------------------! 189 ! ! Set global domain size ! (control print return in cltxt2) 190 ! !--------------------------! 191 IF( ln_read_cfg ) THEN ! Read sizes in configuration "mesh_mask" file 192 CALL iom_open( 'domain_cfg', inum ) 193 CALL iom_get( inum, 'jpiglo', ziglo ) ; jpiglo = INT( ziglo ) 194 CALL iom_get( inum, 'jpjglo', zjglo ) ; jpjglo = INT( zjglo ) 195 CALL iom_get( inum, 'jpkglo', zkglo ) ; jpkglo = INT( zkglo ) 196 CALL iom_get( inum, 'jperio', zperio ) ; jperio = INT( zperio ) 197 CALL iom_close( inum ) 198 WRITE(cltxt2(1),*) '~~~~~~~~~~ ' 199 WRITE(cltxt2(2),*) 'domain_cfg : domain size read in "domain_cfg" file : jp(i,j,k)glo = ' 200 WRITE(cltxt2(3),*) ' ', jpiglo, jpjglo, jpkglo 201 WRITE(cltxt2(1),*) '~~~~~~~~~~ lateral boudary type of the global domain jperio= ', jperio 202 ! 203 ELSE ! user-defined namelist 204 CALL usr_def_nam( cltxt2, clnam, jpiglo, jpjglo, jpkglo, jperio ) 205 ENDIF 206 jpk = jpkglo 183 207 ! 184 208 ! !--------------------------------------------! … … 206 230 WRITE( numond, namctl ) 207 231 WRITE( numond, namcfg ) 232 IF( .NOT.ln_read_cfg ) THEN 233 DO ji = 1, SIZE(clnam) 234 IF( TRIM(clnam (ji)) /= '' ) WRITE(numond, * ) clnam(ji) ! namusr_def print 235 END DO 236 ENDIF 208 237 ENDIF 209 238 … … 225 254 jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 226 255 jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 227 jpk = jpkdta ! third dim228 256 jpim1 = jpi-1 ! inner domain indices 229 257 jpjm1 = jpj-1 ! " " … … 274 302 CALL eos_init ! Equation of state 275 303 IF( lk_c1d ) CALL c1d_init ! 1D column configuration 304 276 305 CALL dom_cfg ! Domain configuration 277 ! 278 INQUIRE( FILE='coordinates.nc', EXIST = llexist ) ! Check if coordinate file exist 279 ! 280 IF( llexist ) THEN ; CALL dom_init ! compute the grid from coordinates and bathymetry 281 ELSE ; CALL dom_rea ! read grid from the meskmask 282 ENDIF 306 CALL dom_init ! Domain 307 283 308 CALL istate_init ! ocean initial state (Dynamics and tracers) 284 309 … … 315 340 !! *** ROUTINE nemo_ctl *** 316 341 !! 317 !! ** Purpose : control print setting 342 !! ** Purpose : control print setting 318 343 !! 319 344 !! ** Method : - print namctl information and check some consistencies 320 345 !!---------------------------------------------------------------------- 321 346 ! 322 IF(lwp) THEN ! Parameterprint347 IF(lwp) THEN ! control print 323 348 WRITE(numout,*) 324 WRITE(numout,*) 'nemo_ flg: Control prints & Benchmark'349 WRITE(numout,*) 'nemo_ctl: Control prints' 325 350 WRITE(numout,*) '~~~~~~~ ' 326 351 WRITE(numout,*) ' Namelist namctl' … … 333 358 WRITE(numout,*) ' number of proc. following i nn_isplt = ', nn_isplt 334 359 WRITE(numout,*) ' number of proc. following j nn_jsplt = ', nn_jsplt 335 WRITE(numout,*) ' benchmark parameter (0/1) nn_bench = ', nn_bench360 WRITE(numout,*) ' timing activated (0/1) nn_timing = ', nn_timing 336 361 ENDIF 337 362 ! … … 343 368 isplt = nn_isplt 344 369 jsplt = nn_jsplt 345 nbench = nn_bench 346 IF(lwp) THEN ! control print370 371 IF(lwp) THEN ! control print 347 372 WRITE(numout,*) 348 373 WRITE(numout,*) 'namcfg : configuration initialization through namelist read' 349 374 WRITE(numout,*) '~~~~~~~ ' 350 375 WRITE(numout,*) ' Namelist namcfg' 351 WRITE(numout,*) ' configuration name cp_cfg = ', TRIM(cp_cfg)352 WRITE(numout,*) ' configuration resolution jp_cfg = ', jp_cfg353 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio376 WRITE(numout,*) ' read configuration definition files ln_read_cfg = ', ln_read_cfg 377 WRITE(numout,*) ' configuration name cp_cfg = ', TRIM(cp_cfg) 378 WRITE(numout,*) ' configuration resolution jp_cfg = ', jp_cfg 354 379 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 355 380 ENDIF … … 357 382 ! 358 383 IF( ln_ctl ) THEN ! sub-domain area indices for the control prints 359 IF( lk_mpp ) THEN360 isplt = jpni ; jsplt = jpnj ; ijsplt = jpni*jpnj ! the domain is forced to the real split teddomain384 IF( lk_mpp .AND. jpnij > 1 ) THEN 385 isplt = jpni ; jsplt = jpnj ; ijsplt = jpni*jpnj ! the domain is forced to the real split domain 361 386 ELSE 362 387 IF( isplt == 1 .AND. jsplt == 1 ) THEN … … 393 418 ENDIF 394 419 ! 395 IF( lk_c1d .AND. .NOT.lk_iomput ) CALL ctl_stop( 'nemo_ctl: The 1D configuration must be used ', &396 & 'with the IOM Input/Output manager. ' , &397 & 'Compile with key_iomput enabled' )398 !399 420 IF( 1_wp /= SIGN(1._wp,-0._wp) ) CALL ctl_stop( 'nemo_ctl: The intrinsec SIGN function follows ', & 400 421 & 'f2003 standard. ' , & … … 419 440 IF( numnam_cfg /= -1 ) CLOSE( numnam_cfg ) ! oce configuration namelist 420 441 IF( numout /= 6 ) CLOSE( numout ) ! standard model output file 442 IF( lwm.AND.numond /= -1 ) CLOSE( numond ) ! oce output namelist 443 421 444 numout = 6 ! redefine numout in case it is used after this point... 422 445 !
Note: See TracChangeset
for help on using the changeset viewer.