New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 8882 for branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2017-12-01T18:44:09+01:00 (6 years ago)
Author:
flavoni
Message:

dev_CNRS_2017 branch: merged dev_r7881_ENHANCE09_RK3 with trunk r8864

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_CNRS_2017/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r8570 r8882  
    5050   USE usrdef_nam     ! user defined configuration 
    5151   USE tideini        ! tidal components initialization   (tide_ini routine) 
    52    USE bdy_oce,   ONLY: ln_bdy 
     52   USE bdy_oce,  ONLY : ln_bdy 
    5353   USE bdyini         ! open boundary cond. setting       (bdy_init routine) 
    5454   USE istate         ! initial state setting          (istate_init routine) 
    5555   USE ldfdyn         ! lateral viscosity setting      (ldfdyn_init routine) 
    5656   USE ldftra         ! lateral diffusivity setting    (ldftra_init routine) 
    57    USE zdfini         ! vertical physics setting          (zdf_init routine) 
    5857   USE trdini         ! dyn/tra trends initialization     (trd_init routine) 
    5958   USE asminc         ! assimilation increments      
     
    140139      CALL Agrif_Declare_Var_top   !  "      "   "   "      "  TOP 
    141140# endif 
    142 # if defined key_lim2 
    143       CALL Agrif_Declare_Var_lim2  !  "      "   "   "      "  LIM2 
    144 # endif 
    145141# if defined key_lim3 
    146142      CALL Agrif_Declare_Var_lim3  !  "      "   "   "      "  LIM3 
     
    211207      CALL Agrif_ChildGrid_To_ParentGrid() 
    212208#endif 
    213       IF( nn_timing == 1 )   CALL timing_finalize 
     209      IF( ln_timing    )   CALL timing_finalize 
    214210      ! 
    215211      CALL nemo_closefile 
     
    241237      NAMELIST/namctl/ ln_ctl   , nn_print, nn_ictls, nn_ictle,   & 
    242238         &             nn_isplt , nn_jsplt, nn_jctls, nn_jctle,   & 
    243          &             nn_timing, nn_diacfl 
     239         &             ln_timing, ln_diacfl 
    244240      NAMELIST/namcfg/ ln_read_cfg, cn_domcfg, ln_write_cfg, cn_domcfg_out, ln_use_jattr 
    245241      !!---------------------------------------------------------------------- 
     
    415411      ENDIF 
    416412      ! 
    417       IF( nn_timing == 1 )  CALL timing_init 
     413      IF( ln_timing    )   CALL timing_init 
    418414      ! 
    419415      !                                      ! 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 
     416                           CALL     phy_cst    ! Physical constants 
     417                           CALL     eos_init   ! Equation of state 
     418      IF( lk_c1d       )   CALL     c1d_init   ! 1D column configuration 
     419                           CALL     wad_init   ! Wetting and drying options 
     420                           CALL     dom_init   ! Domain 
     421      IF( ln_crs       )   CALL     crs_init   ! coarsened grid: domain initialization  
     422      IF( ln_nnogather )   CALL nemo_northcomms! northfold neighbour lists (must be done after the masks are defined) 
     423      IF( ln_ctl       )   CALL prt_ctl_init   ! Print control 
    428424       
    429       CALL diurnal_sst_bulk_init            ! diurnal sst 
     425      CALL diurnal_sst_bulk_init             ! diurnal sst 
    430426      IF ( ln_diurnal ) CALL diurnal_sst_coolskin_init   ! cool skin    
    431427       
    432428      ! IF ln_diurnal_only, then we only want a subset of the initialisation routines 
    433       IF ( ln_diurnal_only ) THEN 
     429      IF( ln_diurnal_only ) THEN 
    434430         CALL  istate_init   ! ocean initial state (Dynamics and tracers) 
    435431         CALL     sbc_init   ! Forcings : surface module 
    436432         CALL tra_qsr_init   ! penetrative solar radiation qsr 
    437          IF( ln_diaobs     ) THEN                  ! Observation & model comparison 
    438             CALL dia_obs_init            ! Initialize observational data 
    439             CALL dia_obs( nit000 - 1 )   ! Observation operator for restart 
     433         IF( ln_diaobs ) THEN                   ! Observation & model comparison 
     434            CALL dia_obs_init                      ! Initialize observational data 
     435            CALL dia_obs( nit000 - 1 )             ! Observation operator for restart 
    440436         ENDIF      
    441437         !                                     ! Assimilation increments 
    442          IF( lk_asminc     )   CALL asm_inc_init   ! Initialize assimilation increments 
     438         IF( lk_asminc )   CALL asm_inc_init   ! Initialize assimilation increments 
    443439                  
    444440         IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler 
     
    446442      ENDIF 
    447443       
    448                             CALL  istate_init   ! ocean initial state (Dynamics and tracers) 
     444                           CALL  istate_init   ! ocean initial state (Dynamics and tracers) 
    449445 
    450446      !                                      ! 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 
     447                           CALL    tide_init   ! tidal harmonics 
     448                           CALL     sbc_init   ! surface boundary conditions (including sea-ice) 
     449                           CALL     bdy_init   ! Open boundaries initialisation 
     450 
    456451      !                                      ! 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           
     452                           CALL zdf_phy_init    ! Vertical physics 
     453                                      
    466454      !                                         ! 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 
     455                           CALL ldf_tra_init      ! Lateral ocean tracer physics 
     456                           CALL ldf_eiv_init      ! eddy induced velocity param. 
     457                           CALL ldf_dyn_init      ! Lateral ocean momentum physics 
     458 
     459      !                                      ! Active tracers 
     460                           CALL tra_qsr_init      ! penetrative solar radiation qsr 
     461                           CALL tra_bbc_init      ! bottom heat flux 
     462      IF( ln_trabbl    )   CALL tra_bbl_init      ! advective (and/or diffusive) bottom boundary layer scheme 
     463                           CALL tra_dmp_init      ! internal tracer damping 
     464                           CALL tra_adv_init      ! horizontal & vertical advection 
     465                           CALL tra_ldf_init      ! lateral mixing 
     466 
     467      !                                      ! Dynamics 
     468      IF( lk_c1d       )   CALL dyn_dmp_init      ! internal momentum damping 
     469                           CALL dyn_adv_init      ! advection (vector or flux form) 
     470                           CALL dyn_vor_init      ! vorticity term including Coriolis 
     471                           CALL dyn_ldf_init      ! lateral mixing 
     472                           CALL dyn_hpg_init      ! horizontal gradient of Hydrostatic pressure 
     473                           CALL dyn_spg_init      ! surface pressure gradient 
    488474 
    489475#if defined key_top 
    490476      !                                      ! Passive tracers 
    491                             CALL     trc_init 
    492 #endif 
    493       IF( l_ldfslp      )   CALL ldf_slp_init   ! slope of lateral mixing 
     477                           CALL     trc_init 
     478#endif 
     479      IF( l_ldfslp     )   CALL ldf_slp_init    ! slope of lateral mixing 
    494480 
    495481      !                                      ! Icebergs 
    496                             CALL icb_init( rdt, nit000)   ! initialise icebergs instance 
     482                           CALL icb_init( rdt, nit000)   ! initialise icebergs instance 
    497483 
    498484      !                                      ! Misc. options 
    499                             CALL sto_par_init   ! Stochastic parametrization 
    500       IF( ln_sto_eos     )  CALL sto_pts_init   ! RRandom T/S fluctuations 
     485                           CALL sto_par_init    ! Stochastic parametrization 
     486      IF( ln_sto_eos   )   CALL sto_pts_init    ! RRandom T/S fluctuations 
    501487      
    502488      !                                      ! Diagnostics 
    503       IF( lk_floats     )   CALL     flo_init   ! drifting Floats 
    504                             CALL dia_cfl_init   ! Initialise CFL diagnostics 
    505                             CALL dia_ptr_init   ! Poleward TRansports initialization 
    506       IF( lk_diadct     )   CALL dia_dct_init   ! Sections tranports 
    507                             CALL dia_hsb_init   ! heat content, salt content and volume budgets 
    508                             CALL     trd_init   ! Mixed-layer/Vorticity/Integral constraints trends 
    509                             CALL dia_obs_init            ! Initialize observational data 
    510       IF( ln_diaobs     )   CALL dia_obs( nit000 - 1 )   ! Observation operator for restart 
    511  
    512       !                                         ! Assimilation increments 
    513       IF( lk_asminc     )   CALL asm_inc_init   ! Initialize assimilation increments 
     489      IF( lk_floats    )   CALL     flo_init    ! drifting Floats 
     490      IF( ln_diacfl    )   CALL dia_cfl_init    ! Initialise CFL diagnostics 
     491                           CALL dia_ptr_init    ! Poleward TRansports initialization 
     492      IF( lk_diadct    )   CALL dia_dct_init    ! Sections tranports 
     493                           CALL dia_hsb_init    ! heat content, salt content and volume budgets 
     494                           CALL     trd_init    ! Mixed-layer/Vorticity/Integral constraints trends 
     495                           CALL dia_obs_init    ! Initialize observational data 
     496      IF( ln_diaobs    )   CALL dia_obs( nit000 - 1 )   ! Observation operator for restart 
     497 
     498      !                                      ! Assimilation increments 
     499      IF( lk_asminc    )   CALL asm_inc_init    ! Initialize assimilation increments 
    514500      IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler 
    515                             CALL dia_tmb_init  ! TMB outputs 
    516                             CALL dia_25h_init  ! 25h mean  outputs 
     501                           CALL dia_tmb_init    ! TMB outputs 
     502                           CALL dia_25h_init    ! 25h mean  outputs 
    517503      ! 
    518504   END SUBROUTINE nemo_init 
     
    541527         WRITE(numout,*) '      number of proc. following i     nn_isplt   = ', nn_isplt 
    542528         WRITE(numout,*) '      number of proc. following j     nn_jsplt   = ', nn_jsplt 
    543          WRITE(numout,*) '      timing activated    (0/1)       nn_timing  = ', nn_timing 
     529         WRITE(numout,*) '      timing by routine               ln_timing  = ', ln_timing 
     530         WRITE(numout,*) '      CFL diagnostics                 ln_diacfl  = ', ln_diacfl 
    544531      ENDIF 
    545532      ! 
     
    551538      isplt     = nn_isplt 
    552539      jsplt     = nn_jsplt 
     540!!gm to be remove at the end of the 2017 merge party 
     541      if( ln_timing ) then  ;  nn_timing = 1 
     542      else                  ;  nn_timing = 0 
     543      endif 
     544!!gm end 
     545       
    553546 
    554547      IF(lwp) THEN                  ! control print 
     
    621614      ! 
    622615      IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file 
    623       IF( numsol          /= -1 )   CLOSE( numsol          )   ! solver file 
     616      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file 
    624617      IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
    625618      IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
Note: See TracChangeset for help on using the changeset viewer.