Changeset 9019 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAO_SRC
- Timestamp:
- 2017-12-13T15:58:53+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAO_SRC/nemogcm.F90
r8528 r9019 93 93 INTEGER :: ji ! dummy loop indices 94 94 INTEGER :: ios, ilocal_comm ! local integer 95 INTEGER :: iiarea, ijarea ! local integers 96 INTEGER :: iirest, ijrest ! local integers 95 97 CHARACTER(len=120), DIMENSION(30) :: cltxt, cltxt2, clnam 96 98 ! 97 99 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 98 100 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & 99 & nn_timing, nn_diacfl101 & ln_timing, ln_diacfl 100 102 NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_write_cfg, cn_domcfg_out, ln_use_jattr 101 103 !!---------------------------------------------------------------------- … … 209 211 #endif 210 212 ENDIF 213 ! 214 #if defined key_agrif 215 IF( .NOT. Agrif_Root() ) THEN ! AGRIF children: specific setting (cf. agrif_user.F90) 216 jpiglo = nbcellsx + 2 + 2*nbghostcells 217 jpjglo = nbcellsy + 2 + 2*nbghostcells 218 jpi = ( jpiglo-2*nn_hls + (jpni-1+0) ) / jpni + 2*nn_hls 219 jpj = ( jpjglo-2*nn_hls + (jpnj-1+0) ) / jpnj + 2*nn_hls 220 jpimax = jpi 221 jpjmax = jpj 222 nperio = 0 223 jperio = 0 224 ln_use_jattr = .false. 225 ENDIF 226 #endif 211 227 212 228 IF( Agrif_Root() ) THEN ! AGRIF mother: specific setting from jpni and jpnj 229 iiarea = 1 + MOD( narea - 1 , jpni ) 230 ijarea = 1 + ( narea - 1 ) / jpni 231 iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) 232 ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) 213 233 #if defined key_nemocice_decomp 214 jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 215 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 234 jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls ! first dim. 235 jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls ! second dim. 236 jpimax = jpi 237 jpjmax = jpj 238 IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) 239 IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) 216 240 #else 217 jpi = ( jpiglo -2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 218 jpj = ( jpjglo -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 219 #endif 220 ENDIF 221 222 !!gm ??? why here it has already been done in line 301 ! 241 jpi = ( jpiglo -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls ! first dim. 242 jpj = ( jpjglo -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls ! second dim. 243 jpimax = jpi 244 jpjmax = jpj 245 IF( iiarea > iirest ) jpi = jpi - 1 246 IF( ijarea > ijrest ) jpj = jpj - 1 247 #endif 248 ENDIF 249 223 250 jpk = jpkglo ! third dim 224 !!gm end 251 252 #if defined key_agrif 253 ! simple trick to use same vertical grid as parent but different number of levels: 254 ! Save maximum number of levels in jpkglo, then define all vertical grids with this number. 255 ! Suppress once vertical online interpolation is ok 256 IF(.NOT.Agrif_Root()) jpkglo = Agrif_Parent( jpkglo ) 257 #endif 225 258 jpim1 = jpi-1 ! inner domain indices 226 259 jpjm1 = jpj-1 ! " " 227 jpkm1 = jpk-1! " "260 jpkm1 = MAX( 1, jpk-1 ) ! " " 228 261 jpij = jpi*jpj ! jpi x j 229 262 … … 259 292 ! !-------------------------------! 260 293 261 CALL nemo_ctl ! Control prints & Benchmark294 CALL nemo_ctl ! Control prints & Benchmark 262 295 263 296 ! ! Domain decomposition 264 IF( jpni*jpnj == jpnij ) THEN ; CALL mpp_init ! standard cutting out 265 ELSE ; CALL mpp_init2 ! eliminate land processors 266 ENDIF 267 ! 268 IF( nn_timing == 1 ) CALL timing_init 269 ! 270 ! ! General initialization 271 CALL phy_cst ! Physical constants 272 CALL eos_init ! Equation of state 273 CALL dom_init ! Domain 274 275 IF( ln_nnogather ) CALL nemo_northcomms ! Initialise the northfold neighbour lists (must be done after the masks are defined) 276 277 IF( ln_ctl ) CALL prt_ctl_init ! Print control 278 279 CALL istate_init ! ocean initial state (Dynamics and tracers) 297 CALL mpp_init 298 ! 299 IF( ln_timing ) CALL timing_init ! timing by routine 300 ! 301 ! ! General initialization 302 CALL phy_cst ! Physical constants 303 CALL eos_init ! Equation of state 304 CALL dom_init ! Domain 305 306 IF( ln_nnogather ) CALL nemo_northcomms ! Initialise the northfold neighbour lists (must be done after the masks are defined) 307 308 IF( ln_ctl ) CALL prt_ctl_init ! Print control 309 310 CALL istate_init ! ocean initial state (Dynamics and tracers) 280 311 END SUBROUTINE nemo_init 281 312 … … 303 334 WRITE(numout,*) ' number of proc. following i nn_isplt = ', nn_isplt 304 335 WRITE(numout,*) ' number of proc. following j nn_jsplt = ', nn_jsplt 305 WRITE(numout,*) ' timing activated (0/1) nn_timing = ', nn_timing 336 WRITE(numout,*) ' timing by routine ln_timing = ', ln_timing 337 WRITE(numout,*) ' CFL diagnostics ln_diacfl = ', ln_diacfl 306 338 ENDIF 307 339 ! … … 383 415 ! 384 416 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file 385 IF( num sol /= -1 ) CLOSE( numsol ) ! solverfile417 IF( numrun /= -1 ) CLOSE( numrun ) ! run statistics file 386 418 IF( numnam_ref /= -1 ) CLOSE( numnam_ref ) ! oce reference namelist 387 419 IF( numnam_cfg /= -1 ) CLOSE( numnam_cfg ) ! oce configuration namelist
Note: See TracChangeset
for help on using the changeset viewer.