- Timestamp:
- 2017-06-25T12:26:32+02:00 (7 years ago)
- Location:
- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/TOP_SRC/TRP
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90
r7753 r8215 5 5 !! layer scheme 6 6 !!====================================================================== 7 !!==============================================================================8 7 !! History : OPA ! 1996-06 (L. Mortier) Original code 9 8 !! 8.0 ! 1997-11 (G. Madec) Optimization … … 13 12 !! - ! 2010-04 (G. Madec) Campin & Goosse advective bbl 14 13 !! - ! 2010-06 (C. Ethe, G. Madec) merge TRA-TRC 14 !! 4.0 ! 2017-04 (G. Madec) ln_trabbl namelist variable instead of a CPP key 15 15 !!---------------------------------------------------------------------- 16 #if defined key_top && defined key_trabbl16 #if defined key_top 17 17 !!---------------------------------------------------------------------- 18 !! 'key_t rabbl diffusive or/and adevective bottom boundary layer18 !! 'key_top' TOP models 19 19 !!---------------------------------------------------------------------- 20 !! trc_bbl 20 !! trc_bbl : update the tracer trends due to the bottom boundary layer (advective and/or diffusive) 21 21 !!---------------------------------------------------------------------- 22 USE oce_trc 23 USE trc 24 USE tr abbl !25 USE prtctl_trc ! Print control for debbuging26 USE tr d_oce27 USE trdtra22 USE oce_trc ! ocean dynamics and active tracers variables 23 USE trc ! ocean passive tracers variables 24 USE trd_oce ! trends: ocean variables 25 USE trdtra ! tracer trends 26 USE trabbl ! bottom boundary layer 27 USE prtctl_trc ! Print control for debbuging 28 28 29 PUBLIC trc_bbl ! routine called by step.F9029 PUBLIC trc_bbl ! routine called by trctrp.F90 30 30 31 31 !!---------------------------------------------------------------------- 32 !! NEMO/TOP 3.3 , NEMO Consortium (2010)32 !! NEMO/TOP 4.0 , NEMO Consortium (2017) 33 33 !! $Id$ 34 34 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 35 35 !!---------------------------------------------------------------------- 36 37 36 CONTAINS 38 39 37 40 38 SUBROUTINE trc_bbl( kt ) … … 73 71 ENDIF 74 72 ! 75 END 73 ENDIF 76 74 77 75 !* Advective bbl : bbl upstream advective trends added to the tracer trends … … 84 82 ENDIF 85 83 ! 86 END 84 ENDIF 87 85 88 86 IF( l_trdtrc ) THEN ! save the horizontal diffusive trends for further diagnostics … … 98 96 END SUBROUTINE trc_bbl 99 97 100 #else101 !!----------------------------------------------------------------------102 !! Dummy module : No bottom boundary layer scheme103 !!----------------------------------------------------------------------104 CONTAINS105 SUBROUTINE trc_bbl( kt ) ! Empty routine106 WRITE(*,*) 'tra_bbl: You should not have seen this print! error?', kt107 END SUBROUTINE trc_bbl108 98 #endif 109 99 -
branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
r7646 r8215 121 121 DO jj = 2, jpjm1 122 122 DO ji = fs_2, fs_jpim1 ! vector opt. 123 IF( av t(ji,jj,jk) <= 5.e-4_wp ) THEN123 IF( avs(ji,jj,jk) <= 5.e-4_wp ) THEN 124 124 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) ) 125 125 ENDIF -
branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
r7646 r8215 15 15 USE oce_trc ! ocean dynamics and active tracers variables 16 16 USE trc ! ocean passive tracers variables 17 USE trabbl ! bottom boundary layer (trc_bbl routine)18 17 USE trcbbl ! bottom boundary layer (trc_bbl routine) 19 18 USE trcdmp ! internal damping (trc_dmp routine) … … 63 62 ! 64 63 CALL trc_sbc ( kt ) ! surface boundary condition 65 IF( l k_trabbl ) CALL trc_bbl ( kt ) ! advective (and/or diffusive) bottom boundary layer scheme64 IF( ln_trabbl ) CALL trc_bbl ( kt ) ! advective (and/or diffusive) bottom boundary layer scheme 66 65 IF( ln_trcdmp ) CALL trc_dmp ( kt ) ! internal damping trends 67 66 IF( ln_bdy ) CALL trc_bdy_dmp( kt ) ! BDY damping trends -
branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
r7753 r8215 4 4 !! Ocean Passive tracers : vertical diffusive trends 5 5 !!===================================================================== 6 !! History : 9.0 ! 2005-11 (G. Madec) Original code6 !! History : 9.0 ! 2005-11 (G. Madec) Original code 7 7 !! NEMO 3.0 ! 2008-01 (C. Ethe, G. Madec) merge TRC-TRA 8 !! 4.0 ! 2017-04 (G. Madec) remove the explicit case 8 9 !!---------------------------------------------------------------------- 9 10 #if defined key_top … … 11 12 !! 'key_top' TOP models 12 13 !!---------------------------------------------------------------------- 13 !! trc_zdf : update the tracer trend with the lateral diffusion 14 !! trc_zdf_ini : initialization, namelist read, and parameters control 14 !! trc_zdf : update the tracer trend with the vertical diffusion 15 15 !!---------------------------------------------------------------------- 16 16 USE trc ! ocean passive tracers variables 17 17 USE oce_trc ! ocean dynamics and active tracers 18 18 USE trd_oce ! trends: ocean variables 19 USE trazdf _exp ! vertical diffusion: explicit (tra_zdf_exp routine)20 USE trazdf_imp ! vertical diffusion: implicit (tra_zdf_imp routine) 19 USE trazdf ! tracer: vertical diffusion 20 !!gm do we really need this ? 21 21 USE trcldf ! passive tracers: lateral diffusion 22 !!gm 22 23 USE trdtra ! trends manager: tracers 23 24 USE prtctl_trc ! Print control … … 27 28 28 29 PUBLIC trc_zdf ! called by step.F90 29 PUBLIC trc_zdf_ini ! called by nemogcm.F9030 30 31 ! !!** Vertical diffusion (nam_trczdf) **32 LOGICAL , PUBLIC :: ln_trczdf_exp !: explicit vertical diffusion scheme flag33 INTEGER , PUBLIC :: nn_trczdf_exp !: number of sub-time step (explicit time stepping)34 35 INTEGER :: nzdf = 0 ! type vertical diffusion algorithm used36 ! ! defined from ln_zdf... namlist logicals)37 !! * Substitutions38 # include "zdfddm_substitute.h90"39 # include "vectopt_loop_substitute.h90"40 31 !!---------------------------------------------------------------------- 41 32 !! NEMO/TOP 3.7 , NEMO Consortium (2015) … … 49 40 !! *** ROUTINE trc_zdf *** 50 41 !! 51 !! ** Purpose : compute the vertical ocean tracer physics. 42 !! ** Purpose : compute the vertical ocean tracer physics using 43 !! an implicit time-stepping scheme. 52 44 !!--------------------------------------------------------------------- 53 45 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 55 47 INTEGER :: jk, jn 56 48 CHARACTER (len=22) :: charout 57 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrtrd ! 4D workspace49 REAL(wp), DIMENSION(jpi,jpj,jpk,jptra) :: ztrtrd ! 4D workspace 58 50 !!--------------------------------------------------------------------- 59 51 ! 60 52 IF( nn_timing == 1 ) CALL timing_start('trc_zdf') 61 53 ! 62 IF( l_trdtrc ) THEN 63 CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrtrd ) 64 ztrtrd(:,:,:,:) = tra(:,:,:,:) 65 ENDIF 66 67 SELECT CASE ( nzdf ) ! compute lateral mixing trend and add it to the general trend 68 CASE ( 0 ) ; CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dttrc, nn_trczdf_exp, trb, tra, jptra ) ! explicit scheme 69 CASE ( 1 ) ; CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc, trb, tra, jptra ) ! implicit scheme 70 END SELECT 71 54 IF( l_trdtrc ) ztrtrd(:,:,:,:) = tra(:,:,:,:) 55 ! 56 CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc, trb, tra, jptra ) ! implicit scheme 57 ! 72 58 IF( l_trdtrc ) THEN ! save the vertical diffusive trends for further diagnostics 73 59 DO jn = 1, jptra … … 77 63 CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) ) 78 64 END DO 79 CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrtrd )80 65 ENDIF 81 66 ! ! print mean trends (used for debugging) 82 67 IF( ln_ctl ) THEN 83 WRITE(charout, FMT="('zdf ')") ; CALL prt_ctl_trc_info(charout) 84 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 68 WRITE(charout, FMT="('zdf ')") 69 CALL prt_ctl_trc_info(charout) 70 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 85 71 END IF 86 72 ! … … 88 74 ! 89 75 END SUBROUTINE trc_zdf 90 91 92 SUBROUTINE trc_zdf_ini93 !!----------------------------------------------------------------------94 !! *** ROUTINE trc_zdf_ini ***95 !!96 !! ** Purpose : Choose the vertical mixing scheme97 !!98 !! ** Method : Set nzdf from ln_zdfexp99 !! nzdf = 0 explicit (time-splitting) scheme (ln_trczdf_exp=T)100 !! = 1 implicit (euler backward) scheme (ln_trczdf_exp=F)101 !! NB: The implicit scheme is required when using :102 !! - rotated lateral mixing operator103 !! - TKE, GLS vertical mixing scheme104 !!----------------------------------------------------------------------105 INTEGER :: ios ! Local integer output status for namelist read106 !!107 NAMELIST/namtrc_zdf/ ln_trczdf_exp , nn_trczdf_exp108 !!----------------------------------------------------------------------109 !110 REWIND( numnat_ref ) ! namtrc_zdf in reference namelist111 READ ( numnat_ref, namtrc_zdf, IOSTAT = ios, ERR = 905)112 905 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in reference namelist', lwp )113 !114 REWIND( numnat_cfg ) ! namtrc_zdf in configuration namelist115 READ ( numnat_cfg, namtrc_zdf, IOSTAT = ios, ERR = 906 )116 906 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in configuration namelist', lwp )117 IF(lwm) WRITE ( numont, namtrc_zdf )118 !119 IF(lwp) THEN ! Control print120 WRITE(numout,*)121 WRITE(numout,*) ' Namelist namtrc_zdf : set vertical diffusion parameters'122 WRITE(numout,*) ' time splitting / backward scheme ln_trczdf_exp = ', ln_trczdf_exp123 WRITE(numout,*) ' number of time step nn_trczdf_exp = ', nn_trczdf_exp124 ENDIF125 126 ! ! Define the vertical tracer physics scheme127 IF( ln_trczdf_exp ) THEN ; nzdf = 0 ! explicit scheme128 ELSE ; nzdf = 1 ! implicit scheme129 ENDIF130 131 ! ! Force implicit schemes132 IF( ln_trcldf_iso ) nzdf = 1 ! iso-neutral lateral physics133 IF( ln_trcldf_hor .AND. ln_sco ) nzdf = 1 ! horizontal lateral physics in s-coordinate134 #if defined key_zdftke || defined key_zdfgls135 nzdf = 1 ! TKE or GLS physics136 #endif137 IF( ln_trczdf_exp .AND. nzdf == 1 ) &138 CALL ctl_stop( 'trc_zdf : If using the rotated lateral mixing operator or TKE, GLS vertical scheme ', &139 & ' the implicit scheme is required, set ln_trczdf_exp = .false.' )140 141 IF(lwp) THEN142 WRITE(numout,*)143 WRITE(numout,*) 'trc:zdf_ctl : vertical passive tracer physics scheme'144 WRITE(numout,*) '~~~~~~~~~~~'145 IF( nzdf == 0 ) WRITE(numout,*) ' Explicit time-splitting scheme'146 IF( nzdf == 1 ) WRITE(numout,*) ' Implicit (euler backward) scheme'147 ENDIF148 !149 END SUBROUTINE trc_zdf_ini150 76 151 77 #else -
branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
r7646 r8215 20 20 USE dom_oce ! domain definition 21 21 USE zdfmxl , ONLY : nmln ! number of level in the mixed layer 22 USE zdf_oce , ONLY : avt ! vert. diffusivity coef. at w-point for temp 23 # if defined key_zdfddm 24 USE zdfddm , ONLY : avs ! salinity vertical diffusivity coeff. at w-point 25 # endif 22 USE zdf_oce , ONLY : avs ! vert. diffusivity coef. at w-point for temp 26 23 USE trdtrc_oce ! definition of main arrays used for trends computations 27 24 USE in_out_manager ! I/O manager … … 54 51 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: ztmltrd2 ! 55 52 56 !! * Substitutions57 # include "zdfddm_substitute.h90"58 53 !!---------------------------------------------------------------------- 59 54 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 275 270 IF( ln_trcldf_iso ) THEN 276 271 ! 277 DO jj = 1,jpj 278 DO ji = 1,jpi 279 ik = nmld_trc(ji,jj) 280 zavt = fsavs(ji,jj,ik) 281 DO jn = 1, jptra 272 DO jn = 1, jptra 273 DO jj = 1, jpj 274 DO ji = 1, jpi 275 ik = nmld_trc(ji,jj) 282 276 IF( ln_trdtrc(jn) ) & 283 tmltrd_trc(ji,jj,jpmxl_trc_zdf,jn) = - zavt/ e3w_n(ji,jj,ik) * tmask(ji,jj,ik) &277 tmltrd_trc(ji,jj,jpmxl_trc_zdf,jn) = - avs(ji,jj,ik) / e3w_n(ji,jj,ik) * tmask(ji,jj,ik) & 284 278 & * ( trn(ji,jj,ik-1,jn) - trn(ji,jj,ik,jn) ) & 285 279 & / MAX( 1., rmld_trc(ji,jj) ) * tmask(ji,jj,1)
Note: See TracChangeset
for help on using the changeset viewer.