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 2027 for branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/opa.F90 – NEMO

Ignore:
Timestamp:
2010-07-29T13:33:05+02:00 (14 years ago)
Author:
cetlod
Message:

Reorganisation of the initialisation phase, see ticket:695

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/opa.F90

    r1976 r2027  
    2525   !!             -   ! 2007-07  (J. Chanut, A. Sellar) Unstructured open boundaries (BDY) 
    2626   !!            3.2  ! 2009-08  (S. Masson)  open/write in the listing file in mpp 
     27   !!            3.3  ! 2010-10  (C. Ethe, G. Madec) reorganisation of initialisation phase 
    2728   !!---------------------------------------------------------------------- 
    2829 
     
    3334   !!   opa_closefile  : close remaining files 
    3435   !!---------------------------------------------------------------------- 
    35    USE oce             ! dynamics and tracers variables 
    36    USE dom_oce         ! ocean space domain variables 
     36 
     37   USE step_oce        ! Time stepping module definition 
    3738   USE sbc_oce         ! surface boundary condition: ocean 
    3839   USE trdmod_oce      ! ocean variables trends 
     
    4041   USE mppini          ! shared/distributed memory setting (mpp_init routine) 
    4142   USE domain          ! domain initialization             (dom_init routine) 
    42    USE obc_par         ! open boundary cond. parameters 
    4343   USE obcini          ! open boundary cond. initialization (obc_ini routine) 
    44    USE bdy_par         ! unstructured open boundary cond. parameters 
    4544   USE bdyini          ! unstructured open boundary cond. initialization (bdy_init routine) 
    4645   USE istate          ! initial state setting          (istate_init routine) 
    47    USE sbcmod          ! surface boundary condition  
    48    USE eosbn2          ! equation of state                 (eos_init routine) 
    49    USE dynhpg          ! hydrostatic pressure gradient 
    5046   USE ldfdyn          ! lateral viscosity setting      (ldfdyn_init routine) 
    5147   USE ldftra          ! lateral diffusivity setting    (ldftra_init routine) 
     
    5349   USE phycst          ! physical constant                  (par_cst routine) 
    5450   USE trdmod          ! momentum/tracers trends       (trd_mod_init routine) 
    55    USE diaptr          ! poleward transports           (dia_ptr_init routine) 
    5651   USE step            ! OPA time-stepping                  (stp     routine) 
    5752#if defined key_oasis3 
     
    6055   USE cpl_oasis4      ! OASIS4 coupling (not working) 
    6156#endif 
    62    USE dynspg_oce      ! Control choice of surface pressure gradient schemes 
    63    USE prtctl          ! Print control                 (prt_ctl_init routine) 
    6457   USE c1d             ! 1D configuration 
    65    USE dyncor_c1d      ! Coriolis factor at T-point 
    6658   USE step_c1d        ! Time stepping loop for the 1D configuration 
    6759#if defined key_top 
    6860   USE trcini          ! passive tracer initialisation 
    6961#endif 
    70     
    71    USE iom 
    72    USE in_out_manager  ! I/O manager 
     62 
    7363   USE lib_mpp         ! distributed memory computing 
    7464#if defined key_iomput 
     
    7666#endif 
    7767 
    78    IMPLICIT NONE 
    7968   PRIVATE 
    8069 
     
    237226      ELSE                            ;   CALL mpp_init2     ! eliminate land processors 
    238227      ENDIF 
    239        
    240       CALL phy_cst                          ! Physical constants 
    241       CALL eos_init                         ! Equation of state 
    242       CALL dom_cfg                          ! Domain configuration 
    243       CALL dom_init                         ! Domain 
    244 !!gm c1d case can be moved in dom_init routine 
    245       IF( lk_c1d ) THEN                          ! 1D configuration  
    246          CALL cor_c1d                            ! Coriolis defined at T-point 
    247          umask(:,:,:) = tmask(:,:,:)             ! U, V and T-points are the same 
    248          vmask(:,:,:) = tmask(:,:,:)             !  
    249       ENDIF 
    250 !!gm c1d end 
    251  
    252       IF( ln_ctl )   CALL prt_ctl_init      ! Print control 
    253  
    254       IF( lk_obc )   CALL obc_init          ! Open boundaries  
    255       IF( lk_bdy )   CALL bdy_init          ! Unstructured open boundaries 
    256  
    257       CALL istate_init                      ! ocean initial state (Dynamics and tracers) 
     228  
     229 
     230 
     231      
     232 
     233                            CALL     phy_cst    ! Physical constants 
     234                            CALL     eos_init   ! Equation of state 
     235                            CALL     dom_cfg    ! Domain configuration 
     236                            CALL     dom_init   ! Domain 
     237 
     238      IF( ln_ctl        )   CALL prt_ctl_init   ! Print control 
     239 
     240      IF( lk_obc        )   CALL     obc_init   ! Open boundaries  
     241      IF( lk_bdy        )   CALL     bdy_init   ! Unstructured open boundaries 
     242 
     243      IF( ln_zps        )   CALL zps_hde_init   ! Partial steps:  horizontal derivative 
     244                            CALL  istate_init   ! ocean initial state (Dynamics and tracers) 
    258245 
    259246      !                                     ! Ocean physics 
    260       CALL sbc_init                             ! Read namsbc namelist : surface module (needed for iom_init) 
    261       CALL ldf_tra_init                         ! Lateral ocean tracer physics 
    262       CALL ldf_dyn_init                         ! Lateral ocean momentum physics 
    263       CALL zdf_init                             ! Vertical ocean physics 
    264  
     247                            CALL     sbc_init   ! Read namsbc namelist : surface module (needed for iom_init) 
     248 
     249      !                                     ! Vertical physics 
     250                            CALL     zdf_init   ! namelist read 
     251                            CALL zdf_bfr_init   ! bottom friction 
     252      IF( lk_zdfric     )   CALL zdf_ric_init   ! Richardson number dependent Kz 
     253      IF( lk_zdftke_old )   CALL zdf_tke_init   ! TKE closure scheme for Kz (old scheme) 
     254      IF( lk_zdftke     )   CALL     tke_init   ! TKE closure scheme for Kz 
     255      IF( lk_zdfkpp     )   CALL zdf_kpp_init   ! KPP closure scheme for Kz 
     256      IF( lk_zdftmx     )   CALL zdf_tmx_init   ! tidal vertical mixing 
     257      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   &  
     258         &                  CALL zdf_ddm_init   ! double diffusive mixing 
     259      !                                     ! Lateral physics 
     260                            CALL ldf_tra_init   ! Lateral ocean tracer physics 
     261                            CALL ldf_dyn_init   ! Lateral ocean momentum physics 
     262      IF( lk_ldfslp )       CALL ldf_slp_init   ! slope of lateral mixing 
     263#if defined key_traldf_c2d 
     264      IF( lk_traldf_eiv )   CALL ldf_eiv( kstp )      ! eddy induced velocity coefficient 
     265#  endif 
     266      !                                     ! Active tracers 
     267                            CALL tra_qsr_init   ! penetrative solar radiation qsr 
     268      IF( lk_trabbc     )   CALL tra_bbc_init   ! bottom heat flux 
     269      IF( lk_trabbl     )   CALL tra_bbl_init   ! advective (and/or diffusive) bottom boundary layer scheme 
     270      IF( lk_tradmp     )   CALL tra_dmp_init   ! internal damping trends 
     271                            CALL tra_adv_init   ! horizontal & vertical advection 
     272      IF( n_cla == 1    )   CALL tra_cla_init   ! Cross Land Advection (Update Hor. advection) 
     273                            CALL tra_ldf_init   ! lateral mixing 
     274                            CALL tra_zdf_init   ! vertical mixing and after tracer fields 
     275 
     276      !                                     ! Dynamics 
     277                            CALL dyn_adv_init   ! advection (vector or flux form) 
     278                            CALL     vor_init   ! vorticity term including Coriolis 
     279                            CALL dyn_ldf_init   ! lateral mixing 
     280                            CALL     hpg_init   ! horizontal gradient of Hydrostatic pressure 
     281                            CALL dyn_zdf_init   ! vertical diffusion 
     282                            CALL dyn_spg_init   ! surface pressure gradient 
    265283#if defined key_top 
    266       CALL trc_ini                          ! Passive tracers 
     284      !                                     ! Passive tracers 
     285                            CALL     trc_ini 
    267286#endif 
    268287 
    269288      !                                     ! diagnostics 
    270       CALL iom_init                             ! iom_put initialization 
    271       CALL dia_ptr_init                         ! Poleward TRansports initialization 
    272       CALL trd_mod_init                         ! Mixed-layer/Vorticity/Integral constraints trends 
     289                            CALL     iom_init   ! iom_put initialization 
     290      IF( lk_floats    )    CALL     flo_init   ! drifting Floats 
     291      IF( lk_diaar5    )    CALL dia_ar5_init   ! ar5 diag 
     292                            CALL dia_ptr_init   ! Poleward TRansports initialization 
     293                            CALL trd_mod_init   ! Mixed-layer/Vorticity/Integral constraints trends 
    273294      ! 
    274295   END SUBROUTINE opa_init 
Note: See TracChangeset for help on using the changeset viewer.