- Timestamp:
- 2017-12-13T15:58:53+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r8583 r9019 31 31 USE icbini ! handle bergs, initialisation 32 32 USE icbstp ! handle bergs, calving, themodynamics and transport 33 USE bdyini ! open boundary cond. setting (bdy_init routine). clem: mandatory for LIM334 USE bdydta ! open boundary cond. setting (bdy_dta_init routine). clem: mandatory for LIM333 USE bdyini ! open boundary cond. setting (bdy_init routine). mandatory for sea-ice 34 USE bdydta ! open boundary cond. setting (bdy_dta_init routine). mandatory for sea-ice 35 35 ! 36 36 USE lib_mpp ! distributed memory computing … … 87 87 CALL Agrif_Declare_Var_top ! " " " " " TOP 88 88 # endif 89 # if defined key_lim290 CALL Agrif_Declare_Var_lim2 ! " " " " " LIM91 # endif92 89 # if defined key_lim3 93 90 CALL Agrif_Declare_Var_lim3 ! " " " " " LIM3 … … 135 132 ! 136 133 #if defined key_agrif 137 IF( .NOT. Agrif_Root() ) THEN138 134 CALL Agrif_ParentGrid_To_ChildGrid() 139 IF( nn_timing == 1) CALL timing_finalize135 IF( ln_timing ) CALL timing_finalize 140 136 CALL Agrif_ChildGrid_To_ParentGrid() 141 ENDIF 142 #endif 143 IF( nn_timing == 1 ) CALL timing_finalize 137 #endif 138 IF( ln_timing ) CALL timing_finalize 144 139 ! 145 140 CALL nemo_closefile … … 168 163 INTEGER :: ilocal_comm ! local integer 169 164 INTEGER :: ios, inum ! - - 165 INTEGER :: iiarea, ijarea ! local integers 166 INTEGER :: iirest, ijrest ! local integers 170 167 CHARACTER(len=120), DIMENSION(30) :: cltxt, cltxt2, clnam 171 168 CHARACTER(len=80) :: clname … … 173 170 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 174 171 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & 175 & nn_timing, nn_diacfl172 & ln_timing, ln_diacfl 176 173 NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_write_cfg, cn_domcfg_out, ln_use_jattr 177 174 !!---------------------------------------------------------------------- … … 221 218 ENDIF 222 219 ! 223 jpk = jpkglo224 !225 #if defined key_agrif226 IF( .NOT. Agrif_Root() ) THEN ! AGRIF children: specific setting (cf. agrif_user.F90)227 jpiglo = nbcellsx + 2 + 2*nbghostcells228 jpjglo = nbcellsy + 2 + 2*nbghostcells229 jpi = ( jpiglo-2*jpreci + (jpni-1+0) ) / jpni + 2*jpreci230 jpj = ( jpjglo-2*jprecj + (jpnj-1+0) ) / jpnj + 2*jprecj231 nperio = 0232 jperio = 0233 ln_use_jattr = .false.234 ENDIF235 #endif236 220 ! 237 221 ! !--------------------------------------------! … … 290 274 #endif 291 275 ENDIF 276 ! 277 #if defined key_agrif 278 IF( .NOT. Agrif_Root() ) THEN ! AGRIF children: specific setting (cf. agrif_user.F90) 279 jpiglo = nbcellsx + 2 + 2*nbghostcells 280 jpjglo = nbcellsy + 2 + 2*nbghostcells 281 jpi = ( jpiglo-2*nn_hls + (jpni-1+0) ) / jpni + 2*nn_hls 282 jpj = ( jpjglo-2*nn_hls + (jpnj-1+0) ) / jpnj + 2*nn_hls 283 jpimax = jpi 284 jpjmax = jpj 285 nperio = 0 286 jperio = 0 287 ln_use_jattr = .false. 288 ENDIF 289 #endif 292 290 293 291 IF( Agrif_Root() ) THEN ! AGRIF mother: specific setting from jpni and jpnj 292 iiarea = 1 + MOD( narea - 1 , jpni ) 293 ijarea = 1 + ( narea - 1 ) / jpni 294 iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) 295 ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) 294 296 #if defined key_nemocice_decomp 295 jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 296 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 297 jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls ! first dim. 298 jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls ! second dim. 299 jpimax = jpi 300 jpjmax = jpj 301 IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) 302 IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) 297 303 #else 298 jpi = ( jpiglo -2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 299 jpj = ( jpjglo -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 300 #endif 301 ENDIF 304 jpi = ( jpiglo -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls ! first dim. 305 jpj = ( jpjglo -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls ! second dim. 306 jpimax = jpi 307 jpjmax = jpj 308 IF( iiarea > iirest ) jpi = jpi - 1 309 IF( ijarea > ijrest ) jpj = jpj - 1 310 #endif 311 ENDIF 312 313 jpk = jpkglo ! third dim 302 314 303 315 #if defined key_agrif … … 350 362 351 363 ! ! Domain decomposition 352 IF( jpni*jpnj == jpnij ) THEN ; CALL mpp_init ! standard cutting out 353 ELSE ; CALL mpp_init2 ! eliminate land processors 354 ENDIF 355 ! 356 IF( nn_timing == 1 ) CALL timing_init 364 CALL mpp_init 365 ! 366 IF( ln_timing ) CALL timing_init 357 367 ! 358 368 ! ! General initialization 359 360 361 362 363 IF( ln_nnogather ) 364 365 IF( ln_ctl ) 366 369 CALL phy_cst ! Physical constants 370 CALL eos_init ! Equation of state 371 CALL dom_init ! Domain 372 373 IF( ln_nnogather ) CALL nemo_northcomms ! Initialise the northfold neighbour lists (must be done after the masks are defined) 374 375 IF( ln_ctl ) CALL prt_ctl_init ! Print control 376 CALL day_init ! model calendar (using both namelist and restart infos) 367 377 IF( ln_rstart ) CALL rst_read_open 368 378 369 370 371 ! ==> clem: open boundaries init. is mandatory for LIM3because ice BDY is not decoupled from379 CALL sbc_init ! Forcings : surface module 380 381 ! ==> clem: open boundaries init. is mandatory for sea-ice because ice BDY is not decoupled from 372 382 ! the environment of ocean BDY. Therefore bdy is called in both OPA and SAS modules. 373 383 ! This is not clean and should be changed in the future. 374 384 CALL bdy_init 375 385 ! ==> 376 386 CALL icb_init( rdt, nit000) ! initialise icebergs instance 377 387 378 388 IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler … … 403 413 WRITE(numout,*) ' number of proc. following i nn_isplt = ', nn_isplt 404 414 WRITE(numout,*) ' number of proc. following j nn_jsplt = ', nn_jsplt 405 WRITE(numout,*) ' timing activated (0/1) nn_timing = ', nn_timing 415 WRITE(numout,*) ' timing by routine ln_timing = ', ln_timing 416 WRITE(numout,*) ' CFL diagnostics ln_diacfl = ', ln_diacfl 406 417 ENDIF 407 418 ! … … 413 424 isplt = nn_isplt 414 425 jsplt = nn_jsplt 426 !!gm to be remove at the end of the 2017 merge party 427 if( ln_timing ) then ; nn_timing = 1 428 else ; nn_timing = 0 429 endif 430 !!gm end 415 431 416 432 IF(lwp) THEN ! control print … … 508 524 USE dom_oce , ONLY: dom_oce_alloc 509 525 USE bdy_oce , ONLY: ln_bdy, bdy_oce_alloc 510 USE oce ! clem: mandatory for LIM3because needed for bdy arrays526 USE oce ! mandatory for sea-ice because needed for bdy arrays 511 527 ! 512 528 INTEGER :: ierr … … 515 531 ierr = dia_wri_alloc () 516 532 ierr = ierr + dom_oce_alloc () ! ocean domain 517 ierr = ierr + oce_alloc () ! (tsn...) needed for agrif and/or lim3and bdy533 ierr = ierr + oce_alloc () ! (tsn...) needed for agrif and/or ESIM and bdy 518 534 ierr = ierr + bdy_oce_alloc () ! bdy masks (incl. initialization) 519 535 !
Note: See TracChangeset
for help on using the changeset viewer.