diff --git a/Docs/sphinx_doc/Inputs.rst b/Docs/sphinx_doc/Inputs.rst index 8e89789de..54ffac760 100644 --- a/Docs/sphinx_doc/Inputs.rst +++ b/Docs/sphinx_doc/Inputs.rst @@ -883,9 +883,11 @@ List of Parameters | | turb. diffusion | | | | | terms in QKE eqn. | | | +------------------------------------+--------------------+---------------------+-------------+ -| **erf.pbl_ysu_over_land** | Treat whole domain | bool | 1 | -| | as being over land | | | -| | for YSU PBL scheme | | | +| **erf.pbl_ysu_force_over_water** | Treat whole domain | bool | 0 | +| | as over water for | | | +| | YSU PBL scheme | | | +| | regardless of | | | +| | LSM/other inputs | | | +------------------------------------+--------------------+---------------------+-------------+ | **erf.pbl_ysu_land_Ribcr** | Over land critical | Real | 0.25 | | | Richardson number | | | diff --git a/Source/DataStructs/TurbStruct.H b/Source/DataStructs/TurbStruct.H index 19da79409..af9306966 100644 --- a/Source/DataStructs/TurbStruct.H +++ b/Source/DataStructs/TurbStruct.H @@ -96,7 +96,7 @@ struct TurbChoice { pp.query("pbl_mynn_diffuse_moistvars", pbl_mynn_diffuse_moistvars); } else if (pbl_type == PBLType::YSU) { pp.query("pbl_ysu_coriolis_freq", pbl_ysu_coriolis_freq); - pp.query("pbl_ysu_over_land", pbl_ysu_over_land); + pp.query("pbl_ysu_force_over_water", pbl_ysu_force_over_water); pp.query("pbl_ysu_land_Ribcr", pbl_ysu_land_Ribcr); pp.query("pbl_ysu_unst_Ribcr", pbl_ysu_unst_Ribcr); } @@ -191,7 +191,7 @@ struct TurbChoice { pp.query("pbl_mynn_diffuse_moistvars", pbl_mynn_diffuse_moistvars, lev); } else if (pbl_type == PBLType::YSU) { pp.query("pbl_ysu_coriolis_freq", pbl_ysu_coriolis_freq); - pp.query("pbl_ysu_over_land", pbl_ysu_over_land); + pp.query("pbl_ysu_force_over_water", pbl_ysu_force_over_water); pp.query("pbl_ysu_land_Ribcr", pbl_ysu_land_Ribcr); pp.query("pbl_ysu_unst_Ribcr", pbl_ysu_unst_Ribcr); } @@ -270,7 +270,7 @@ struct TurbChoice { amrex::Print() << "pbl_mynn_C5 : " << pbl_mynn_C5 << std::endl; } else if (pbl_type == PBLType::YSU) { amrex::Print() << "pbl_ysu_coriolis_freq : " << pbl_ysu_coriolis_freq << std::endl; - amrex::Print() << "pbl_ysu_over_land : " << pbl_ysu_over_land << std::endl; + amrex::Print() << "pbl_ysu_force_over_water : " << pbl_ysu_force_over_water << std::endl; amrex::Print() << "pbl_ysu_land_Ribcr : " << pbl_ysu_land_Ribcr << std::endl; amrex::Print() << "pbl_ysu_unst_Ribcr : " << pbl_ysu_unst_Ribcr << std::endl; } @@ -323,7 +323,7 @@ struct TurbChoice { // Model coefficients - YSU // TODO: Add parmparse for all of these above amrex::Real pbl_ysu_coriolis_freq = 1.0e-4; // TODO: make this consistent with coriolis forcing (but note WRF always uses 1e-4) - bool pbl_ysu_over_land = true; // TODO: pull from other inputs and make local + bool pbl_ysu_force_over_water = false; // Force YSU to act as if it is over water regardless of other inputs (for testing) amrex::Real pbl_ysu_land_Ribcr = 0.25; // Critical Bulk Richardson number of Land for stable conditions amrex::Real pbl_ysu_unst_Ribcr = 0.0; // Critical Bulk Richardson number for unstable conditions diff --git a/Source/Diffusion/PBLModels.cpp b/Source/Diffusion/PBLModels.cpp index 8bd9b9796..4771f9145 100644 --- a/Source/Diffusion/PBLModels.cpp +++ b/Source/Diffusion/PBLModels.cpp @@ -311,6 +311,7 @@ ComputeTurbulentViscosityPBL (const MultiFab& xvel, const auto& ws10av_arr = most->get_mac_avg(level,5)->const_array(mfi); const auto& t10av_arr = most->get_mac_avg(level,2)->const_array(mfi); const auto& t_surf_arr = most->get_t_surf(level)->const_array(mfi); + const auto& over_land_arr = (most->get_lmask(level)) ? most->get_lmask(level)->const_array(mfi) : Array4 {}; const Array4 z_nd_arr = use_terrain ? z_phys_nd->array(mfi) : Array4{}; const Real most_zref = most->get_zref(); @@ -339,7 +340,7 @@ ComputeTurbulentViscosityPBL (const MultiFab& xvel, // -- Diagnose PBL height - starting out assuming non-moist -- // loop is only over i,j in order to find height at each x,y const Real f0 = turbChoice.pbl_ysu_coriolis_freq; - const bool over_land = turbChoice.pbl_ysu_over_land; // TODO: make this local and consistent + const bool force_over_water = turbChoice.pbl_ysu_force_over_water; const Real land_Ribcr = turbChoice.pbl_ysu_land_Ribcr; const Real unst_Ribcr = turbChoice.pbl_ysu_unst_Ribcr; ParallelFor(xybx, [=] AMREX_GPU_DEVICE (int i, int j, int) noexcept @@ -360,7 +361,8 @@ ComputeTurbulentViscosityPBL (const MultiFab& xvel, // PBL Height: Stable Conditions Real Rib_cr; - if (over_land) { + bool over_land = (over_land_arr) ? over_land_arr(i,j,0) : 1; + if (over_land && !force_over_water) { Rib_cr = land_Ribcr; } else { // over water // Velocity at z=10 m comes from MOST -> currently the average using whatever averaging MOST uses.