Back to home page

MITgcm

 
 

    


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 diffusivity</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="#ROUTINES">ROUTINES</A> / 
                0008 <A HREF="#NAMELIST">NAMELIST</A> / 
                0009 <A HREF="#CHANGES">CHANGES</A> / 
                0010 <A HREF="#ERRORS">ERRORS</A> / 
                0011 <A HREF="#REFERENCES">REFERENCES</A> / 
                0012 <A HREF="#NOTES">NOTES</A> 
                0013 </FONT>
                0014 <BR><BR></DIV><HR>
                0015 
                0016 
                0017 <H2>Module diffusivity_mod</H2>
                0018 <A NAME="HEADER">
                0019 <PRE>
                0020      <B>Contact:</B>   Steve Klein and Isaac Held
                0021      <B>Reviewers:</B>
                0022 
                0023      <B><A HREF=".doc.log#diffusivity.f90">Tags/Status</A></B>
                0024 </PRE>
                0025 </A><!-- END HEADER -->
                0026 <!--------------------------------------------------------------------->
                0027 <A NAME="OVERVIEW">
                0028 <HR>
                0029 <H4>OVERVIEW</H4>
                0030 <!-- BEGIN OVERVIEW -->
                0031 <PRE>
                0032 
                0033      This routine computes the atmospheric vertical diffusivity
                0034      coefficients of momentum and temperature plus tracers at all
                0035      half-levels interior to the atmosphere.   
                0036 
                0037 </PRE>
                0038 </A><!-- END OVERVIEW -->
                0039 <!--------------------------------------------------------------------->
                0040 <A NAME="DESCRIPTION">
                0041 <!-- BEGIN DESCRIPTION -->
                0042 <PRE>
                0043 
                0044      The vertical diffusivity coefficients are calculated separately 
                0045      for the planetary boundary layer (PBL) and the free atmosphere. 
                0046      Note that the diffusivity coefficient for temperature is the same 
                0047      as that for all tracers.
                0048 
                0049      In the PBL, the default prescription of diffusivities is the 
                0050      K-profile boundary layer scheme. A second method is to do the 
                0051      Old Climate Model's version.  In the free atmosphere there
                0052      there are two options, one of which duplicates that used in
                0053      the old Skyhii model.
                0054 
                0055      A full description can be found <A HREF="diffusivity.tech.ps">here</A>.
                0056 
                0057 </PRE>
                0058 </A><!-- END DESCRIPTION -->
                0059 <!--------------------------------------------------------------------->
                0060 <A NAME="MODULES_USED">
                0061 <HR>
                0062 <H4>OTHER MODULES USED</H4>
                0063 <!-- BEGIN MODULES_USED -->
                0064 <PRE>
                0065 
                0066 utilities_mod
                0067 constants_mod
                0068 monin_obukhov_mod     
                0069 
                0070 </PRE>
                0071 </A><!-- END MODULES_USED -->
                0072 <!--------------------------------------------------------------------->
                0073 <A NAME="INTERFACE">
                0074 <HR>
                0075 <H4>PUBLIC INTERFACE</H4>
                0076 <!-- BEGIN INTERFACE -->
                0077 <PRE>
                0078 
                0079 use diffusivity_mod [,only: diffusivity]
                0080 
                0081 diffusivity -         called every physics time step to compute diffusivity 
                0082                       coefficients.
                0083 
                0084 Notes:
                0085 
                0086  1) A namelist interface controls runtime options
                0087  2) An initialization routine is called upon the first call to 
                0088     diffusivity.
                0089  2) No restart file is generated by this module.
                0090  3) No other data files are needed.
                0091 
                0092 </PRE>
                0093 </A><!-- END INTERFACE -->
                0094 <!--------------------------------------------------------------------->
                0095 <A NAME="ROUTINES">
                0096 <HR>
                0097 <H4>PUBLIC ROUTINES</H4>
                0098 <!-- BEGIN ROUTINES -->
                0099 <PRE>
                0100 
                0101 <b>call diffusivity</b> (t, q, u, v, p_full, p_half, z_full, z_half,
                0102                          u_star, b_star, h, k_m, k_t, kbot)
                0103 
                0104 input:
                0105   
                0106        t     : temperature (K) [real, dimension(:,:,:) -- (:,:,pressure), 
                0107                third index running from top of atmosphere to bottom]
                0108 
                0109        q     : water vapor specific humidity (nondimensional) 
                0110                [real, dimension(:,:,:)]
                0111                 
                0112        u     : zonal wind (m/s) [real, dimension(:,:)]
                0113 
                0114        v     : meridional wind (m/s) [real, dimension(:,:,:)] 
                0115 
                0116        p_full : pressure at full levels (pascals)
                0117 
                0118        p_half : pressure at half levels (pascals)
                0119 
                0120        z_full : height of full levels (m)
                0121                 [real, dimension(:,:,:), size(z_full,3) = size(t,3)]
                0122 
                0123        z_half : height of  half levels (m)
                0124                 [real, dimension(:,:,:), size(z_half,3) = size(t,3) +1
                0125                 z_half(:,:,size(z_half,3)) must be height of surface 
                0126                 (for non-eta models)!]
                0127 
                0128        u_star: friction velocity (m/s)
                0129                [real, dimension(:,:)]
                0130                
                0131        b_star: buoyancy scale (m/s**2)
                0132                [real, dimension(:,:)]
                0133                
                0134                    surface stress = ustar*ustar
                0135                    surface buoyancy flux = ustar*bstar 
                0136                       bstar > 0 => upward flux
                0137 
                0138                  (u_star and b_star are output from  
                0139                   mo_drag in monin_obukhov_mod
                0140                   along with the drag_coeffcients )
                0141 
                0142 
                0143 output: 
                0144 
                0145          h     : pbl depth (meters) [real, dimension(:,:)]
                0146     
                0147        k_m     : momentum diffusivity coefficient ((meters)**2./second)
                0148                  [real, dimension(:,:,:)]
                0149 
                0150        k_t     : temperature, vapor and scalars diffusivity coefficient 
                0151                  ((meters)**2./second)
                0152                  [real, dimension(:,:,:)]
                0153 
                0154                 defined at half-levels
                0155                 size(k_m and k_t,3) should be at least as large as size(t,3)
                0156                 only the returned values at 
                0157                       levels 2 to size(t,3) are meaningful
                0158                 other values will be returned as zero
                0159                 That is k_m(:,:,2) is the diffusivity coefficient
                0160                 between full model levels 1 and 2. (Full model level 1
                0161                 is the top level of the model.)
                0162 
                0163 optional input:
                0164 
                0165        kbot    : lowest true model level (for use with eta grid point model)
                0166                  [integer, dimension(:,:)]
                0167 
                0168 
                0169 
                0170 </PRE>
                0171 </A><!-- END ROUTINES -->
                0172 <!--------------------------------------------------------------------->
                0173 <A NAME="NAMELIST">
                0174 <HR>
                0175 <H4>NAMELIST</H4>
                0176 <!-- BEGIN NAMELIST -->
                0177 <PRE>
                0178 
                0179 <b>&diffusivity_nml</b>
                0180 
                0181 fixed_depth         should the boundary layer depth be fixed?
                0182                     [logical, default: fixed_depth = .false.]
                0183 
                0184 depth_0             height of fixed depth boundary (meters)
                0185                     [real, default: depth_0 = 5000.]
                0186 
                0187 frac_inner          height of the surface layer as a fraction of
                0188                     the boundary layer depth
                0189                     [real, default: frac_inner = 0.1]
                0190 
                0191 rich_crit_pbl       critical richardson number used to compute 
                0192                     boundary layer depth in the neutral or stable
                0193                     case
                0194                     [real, default: rich_crit_pbl = 1.0]
                0195 
                0196 entr_ratio          ratio of entrainment buoyancy flux to surface
                0197                     buoyancy flux (must be >= 0.)
                0198                     [real, default: entr_ratio = 0.2]
                0199 
                0200 parcel_buoy         scaling factor for the excess buoyancy of the
                0201                     parcel used to determine the boundary layer
                0202                     depth in the unstable case
                0203                     [real, default: parcel_buoy = 2.]
                0204 
                0205 znom                nominal boundary layer depth used only in the
                0206                     calculation of surface layer vertical velocity
                0207                     scale.  this velocity scale is used only in
                0208                     the calculation of parcel buoyancy in the unstable
                0209                     case (meters)
                0210                     [real, default: znom = 1000.]
                0211 
                0212 free_atm_diff       should there be richardson number dependent
                0213                     mixing in the free atmosphere?
                0214                     [logical, default: free_atm_diff = .false.]
                0215 
                0216 free_atm_skyhi_diff should the free atmospheric diffusion
                0217                     depend on model level thickness and the 
                0218                     prandtl number depend on the richardson number
                0219                     (as in the formulation previously used in skyhi)?
                0220                     [logical, default: free_atm_skyhi_diff = .false.]
                0221 
                0222 pbl_mcm             When .true., the pbl K profile is that of the Manabe Climate Model.
                0223                     [logical, default: pbl_mcm = .false.]
                0224 
                0225 rich_crit_diff      critical richardson number beneath which free
                0226                     atmospheric diffusion occurs
                0227                     [real, default: rich_crit_diff = 0.25 ] 
                0228 
                0229 mix_len             mixing length used in free atmospheric diffusion
                0230                     (meters)
                0231                     [real, default: mix_len = 30.]
                0232 
                0233 rich_prandtl        Prandtl number used in the scaling of k_m to
                0234                     k_t in the free atmospheric diffusion 
                0235                     [real, default: rich_prandtl = 1.]
                0236 
                0237 background_m        background value of K for momentum (m**2/sec)
                0238                     [real, default: background_m = 0.]
                0239 
                0240 background_t        background value of K for temperature and tracers
                0241                     (m**2/sec)
                0242                     [real, default: background_t = 0.]
                0243 
                0244 Notes:  (1) To get Climate Model's PBL diffusivities set
                0245             pbl_mcm to TRUE, fixed_depth to TRUE, 
                0246             depth_0 to 5000. and frac_inner to 0.015.
                0247 
                0248         (2) To get K-profile diffusivities, pbl_mcm
                0249             must be FALSE (default) and fixed_depth must be 
                0250             FALSE (default).
                0251 
                0252         (3) To have any vertical diffusion in the free atmosphere
                0253             free_atm_diff must be set to TRUE.
                0254 
                0255         (4) To get skyhi free atmospheric diffusivities, both
                0256             free_atm_skyhi_diff and free_atm_diff must be set
                0257             to true.
                0258 
                0259 </PRE>
                0260 </A><!-- END NAMELIST -->
                0261 <!--------------------------------------------------------------------->
                0262 <A NAME="CHANGES">
                0263 <HR>
                0264 <H4>CHANGE HISTORY</H4>
                0265 <!-- BEGIN CHANGES -->
                0266 <PRE>
                0267 <B><A HREF=".doc.log#diffusivity.f90">Revision history</A></B>
                0268 
                0269 <b>changes</b> (10/4/1999)
                0270 
                0271      MPP version created. Minor changes in open_file, error_mesg,
                0272      and Fortran write statements. Answers should reproduce the
                0273      previous version.
                0274 
                0275 <b>changes</b> (8/16/1999)
                0276 
                0277      Code to set background diffusivities is moved out of
                0278      diffusivity_free subroutine and into the diffusivity subroutine
                0279      so that it is possible to set a background level of diffusivity
                0280      even if free_atm_diff = FALSE.  
                0281      (This was impossible in previous revisions).
                0282 
                0283 </PRE>
                0284 </A><!-- END CHANGES -->
                0285 <!--------------------------------------------------------------------->
                0286 <A NAME="ERRORS">
                0287 <HR>
                0288 <H4>ERROR MESSAGES</H4>
                0289 <!-- BEGIN ERRORS -->
                0290 <PRE>
                0291 
                0292 diffusivity_init:
                0293 
                0294      namelist parameters are checked to see if valid selections
                0295      have been made.  The following settings are prohibited and
                0296      the model will shut down if any are chosen:
                0297 
                0298      (1) frac_inner <= 0 or frac_inner >= 1.
                0299      (2) rich_crit_pbl < 0.
                0300      (3) entr_ratio < 0.
                0301      (4) znom < 0.
                0302      (5) free_atm_skyhi_diff = TRUE and free_atm_diff = FALSE
                0303      (6) rich_crit_diff <= 0.
                0304      (7) mix_len < 0.
                0305      (8) rich_prandtl < 0.
                0306      (9) background_m < 0.
                0307      (10) background_t < 0.
                0308 
                0309 </PRE>
                0310 </A><!-- END ERRORS -->
                0311 <!--------------------------------------------------------------------->
                0312 <A NAME="REFERENCES">
                0313 <HR>
                0314 <H4>REFERENCES</H4>
                0315 <!-- BEGIN REFERENCES -->
                0316 <PRE>
                0317 
                0318      See <A HREF="diffusivity.tech.ps">technical documention</A>.
                0319 
                0320 </PRE>
                0321 </A><!-- END REFERENCES -->
                0322 <!--------------------------------------------------------------------->
                0323 <A NAME="NOTES">
                0324 <HR>
                0325 <H4>NOTES</H4>
                0326 <!-- BEGIN NOTES -->
                0327 <PRE>
                0328 
                0329     None.
                0330 
                0331 </PRE>
                0332 </A><!-- END NOTES -->
                0333 <!--------------------------------------------------------------------->
                0334 <A NAME="PLANS">
                0335 <HR>
                0336 <H4>FUTURE PLANS</H4>
                0337 <!-- BEGIN PLANS -->
                0338 <PRE>
                0339 
                0340     None.
                0341 
                0342 </PRE>
                0343 </A><!-- END PLANS -->
                0344 <!--------------------------------------------------------------------->
                0345 
                0346 <HR>
                0347 </BODY>
                0348 </HTML>