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 11949 for NEMO/branches/2019/dev_r11943_MERGE_2019/src/OFF/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2019-11-22T15:29:17+01:00 (4 years ago)
Author:
acc
Message:

Merge in changes from 2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps. This just creates a fresh copy of this branch to use as the merge base. See ticket #2341

Location:
NEMO/branches/2019/dev_r11943_MERGE_2019/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src

    • Property svn:mergeinfo deleted
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OFF/nemogcm.F90

    r11536 r11949  
    77   !!            3.4  ! 2011-01  (C. Ethe, A. R. Porter, STFC Daresbury) dynamical allocation 
    88   !!            4.0  ! 2016-10  (C. Ethe, G. Madec, S. Flavoni)  domain configuration / user defined interface 
     9   !!            4.1  ! 2019-08  (A. Coward, D. Storkey) rewrite in preparation for new timestepping scheme 
    910   !!---------------------------------------------------------------------- 
    1011 
     
    5960   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    6061   USE lbcnfd  , ONLY : isendto, nsndto, nfsloop, nfeloop   ! Setup of north fold exchanges 
     62   USE step, ONLY : Nbb, Nnn, Naa, Nrhs   ! time level indices 
    6163 
    6264   IMPLICIT NONE 
     
    111113                                CALL iom_setkt  ( istp - nit000 + 1, cxios_context )   ! say to iom that we are at time step kstp 
    112114#if defined key_sed_off 
    113                                 CALL dta_dyn_sed( istp )         ! Interpolation of the dynamical fields 
     115                                CALL dta_dyn_sed( istp,      Nnn      )       ! Interpolation of the dynamical fields 
    114116#else 
    115                                 CALL dta_dyn    ( istp )         ! Interpolation of the dynamical fields 
    116          IF( .NOT.ln_linssh )   CALL dta_dyn_swp( istp )         ! swap of sea  surface height and vertical scale factors 
    117 #endif 
    118                                 CALL trc_stp    ( istp )         ! time-stepping 
     117                                CALL dta_dyn    ( istp, Nbb, Nnn, Naa )       ! Interpolation of the dynamical fields 
     118#endif 
     119                                CALL trc_stp    ( istp, Nbb, Nnn, Nrhs, Naa ) ! time-stepping 
     120#if ! defined key_sed_off 
     121         IF( .NOT.ln_linssh )   CALL dta_dyn_atf( istp, Nbb, Nnn, Naa )       ! time filter of sea  surface height and vertical scale factors 
     122#endif 
     123         ! Swap time levels 
     124         Nrhs = Nbb 
     125         Nbb = Nnn 
     126         Nnn = Naa 
     127         Naa = Nrhs 
     128         ! 
     129#if ! defined key_sed_off 
     130         IF( .NOT.ln_linssh )   CALL dta_dyn_sf_interp( istp, Nnn )  ! calculate now grid parameters 
     131#endif 
    119132                                CALL stp_ctl    ( istp, indic )  ! Time loop: control and print 
    120133         istp = istp + 1 
     
    285298      CALL nemo_alloc() 
    286299 
     300      ! Initialise time level indices 
     301      Nbb = 1; Nnn = 2; Naa = 3; Nrhs = Naa 
     302    
     303 
    287304      !                             !-------------------------------! 
    288305      !                             !  NEMO general initialization  ! 
     
    298315                           CALL     eos_init        ! Equation of state 
    299316      IF( lk_c1d       )   CALL     c1d_init        ! 1D column configuration 
    300                            CALL     dom_init("OPA") ! Domain 
     317                           CALL     dom_init( Nbb, Nnn, Naa, "OPA") ! Domain 
    301318      IF( ln_ctl       )   CALL prt_ctl_init        ! Print control 
    302319 
    303                            CALL  istate_init    ! ocean initial state (Dynamics and tracers) 
    304  
    305                            CALL     sbc_init    ! Forcings : surface module 
     320                           CALL  istate_init( Nnn, Naa )    ! ocean initial state (Dynamics and tracers) 
     321 
     322                           CALL     sbc_init( Nbb, Nnn, Naa )    ! Forcings : surface module 
    306323 
    307324      !                                      ! Tracer physics 
     
    317334                           CALL trc_rst_cal( nit000, 'READ' )   ! calendar 
    318335#if defined key_sed_off 
    319                            CALL dta_dyn_sed_init ! Initialization for the dynamics 
     336                           CALL dta_dyn_sed_init(  Nnn      )        ! Initialization for the dynamics 
    320337#else 
    321                            CALL dta_dyn_init   ! Initialization for the dynamics 
    322 #endif 
    323  
    324                            CALL     trc_init   ! Passive tracers initialization 
     338                           CALL dta_dyn_init( Nbb, Nnn, Naa )        ! Initialization for the dynamics 
     339#endif 
     340 
     341                           CALL     trc_init( Nbb, Nnn, Naa )        ! Passive tracers initialization 
    325342                           CALL dia_ptr_init   ! Poleward TRansports initialization 
    326343                            
     
    510527   END SUBROUTINE nemo_set_cfctl 
    511528 
    512    SUBROUTINE istate_init 
     529   SUBROUTINE istate_init( Kmm, Kaa ) 
    513530      !!---------------------------------------------------------------------- 
    514531      !!                   ***  ROUTINE istate_init  *** 
     
    516533      !! ** Purpose :   Initialization to zero of the dynamics and tracers. 
    517534      !!---------------------------------------------------------------------- 
     535      INTEGER, INTENT(in) ::   Kmm, Kaa  ! ocean time level indices 
    518536      ! 
    519537      !     now fields         !     after fields      ! 
    520       un   (:,:,:)   = 0._wp   ;   ua(:,:,:) = 0._wp   ! 
    521       vn   (:,:,:)   = 0._wp   ;   va(:,:,:) = 0._wp   ! 
    522       wn   (:,:,:)   = 0._wp   !                       ! 
    523       hdivn(:,:,:)   = 0._wp   !                       ! 
    524       tsn  (:,:,:,:) = 0._wp   !                       ! 
     538      uu   (:,:,:,Kmm)   = 0._wp   ;   uu(:,:,:,Kaa) = 0._wp   ! 
     539      vv   (:,:,:,Kmm)   = 0._wp   ;   vv(:,:,:,Kaa) = 0._wp   ! 
     540      ww   (:,:,:)   = 0._wp   !                       ! 
     541      hdiv (:,:,:)   = 0._wp   !                       ! 
     542      ts  (:,:,:,:,Kmm) = 0._wp   !                       ! 
    525543      ! 
    526544      rhd  (:,:,:) = 0.e0 
Note: See TracChangeset for help on using the changeset viewer.