File indexing completed on 2018-03-02 18:37:38 UTC
view on githubraw file Latest commit 672ec4d5 on 2016-12-01 17:05:48 UTC
672ec4d5cf Jean*0001 <HTML>
0002 <TITLE>module my25_turb_mod</TITLE>
0003 <BODY BGCOLOR="#AABBCC" TEXT="#332211" >
0004
0005 <DIV ALIGN="CENTER"> <FONT SIZE=1>
0006 <A HREF="#INTERFACE">PUBLIC INTERFACE</A> /
0007 <A HREF="#DATA_TYPES">DATA</A> /
0008 <A HREF="#ROUTINES">ROUTINES</A> /
0009 <A HREF="#NAMELIST">NAMELIST</A> /
0010 <A HREF="#CHANGES">CHANGES</A> /
0011 <A HREF="#ERRORS">ERRORS</A> /
0012 <A HREF="#REFERENCES">REFERENCES</A> /
0013 <A HREF="#NOTES">NOTES</A>
0014 </FONT>
0015 <BR><BR></DIV><HR>
0016
0017
0018 <H2>module my25_turb_mod</H2>
0019 <A NAME="HEADER">
0020 <PRE>
0021 <B>Contact:</B> Joe Sirutis, Bruce Wyman
0022 <B>Reviewers:</B>
0023
0024 <B><A HREF=".doc.log#my25_turb.f90">Tags/Status</A></B>
0025 </PRE>
0026 </A>
0027
0028 <A NAME="OVERVIEW">
0029 <HR>
0030 <H4>OVERVIEW</H4>
0031
0032 <PRE>
0033
0034 Mellor/Yamada level 2.5 turbulent closure parameterization.
0035
0036 This module provides mixing coefficients for wind, temperature
0037 and moisture that are used in the vertical diffusion code.
0038
0039 </PRE>
0040 </A>
0041
0042 <A NAME="DESCRIPTION">
0043
0044 <PRE>
0045 Given potential temperature and wind profiles at the model's
0046 pressure levels, this module returns mixing coefficients for
0047 wind, temperature and moisture based on the Mellor/Yamada
0048 level 2.5 turbulent closure parameterization. These coefficients
0049 are then used in the vertical diffusion code.
0050
0051 The level 2.5 scheme has a prognostic equation for turbulent
0052 kinetic energy, and a diagnostic relationship for temperature
0053 variance. The prognostication of the turbulent kinetic energy,
0054 with the exception of the advection and horizontal diffusion
0055 terms, is also done in this module.
0056
0057 This module also handles the initialization of the turbulent
0058 kinetic energy, along with the input/output of a restart file
0059 for the turbulent kinetic energy.
0060
0061 </PRE>
0062 </A><!-- END DESCRIPTION -->
0063 <!--------------------------------------------------------------------->
0064 <A NAME="MODULES_USED">
0065 <HR>
0066 <H4>OTHER MODULES USED</H4>
0067 <!-- BEGIN MODULES_USED -->
0068 <PRE>
0069
0070 constants_mod
0071 tridiagonal_mod
0072 utilities_mod
0073 monin_obukhov_mod
0074
0075 </PRE>
0076 </A><!-- END MODULES_USED -->
0077 <!--------------------------------------------------------------------->
0078 <A NAME="INTERFACE">
0079 <HR>
0080 <H4>PUBLIC INTERFACE</H4>
0081 <!-- BEGIN INTERFACE -->
0082 <PRE>
0083
0084 use my25_turb_mod [,only: my25_turb_init, my25_turb, tke_surf, my25_turb_end]
0085
0086 my25_turb_init - Called once to initialize my25_turb. Also reads namelist,
0087 and restart data for turbulent kinetic energy.
0088 Must be called before my25_turb.
0089
0090 my25_turb - Called every time step. Computes mixing coefficients
0091 for momentum, heat, and moisture. Also updates turbulent
0092 kinetic energy.
0093
0094 tke_surf - Prescribes lower boundary condition for
0095 turbulent kinetic energy
0096
0097 my25_turb_end - Called at the end of the model run to write restart
0098 data for turbulent kinetic energy.
0099
0100 Notes:
0101 1) A namelist interface controls runtime options.
0102 2) A restart file for TKE is generated by this module.
0103
0104 </PRE>
0105 </A><!-- END INTERFACE -->
0106 <!--------------------------------------------------------------------->
0107 <A NAME="DATA_TYPES">
0108 <HR>
0109 <H4>PUBLIC DATA</H4>
0110 <!-- BEGIN DATA_TYPES -->
0111 <PRE>
0112
0113 real, public, allocatable, dimension(:,:,:) :: TKE
0114
0115 TKE - global turbulent kinetic energy at model half levels in m^2/sec^2
0116 If there are "kx" model levels then TKE will have
0117 "kx+1" half levels.
0118
0119 </PRE>
0120 </A><!-- END DATA_TYPES -->
0121 <!--------------------------------------------------------------------->
0122 <A NAME="ROUTINES">
0123 <HR>
0124 <H4>PUBLIC ROUTINES</H4>
0125 <!-- BEGIN ROUTINES -->
0126 <PRE>
0127
0128 call my25_turb_init (ix, jx, kx)
0129
0130 input
0131
0132 ix, jx number of horizontal grid points in the global
0133 fields along the x and y axis, respectively.
0134 [integer]
0135
0136 kx number of vertical points in a column of the atmosphere
0137 [integer]
0138
0139 ---------------------------------------------------------------------
0140
0141 call my25_turb( delt, fracland, phalf, pfull, theta, &
0142 um, vm, zhalf, zfull, z0, &
0143 TKE, el0, el, akm, akh, &
0144 mask, kbot)
0145
0146 input
0147
0148 delt Model time step in seconds
0149 [real]
0150
0151 fracland Fractional amount of land beneath a grid box
0152 [real, dimension(:,:)]
0153
0154 phalf Pressure at half levels in pascals
0155 [real, dimension(:,:,nlev+1)]
0156
0157 pfull Pressure at full levels in pascals
0158 [real, dimension(:,:,nlev)]
0159
0160 theta Potential temperature [deg K] at full model levels
0161 [real, dimension(:,:,nlev)]
0162
0163 um Zonal wind component [m/s] at full model levels,
0164 [real, dimension(:,:,nlev)]
0165
0166 vm Meridional wind component [m/s] at full model levels,
0167 [real, dimension(:,:,nlev)]
0168
0169 zhalf Height at half levels in meters
0170 [real, dimension(:,:,nlev+1)]
0171
0172 zfull Height at full levels in meters
0173 [real, dimension(:,:,nlev)]
0174
0175 z0 Surface roughness length in meters
0176 [real, dimension(:,:)]
0177
0178 input/output
0179
0180 TKE Turbulent kinetic energy in m^2/sec^2.
0181 [real, dimension(:,:,nlev+1)]
0182
0183 output
0184
0185 el0 Characteristic length scale in meters.
0186 [real, dimension(:,:)]
0187
0188 el Master length scale in meters.
0189 [real, dimension(:,:,nlev+1)]
0190
0191 akm Mixing coefficient for momentum in m^2/sec.
0192 [real, dimension(:,:,nlev)]
0193
0194 akh Mixing coefficient for heat and moisture in m^2/sec.
0195 [real, dimension(:,:,nlev)]
0196
0197
0198 input (optional)
0199
0200 - for use with the step-mountain (eta) vertical coordinate
0201
0202 mask Mask (1. or 0.) for grid boxes above or below the ground.
0203 [real, dimension(:,:,nlev)]
0204
0205 kbot Index of the lowest model level
0206 [integer, dimension(:,:)]
0207
0208 - for use in diagnosing PBL depth
0209
0210 ustar Friction velocity at the surface (meters/sec)
0211 [real, dimension(:,:)]
0212
0213 bstar Buoyancy scale at the surface (meters/sec**2.)
0214 [real, dimension(:,:)]
0215
0216 output (optional)
0217
0218 h pbl depth (meters)
0219 [real, dimension(:,:)]
0220
0221 ---------------------------------------------------------------------
0222
0223 call tke_surf ( u_star, TKE, kbot )
0224
0225 input
0226
0227 u_star Surface friction velocity (m/s)
0228 [real, dimension(:,:)]
0229
0230 input/output
0231
0232 TKE Turbulent kinetic energy, in m^2/sec^2.
0233 [real, dimension(:,:,nlev+1)]
0234
0235 input (optional) - for use with the step-mountain (eta) vertical coordinate
0236
0237 kbot Index of the lowest model level
0238 [integer, dimension(:,:)]
0239
0240 ---------------------------------------------------------------------
0241
0242 call my25_turb_end()
0243
0244 There are no arguments to this routine.
0245
0246 </PRE>
0247 </A><!-- END ROUTINES -->
0248 <!--------------------------------------------------------------------->
0249 <A NAME="NAMELIST">
0250 <HR>
0251 <H4>NAMELIST</H4>
0252 <!-- BEGIN NAMELIST -->
0253 <PRE>
0254
0255 <b>&my25_turb_nml</b>
0256
0257 TKEmax Max value for TKE
0258 [real, default: TKEmax = 5.0 m^2/sec^2]
0259
0260 TKEmin Min value for TKE
0261 [real, default: TKEmin = 0.0 m^2/sec^2]
0262
0263 akmax Max value for akm & akh
0264 [real, default: akmax = 1.0e4 m^2/sec]
0265
0266 akmin_land Min value for akm & akh over land points
0267 (Applied to the lowest nk_lim levels)
0268 [real, default: akmin_land = 5.0 m^2/sec]
0269
0270 akmin_sea Min value for akm & akh over all ocean points
0271 (Applied to the lowest nk_lim levels)
0272 [real, default: akmin_sea = 0.0 m^2/sec]
0273
0274 nk_lim Lower bound on akm & akh applied at lowest nk_lim levels
0275 [integer, default: nk_lim = 2 ]
0276
0277 init_iters Number of iterations to be used in initializing TKE.
0278 Only used if the input restart data does not exist.
0279 [integer, default: init_iters = 20 ]
0280
0281 el0max Max value for el0
0282 [real, default: el0max = 1.0e6 meters]
0283
0284 el0min Min value for el0
0285 [real, default: el0min = 0.0 meters]
0286
0287 alpha_land Constant used in computing el0 ( land value )
0288 [real, default: alpha_land = 0.10 ]
0289
0290 alpha_sea Constant used in computing el0 ( sea value )
0291 [real, default: alpha_land = 0.10 ]
0292
0293 do_thv_stab If false, buoyancy computed using constant
0294 reference potential temperature.
0295 [logical, default: do_thv_stab = .true.]
0296
0297 use_old_cons If true, use original MY constants
0298 If false, use revised values
0299 [logical, default: use_old_cons = .false.]
0300
0301 kcrit Mixing coefficient threshold used to diagnose PBL top.
0302 PBL top is set the interpolated height where the mean
0303 of the momentum and tracer diffusion coefficient first
0304 falls beneath kcrit.
0305 [real, default: kcrit = 0.01 m2/sec]
0306
0307
0308 Notes:
0309
0310 * Diagnostic output from Mellor Yamada 2.5 is controlled by the
0311 namelist to vert_turb_driver module.
0312
0313 </PRE>
0314 </A><!-- END NAMELIST -->
0315 <!--------------------------------------------------------------------->
0316 <A NAME="DATA_SETS">
0317 <HR>
0318 <H4>DATA SETS</H4>
0319 <!-- BEGIN DATA_SETS -->
0320 <PRE>
0321
0322 This module automatically writes restart data to file
0323 "RESTART/my25_turb.res". This file has one record which
0324 contains the global turbulent kinetic energy field (see the
0325 section for PUBLIC DATA).
0326
0327 The input restart data is read from file "INPUT/my25_turb.res".
0328 If this restart file does not exist, the module will initialize
0329 TKE by setting TKE = TKEmin and iterating with the same input
0330 data "init_iters" times. init_iters is a namelist variable.
0331
0332 </PRE>
0333 </A><!-- END DATA_SETS -->
0334 <!--------------------------------------------------------------------->
0335 <A NAME="CHANGES">
0336 <HR>
0337 <H4>CHANGE HISTORY</H4>
0338 <!-- BEGIN CHANGES -->
0339 <PRE>
0340 <B><A HREF=".doc.log#my25_turb.f90">Revision history</A></B>
0341
0342 <b>changes</b> (8/31/99)
0343
0344 A diagnostic subroutine was added which diagnoses the pbl depth
0345 as the height to which the interpolated mean diffusivity coefficients
0346 (mean of akm and akh) falls beneath a specified value, kcrit (a
0347 new namelist variable which is defaulted to 0.01 m^2/sec).
0348
0349 </PRE>
0350 </A><!-- END CHANGES -->
0351 <!--------------------------------------------------------------------->
0352 <A NAME="ERRORS">
0353 <HR>
0354 <H4>ERROR MESSAGES</H4>
0355 <!-- BEGIN ERRORS -->
0356 <PRE>
0357
0358 <b>Fatal Errors in MY25_TURB</b>
0359
0360 <b>MY25_TURB_INIT has not been called</b>
0361 The initialization routine for this module must be called
0362 before calling routine MY25_TURB.
0363
0364 <b>divid by zero, x1 <= 0.0</b>
0365 This error should never occur.
0366 If it occurs, contact the developer.
0367
0368 <b>cannot request pbl depth if ustar and bstar are not also supplied</b>
0369 If you request (as an optional argument to my25_turb)
0370 the pbl depth, h, the calculation also needs the optional
0371 arguments ustar, and bstar.
0372
0373 </PRE>
0374 </A><!-- END ERRORS -->
0375 <!--------------------------------------------------------------------->
0376 <A NAME="REFERENCES">
0377 <HR>
0378 <H4>REFERENCES</H4>
0379 <!-- BEGIN REFERENCES -->
0380 <PRE>
0381
0382 Mellor, G.L. and T. Yamada, 1974: A hierarchy of turbulent
0383 closure models for planetary boundary layers. J. Atmos.
0384 Sci., 31, 1791-1806.
0385
0386 Mellor, G.L. and T. Yamada, 1982: Development of a turbulent
0387 closure model for geophysical fluid problems. Rev. Geophys.
0388 Space Phys. 20, 851-875.
0389
0390 </PRE>
0391 </A><!-- END REFERENCES -->
0392 <!--------------------------------------------------------------------->
0393 <A NAME="BUGS">
0394 <HR>
0395 <H4>KNOWN BUGS</H4>
0396 <!-- BEGIN BUGS -->
0397 <PRE>
0398
0399 There are no known bugs.
0400
0401 </PRE>
0402 </A><!-- END BUGS -->
0403 <!--------------------------------------------------------------------->
0404 <A NAME="NOTES">
0405 <HR>
0406 <H4>NOTES</H4>
0407 <!-- BEGIN NOTES -->
0408 <PRE>
0409
0410 None.
0411
0412 </PRE>
0413 </A><!-- END NOTES -->
0414 <!--------------------------------------------------------------------->
0415 <A NAME="PLANS">
0416 <HR>
0417 <H4>FUTURE PLANS</H4>
0418 <!-- BEGIN PLANS -->
0419 <PRE>
0420
0421 None.
0422
0423 </PRE>
0424 </A><!-- END PLANS -->
0425 <!--------------------------------------------------------------------->
0426
0427 <HR>
0428 </BODY>
0429 </HTML>