|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include "ERF_DataStruct.H"

Go to the source code of this file.
Classes | |
| struct | PBLDerivativeDzInv |
| struct | PBLDerivativeDzInv_N |
| struct | PBLDerivativeDzInv_S |
| struct | PBLDerivativeDzInv_T |
Functions | |
| void | ComputeDiffusivityMYJ (double dt, const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, amrex::MultiFab &cons_in, amrex::MultiFab &eddyViscosity, const amrex::Geometry &geom, const TurbChoice &turbChoice, std::unique_ptr< SurfaceLayer > &SurfLayer, bool use_terrain_fitted_coords, bool use_moisture, int level, const amrex::BCRec *bc_ptr, bool, const std::unique_ptr< amrex::MultiFab > &z_phys_nd, const std::unique_ptr< amrex::MultiFab > &z_phys_cc, const MoistureComponentIndices &moisture_indices) |
| void | ComputeDiffusivityMYNN25 (const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &cons_in, amrex::MultiFab &eddyViscosity, const amrex::Geometry &geom, const TurbChoice &turbChoice, std::unique_ptr< SurfaceLayer > &SurfLayer, bool use_terrain_fitted_coords, bool use_moisture, int level, const amrex::BCRec *bc_ptr, bool, const std::unique_ptr< amrex::MultiFab > &z_phys_nd, const std::unique_ptr< amrex::MultiFab > &z_phys_cc, const MoistureComponentIndices &moisture_indices) |
| void | ComputeDiffusivityMYNNEDMF (const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &cons_in, amrex::MultiFab &eddyViscosity, const amrex::Geometry &geom, const TurbChoice &turbChoice, std::unique_ptr< SurfaceLayer > &SurfLayer, bool use_terrain_fitted_coords, bool use_moisture, int level, const amrex::BCRec *bc_ptr, bool, const std::unique_ptr< amrex::MultiFab > &z_phys_nd, const std::unique_ptr< amrex::MultiFab > &z_phys_cc, const MoistureComponentIndices &moisture_indices) |
| void | ComputeDiffusivityYSU (const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &cons_in, amrex::MultiFab &eddyViscosity, const amrex::Geometry &geom, const TurbChoice &turbChoice, std::unique_ptr< SurfaceLayer > &SurfLayer, bool use_terrain_fitted_coords, bool use_moisture, int level, const amrex::BCRec *bc_ptr, bool, const std::unique_ptr< amrex::MultiFab > &z_phys_nd, const std::unique_ptr< amrex::MultiFab > &z_phys_cc, const MoistureComponentIndices &moisture_indices) |
| void | ComputeDiffusivityMRF (const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &cons_in, amrex::MultiFab &eddyViscosity, const amrex::Geometry &geom, const TurbChoice &turbChoice, std::unique_ptr< SurfaceLayer > &SurfLayer, bool use_terrain_fitted_coords, bool use_moisture, int level, const amrex::BCRec *bc_ptr, bool, const std::unique_ptr< amrex::MultiFab > &z_phys_nd, const std::unique_ptr< amrex::MultiFab > &z_phys_cc, const MoistureComponentIndices &moisture_indices) |
| void | ComputeDiffusivityYSUNew (const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &cons_in, amrex::MultiFab &eddyViscosity, const amrex::Geometry &geom, const TurbChoice &turbChoice, std::unique_ptr< SurfaceLayer > &SurfLayer, bool use_terrain_fitted_coords, bool use_moisture, int level, const amrex::BCRec *bc_ptr, bool, const std::unique_ptr< amrex::MultiFab > &z_phys_nd, const std::unique_ptr< amrex::MultiFab > &z_phys_cc, const MoistureComponentIndices &moisture_indices, const amrex::MultiFab *qheating_rates=nullptr) |
| AMREX_GPU_DEVICE AMREX_FORCE_INLINE void | ComputeVerticalDerivativesPBL (int i, int j, int k, const amrex::Array4< const amrex::Real > &uvel, const amrex::Array4< const amrex::Real > &vvel, const amrex::Array4< const amrex::Real > &cell_data, const int izmin, const int izmax, const PBLDerivativeDzInv &dz_inv, const bool c_ext_dir_on_zlo, const bool c_ext_dir_on_zhi, const bool u_ext_dir_on_zlo, const bool u_ext_dir_on_zhi, const bool v_ext_dir_on_zlo, const bool v_ext_dir_on_zhi, amrex::Real &dthetadz, amrex::Real &dudz, amrex::Real &dvdz, const MoistureComponentIndices &moisture_indices) |
| AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real | ComputeQKESourceTerms (int i, int j, int k, const amrex::Array4< const amrex::Real > &uvel, const amrex::Array4< const amrex::Real > &vvel, const amrex::Array4< const amrex::Real > &cell_data, const amrex::Array4< const amrex::Real > &cell_prim, const amrex::Array4< const amrex::Real > &K_turb, const amrex::Box &domain, const PBLDerivativeDzInv dz_inv, amrex::Real pbl_mynn_B1_l, const amrex::Real theta_mean, const MoistureComponentIndices &moisture_indices, bool c_ext_dir_on_zlo, bool c_ext_dir_on_zhi, bool u_ext_dir_on_zlo, bool u_ext_dir_on_zhi, bool v_ext_dir_on_zlo, bool v_ext_dir_on_zhi) |
| void ComputeDiffusivityMRF | ( | const amrex::MultiFab & | xvel, |
| const amrex::MultiFab & | yvel, | ||
| const amrex::MultiFab & | cons_in, | ||
| amrex::MultiFab & | eddyViscosity, | ||
| const amrex::Geometry & | geom, | ||
| const TurbChoice & | turbChoice, | ||
| std::unique_ptr< SurfaceLayer > & | SurfLayer, | ||
| bool | use_terrain_fitted_coords, | ||
| bool | use_moisture, | ||
| int | level, | ||
| const amrex::BCRec * | bc_ptr, | ||
| bool | , | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_nd, | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_cc, | ||
| const MoistureComponentIndices & | moisture_indices | ||
| ) |
Compute eddy diffusivities of momentum (eddy viscosity) and heat using the Medium Range Forecast (MRF) boundary layer scheme based on Hong and Pan (1996). Reference: Hong, S. Y., and H.-L. Pan, 1996: Nonlocal Boundary Layer Vertical Diffusion in a Medium-Range Forecast Model. Monthly Weather Review, 124, 2322-2339. https://doi.org/10.1175/1520-0493(1996)124<2322:NBLVDI>2.0.CO;2
| [in] | xvel | Velocity in x-dir |
| [in] | yvel | Velocity in y-dir |
| [in] | cons_in | Cell center conserved quantities |
| [out] | eddyViscosity | Holds turbulent viscosity |
| [in] | geom | Problem geometry |
| [in] | turbChoice | Container with turbulence parameters |
| [in] | SurfLayer | Pointer to Monin-Obukhov class if instantiated |
| [in] | use_moisture | If we have microphysics enabled |
| [in] | level | Current level |
| [in] | bc_ptr | Pointer to array with boundary condition info |
| [in] | vert_only | Only compute vertical eddy diffusivities |
| [in] | z_phys_nd | Physical location of grid nodes, if terrain (or grid stretching) is enabled |
| [in] | z_phys_cc | Physical location of cell centers |
| void ComputeDiffusivityMYJ | ( | double | dt, |
| const amrex::MultiFab & | xvel, | ||
| const amrex::MultiFab & | yvel, | ||
| amrex::MultiFab & | cons_in, | ||
| amrex::MultiFab & | eddyViscosity, | ||
| const amrex::Geometry & | geom, | ||
| const TurbChoice & | turbChoice, | ||
| std::unique_ptr< SurfaceLayer > & | SurfLayer, | ||
| bool | use_terrain_fitted_coords, | ||
| bool | use_moisture, | ||
| int | level, | ||
| const amrex::BCRec * | bc_ptr, | ||
| bool | , | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_nd, | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_cc, | ||
| const MoistureComponentIndices & | moisture_indices | ||
| ) |
Compute eddy diffusivities of momentum (eddy viscosity) and heat using the Mellor-Yamada-Janjić (MYJ) boundary layer scheme. Reference: Janjić, Z. I., 1994: The Step-Mountain Eta Coordinate Model: Further Developments of the Convection, Viscous Sublayer, and Turbulence Closure Schemes. Monthly Weather Review, 122, 927–945. https://doi.org/10.1175/1520-0493(1994)122<0927:TSMECM>2.0.CO;2
| [in] | xvel | Velocity in x-dir |
| [in] | yvel | Velocity in y-dir |
| [in] | cons_in | Cell center conserved quantities |
| [out] | eddyViscosity | Holds turbulent viscosity |
| [in] | geom | Problem geometry |
| [in] | turbChoice | Container with turbulence parameters |
| [in] | SurfLayer | Pointer to Monin-Obukhov class if instantiated |
| [in] | use_moisture | If we have microphysics enabled |
| [in] | level | Current level |
| [in] | bc_ptr | Pointer to array with boundary condition info |
| [in] | vert_only | Only compute vertical eddy diffusivities |
| [in] | z_phys_nd | Physical location of grid nodes, if terrain (or grid stretching) is enabled |
| [in] | z_phys_cc | Physical location of cell centers |
| void ComputeDiffusivityMYNN25 | ( | const amrex::MultiFab & | xvel, |
| const amrex::MultiFab & | yvel, | ||
| const amrex::MultiFab & | cons_in, | ||
| amrex::MultiFab & | eddyViscosity, | ||
| const amrex::Geometry & | geom, | ||
| const TurbChoice & | turbChoice, | ||
| std::unique_ptr< SurfaceLayer > & | SurfLayer, | ||
| bool | use_terrain_fitted_coords, | ||
| bool | use_moisture, | ||
| int | level, | ||
| const amrex::BCRec * | bc_ptr, | ||
| bool | , | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_nd, | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_cc, | ||
| const MoistureComponentIndices & | moisture_indices | ||
| ) |
Compute eddy diffusivities of momentum (eddy viscosity) and heat using the Mellor-Yamada-Nakanishi-Niino Level amrex::Real(2.5) PBL scheme
| [in] | xvel | Velocity in x-dir |
| [in] | yvel | Velocity in y-dir |
| [in] | cons_in | Cell center conserved quantities |
| [out] | eddyViscosity | Holds turbulent viscosity |
| [in] | geom | Problem geometry |
| [in] | turbChoice | Container with turbulence parameters |
| [in] | SurfLayer | Pointer to Monin-Obukhov class if instantiated |
| [in] | use_moisture | If we have microphysics enabled |
| [in] | level | Current level |
| [in] | bc_ptr | Pointer to array with boundary condition info |
| [in] | vert_only | Only compute vertical eddy diffusivities |
| [in] | z_phys_nd | Physical location of grid nodes, if terrain (or grid stretching) is enabled |
| [in] | z_phys_cc | Physical location of cell centers |
| void ComputeDiffusivityMYNNEDMF | ( | const amrex::MultiFab & | xvel, |
| const amrex::MultiFab & | yvel, | ||
| const amrex::MultiFab & | cons_in, | ||
| amrex::MultiFab & | eddyViscosity, | ||
| const amrex::Geometry & | geom, | ||
| const TurbChoice & | turbChoice, | ||
| std::unique_ptr< SurfaceLayer > & | SurfLayer, | ||
| bool | use_terrain_fitted_coords, | ||
| bool | use_moisture, | ||
| int | level, | ||
| const amrex::BCRec * | bc_ptr, | ||
| bool | , | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_nd, | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_cc, | ||
| const MoistureComponentIndices & | moisture_indices | ||
| ) |
Compute eddy diffusivities of momentum (eddy viscosity) and heat using the Mellor-Yamada-Nakanishi-Niino Level amrex::Real(2.5) PBL scheme
| [in] | xvel | Velocity in x-dir |
| [in] | yvel | Velocity in y-dir |
| [in] | cons_in | Cell center conserved quantities |
| [out] | eddyViscosity | Holds turbulent viscosity |
| [in] | geom | Problem geometry |
| [in] | turbChoice | Container with turbulence parameters |
| [in] | SurfLayer | Pointer to Monin-Obukhov class if instantiated |
| [in] | use_moisture | If we have microphysics enabled |
| [in] | level | Current level |
| [in] | bc_ptr | Pointer to array with boundary condition info |
| [in] | vert_only | Only compute vertical eddy diffusivities |
| [in] | z_phys_nd | Physical location of grid nodes, if terrain (or grid stretching) is enabled |
| [in] | z_phys_cc | Physical location of cell centers |
| void ComputeDiffusivityYSU | ( | const amrex::MultiFab & | xvel, |
| const amrex::MultiFab & | yvel, | ||
| const amrex::MultiFab & | cons_in, | ||
| amrex::MultiFab & | eddyViscosity, | ||
| const amrex::Geometry & | geom, | ||
| const TurbChoice & | turbChoice, | ||
| std::unique_ptr< SurfaceLayer > & | SurfLayer, | ||
| bool | use_terrain_fitted_coords, | ||
| bool | use_moisture, | ||
| int | level, | ||
| const amrex::BCRec * | bc_ptr, | ||
| bool | , | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_nd, | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_cc, | ||
| const MoistureComponentIndices & | moisture_indices | ||
| ) |
Compute eddy diffusivities of momentum (eddy viscosity) and heat using the Yonsei University PBL scheme
| [in] | xvel | Velocity in x-dir |
| [in] | yvel | Velocity in y-dir |
| [in] | cons_in | Cell center conserved quantities |
| [out] | eddyViscosity | Holds turbulent viscosity |
| [in] | geom | Problem geometry |
| [in] | turbChoice | Container with turbulence parameters |
| [in] | SurfLayer | Pointer to Monin-Obukhov class if instantiated |
| [in] | use_moisture | If we have microphysics enabled |
| [in] | level | Current level |
| [in] | bc_ptr | Pointer to array with boundary condition info |
| [in] | vert_only | Only compute vertical eddy diffusivities |
| [in] | z_phys_nd | Physical location of grid nodes, if terrain (or grid stretching) is enabled |
| [in] | z_phys_cc | Physical location of cell centers |
| void ComputeDiffusivityYSUNew | ( | const amrex::MultiFab & | xvel, |
| const amrex::MultiFab & | yvel, | ||
| const amrex::MultiFab & | cons_in, | ||
| amrex::MultiFab & | eddyViscosity, | ||
| const amrex::Geometry & | geom, | ||
| const TurbChoice & | turbChoice, | ||
| std::unique_ptr< SurfaceLayer > & | SurfLayer, | ||
| bool | use_terrain_fitted_coords, | ||
| bool | use_moisture, | ||
| int | level, | ||
| const amrex::BCRec * | bc_ptr, | ||
| bool | , | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_nd, | ||
| const std::unique_ptr< amrex::MultiFab > & | z_phys_cc, | ||
| const MoistureComponentIndices & | moisture_indices, | ||
| const amrex::MultiFab * | qheating_rates = nullptr |
||
| ) |
Compute eddy diffusivities of momentum (eddy viscosity) and heat using the WRF Yonsei University (YSU) PBL scheme.
Based on: Hong, Noh & Dudhia (2006), MWR, https://doi.org/10.1175/MWR3250.1 Hong (2010), QJRMS, https://doi.org/10.1002/qj.665
Features: three-pass bulk-Richardson PBLH diagnosis, nonlocal countergradient fluxes, explicit entrainment at PBL top, and grid-adaptive Richardson-number mixing in free atmosphere.
| [in] | xvel | x-direction velocity |
| [in] | yvel | y-direction velocity |
| [in] | cons_in | cell-center conserved quantities |
| [out] | eddyViscosity | turbulent eddy viscosity |
| [in] | geom | problem geometry |
| [in] | turbChoice | turbulence parameter container |
| [in] | SurfLayer | Monin-Obukhov surface layer object |
| [in] | use_terrain_fitted_coords | flag for terrain coordinates |
| [in] | use_moisture | flag for moisture active |
| [in] | level | AMR level |
| [in] | bc_ptr | boundary condition array |
| [in] | vert_only | compute vertical diffusivity only |
| [in] | z_phys_nd | physical node heights (terrain) |
| [in] | z_phys_cc | physical cell-center heights |
| [in] | moisture_indices | component index mapping for moisture variables |
| [in] | qheating_rates | radiation heating rates (SW, LW components); optional |
| AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real ComputeQKESourceTerms | ( | int | i, |
| int | j, | ||
| int | k, | ||
| const amrex::Array4< const amrex::Real > & | uvel, | ||
| const amrex::Array4< const amrex::Real > & | vvel, | ||
| const amrex::Array4< const amrex::Real > & | cell_data, | ||
| const amrex::Array4< const amrex::Real > & | cell_prim, | ||
| const amrex::Array4< const amrex::Real > & | K_turb, | ||
| const amrex::Box & | domain, | ||
| const PBLDerivativeDzInv | dz_inv, | ||
| amrex::Real | pbl_mynn_B1_l, | ||
| const amrex::Real | theta_mean, | ||
| const MoistureComponentIndices & | moisture_indices, | ||
| bool | c_ext_dir_on_zlo, | ||
| bool | c_ext_dir_on_zhi, | ||
| bool | u_ext_dir_on_zlo, | ||
| bool | u_ext_dir_on_zhi, | ||
| bool | v_ext_dir_on_zlo, | ||
| bool | v_ext_dir_on_zhi | ||
| ) |
Function for computing the QKE source terms (NN09, Eqn. 5).
| [in] | u | velocity in x-dir |
| [in] | v | velocity in y-dir |
| [in] | cell_data | conserved cell center vars |
| [in] | cell_prim | primitive cell center vars |
| [in] | K_turb | turbulent viscosity |
| [in] | domain | box of the whole domain |
| [in] | dz_inv | inverse spacings for interior and Dirichlet-boundary differences |
| [in] | pbl_mynn_B1_l | a parameter |
| [in] | theta_mean | average theta |
Referenced by if().


| AMREX_GPU_DEVICE AMREX_FORCE_INLINE void ComputeVerticalDerivativesPBL | ( | int | i, |
| int | j, | ||
| int | k, | ||
| const amrex::Array4< const amrex::Real > & | uvel, | ||
| const amrex::Array4< const amrex::Real > & | vvel, | ||
| const amrex::Array4< const amrex::Real > & | cell_data, | ||
| const int | izmin, | ||
| const int | izmax, | ||
| const PBLDerivativeDzInv & | dz_inv, | ||
| const bool | c_ext_dir_on_zlo, | ||
| const bool | c_ext_dir_on_zhi, | ||
| const bool | u_ext_dir_on_zlo, | ||
| const bool | u_ext_dir_on_zhi, | ||
| const bool | v_ext_dir_on_zlo, | ||
| const bool | v_ext_dir_on_zhi, | ||
| amrex::Real & | dthetadz, | ||
| amrex::Real & | dudz, | ||
| amrex::Real & | dvdz, | ||
| const MoistureComponentIndices & | moisture_indices | ||
| ) |
Referenced by ComputeDiffusivityMRF(), ComputeDiffusivityMYJ(), ComputeDiffusivityMYNN25(), ComputeDiffusivityMYNNEDMF(), ComputeDiffusivityYSU(), ComputeDiffusivityYSUNew(), and ComputeQKESourceTerms().

