- Timestamp:
- 2017-04-23T09:30:41+02:00 (7 years ago)
- Location:
- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/TOP_SRC/TRP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
r7646 r7953 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_HPC09_ZDF/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
r7931 r7953 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 … … 27 27 28 28 PUBLIC trc_zdf ! called by step.F90 29 PUBLIC trc_zdf_ini ! called by nemogcm.F9030 29 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 "vectopt_loop_substitute.h90"39 30 !!---------------------------------------------------------------------- 40 31 !! NEMO/TOP 3.7 , NEMO Consortium (2015) … … 48 39 !! *** ROUTINE trc_zdf *** 49 40 !! 50 !! ** Purpose : compute the vertical ocean tracer physics. 41 !! ** Purpose : compute the vertical ocean tracer physics using 42 !! an implicit time-stepping scheme. 51 43 !!--------------------------------------------------------------------- 52 44 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 54 46 INTEGER :: jk, jn 55 47 CHARACTER (len=22) :: charout 56 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrtrd ! 4D workspace48 REAL(wp), DIMENSION(jpi,jpj,jpk,jptra) :: ztrtrd ! 4D workspace 57 49 !!--------------------------------------------------------------------- 58 50 ! 59 51 IF( nn_timing == 1 ) CALL timing_start('trc_zdf') 60 52 ! 61 IF( l_trdtrc ) THEN 62 CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrtrd ) 63 ztrtrd(:,:,:,:) = tra(:,:,:,:) 64 ENDIF 65 66 SELECT CASE ( nzdf ) ! compute lateral mixing trend and add it to the general trend 67 CASE ( 0 ) ; CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dttrc, nn_trczdf_exp, trb, tra, jptra ) ! explicit scheme 68 CASE ( 1 ) ; CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc, trb, tra, jptra ) ! implicit scheme 69 END SELECT 70 53 IF( l_trdtrc ) ztrtrd(:,:,:,:) = tra(:,:,:,:) 54 ! 55 CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc, trb, tra, jptra ) ! implicit scheme 56 ! 71 57 IF( l_trdtrc ) THEN ! save the vertical diffusive trends for further diagnostics 72 58 DO jn = 1, jptra … … 76 62 CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) ) 77 63 END DO 78 CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrtrd )79 64 ENDIF 80 65 ! ! print mean trends (used for debugging) 81 66 IF( ln_ctl ) THEN 82 WRITE(charout, FMT="('zdf ')") ; CALL prt_ctl_trc_info(charout) 83 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 67 WRITE(charout, FMT="('zdf ')") 68 CALL prt_ctl_trc_info(charout) 69 CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 84 70 END IF 85 71 ! … … 87 73 ! 88 74 END SUBROUTINE trc_zdf 89 90 91 SUBROUTINE trc_zdf_ini92 !!----------------------------------------------------------------------93 !! *** ROUTINE trc_zdf_ini ***94 !!95 !! ** Purpose : Choose the vertical mixing scheme96 !!97 !! ** Method : Set nzdf from ln_zdfexp98 !! nzdf = 0 explicit (time-splitting) scheme (ln_trczdf_exp=T)99 !! = 1 implicit (euler backward) scheme (ln_trczdf_exp=F)100 !! NB: The implicit scheme is required when using :101 !! - rotated lateral mixing operator102 !! - TKE, GLS vertical mixing scheme103 !!----------------------------------------------------------------------104 INTEGER :: ios ! Local integer output status for namelist read105 !!106 NAMELIST/namtrc_zdf/ ln_trczdf_exp , nn_trczdf_exp107 !!----------------------------------------------------------------------108 !109 REWIND( numnat_ref ) ! namtrc_zdf in reference namelist110 READ ( numnat_ref, namtrc_zdf, IOSTAT = ios, ERR = 905)111 905 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in reference namelist', lwp )112 !113 REWIND( numnat_cfg ) ! namtrc_zdf in configuration namelist114 READ ( numnat_cfg, namtrc_zdf, IOSTAT = ios, ERR = 906 )115 906 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in configuration namelist', lwp )116 IF(lwm) WRITE ( numont, namtrc_zdf )117 !118 IF(lwp) THEN ! Control print119 WRITE(numout,*)120 WRITE(numout,*) ' Namelist namtrc_zdf : set vertical diffusion parameters'121 WRITE(numout,*) ' time splitting / backward scheme ln_trczdf_exp = ', ln_trczdf_exp122 WRITE(numout,*) ' number of time step nn_trczdf_exp = ', nn_trczdf_exp123 ENDIF124 125 ! ! Define the vertical tracer physics scheme126 IF( ln_trczdf_exp ) THEN ; nzdf = 0 ! explicit scheme127 ELSE ; nzdf = 1 ! implicit scheme128 ENDIF129 130 ! ! Force implicit schemes131 IF( ln_trcldf_iso ) nzdf = 1 ! iso-neutral lateral physics132 IF( ln_trcldf_hor .AND. ln_sco ) nzdf = 1 ! horizontal lateral physics in s-coordinate133 #if defined key_zdftke || defined key_zdfgls134 nzdf = 1 ! TKE or GLS physics135 #endif136 IF( ln_trczdf_exp .AND. nzdf == 1 ) &137 CALL ctl_stop( 'trc_zdf : If using the rotated lateral mixing operator or TKE, GLS vertical scheme ', &138 & ' the implicit scheme is required, set ln_trczdf_exp = .false.' )139 140 IF(lwp) THEN141 WRITE(numout,*)142 WRITE(numout,*) 'trc:zdf_ctl : vertical passive tracer physics scheme'143 WRITE(numout,*) '~~~~~~~~~~~'144 IF( nzdf == 0 ) WRITE(numout,*) ' Explicit time-splitting scheme'145 IF( nzdf == 1 ) WRITE(numout,*) ' Implicit (euler backward) scheme'146 ENDIF147 !148 END SUBROUTINE trc_zdf_ini149 75 150 76 #else
Note: See TracChangeset
for help on using the changeset viewer.