- Timestamp:
- 2015-09-28T16:42:34+02:00 (9 years ago)
- Location:
- branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90
r5758 r5766 12 12 !!---------------------------------------------------------------------- 13 13 !! trc_adv : compute ocean tracer advection trend 14 !! trc_adv_ ctl: control the different options of advection scheme14 !! trc_adv_ini : control the different options of advection scheme 15 15 !!---------------------------------------------------------------------- 16 16 USE oce_trc ! ocean dynamics and active tracers 17 17 USE trc ! ocean passive tracers variables 18 USE trcnam_trp ! passive tracers transport namelist variables19 18 USE traadv_cen2 ! 2nd order centered scheme (tra_adv_cen2 routine) 20 19 USE traadv_tvd ! TVD scheme (tra_adv_tvd routine) … … 23 22 USE traadv_ubs ! UBS scheme (tra_adv_ubs routine) 24 23 USE traadv_qck ! QUICKEST scheme (tra_adv_qck routine) 25 USE traadv_eiv ! eddy induced velocity (tra_adv_eiv routine)26 24 USE traadv_mle ! ML eddy induced velocity (tra_adv_mle routine) 27 25 USE ldftra ! lateral diffusion coefficient on tracers … … 31 29 PRIVATE 32 30 33 PUBLIC trc_adv ! routine called by step module 34 PUBLIC trc_adv_alloc ! routine called by nemogcm module 31 PUBLIC trc_adv 32 PUBLIC trc_adv_alloc 33 PUBLIC trc_adv_ini 34 35 ! !!: ** Advection (namtrc_adv) ** 36 LOGICAL , PUBLIC :: ln_trcadv_cen2 ! 2nd order centered scheme flag 37 LOGICAL , PUBLIC :: ln_trcadv_tvd ! TVD scheme flag 38 LOGICAL , PUBLIC :: ln_trcadv_muscl ! MUSCL scheme flag 39 LOGICAL , PUBLIC :: ln_trcadv_muscl2 ! MUSCL2 scheme flag 40 LOGICAL , PUBLIC :: ln_trcadv_ubs ! UBS scheme flag 41 LOGICAL , PUBLIC :: ln_trcadv_qck ! QUICKEST scheme flag 42 LOGICAL , PUBLIC :: ln_trcadv_msc_ups ! use upstream scheme within muscl 35 43 36 44 INTEGER :: nadv ! choice of the type of advection scheme … … 79 87 CALL wrk_alloc( jpi,jpj,jpk, zun, zvn, zwn ) 80 88 ! 81 82 IF( kt == nittrc000 ) CALL trc_adv_ctl ! initialisation & control of options83 84 89 IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN ! at nittrc000 85 90 r2dt(:) = rdttrc(:) ! = rdttrc (use or restarting with Euler time stepping) … … 131 136 132 137 133 SUBROUTINE trc_adv_ ctl138 SUBROUTINE trc_adv_ini 134 139 !!--------------------------------------------------------------------- 135 !! *** ROUTINE trc_adv_ ctl***140 !! *** ROUTINE trc_adv_ini *** 136 141 !! 137 142 !! ** Purpose : Control the consistency between namelist options for … … 139 144 !!---------------------------------------------------------------------- 140 145 INTEGER :: ioptio 141 !!---------------------------------------------------------------------- 142 ! 146 INTEGER :: ios ! Local integer output status for namelist read 147 !! 148 NAMELIST/namtrc_adv/ ln_trcadv_cen2 , ln_trcadv_tvd , & 149 & ln_trcadv_muscl, ln_trcadv_muscl2, & 150 & ln_trcadv_ubs , ln_trcadv_qck, ln_trcadv_msc_ups 151 !!---------------------------------------------------------------------- 152 ! 153 REWIND( numnat_ref ) ! namtrc_adv in reference namelist 154 READ ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901) 155 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in reference namelist', lwp ) 156 157 REWIND( numnat_cfg ) ! namtrc_adv in configuration namelist 158 READ ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 ) 159 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist', lwp ) 160 IF(lwm) WRITE ( numont, namtrc_adv ) 161 162 IF(lwp) THEN ! Namelist print 163 WRITE(numout,*) 164 WRITE(numout,*) 'trc_adv_ini : choice/control of the tracer advection scheme' 165 WRITE(numout,*) '~~~~~~~~~~~' 166 WRITE(numout,*) ' Namelist namtrc_adv : chose a advection scheme for tracers' 167 WRITE(numout,*) ' 2nd order advection scheme ln_trcadv_cen2 = ', ln_trcadv_cen2 168 WRITE(numout,*) ' TVD advection scheme ln_trcadv_tvd = ', ln_trcadv_tvd 169 WRITE(numout,*) ' MUSCL advection scheme ln_trcadv_muscl = ', ln_trcadv_muscl 170 WRITE(numout,*) ' MUSCL2 advection scheme ln_trcadv_muscl2 = ', ln_trcadv_muscl2 171 WRITE(numout,*) ' UBS advection scheme ln_trcadv_ubs = ', ln_trcadv_ubs 172 WRITE(numout,*) ' QUICKEST advection scheme ln_trcadv_qck = ', ln_trcadv_qck 173 ENDIF 174 ! 175 143 176 ioptio = 0 ! Parameter control 144 177 IF( ln_trcadv_cen2 ) ioptio = ioptio + 1 … … 169 202 ENDIF 170 203 ! 171 END SUBROUTINE trc_adv_ ctl204 END SUBROUTINE trc_adv_ini 172 205 173 206 #else -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90
r4990 r5766 22 22 USE oce_trc ! ocean dynamics and active tracers variables 23 23 USE trc ! ocean passive tracers variables 24 USE trcnam_trp ! passive tracers transport namelist variables25 24 USE trabbl ! 26 25 USE prtctl_trc ! Print control for debbuging … … 30 29 PUBLIC trc_bbl ! routine called by step.F90 31 30 32 33 !! * Substitutions34 # include "top_substitute.h90"35 31 !!---------------------------------------------------------------------- 36 32 !! NEMO/TOP 3.3 , NEMO Consortium (2010) -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
r5506 r5766 18 18 USE oce_trc ! ocean dynamics and tracers variables 19 19 USE trc ! ocean passive tracers variables 20 USE trcnam_trp ! passive tracers transport namelist variables21 20 USE trcdta 22 21 USE tradmp … … 29 28 PRIVATE 30 29 31 PUBLIC trc_dmp ! routine called by step.F90 32 PUBLIC trc_dmp_clo ! routine called by step.F90 33 PUBLIC trc_dmp_alloc ! routine called by nemogcm.F90 30 PUBLIC trc_dmp 31 PUBLIC trc_dmp_clo 32 PUBLIC trc_dmp_alloc 33 PUBLIC trc_dmp_ini 34 35 INTEGER , PUBLIC :: nn_zdmp_tr ! = 0/1/2 flag for damping in the mixed layer 36 CHARACTER(LEN=200) , PUBLIC :: cn_resto_tr !File containing restoration coefficient 34 37 35 38 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: restotr ! restoring coeff. on tracers (s-1) … … 40 43 41 44 !! * Substitutions 42 # include "top_substitute.h90" 45 # include "domzgr_substitute.h90" 46 # include "vectopt_loop_substitute.h90" 43 47 !!---------------------------------------------------------------------- 44 48 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 90 94 IF( nn_timing == 1 ) CALL timing_start('trc_dmp') 91 95 ! 92 ! 0. Initialization (first time-step only)93 ! --------------94 IF( kt == nittrc000 ) CALL trc_dmp_init95 96 96 IF( l_trdtrc ) CALL wrk_alloc( jpi, jpj, jpk, ztrtrd ) ! temporary save of trends 97 97 ! … … 171 171 END SUBROUTINE trc_dmp 172 172 173 SUBROUTINE trc_dmp_ini 174 !!---------------------------------------------------------------------- 175 !! *** ROUTINE trc_dmp_ini *** 176 !! 177 !! ** Purpose : Initialization for the newtonian damping 178 !! 179 !! ** Method : read the nammbf namelist and check the parameters 180 !! called by trc_dmp at the first timestep (nittrc000) 181 !!---------------------------------------------------------------------- 182 ! 183 INTEGER :: ios ! Local integer output status for namelist read 184 INTEGER :: imask !local file handle 185 ! 186 NAMELIST/namtrc_dmp/ nn_zdmp_tr , cn_resto_tr 187 !!---------------------------------------------------------------------- 188 189 IF( nn_timing == 1 ) CALL timing_start('trc_dmp_init') 190 ! 191 192 REWIND( numnat_ref ) ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping 193 READ ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909) 194 909 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist', lwp ) 195 196 REWIND( numnat_cfg ) ! Namelist namtrc_dmp in configuration namelist : Passive tracers newtonian damping 197 READ ( numnat_cfg, namtrc_dmp, IOSTAT = ios, ERR = 910) 198 910 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist', lwp ) 199 IF(lwm) WRITE ( numont, namtrc_dmp ) 200 201 IF(lwp) THEN ! Namelist print 202 WRITE(numout,*) 203 WRITE(numout,*) 'trc_dmp : Passive tracers newtonian damping' 204 WRITE(numout,*) '~~~~~~~' 205 WRITE(numout,*) ' Namelist namtrc_dmp : set damping parameter' 206 WRITE(numout,*) ' mixed layer damping option nn_zdmp_tr = ', nn_zdmp_tr, '(zoom: forced to 0)' 207 WRITE(numout,*) ' Restoration coeff file cn_resto_tr = ', cn_resto_tr 208 ENDIF 209 ! 210 IF( lzoom ) nn_zdmp_tr = 0 ! restoring to climatology at closed north or south boundaries 211 SELECT CASE ( nn_zdmp_tr ) 212 CASE ( 0 ) ; IF(lwp) WRITE(numout,*) ' tracer damping throughout the water column' 213 CASE ( 1 ) ; IF(lwp) WRITE(numout,*) ' no tracer damping in the turbocline (avt > 5 cm2/s)' 214 CASE ( 2 ) ; IF(lwp) WRITE(numout,*) ' no tracer damping in the mixed layer' 215 CASE DEFAULT 216 WRITE(ctmp1,*) 'bad flag value for nn_zdmp_tr = ', nn_zdmp_tr 217 CALL ctl_stop(ctmp1) 218 END SELECT 219 220 IF( .NOT. ln_tradmp ) & 221 & CALL ctl_stop( 'passive trace damping need key_tradmp to compute damping coef.' ) 222 ! 223 ! ! Read damping coefficients from file 224 !Read in mask from file 225 CALL iom_open ( cn_resto_tr, imask) 226 CALL iom_get ( imask, jpdom_autoglo, 'resto', restotr) 227 CALL iom_close( imask ) 228 ! 229 IF( nn_timing == 1 ) CALL timing_stop('trc_dmp_init') 230 ! 231 END SUBROUTINE trc_dmp_ini 232 173 233 SUBROUTINE trc_dmp_clo( kt ) 174 234 !!--------------------------------------------------------------------- … … 303 363 304 364 305 SUBROUTINE trc_dmp_init306 !!----------------------------------------------------------------------307 !! *** ROUTINE trc_dmp_init ***308 !!309 !! ** Purpose : Initialization for the newtonian damping310 !!311 !! ** Method : read the nammbf namelist and check the parameters312 !! called by trc_dmp at the first timestep (nittrc000)313 !!----------------------------------------------------------------------314 !315 INTEGER :: imask !local file handle316 317 IF( nn_timing == 1 ) CALL timing_start('trc_dmp_init')318 !319 320 IF( lzoom ) nn_zdmp_tr = 0 ! restoring to climatology at closed north or south boundaries321 SELECT CASE ( nn_zdmp_tr )322 CASE ( 0 ) ; IF(lwp) WRITE(numout,*) ' tracer damping throughout the water column'323 CASE ( 1 ) ; IF(lwp) WRITE(numout,*) ' no tracer damping in the turbocline (avt > 5 cm2/s)'324 CASE ( 2 ) ; IF(lwp) WRITE(numout,*) ' no tracer damping in the mixed layer'325 CASE DEFAULT326 WRITE(ctmp1,*) 'bad flag value for nn_zdmp_tr = ', nn_zdmp_tr327 CALL ctl_stop(ctmp1)328 END SELECT329 330 IF( .NOT. ln_tradmp ) &331 & CALL ctl_stop( 'passive trace damping need key_tradmp to compute damping coef.' )332 !333 ! ! Read damping coefficients from file334 !Read in mask from file335 CALL iom_open ( cn_resto_tr, imask)336 CALL iom_get ( imask, jpdom_autoglo, 'resto', restotr)337 CALL iom_close( imask )338 !339 IF( nn_timing == 1 ) CALL timing_stop('trc_dmp_init')340 !341 END SUBROUTINE trc_dmp_init342 343 365 #else 344 366 !!---------------------------------------------------------------------- -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90
r5758 r5766 13 13 !!---------------------------------------------------------------------- 14 14 !! trc_ldf : update the tracer trend with the lateral diffusion 15 !! ldf_ctl: initialization, namelist read, and parameters control15 !! trc_ldf_ini : initialization, namelist read, and parameters control 16 16 !!---------------------------------------------------------------------- 17 17 USE trc ! ocean passive tracers variables 18 18 USE oce_trc ! ocean dynamics and active tracers 19 USE trcnam_trp ! passive tracers transport namelist variables20 19 USE ldfslp ! lateral diffusion: iso-neutral slope 21 20 USE traldf_lap ! lateral diffusion: laplacian iso-level operator (tra_ldf_lap routine) … … 31 30 PRIVATE 32 31 33 PUBLIC trc_ldf ! called by trctrp.F90 34 ! !!: ** lateral mixing namelist (nam_trcldf) ** 35 REAL(wp) :: rldf_rat ! ratio between active and passive tracers diffusive coefficient 32 PUBLIC trc_ldf 33 PUBLIC trc_ldf_ini 34 ! 35 LOGICAL , PUBLIC :: ln_trcldf_lap !: laplacian operator 36 LOGICAL , PUBLIC :: ln_trcldf_blp !: bilaplacian operator 37 LOGICAL , PUBLIC :: ln_trcldf_lev !: iso-level direction 38 LOGICAL , PUBLIC :: ln_trcldf_hor !: horizontal direction (rotation to geopotential) 39 LOGICAL , PUBLIC :: ln_trcldf_iso !: iso-neutral direction (standard) 40 LOGICAL , PUBLIC :: ln_trcldf_triad !: iso-neutral direction (triad) 41 REAL(wp), PUBLIC :: rn_ahtrc_0 !: laplacian diffusivity coefficient for passive tracer [m2/s] 42 REAL(wp), PUBLIC :: rn_bhtrc_0 !: bilaplacian - -- - - [m4/s] 43 ! 44 !!: ** lateral mixing namelist (nam_trcldf) ** 45 REAL(wp) :: rldf ! ratio between active and passive tracers diffusive coefficient 36 46 INTEGER :: nldf = 0 ! type of lateral diffusion used defined from ln_trcldf_... namlist logicals) 37 47 … … 64 74 ! 65 75 66 !!gm this call should be put in trcini !67 IF( kt == nittrc000 ) CALL ldf_ctl ! initialisation & control of options68 !!gm end69 70 76 IF( l_trdtrc ) THEN 71 77 CALL wrk_alloc( jpi,jpj,jpk,jptra, ztrtrd ) … … 75 81 ! ! set the lateral diffusivity coef. for passive tracer 76 82 CALL wrk_alloc( jpi,jpj,jpk, zahu, zahv ) 77 zahu(:,:,:) = rldf _rat* ahtu(:,:,:)78 zahv(:,:,:) = rldf _rat* ahtv(:,:,:)83 zahu(:,:,:) = rldf * ahtu(:,:,:) 84 zahv(:,:,:) = rldf * ahtv(:,:,:) 79 85 80 86 SELECT CASE ( nldf ) !* compute lateral mixing trend and add it to the general trend … … 115 121 !!gm ldf_ctl should be called in trcini so that l_ldfslp=T cause the slope init and calculation 116 122 117 SUBROUTINE ldf_ctl123 SUBROUTINE trc_ldf_ini 118 124 !!---------------------------------------------------------------------- 119 125 !! *** ROUTINE ldf_ctl *** … … 129 135 !!---------------------------------------------------------------------- 130 136 INTEGER :: ioptio, ierr ! temporary integers 131 !!---------------------------------------------------------------------- 137 INTEGER :: ios ! Local integer output status for namelist read 138 ! 139 NAMELIST/namtrc_ldf/ ln_trcldf_lap, ln_trcldf_blp, & 140 & ln_trcldf_lev, ln_trcldf_hor, ln_trcldf_iso, ln_trcldf_triad, & 141 & rn_ahtrc_0 , rn_bhtrc_0 142 !!---------------------------------------------------------------------- 143 REWIND( numnat_ref ) ! namtrc_ldf in reference namelist 144 READ ( numnat_ref, namtrc_ldf, IOSTAT = ios, ERR = 903) 145 903 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist', lwp ) 146 147 REWIND( numnat_cfg ) ! namtrc_ldf in configuration namelist 148 READ ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 ) 149 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist', lwp ) 150 IF(lwm) WRITE ( numont, namtrc_ldf ) 151 152 IF(lwp) THEN ! Namelist print 153 WRITE(numout,*) 154 WRITE(numout,*) 'trc_ldf_ini : lateral tracer diffusive operator' 155 WRITE(numout,*) '~~~~~~~~~~~' 156 WRITE(numout,*) ' Namelist namtrc_ldf : set lateral mixing parameters (type, direction, coefficients)' 157 WRITE(numout,*) ' operator' 158 WRITE(numout,*) ' laplacian ln_trcldf_lap = ', ln_trcldf_lap 159 WRITE(numout,*) ' bilaplacian ln_trcldf_blp = ', ln_trcldf_blp 160 WRITE(numout,*) ' direction of action' 161 WRITE(numout,*) ' iso-level ln_trcldf_lev = ', ln_trcldf_lev 162 WRITE(numout,*) ' horizontal (geopotential) ln_trcldf_hor = ', ln_trcldf_hor 163 WRITE(numout,*) ' iso-neutral (standard) ln_trcldf_iso = ', ln_trcldf_iso 164 WRITE(numout,*) ' iso-neutral (triad) ln_trcldf_triad = ', ln_trcldf_triad 165 WRITE(numout,*) ' diffusivity coefficient' 166 WRITE(numout,*) ' laplacian rn_ahtrc_0 = ', rn_ahtrc_0 167 WRITE(numout,*) ' bilaplacian rn_bhtrc_0 = ', rn_bhtrc_0 168 ENDIF 132 169 ! 133 170 ! ! control the namelist parameters … … 172 209 IF( ABS(rn_aht_0) < 2._wp*TINY(1.e0) ) THEN 173 210 IF( ABS(rn_ahtrc_0) < 2._wp*TINY(1.e0) ) THEN 174 rldf _rat= 1.0_wp211 rldf = 1.0_wp 175 212 ELSE 176 CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf _rat, rn_aht_0==0, rn_ahtrc_0 /=0' )213 CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf, rn_aht_0==0, rn_ahtrc_0 /=0' ) 177 214 ENDIF 178 215 ELSE 179 rldf _rat= rn_ahtrc_0 / rn_aht_0216 rldf = rn_ahtrc_0 / rn_aht_0 180 217 ENDIF 181 218 ENDIF … … 203 240 IF( ABS(rn_bht_0) < 2._wp*TINY(1.e0) ) THEN 204 241 IF( ABS(rn_bhtrc_0) < 2._wp*TINY(1.e0) ) THEN 205 rldf _rat= 1.0_wp242 rldf = 1.0_wp 206 243 ELSE 207 CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf _rat, rn_aht_0==0, rn_ahtrc_0 /=0' )244 CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf, rn_aht_0==0, rn_ahtrc_0 /=0' ) 208 245 ENDIF 209 246 ELSE 210 rldf _rat= SQRT( ABS( rn_bhtrc_0 / rn_bht_0 ) )247 rldf = SQRT( ABS( rn_bhtrc_0 / rn_bht_0 ) ) 211 248 ENDIF 212 249 ENDIF … … 231 268 ENDIF 232 269 ! 233 END SUBROUTINE ldf_ctl270 END SUBROUTINE trc_ldf_ini 234 271 #else 235 272 !!---------------------------------------------------------------------- -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90
r4990 r5766 22 22 PRIVATE 23 23 24 PUBLIC trc_rad ! routine called by trcstp.F90 25 26 !! * Substitutions 27 # include "top_substitute.h90" 24 PUBLIC trc_rad 25 PUBLIC trc_rad_ini 26 27 LOGICAL , PUBLIC :: ln_trcrad !: flag to artificially correct negative concentrations 28 28 29 !!---------------------------------------------------------------------- 29 30 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 76 77 ! 77 78 END SUBROUTINE trc_rad 79 80 SUBROUTINE trc_rad_ini 81 !!--------------------------------------------------------------------- 82 !! *** ROUTINE trc _rad_ini *** 83 !! 84 !! ** Purpose : read namelist options 85 !!---------------------------------------------------------------------- 86 INTEGER :: ios ! Local integer output status for namelist read 87 NAMELIST/namtrc_rad/ ln_trcrad 88 !!---------------------------------------------------------------------- 89 90 ! 91 REWIND( numnat_ref ) ! namtrc_rad in reference namelist 92 READ ( numnat_ref, namtrc_rad, IOSTAT = ios, ERR = 907) 93 907 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in reference namelist', lwp ) 94 95 REWIND( numnat_cfg ) ! namtrc_rad in configuration namelist 96 READ ( numnat_cfg, namtrc_rad, IOSTAT = ios, ERR = 908 ) 97 908 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist', lwp ) 98 IF(lwm) WRITE ( numont, namtrc_rad ) 99 100 IF(lwp) THEN ! ! Control print 101 WRITE(numout,*) 102 WRITE(numout,*) ' Namelist namtrc_rad : treatment of negative concentrations' 103 WRITE(numout,*) ' correct artificially negative concen. or not ln_trcrad = ', ln_trcrad 104 ENDIF 105 ! 106 END SUBROUTINE trc_rad_ini 78 107 79 108 SUBROUTINE trc_rad_sms( kt, ptrb, ptrn, jp_sms0, jp_sms1, cpreserv ) -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
r5385 r5766 31 31 32 32 !! * Substitutions 33 # include "top_substitute.h90" 33 # include "domzgr_substitute.h90" 34 # include "vectopt_loop_substitute.h90" 34 35 !!---------------------------------------------------------------------- 35 36 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 83 84 CASE( 0 ) ; zswitch = 1 ! (0) standard levitating sea-ice : salt exchange only 84 85 CASE( 1, 2 ) ; zswitch = 0 ! (1) levitating sea-ice: salt and volume exchange but no pressure effect 85 86 ! ! (2) embedded sea-ice : salt and volume fluxes and pressure 86 87 END SELECT 87 88 -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
r5758 r5766 15 15 USE oce_trc ! ocean dynamics and active tracers variables 16 16 USE trc ! ocean passive tracers variables 17 USE trcnam_trp ! passive tracers transport namelist variables18 17 USE trabbl ! bottom boundary layer (trc_bbl routine) 19 18 USE trcbbl ! bottom boundary layer (trc_bbl routine) 20 USE zdfkpp ! KPP non-local tracer fluxes (trc_kpp routine)21 19 USE trcdmp ! internal damping (trc_dmp routine) 22 20 USE trcldf ! lateral mixing (trc_ldf routine) … … 38 36 PUBLIC trc_trp ! called by trc_stp 39 37 40 !! * Substitutions41 # include "top_substitute.h90"42 38 !!---------------------------------------------------------------------- 43 39 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 69 65 IF( ln_trcdmp_clo ) CALL trc_dmp_clo( kt ) ! internal damping trends on closed seas only 70 66 CALL trc_adv ( kt ) ! horizontal & vertical advection 67 ! ! Partial top/bottom cell: GRADh( trb ) 68 IF( ln_zps ) THEN 69 IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kt, jptra, trb, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi ) ! both top & bottom 70 ELSE ; CALL zps_hde ( kt, jptra, trb, gtru, gtrv ) ! only bottom 71 ENDIF 72 ENDIF 73 ! 71 74 CALL trc_ldf ( kt ) ! lateral mixing 72 75 #if defined key_agrif … … 78 81 79 82 #if defined key_agrif 80 IF( .NOT.Agrif_Root())CALL Agrif_Update_Trc( kt ) ! Update tracer at AGRIF zoom boundaries : children only83 IF( .NOT.Agrif_Root()) CALL Agrif_Update_Trc( kt ) ! Update tracer at AGRIF zoom boundaries : children only 81 84 #endif 82 83 ! ! Partial top/bottom cell: GRADh( trn )84 IF( ln_isfcav .AND. ln_zps ) THEN ; CALL zps_hde_isf( kt, jptra, trn, gtru, gtrv, gtrui, gtrvi ) ! both top & bottom85 ELSEIF( ln_zps ) THEN ; CALL zps_hde ( kt, jptra, trn, gtru, gtrv ) ! only bottom86 ENDIF87 !!gm IF( ln_zps ) THEN88 ! & CALL zps_hde ( kt, jptra, trn, gtru, gtrv ) ! Partial steps: now horizontal gradient of passive89 ! IF( ln_isfcav) &90 ! & CALL zps_hde_isf( kt, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi ) ! Partial steps: now horizontal gradient of passive91 !!gm ENDIF92 85 ! 93 86 ELSE ! 1D vertical configuration 94 87 CALL trc_sbc( kt ) ! surface boundary condition 95 IF( .NOT. lk_offline .AND. lk_zdfkpp ) &96 & CALL trc_kpp( kt ) ! KPP non-local tracer fluxes97 88 CALL trc_zdf( kt ) ! vertical mixing and after tracer fields 98 89 CALL trc_nxt( kt ) ! tracer fields at next time step -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
r5385 r5766 11 11 !! 'key_top' TOP models 12 12 !!---------------------------------------------------------------------- 13 !! trc_ ldf : update the tracer trend with the lateral diffusion14 !! ldf_ctl: initialization, namelist read, and parameters control13 !! trc_zdf : update the tracer trend with the lateral diffusion 14 !! trc_zdf_ini : initialization, namelist read, and parameters control 15 15 !!---------------------------------------------------------------------- 16 16 USE oce_trc ! ocean dynamics and active tracers 17 17 USE trc ! ocean passive tracers variables 18 USE trcnam_trp ! passive tracers transport namelist variables19 18 USE trazdf_exp ! vertical diffusion: explicit (tra_zdf_exp routine) 20 19 USE trazdf_imp ! vertical diffusion: implicit (tra_zdf_imp routine) 20 USE trcldf 21 21 USE trd_oce 22 22 USE trdtra … … 28 28 PUBLIC trc_zdf ! called by step.F90 29 29 PUBLIC trc_zdf_alloc ! called by nemogcm.F90 30 PUBLIC trc_zdf_ini ! called by nemogcm.F90 31 ! !!: ** Vertical diffusion 32 ! (nam_trczdf) ** 33 LOGICAL , PUBLIC :: ln_trczdf_exp !: explicit vertical diffusion scheme flag 34 INTEGER , PUBLIC :: nn_trczdf_exp !: number of sub-time step (explicit time stepping) 30 35 31 36 INTEGER :: nzdf = 0 ! type vertical diffusion algorithm used … … 55 60 END FUNCTION trc_zdf_alloc 56 61 57 58 62 SUBROUTINE trc_zdf( kt ) 59 63 !!---------------------------------------------------------------------- … … 71 75 IF( nn_timing == 1 ) CALL timing_start('trc_zdf') 72 76 ! 73 IF( kt == nittrc000 ) CALL zdf_ctl ! initialisation & control of options74 75 77 IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN ! at nittrc000 76 78 r2dt(:) = rdttrc(:) ! = rdttrc (use or restarting with Euler time stepping) … … 116 118 END SUBROUTINE trc_zdf 117 119 118 119 SUBROUTINE zdf_ctl 120 SUBROUTINE trc_zdf_ini 120 121 !!---------------------------------------------------------------------- 121 !! *** ROUTINE zdf_ctl***122 !! *** ROUTINE trc_zdf_ini *** 122 123 !! 123 124 !! ** Purpose : Choose the vertical mixing scheme … … 128 129 !! NB: The implicit scheme is required when using : 129 130 !! - rotated lateral mixing operator 130 !! - TKE, GLS or KPP vertical mixing scheme 131 !! - TKE, GLS vertical mixing scheme 132 !!---------------------------------------------------------------------- 133 INTEGER :: ios ! Local integer output status for namelist read 134 ! 135 NAMELIST/namtrc_zdf/ ln_trczdf_exp , nn_trczdf_exp 131 136 !!---------------------------------------------------------------------- 132 137 138 ! ! Vertical mixing 139 REWIND( numnat_ref ) ! namtrc_zdf in reference namelist 140 READ ( numnat_ref, namtrc_zdf, IOSTAT = ios, ERR = 905) 141 905 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in reference namelist', lwp ) 142 143 REWIND( numnat_cfg ) ! namtrc_zdf in configuration namelist 144 READ ( numnat_cfg, namtrc_zdf, IOSTAT = ios, ERR = 906 ) 145 906 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in configuration namelist', lwp ) 146 IF(lwm) WRITE ( numont, namtrc_zdf ) 147 148 IF(lwp) THEN ! ! Control print 149 WRITE(numout,*) 150 WRITE(numout,*) ' Namelist namtrc_zdf : set vertical diffusion parameters' 151 WRITE(numout,*) ' time splitting / backward scheme ln_trczdf_exp = ', ln_trczdf_exp 152 WRITE(numout,*) ' number of time step nn_trczdf_exp = ', nn_trczdf_exp 153 ENDIF 154 133 155 ! Define the vertical tracer physics scheme 134 ! ========================================== 135 136 ! Choice from ln_zdfexp already read in namelist in zdfini module 137 IF( ln_trczdf_exp ) THEN ! use explicit scheme 138 nzdf = 0 139 ELSE ! use implicit scheme 140 nzdf = 1 156 IF( ln_trczdf_exp ) THEN ; nzdf = 0 ! explicit scheme 157 ELSE ; nzdf = 1 ! implicit scheme 141 158 ENDIF 142 159 … … 144 161 IF( ln_trcldf_iso ) nzdf = 1 ! iso-neutral lateral physics 145 162 IF( ln_trcldf_hor .AND. ln_sco ) nzdf = 1 ! horizontal lateral physics in s-coordinate 146 #if defined key_zdftke || defined key_zdfgls || defined key_zdfkpp147 nzdf = 1 ! TKE , GLS or KPPphysics163 #if defined key_zdftke || defined key_zdfgls 164 nzdf = 1 ! TKE or GLS physics 148 165 #endif 149 IF( ln_trczdf_exp .AND. nzdf == 1 ) THEN150 CALL ctl_stop( 'trc_zdf : If using the rotated lateral mixing operator or TKE, GLS or KPPvertical scheme ', &166 IF( ln_trczdf_exp .AND. nzdf == 1 ) & 167 CALL ctl_stop( 'trc_zdf : If using the rotated lateral mixing operator or TKE, GLS vertical scheme ', & 151 168 & ' the implicit scheme is required, set ln_trczdf_exp = .false.' ) 152 ENDIF153 154 ! Test: esopa155 IF( lk_esopa ) nzdf = -1 ! All schemes used156 169 157 170 IF(lwp) THEN … … 159 172 WRITE(numout,*) 'trc:zdf_ctl : vertical passive tracer physics scheme' 160 173 WRITE(numout,*) '~~~~~~~~~~~' 161 IF( nzdf == -1 ) WRITE(numout,*) ' ESOPA test All scheme used'162 174 IF( nzdf == 0 ) WRITE(numout,*) ' Explicit time-splitting scheme' 163 175 IF( nzdf == 1 ) WRITE(numout,*) ' Implicit (euler backward) scheme' 164 176 ENDIF 165 177 166 END SUBROUTINE zdf_ctl178 END SUBROUTINE trc_zdf_ini 167 179 #else 168 180 !!---------------------------------------------------------------------- -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
r5215 r5766 24 24 USE zdfddm , ONLY : avs ! salinity vertical diffusivity coeff. at w-point 25 25 # endif 26 USE trcnam_trp ! passive tracers transport namelist variables27 26 USE trdtrc_oce ! definition of main arrays used for trends computations 28 27 USE in_out_manager ! I/O manager … … 67 66 68 67 !! * Substitutions 69 # include " top_substitute.h90"68 # include "domzgr_substitute.h90" 70 69 # include "zdfddm_substitute.h90" 71 70 !!---------------------------------------------------------------------- -
branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc.F90
r5215 r5766 14 14 !!---------------------------------------------------------------------- 15 15 USE trc ! tracer definitions (trn, trb, tra, etc.) 16 USE trcnam_trp17 16 USE trd_oce 18 17 USE trdtrc_oce ! definition of main arrays used for trends computations … … 29 28 PUBLIC trd_trc 30 29 31 !! * Substitutions32 # include "top_substitute.h90"33 30 !!---------------------------------------------------------------------- 34 31 !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Note: See TracChangeset
for help on using the changeset viewer.