- 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/OPA_SRC/nemogcm.F90
r8570 r9019 50 50 USE usrdef_nam ! user defined configuration 51 51 USE tideini ! tidal components initialization (tide_ini routine) 52 USE bdy_oce, ONLY: ln_bdy52 USE bdy_oce, ONLY : ln_bdy 53 53 USE bdyini ! open boundary cond. setting (bdy_init routine) 54 54 USE istate ! initial state setting (istate_init routine) 55 55 USE ldfdyn ! lateral viscosity setting (ldfdyn_init routine) 56 56 USE ldftra ! lateral diffusivity setting (ldftra_init routine) 57 USE zdfini ! vertical physics setting (zdf_init routine)58 57 USE trdini ! dyn/tra trends initialization (trd_init routine) 59 58 USE asminc ! assimilation increments … … 140 139 CALL Agrif_Declare_Var_top ! " " " " " TOP 141 140 # endif 142 # if defined key_lim2143 CALL Agrif_Declare_Var_lim2 ! " " " " " LIM2144 # endif145 141 # if defined key_lim3 146 142 CALL Agrif_Declare_Var_lim3 ! " " " " " LIM3 … … 206 202 ! 207 203 #if defined key_agrif 208 CALL Agrif_ParentGrid_To_ChildGrid() 209 IF( ln_diaobs ) CALL dia_obs_wri 210 IF( nn_timing == 1 ) CALL timing_finalize 211 CALL Agrif_ChildGrid_To_ParentGrid() 212 #endif 213 IF( nn_timing == 1 ) CALL timing_finalize 204 IF( .NOT. Agrif_Root() ) THEN 205 CALL Agrif_ParentGrid_To_ChildGrid() 206 IF( ln_diaobs ) CALL dia_obs_wri 207 IF( nn_timing == 1 ) CALL timing_finalize 208 CALL Agrif_ChildGrid_To_ParentGrid() 209 ENDIF 210 #endif 211 IF( ln_timing ) CALL timing_finalize 214 212 ! 215 213 CALL nemo_closefile … … 237 235 INTEGER :: ji ! dummy loop indices 238 236 INTEGER :: ios, ilocal_comm ! local integer 237 INTEGER :: iiarea, ijarea ! local integers 238 INTEGER :: iirest, ijrest ! local integers 239 239 CHARACTER(len=120), DIMENSION(30) :: cltxt, cltxt2, clnam 240 240 ! 241 241 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, & 242 242 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & 243 & nn_timing, nn_diacfl243 & ln_timing, ln_diacfl 244 244 NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_write_cfg, cn_domcfg_out, ln_use_jattr 245 245 !!---------------------------------------------------------------------- … … 280 280 ENDIF 281 281 ! 282 jpk = jpkglo283 !284 #if defined key_agrif285 IF( .NOT. Agrif_Root() ) THEN ! AGRIF children: specific setting (cf. agrif_user.F90)286 jpiglo = nbcellsx + 2 + 2*nbghostcells287 jpjglo = nbcellsy + 2 + 2*nbghostcells288 jpi = ( jpiglo-2*jpreci + (jpni-1+0) ) / jpni + 2*jpreci289 jpj = ( jpjglo-2*jprecj + (jpnj-1+0) ) / jpnj + 2*jprecj290 nperio = 0291 jperio = 0292 ln_use_jattr = .false.293 ENDIF294 #endif295 282 ! 296 283 ! !--------------------------------------------! … … 351 338 #endif 352 339 ENDIF 340 ! 341 #if defined key_agrif 342 IF( .NOT. Agrif_Root() ) THEN ! AGRIF children: specific setting (cf. agrif_user.F90) 343 jpiglo = nbcellsx + 2 + 2*nbghostcells 344 jpjglo = nbcellsy + 2 + 2*nbghostcells 345 jpi = ( jpiglo-2*nn_hls + (jpni-1+0) ) / jpni + 2*nn_hls 346 jpj = ( jpjglo-2*nn_hls + (jpnj-1+0) ) / jpnj + 2*nn_hls 347 jpimax = jpi 348 jpjmax = jpj 349 nperio = 0 350 jperio = 0 351 ln_use_jattr = .false. 352 ENDIF 353 #endif 353 354 354 355 IF( Agrif_Root() ) THEN ! AGRIF mother: specific setting from jpni and jpnj 356 iiarea = 1 + MOD( narea - 1 , jpni ) 357 ijarea = 1 + ( narea - 1 ) / jpni 358 iirest = 1 + MOD( jpiglo - 2*nn_hls - 1 , jpni ) 359 ijrest = 1 + MOD( jpjglo - 2*nn_hls - 1 , jpnj ) 355 360 #if defined key_nemocice_decomp 356 jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 357 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 361 jpi = ( nx_global+2-2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls ! first dim. 362 jpj = ( ny_global+2-2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls ! second dim. 363 jpimax = jpi 364 jpjmax = jpj 365 IF( iiarea == jpni ) jpi = jpiglo - (jpni - 1) * (jpi - 2*nn_hls) 366 IF( ijarea == jpnj ) jpj = jpjglo - (jpnj - 1) * (jpj - 2*nn_hls) 358 367 #else 359 jpi = ( jpiglo -2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 360 jpj = ( jpjglo -2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 361 #endif 362 ENDIF 363 364 !!gm ??? why here it has already been done in line 301 ! 368 jpi = ( jpiglo -2*nn_hls + (jpni-1) ) / jpni + 2*nn_hls ! first dim. 369 jpj = ( jpjglo -2*nn_hls + (jpnj-1) ) / jpnj + 2*nn_hls ! second dim. 370 jpimax = jpi 371 jpjmax = jpj 372 IF( iiarea > iirest ) jpi = jpi - 1 373 IF( ijarea > ijrest ) jpj = jpj - 1 374 #endif 375 ENDIF 376 365 377 jpk = jpkglo ! third dim 366 !!gm end367 378 368 379 #if defined key_agrif … … 411 422 412 423 ! ! Domain decomposition 413 IF( jpni*jpnj == jpnij ) THEN ; CALL mpp_init ! standard cutting out 414 ELSE ; CALL mpp_init2 ! eliminate land processors 415 ENDIF 416 ! 417 IF( nn_timing == 1 ) CALL timing_init 424 CALL mpp_init 425 IF( ln_nnogather ) CALL nemo_northcomms! northfold neighbour lists 426 ! 427 IF( ln_timing ) CALL timing_init 418 428 ! 419 429 ! ! General initialization 420 CALL phy_cst ! Physical constants 421 CALL eos_init ! Equation of state 422 IF( lk_c1d ) CALL c1d_init ! 1D column configuration 423 CALL wad_init ! Wetting and drying options 424 CALL dom_init ! Domain 425 IF( ln_crs ) CALL crs_init ! coarsened grid: domain initialization 426 IF( ln_nnogather ) CALL nemo_northcomms! northfold neighbour lists (must be done after the masks are defined) 427 IF( ln_ctl ) CALL prt_ctl_init ! Print control 430 CALL phy_cst ! Physical constants 431 CALL eos_init ! Equation of state 432 IF( lk_c1d ) CALL c1d_init ! 1D column configuration 433 CALL wad_init ! Wetting and drying options 434 CALL dom_init ! Domain 435 IF( ln_crs ) CALL crs_init ! coarsened grid: domain initialization 436 IF( ln_ctl ) CALL prt_ctl_init ! Print control 428 437 429 CALL diurnal_sst_bulk_init ! diurnal sst438 CALL diurnal_sst_bulk_init ! diurnal sst 430 439 IF ( ln_diurnal ) CALL diurnal_sst_coolskin_init ! cool skin 431 440 432 441 ! IF ln_diurnal_only, then we only want a subset of the initialisation routines 433 IF 442 IF( ln_diurnal_only ) THEN 434 443 CALL istate_init ! ocean initial state (Dynamics and tracers) 435 444 CALL sbc_init ! Forcings : surface module 436 445 CALL tra_qsr_init ! penetrative solar radiation qsr 437 IF( ln_diaobs ) THEN! Observation & model comparison438 CALL dia_obs_init ! Initialize observational data439 CALL dia_obs( nit000 - 1 ) ! Observation operator for restart446 IF( ln_diaobs ) THEN ! Observation & model comparison 447 CALL dia_obs_init ! Initialize observational data 448 CALL dia_obs( nit000 - 1 ) ! Observation operator for restart 440 449 ENDIF 441 450 ! ! Assimilation increments 442 IF( lk_asminc 451 IF( lk_asminc ) CALL asm_inc_init ! Initialize assimilation increments 443 452 444 453 IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler … … 446 455 ENDIF 447 456 448 457 CALL istate_init ! ocean initial state (Dynamics and tracers) 449 458 450 459 ! ! external forcing 451 !!gm to be added : creation and call of sbc_apr_init 452 !==> cbr: sbc_apr_init in sbcmod as sbc_rnf_init 453 CALL tide_init ! tidal harmonics 454 CALL sbc_init ! surface boundary conditions (including sea-ice) 455 CALL bdy_init ! Open boundaries initialisation 460 CALL tide_init ! tidal harmonics 461 CALL sbc_init ! surface boundary conditions (including sea-ice) 462 CALL bdy_init ! Open boundaries initialisation 463 456 464 ! ! Ocean physics 457 ! ! Vertical physics 458 CALL zdf_init ! namelist read 459 CALL zdf_bfr_init ! bottom friction 460 IF( lk_zdfric ) CALL zdf_ric_init ! Richardson number dependent Kz 461 IF( lk_zdftke ) CALL zdf_tke_init ! TKE closure scheme 462 IF( lk_zdfgls ) CALL zdf_gls_init ! GLS closure scheme 463 IF( lk_zdftmx ) CALL zdf_tmx_init ! tidal vertical mixing 464 IF( lk_zdfddm ) CALL zdf_ddm_init ! double diffusive mixing 465 465 CALL zdf_phy_init ! Vertical physics 466 466 467 ! ! Lateral physics 467 CALL ldf_tra_init ! Lateral ocean tracer physics 468 CALL ldf_eiv_init ! eddy induced velocity param. 469 CALL ldf_dyn_init ! Lateral ocean momentum physics 470 471 ! ! Active tracers 472 CALL tra_qsr_init ! penetrative solar radiation qsr 473 CALL tra_bbc_init ! bottom heat flux 474 IF( lk_trabbl ) CALL tra_bbl_init ! advective (and/or diffusive) bottom boundary layer scheme 475 CALL tra_dmp_init ! internal tracer damping 476 CALL tra_adv_init ! horizontal & vertical advection 477 CALL tra_ldf_init ! lateral mixing 478 CALL tra_zdf_init ! vertical mixing and after tracer fields 479 480 ! ! Dynamics 481 IF( lk_c1d ) CALL dyn_dmp_init ! internal momentum damping 482 CALL dyn_adv_init ! advection (vector or flux form) 483 CALL dyn_vor_init ! vorticity term including Coriolis 484 CALL dyn_ldf_init ! lateral mixing 485 CALL dyn_hpg_init ! horizontal gradient of Hydrostatic pressure 486 CALL dyn_zdf_init ! vertical diffusion 487 CALL dyn_spg_init ! surface pressure gradient 468 CALL ldf_tra_init ! Lateral ocean tracer physics 469 CALL ldf_eiv_init ! eddy induced velocity param. 470 CALL ldf_dyn_init ! Lateral ocean momentum physics 471 472 ! ! Active tracers 473 IF( ln_traqsr ) CALL tra_qsr_init ! penetrative solar radiation qsr 474 CALL tra_bbc_init ! bottom heat flux 475 IF( ln_trabbl ) CALL tra_bbl_init ! advective (and/or diffusive) bottom boundary layer scheme 476 CALL tra_dmp_init ! internal tracer damping 477 CALL tra_adv_init ! horizontal & vertical advection 478 CALL tra_ldf_init ! lateral mixing 479 480 ! ! Dynamics 481 IF( lk_c1d ) CALL dyn_dmp_init ! internal momentum damping 482 CALL dyn_adv_init ! advection (vector or flux form) 483 CALL dyn_vor_init ! vorticity term including Coriolis 484 CALL dyn_ldf_init ! lateral mixing 485 CALL dyn_hpg_init ! horizontal gradient of Hydrostatic pressure 486 CALL dyn_spg_init ! surface pressure gradient 488 487 489 488 #if defined key_top 490 489 ! ! Passive tracers 491 492 #endif 493 IF( l_ldfslp ) CALL ldf_slp_init! slope of lateral mixing490 CALL trc_init 491 #endif 492 IF( l_ldfslp ) CALL ldf_slp_init ! slope of lateral mixing 494 493 495 494 ! ! Icebergs 496 495 CALL icb_init( rdt, nit000) ! initialise icebergs instance 497 496 498 497 ! ! Misc. options 499 CALL sto_par_init! Stochastic parametrization500 IF( ln_sto_eos ) CALL sto_pts_init! RRandom T/S fluctuations498 CALL sto_par_init ! Stochastic parametrization 499 IF( ln_sto_eos ) CALL sto_pts_init ! RRandom T/S fluctuations 501 500 502 501 ! ! Diagnostics 503 IF( lk_floats ) CALL flo_init! drifting Floats504 CALL dia_cfl_init! Initialise CFL diagnostics505 CALL dia_ptr_init! Poleward TRansports initialization506 IF( lk_diadct ) CALL dia_dct_init! Sections tranports507 CALL dia_hsb_init! heat content, salt content and volume budgets508 CALL trd_init! Mixed-layer/Vorticity/Integral constraints trends509 CALL dia_obs_init! Initialize observational data510 IF( ln_diaobs 511 512 ! 513 IF( lk_asminc ) CALL asm_inc_init! Initialize assimilation increments502 IF( lk_floats ) CALL flo_init ! drifting Floats 503 IF( ln_diacfl ) CALL dia_cfl_init ! Initialise CFL diagnostics 504 CALL dia_ptr_init ! Poleward TRansports initialization 505 IF( lk_diadct ) CALL dia_dct_init ! Sections tranports 506 CALL dia_hsb_init ! heat content, salt content and volume budgets 507 CALL trd_init ! Mixed-layer/Vorticity/Integral constraints trends 508 CALL dia_obs_init ! Initialize observational data 509 IF( ln_diaobs ) CALL dia_obs( nit000 - 1 ) ! Observation operator for restart 510 511 ! ! Assimilation increments 512 IF( lk_asminc ) CALL asm_inc_init ! Initialize assimilation increments 514 513 IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler 515 CALL dia_tmb_init! TMB outputs516 CALL dia_25h_init! 25h mean outputs514 CALL dia_tmb_init ! TMB outputs 515 CALL dia_25h_init ! 25h mean outputs 517 516 ! 518 517 END SUBROUTINE nemo_init … … 541 540 WRITE(numout,*) ' number of proc. following i nn_isplt = ', nn_isplt 542 541 WRITE(numout,*) ' number of proc. following j nn_jsplt = ', nn_jsplt 543 WRITE(numout,*) ' timing activated (0/1) nn_timing = ', nn_timing 542 WRITE(numout,*) ' timing by routine ln_timing = ', ln_timing 543 WRITE(numout,*) ' CFL diagnostics ln_diacfl = ', ln_diacfl 544 544 ENDIF 545 545 ! … … 551 551 isplt = nn_isplt 552 552 jsplt = nn_jsplt 553 !!gm to be remove at the end of the 2017 merge party 554 if( ln_timing ) then ; nn_timing = 1 555 else ; nn_timing = 0 556 endif 557 !!gm end 558 553 559 554 560 IF(lwp) THEN ! control print … … 621 627 ! 622 628 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file 623 IF( num sol /= -1 ) CLOSE( numsol ) ! solverfile629 IF( numrun /= -1 ) CLOSE( numrun ) ! run statistics file 624 630 IF( numnam_ref /= -1 ) CLOSE( numnam_ref ) ! oce reference namelist 625 631 IF( numnam_cfg /= -1 ) CLOSE( numnam_cfg ) ! oce configuration namelist
Note: See TracChangeset
for help on using the changeset viewer.