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 11427 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OFF/dtadyn.F90 – NEMO

Ignore:
Timestamp:
2019-08-09T15:44:20+02:00 (5 years ago)
Author:
davestorkey
Message:

dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap :
Restore independent time level indices for TOP in order to enable the option for
TOP to have a different timestep to OCE (nn_dttrc > 1). But note that this version of
the code only works for nn_dttrc=1. Also sort out the time-level swapping for OFF.
This commit passes the GYRE_PISCES and ORCA2_OFF_PISCES tests but fails restartability
and bit-comparison with the control for ORCA2_ICE_PISCES.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OFF/dtadyn.F90

    r11053 r11427  
    4646   PRIVATE 
    4747 
    48    PUBLIC   dta_dyn_init       ! called by opa.F90 
    49    PUBLIC   dta_dyn            ! called by step.F90 
    50    PUBLIC   dta_dyn_sed_init   ! called by opa.F90 
    51    PUBLIC   dta_dyn_sed        ! called by step.F90 
    52    PUBLIC   dta_dyn_swp        ! called by step.F90 
     48   PUBLIC   dta_dyn_init       ! called by nemo_init 
     49   PUBLIC   dta_dyn            ! called by nemo_gcm 
     50   PUBLIC   dta_dyn_sed_init   ! called by nemo_init 
     51   PUBLIC   dta_dyn_sed        ! called by nemo_gcm 
     52   PUBLIC   dta_dyn_atf        ! called by nemo_gcm 
     53   PUBLIC   dta_dyn_sf_interp  ! called by nemo_gcm 
    5354 
    5455   CHARACTER(len=100) ::   cn_dir          !: Root directory for location of ssr files 
     
    535536   END SUBROUTINE dta_dyn_sed_init 
    536537 
    537    SUBROUTINE dta_dyn_swp( kt, Kbb, Kmm, Kaa ) 
     538   SUBROUTINE dta_dyn_atf( kt, Kbb, Kmm, Kaa ) 
    538539     !!--------------------------------------------------------------------- 
    539540      !!                    ***  ROUTINE dta_dyn_swp  *** 
    540541      !! 
    541       !! ** Purpose :   Swap and the data and compute the vertical scale factor  
    542       !!              at U/V/W pointand the depht 
     542      !! ** Purpose :   Asselin time filter of now SSH 
    543543      !!--------------------------------------------------------------------- 
    544544      INTEGER, INTENT(in) :: kt             ! time step 
    545545      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa  ! ocean time level indices 
    546546      ! 
     547      !!--------------------------------------------------------------------- 
     548 
     549      IF( kt == nit000 ) THEN 
     550         IF(lwp) WRITE(numout,*) 
     551         IF(lwp) WRITE(numout,*) 'dta_dyn_atf : Asselin time filter of sea surface height' 
     552         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ ' 
     553      ENDIF 
     554 
     555      ssh(:,:,Kmm) = ssh(:,:,Kmm) + atfp * ( ssh(:,:,Kbb) - 2 * ssh(:,:,Kmm) + ssh(:,:,Kaa))   
     556 
     557      !! Do we also need to time filter e3t?? 
     558      ! 
     559   END SUBROUTINE dta_dyn_atf 
     560    
     561   SUBROUTINE dta_dyn_sf_interp( kt, Kmm ) 
     562      !!--------------------------------------------------------------------- 
     563      !!                    ***  ROUTINE dta_dyn_sf_interp  *** 
     564      !! 
     565      !! ** Purpose :   Calculate scale factors at U/V/W points and depths 
     566      !!                given the after e3t field 
     567      !!--------------------------------------------------------------------- 
     568      INTEGER, INTENT(in) :: kt   ! time step 
     569      INTEGER, INTENT(in) :: Kmm  ! ocean time level indices 
     570      ! 
    547571      INTEGER             :: ji, jj, jk 
    548572      REAL(wp)            :: zcoef 
    549573      !!--------------------------------------------------------------------- 
    550  
    551       IF( kt == nit000 ) THEN 
    552          IF(lwp) WRITE(numout,*) 
    553          IF(lwp) WRITE(numout,*) 'ssh_swp : Asselin time filter and swap of sea surface height' 
    554          IF(lwp) WRITE(numout,*) '~~~~~~~ ' 
    555       ENDIF 
    556  
    557       ssh(:,:,Kbb) = ssh(:,:,Kmm) + atfp * ( ssh(:,:,Kbb) - 2 * ssh(:,:,Kmm) + ssh(:,:,Kaa))  ! before <-- now filtered 
    558       ssh(:,:,Kmm) = ssh(:,:,Kaa) 
    559  
    560       e3t(:,:,:,Kmm) = e3t(:,:,:,Kaa) 
    561  
    562       ! Reconstruction of all vertical scale factors at now and before time steps 
    563       ! ============================================================================= 
    564574 
    565575      ! Horizontal scale factor interpolations 
     
    571581      ! ------------------------------------ 
    572582      CALL dom_vvl_interpol( e3t(:,:,:,Kmm), e3w (:,:,:,Kmm), 'W' ) 
    573  
    574       e3t(:,:,:,Kbb)  = e3t(:,:,:,Kmm) 
    575       e3u(:,:,:,Kbb)  = e3u(:,:,:,Kmm) 
    576       e3v(:,:,:,Kbb)  = e3v(:,:,:,Kmm) 
    577583 
    578584      ! t- and w- points depth 
     
    592598      END DO 
    593599      ! 
    594       gdept(:,:,:,Kbb) = gdept(:,:,:,Kmm) 
    595       gdepw(:,:,:,Kbb) = gdepw(:,:,:,Kmm) 
    596       ! 
    597    END SUBROUTINE dta_dyn_swp 
    598     
     600   END SUBROUTINE dta_dyn_sf_interp 
    599601 
    600602   SUBROUTINE dta_dyn_ssh( kt, phdivtr, psshb,  pemp, pssha, pe3ta ) 
Note: See TracChangeset for help on using the changeset viewer.