Changeset 12377 for NEMO/trunk/src/OCE/nemogcm.F90
- Timestamp:
- 2020-02-12T15:39:06+01:00 (4 years ago)
- Location:
- NEMO/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk
- Property svn:externals
-
old new 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev @HEAD ext/AGRIF5 ^/vendors/AGRIF/dev_r11615_ENHANCE-04_namelists_as_internalfiles_agrif@HEAD ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL
-
- Property svn:externals
-
NEMO/trunk/src/OCE/nemogcm.F90
r12214 r12377 46 46 USE closea ! treatment of closed seas (for ln_closea) 47 47 USE usrdef_nam ! user defined configuration 48 USE tide ini ! tidal components initialization (tide_iniroutine)48 USE tide_mod, ONLY : tide_init ! tidal components initialization (tide_init routine) 49 49 USE bdy_oce, ONLY : ln_bdy 50 50 USE bdyini ! open boundary cond. setting (bdy_init routine) … … 59 59 USE diaobs ! Observation diagnostics (dia_obs_init routine) 60 60 USE diacfl ! CFL diagnostics (dia_cfl_init routine) 61 USE dia harm ! tidal harmonics diagnostics (dia_harm_init routine)61 USE diamlr ! IOM context management for multiple-linear-regression analysis 62 62 USE step ! NEMO time-stepping (stp routine) 63 USE isfstp ! ice shelf (isf_stp_init routine) 63 64 USE icbini ! handle bergs, initialisation 64 65 USE icbstp ! handle bergs, calving, themodynamics and transport … … 69 70 USE stopar ! Stochastic param.: ??? 70 71 USE stopts ! Stochastic param.: ??? 71 USE diu rnal_bulk ! diurnal bulk SST72 USE diu_layers ! diurnal bulk SST and coolskin 72 73 USE step_diu ! diurnal bulk SST timestepping (called from here if run offline) 73 74 USE crsini ! initialise grid coarsening utility 74 75 USE dia25h ! 25h mean output 76 USE diadetide ! Weights computation for daily detiding of model diagnostics 75 77 USE sbc_oce , ONLY : lk_oasis 76 78 USE wet_dry ! Wetting and drying setting (wad_init routine) … … 139 141 ! !-----------------------! 140 142 #if defined key_agrif 143 Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs ! agrif_oce module copies of time level indices 141 144 CALL Agrif_Declare_Var_dom ! AGRIF: set the meshes for DOM 142 145 CALL Agrif_Declare_Var ! " " " " " DYN/TRA … … 171 174 ! 172 175 ! Recursive update from highest nested level to lowest: 176 Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs ! agrif_oce module copies of time level indices 173 177 CALL Agrif_step_child_adj(Agrif_Update_All) 174 178 ! … … 262 266 INTEGER :: ios, ilocal_comm ! local integers 263 267 !! 264 NAMELIST/namctl/ ln_ctl , sn_cfctl, nn_print, nn_ictls, nn_ictle,&268 NAMELIST/namctl/ sn_cfctl, nn_print, nn_ictls, nn_ictle, & 265 269 & nn_isplt , nn_jsplt, nn_jctls, nn_jctle, & 266 270 & ln_timing, ln_diacfl … … 306 310 IF( lwm ) CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 307 311 ! open reference and configuration namelist files 308 CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE.)309 CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE.)312 CALL load_nml( numnam_ref, 'namelist_ref', -1, lwm ) 313 CALL load_nml( numnam_cfg, 'namelist_cfg', -1, lwm ) 310 314 IF( lwm ) CALL ctl_opn( numond, 'output.namelist.dyn', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE. ) 311 315 ! open /dev/null file to be able to supress output write easily … … 313 317 ! 314 318 ! !--------------------! 315 ! ! Open listing units ! -> need ln_ctl from namctl to define lwp319 ! ! Open listing units ! -> need sn_cfctl from namctl to define lwp 316 320 ! !--------------------! 317 321 ! 318 REWIND( numnam_ref ) ! Namelist namctl in reference namelist319 322 READ ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 320 323 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist' ) 321 REWIND( numnam_cfg ) ! Namelist namctl in confguration namelist322 324 READ ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 323 325 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist' ) 324 326 ! 325 lwp = (narea == 1) .OR. ln_ctl ! control of all listing output print 327 ! finalize the definition of namctl variables 328 IF( sn_cfctl%l_allon ) THEN 329 ! Turn on all options. 330 CALL nemo_set_cfctl( sn_cfctl, .TRUE., .TRUE. ) 331 ! Ensure all processors are active 332 sn_cfctl%procmin = 0 ; sn_cfctl%procmax = 1000000 ; sn_cfctl%procincr = 1 333 ELSEIF( sn_cfctl%l_config ) THEN 334 ! Activate finer control of report outputs 335 ! optionally switch off output from selected areas (note this only 336 ! applies to output which does not involve global communications) 337 IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax ) .OR. & 338 & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) ) & 339 & CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. ) 340 ELSE 341 ! turn off all options. 342 CALL nemo_set_cfctl( sn_cfctl, .FALSE., .TRUE. ) 343 ENDIF 344 ! 345 lwp = (narea == 1) .OR. sn_cfctl%l_oceout ! control of all listing output print 326 346 ! 327 347 IF(lwp) THEN ! open listing units … … 355 375 ENDIF 356 376 ! 357 ! finalize the definition of namctl variables358 IF( sn_cfctl%l_config ) THEN359 ! Activate finer control of report outputs360 ! optionally switch off output from selected areas (note this only361 ! applies to output which does not involve global communications)362 IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax ) .OR. &363 & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) ) &364 & CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. )365 ELSE366 ! Use ln_ctl to turn on or off all options.367 CALL nemo_set_cfctl( sn_cfctl, ln_ctl, .TRUE. )368 ENDIF369 !370 377 IF(lwm) WRITE( numond, namctl ) 371 378 ! … … 374 381 ! !------------------------------------! 375 382 ! 376 REWIND( numnam_ref ) ! Namelist namcfg in reference namelist377 383 READ ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 378 384 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist' ) 379 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist380 385 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 381 386 904 IF( ios > 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist' ) … … 397 402 CALL nemo_alloc() 398 403 404 ! Initialise time level indices 405 Nbb = 1; Nnn = 2; Naa = 3; Nrhs = Naa 406 399 407 ! !-------------------------------! 400 408 ! ! NEMO general initialization ! … … 411 419 IF( lk_c1d ) CALL c1d_init ! 1D column configuration 412 420 CALL wad_init ! Wetting and drying options 413 CALL dom_init("OPA") ! Domain 414 IF( ln_crs ) CALL crs_init ! coarsened grid: domain initialization 415 IF( ln_ctl ) CALL prt_ctl_init ! Print control 421 CALL dom_init( Nbb, Nnn, Naa, "OPA") ! Domain 422 IF( ln_crs ) CALL crs_init( Nnn ) ! coarsened grid: domain initialization 423 IF( sn_cfctl%l_prtctl ) & 424 & CALL prt_ctl_init ! Print control 416 425 417 CALL diurnal_sst_bulk_init! diurnal sst426 CALL diurnal_sst_bulk_init ! diurnal sst 418 427 IF( ln_diurnal ) CALL diurnal_sst_coolskin_init ! cool skin 419 428 ! 420 IF( ln_diurnal_only ) THEN ! diurnal only: a subset of the initialisation routines421 CALL istate_init 422 CALL sbc_init 423 CALL tra_qsr_init 424 IF( ln_diaobs ) THEN 425 CALL dia_obs_init 426 CALL dia_obs( nit000 - 1 )! Observation operator for restart429 IF( ln_diurnal_only ) THEN ! diurnal only: a subset of the initialisation routines 430 CALL istate_init( Nbb, Nnn, Naa ) ! ocean initial state (Dynamics and tracers) 431 CALL sbc_init( Nbb, Nnn, Naa ) ! Forcings : surface module 432 CALL tra_qsr_init ! penetrative solar radiation qsr 433 IF( ln_diaobs ) THEN ! Observation & model comparison 434 CALL dia_obs_init( Nnn ) ! Initialize observational data 435 CALL dia_obs( nit000 - 1, Nnn ) ! Observation operator for restart 427 436 ENDIF 428 IF( lk_asminc ) CALL asm_inc_init 437 IF( lk_asminc ) CALL asm_inc_init( Nbb, Nnn, Nrhs ) ! Assimilation increments 429 438 ! 430 439 RETURN ! end of initialization 431 440 ENDIF 441 ! 432 442 433 CALL istate_init ! ocean initial state (Dynamics and tracers)443 CALL istate_init( Nbb, Nnn, Naa ) ! ocean initial state (Dynamics and tracers) 434 444 435 445 ! ! external forcing 436 CALL tide_init ! tidal harmonics437 CALL sbc_init ! surface boundary conditions (including sea-ice)438 CALL bdy_init ! Open boundaries initialisation446 CALL tide_init ! tidal harmonics 447 CALL sbc_init( Nbb, Nnn, Naa ) ! surface boundary conditions (including sea-ice) 448 CALL bdy_init ! Open boundaries initialisation 439 449 440 450 ! ! Ocean physics 441 CALL zdf_phy_init ! Vertical physics451 CALL zdf_phy_init( Nnn ) ! Vertical physics 442 452 443 453 ! ! Lateral physics … … 455 465 456 466 ! ! Dynamics 457 IF( lk_c1d ) CALL dyn_dmp_init ! internal momentum damping458 CALL dyn_adv_init ! advection (vector or flux form)459 CALL dyn_vor_init ! vorticity term including Coriolis460 CALL dyn_ldf_init ! lateral mixing461 CALL dyn_hpg_init 462 CALL dyn_spg_init ! surface pressure gradient467 IF( lk_c1d ) CALL dyn_dmp_init ! internal momentum damping 468 CALL dyn_adv_init ! advection (vector or flux form) 469 CALL dyn_vor_init ! vorticity term including Coriolis 470 CALL dyn_ldf_init ! lateral mixing 471 CALL dyn_hpg_init( Nnn ) ! horizontal gradient of Hydrostatic pressure 472 CALL dyn_spg_init ! surface pressure gradient 463 473 464 474 #if defined key_top 465 475 ! ! Passive tracers 466 CALL trc_init 476 CALL trc_init( Nbb, Nnn, Naa ) 467 477 #endif 468 478 IF( l_ldfslp ) CALL ldf_slp_init ! slope of lateral mixing … … 470 480 ! ! Icebergs 471 481 CALL icb_init( rdt, nit000) ! initialise icebergs instance 482 483 ! ice shelf 484 CALL isf_init( Nbb, Nnn, Naa ) 472 485 473 486 ! ! Misc. options … … 476 489 477 490 ! ! Diagnostics 478 CALL flo_init ! drifting Floats491 CALL flo_init( Nnn ) ! drifting Floats 479 492 IF( ln_diacfl ) CALL dia_cfl_init ! Initialise CFL diagnostics 480 CALL dia_ptr_init ! Poleward TRansports initialization493 ! CALL dia_ptr_init ! Poleward TRansports initialization 481 494 CALL dia_dct_init ! Sections tranports 482 CALL dia_hsb_init ! heat content, salt content and volume budgets 483 CALL trd_init ! Mixed-layer/Vorticity/Integral constraints trends 484 CALL dia_obs_init ! Initialize observational data 485 CALL dia_25h_init ! 25h mean outputs 486 CALL dia_harm_init ! tidal harmonics outputs 487 IF( ln_diaobs ) CALL dia_obs( nit000-1 ) ! Observation operator for restart 495 CALL dia_hsb_init( Nnn ) ! heat content, salt content and volume budgets 496 CALL trd_init( Nnn ) ! Mixed-layer/Vorticity/Integral constraints trends 497 CALL dia_obs_init( Nnn ) ! Initialize observational data 498 CALL dia_25h_init( Nbb ) ! 25h mean outputs 499 CALL dia_detide_init ! Weights computation for daily detiding of model diagnostics 500 IF( ln_diaobs ) CALL dia_obs( nit000-1, Nnn ) ! Observation operator for restart 501 CALL dia_mlr_init ! Initialisation of IOM context management for multiple-linear-regression analysis 488 502 489 503 ! ! Assimilation increments 490 IF( lk_asminc ) CALL asm_inc_init 504 IF( lk_asminc ) CALL asm_inc_init( Nbb, Nnn, Nrhs ) ! Initialize assimilation increments 491 505 ! 492 506 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA … … 511 525 WRITE(numout,*) '~~~~~~~~' 512 526 WRITE(numout,*) ' Namelist namctl' 513 WRITE(numout,*) ' run control (for debugging) ln_ctl = ', ln_ctl 527 WRITE(numout,*) ' sn_cfctl%l_glochk = ', sn_cfctl%l_glochk 528 WRITE(numout,*) ' sn_cfctl%l_allon = ', sn_cfctl%l_allon 514 529 WRITE(numout,*) ' finer control over o/p sn_cfctl%l_config = ', sn_cfctl%l_config 515 530 WRITE(numout,*) ' sn_cfctl%l_runstat = ', sn_cfctl%l_runstat … … 517 532 WRITE(numout,*) ' sn_cfctl%l_oceout = ', sn_cfctl%l_oceout 518 533 WRITE(numout,*) ' sn_cfctl%l_layout = ', sn_cfctl%l_layout 519 WRITE(numout,*) ' sn_cfctl%l_mppout = ', sn_cfctl%l_mppout 520 WRITE(numout,*) ' sn_cfctl%l_mpptop = ', sn_cfctl%l_mpptop 534 WRITE(numout,*) ' sn_cfctl%l_prtctl = ', sn_cfctl%l_prtctl 535 WRITE(numout,*) ' sn_cfctl%l_prttrc = ', sn_cfctl%l_prttrc 536 WRITE(numout,*) ' sn_cfctl%l_oasout = ', sn_cfctl%l_oasout 521 537 WRITE(numout,*) ' sn_cfctl%procmin = ', sn_cfctl%procmin 522 538 WRITE(numout,*) ' sn_cfctl%procmax = ', sn_cfctl%procmax … … 556 572 ! ! Parameter control 557 573 ! 558 IF( ln_ctl ) THEN! sub-domain area indices for the control prints574 IF( sn_cfctl%l_prtctl .OR. sn_cfctl%l_prttrc ) THEN ! sub-domain area indices for the control prints 559 575 IF( lk_mpp .AND. jpnij > 1 ) THEN 560 576 isplt = jpni ; jsplt = jpnj ; ijsplt = jpni*jpnj ! the domain is forced to the real split domain … … 617 633 IF( numstp /= -1 ) CLOSE( numstp ) ! time-step file 618 634 IF( numrun /= -1 ) CLOSE( numrun ) ! run statistics file 619 IF( numnam_ref /= -1 ) CLOSE( numnam_ref ) ! oce reference namelist620 IF( numnam_cfg /= -1 ) CLOSE( numnam_cfg ) ! oce configuration namelist621 635 IF( lwm.AND.numond /= -1 ) CLOSE( numond ) ! oce output namelist 622 IF( numnam_ice_ref /= -1 ) CLOSE( numnam_ice_ref ) ! ice reference namelist623 IF( numnam_ice_cfg /= -1 ) CLOSE( numnam_ice_cfg ) ! ice configuration namelist624 636 IF( lwm.AND.numoni /= -1 ) CLOSE( numoni ) ! ice output namelist 625 637 IF( numevo_ice /= -1 ) CLOSE( numevo_ice ) ! ice variables (temp. evolution) … … 686 698 sn_cfctl%l_oceout = setto 687 699 sn_cfctl%l_layout = setto 688 sn_cfctl%l_mppout = setto 689 sn_cfctl%l_mpptop = setto 700 sn_cfctl%l_prtctl = setto 701 sn_cfctl%l_prttrc = setto 702 sn_cfctl%l_oasout = setto 690 703 END SUBROUTINE nemo_set_cfctl 691 704
Note: See TracChangeset
for help on using the changeset viewer.