Ignore:
Timestamp:
2019-08-09T15:44:20+02:00 (18 months 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.

Location:
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OFF
Files:
2 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 ) 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps_rewrite_time_filterswap/src/OFF/nemogcm.F90

    r11053 r11427  
    119119#else 
    120120                                CALL dta_dyn    ( istp, Nbb, Nnn, Naa )       ! Interpolation of the dynamical fields 
    121          IF( .NOT.ln_linssh )   CALL dta_dyn_swp( istp, Nbb, Nnn, Naa )       ! swap of sea  surface height and vertical scale factors 
    122121#endif 
    123122                                CALL trc_stp    ( istp, Nbb, Nnn, Nrhs, Naa ) ! time-stepping 
     123#if ! defined key_sed_off 
     124         IF( .NOT.ln_linssh )   CALL dta_dyn_atf( istp, Nbb, Nnn, Naa )       ! time filter of sea  surface height and vertical scale factors 
     125#endif 
     126         ! Swap time levels 
     127         Nrhs = Nbb 
     128         Nbb = Nnn 
     129         Nnn = Naa 
     130         Naa = Nrhs 
     131         ! 
     132#if ! defined key_sed_off 
     133         IF( .NOT.ln_linssh )   CALL dta_dyn_sf_interp( istp, Nnn )  ! calculate now grid parameters 
     134#endif 
    124135                                CALL stp_ctl    ( istp, indic )  ! Time loop: control and print 
    125136         istp = istp + 1 
     
    333344#endif 
    334345 
    335                            CALL     trc_init( Nbb, Nnn, Naa )   ! Passive tracers initialization 
     346                           CALL     trc_init                         ! Passive tracers initialization 
    336347                           CALL dia_ptr_init   ! Poleward TRansports initialization 
    337348                            
Note: See TracChangeset for help on using the changeset viewer.