- Timestamp:
- 2016-07-19T10:38:35+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90
r4990 r6808 9 9 10 10 !!---------------------------------------------------------------------- 11 !! dyn_zdf : Update the momentum trend with the vertical diffusion12 !! dyn_zdf_init : initializations of the vertical diffusion scheme11 !! dyn_zdf : Update the momentum trend with the vertical diffusion 12 !! dyn_zdf_init : initializations of the vertical diffusion scheme 13 13 !!---------------------------------------------------------------------- 14 USE oce ! ocean dynamics and tracers variables 15 USE dom_oce ! ocean space and time domain variables 16 USE zdf_oce ! ocean vertical physics variables 17 18 USE dynzdf_exp ! vertical diffusion: explicit (dyn_zdf_exp routine) 19 USE dynzdf_imp ! vertical diffusion: implicit (dyn_zdf_imp routine) 20 21 USE ldfdyn_oce ! ocean dynamics: lateral physics 22 USE trd_oce ! trends: ocean variables 23 USE trddyn ! trend manager: dynamics 24 USE in_out_manager ! I/O manager 25 USE lib_mpp ! MPP library 26 USE prtctl ! Print control 27 USE wrk_nemo ! Memory Allocation 28 USE timing ! Timing 14 USE oce ! ocean dynamics and tracers variables 15 USE dom_oce ! ocean space and time domain variables 16 USE zdf_oce ! ocean vertical physics variables 17 USE dynzdf_exp ! vertical diffusion: explicit (dyn_zdf_exp routine) 18 USE dynzdf_imp ! vertical diffusion: implicit (dyn_zdf_imp routine) 19 USE ldfdyn ! lateral diffusion: eddy viscosity coef. 20 USE trd_oce ! trends: ocean variables 21 USE trddyn ! trend manager: dynamics 22 ! 23 USE in_out_manager ! I/O manager 24 USE lib_mpp ! MPP library 25 USE prtctl ! Print control 26 USE wrk_nemo ! Memory Allocation 27 USE timing ! Timing 29 28 30 29 IMPLICIT NONE … … 35 34 36 35 INTEGER :: nzdf = 0 ! type vertical diffusion algorithm used, defined from ln_zdf... namlist logicals 37 REAL(wp) :: r2dt ! time-step, = 2 rdttra except at nit000 (=rdttra) if neuler=038 36 39 37 !! * Substitutions 40 # include "domzgr_substitute.h90"41 # include "zdfddm_substitute.h90"42 38 # include "vectopt_loop_substitute.h90" 43 39 !!---------------------------------------------------------------------- … … 61 57 !!--------------------------------------------------------------------- 62 58 ! 63 IF( nn_timing == 1 ) CALL timing_start('dyn_zdf')59 IF( nn_timing == 1 ) CALL timing_start('dyn_zdf') 64 60 ! 65 61 ! ! set time step 66 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt = rdt ! = rdt ra(restart with Euler time stepping)67 ELSEIF( kt <= nit000 + 1 ) THEN ; r2dt = 2. * rdt ! = 2 rdt tra(leapfrog)62 IF( neuler == 0 .AND. kt == nit000 ) THEN ; r2dt = rdt ! = rdt (restart with Euler time stepping) 63 ELSEIF( kt <= nit000 + 1 ) THEN ; r2dt = 2. * rdt ! = 2 rdt (leapfrog) 68 64 ENDIF 69 65 … … 79 75 CASE ( 1 ) ; CALL dyn_zdf_imp( kt, r2dt ) ! implicit scheme 80 76 ! 81 CASE ( -1 ) ! esopa: test all possibility with control print82 CALL dyn_zdf_exp( kt, r2dt )83 CALL prt_ctl( tab3d_1=ua, clinfo1=' zdf0 - Ua: ', mask1=umask, &84 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' )85 CALL dyn_zdf_imp( kt, r2dt )86 CALL prt_ctl( tab3d_1=ua, clinfo1=' zdf1 - Ua: ', mask1=umask, &87 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' )88 77 END SELECT 89 78 90 79 IF( l_trddyn ) THEN ! save the vertical diffusive trends for further diagnostics 91 ztrdu(:,:,:) = ua(:,:,:)- ztrdu(:,:,:)92 ztrdv(:,:,:) = va(:,:,:)- ztrdv(:,:,:)80 ztrdu(:,:,:) = ( ua(:,:,:) - ub(:,:,:) ) / r2dt - ztrdu(:,:,:) 81 ztrdv(:,:,:) = ( va(:,:,:) - vb(:,:,:) ) / r2dt - ztrdv(:,:,:) 93 82 CALL trd_dyn( ztrdu, ztrdv, jpdyn_zdf, kt ) 94 83 CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv ) … … 96 85 ! ! print mean trends (used for debugging) 97 86 IF(ln_ctl) CALL prt_ctl( tab3d_1=ua, clinfo1=' zdf - Ua: ', mask1=umask, & 98 &tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' )99 !100 IF( nn_timing == 1 ) CALL timing_stop('dyn_zdf')87 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 88 ! 89 IF( nn_timing == 1 ) CALL timing_stop('dyn_zdf') 101 90 ! 102 91 END SUBROUTINE dyn_zdf … … 114 103 USE zdftke 115 104 USE zdfgls 116 USE zdfkpp117 105 !!---------------------------------------------------------------------- 118 106 ! … … 123 111 ! 124 112 ! Force implicit schemes 125 IF( lk_zdftke .OR. lk_zdfgls .OR. lk_zdfkpp ) nzdf = 1 ! TKE, GLS or KPP physics 126 IF( ln_dynldf_iso ) nzdf = 1 ! iso-neutral lateral physics 127 IF( ln_dynldf_hor .AND. ln_sco ) nzdf = 1 ! horizontal lateral physics in s-coordinate 128 ! 129 IF( lk_esopa ) nzdf = -1 ! Esopa key: All schemes used 113 IF( lk_zdftke .OR. lk_zdfgls ) nzdf = 1 ! TKE or GLS physics 114 IF( ln_dynldf_iso ) nzdf = 1 ! iso-neutral lateral physics 115 IF( ln_dynldf_hor .AND. ln_sco ) nzdf = 1 ! horizontal lateral physics in s-coordinate 130 116 ! 131 117 IF(lwp) THEN ! Print the choice … … 133 119 WRITE(numout,*) 'dyn_zdf_init : vertical dynamics physics scheme' 134 120 WRITE(numout,*) '~~~~~~~~~~~' 135 IF( nzdf == -1 ) WRITE(numout,*) ' ESOPA test All scheme used'136 121 IF( nzdf == 0 ) WRITE(numout,*) ' Explicit time-splitting scheme' 137 122 IF( nzdf == 1 ) WRITE(numout,*) ' Implicit (euler backward) scheme'
Note: See TracChangeset
for help on using the changeset viewer.