Skip to content

Commit

Permalink
Merge branch 'SubStepCompute' of https://github.com/AMLattanzi/ERF in…
Browse files Browse the repository at this point in the history
…to SubStepCompute
  • Loading branch information
AMLattanzi committed Dec 6, 2024
2 parents 2133796 + e326ba5 commit 2a69790
Show file tree
Hide file tree
Showing 8 changed files with 1,418 additions and 526 deletions.
110 changes: 110 additions & 0 deletions Docs/sphinx_doc/Inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,107 @@ List of Parameters
| **erf.project_initial_velocity** | project initial | true or false | true if anelastic; |
| | velocity? | | false if compressible |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.real_width** | Lateral boundary | Integer | 0 |
| | total width if | | |
| | use_real_bcs is | | |
| | true | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.real_set_width** | Lateral boundary | Integer | 0 |
| | specified zone | | |
| | width if | | |
| | use_real_bcs is | | |
| | true | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_debug_quiescent** | If init_type is | true or false | false |
| | metgrid, overwrite| | |
| | initial conditions| | |
| | and boundary | | |
| | conditions to be | | |
| | quiescent. | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_debug_isothermal** | If init_type is | true or false | false |
| | metgrid, overwrite| | |
| | theta to be 300 in| | |
| | initial conditions| | |
| | and boundary | | |
| | conditions. | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_debug_dry** | If init_type is | true or false | false |
| | metgrid, overwrite| | |
| | qv to be dry in | | |
| | initial conditions| | |
| | and boundary | | |
| | conditions. | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_debug_msf** | If init_type is | true or false | false |
| | metgrid, overwrite| | |
| | map scale factors | | |
| | to be 1. | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_debug_psfc** | If init_type is | true or false | false |
| | metgrid, overwrite| | |
| | surface pressure | | |
| | to be 10**5. | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_interp_theta** | If init_type is | true or false | false |
| | metgrid, calculate| | |
| | theta on origin | | |
| | model vertical | | |
| | levels and then | | |
| | interpolate onto | | |
| | the ERF vertical | | |
| | levels. | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_basic_linear** | If init_type is | true or false | false |
| | metgrid, use | | |
| | linear vertical | | |
| | interpolation and | | |
| | no quality | | |
| | control? | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_use_below_sfc** | If init_type is | true or false | true |
| | metgrid, use the | | |
| | origin data levels| | |
| | below the surface?| | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_use_sfc** | If init_type is | true or false | true |
| | metgrid, use the | | |
| | origin data level | | |
| | at the surface? | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_retain_sfc** | If init_type is | true or false | false |
| | metgrid, assign | | |
| | the lowest level | | |
| | directly using the| | |
| | surface value from| | |
| | the origin data? | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_proximity** | If init_type is | Real | 1000. |
| | metgrid, pressure | | |
| | differential for | | |
| | detecting origin | | |
| | levels that are | | |
| | problematically | | |
| | close together | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_order** | If init_type is | Integer | 2 |
| | metgrid, order of | | |
| | the Lagrange | | |
| | polynomial | | |
| | interpolation | | |
| | scheme for | | |
| | vertical | | |
| | interpolation | | |
+----------------------------------+-------------------+--------------------+-----------------------+
| **erf.metgrid_force_sfc_k** | If init_type is | Integer | 0 |
| | metgrid, force the| | |
| | origin data | | |
| | surface level to | | |
| | be included in the| | |
| | interpolation for | | |
| | this many ERF | | |
| | vertical levels | | |
+----------------------------------+-------------------+--------------------+-----------------------+

Notes
-----------------
Expand All @@ -1233,6 +1334,15 @@ The extent of the relaxation zone may be controlled with ``erf.real_width`` (cor
and ``erf.real_set_width`` (corresponding to WRF's **spec_zone**, typically set to 1), which corresponds to a relaxation zone with a
width of **real_width - real_set_width**.

If **erf.init_type = metgrid**, the problem is initialized with data
contained in the first NetCDF file provided via ``erf.nc_init_file_0``.
Lateral boundary conditions are derived from the sequence of NetCDF
files provided via ``erf.nc_init_file_0``. The sequence of
``erf.nc_init_file_0`` should be output from the WRF Preprocessing
System (WPS) listed chronologically starting with the earliest
timestamp. A minimum of two files are required to derive lateral
boundary conditions.

If **erf.init_type = input_sounding**, a WRF-style input sounding is read from
``erf.input_sounding_file``. This text file includes any set of levels that
goes at least up to the model top height. The first line includes the surface
Expand Down
15 changes: 15 additions & 0 deletions Source/ERF.H
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,21 @@ private:
// used with init_type == InitType::Input_Sounding
static bool init_sounding_ideal;

// Options for vertical interpolation of met_em*.nc data.
bool metgrid_debug_quiescent{false};
bool metgrid_debug_isothermal{false};
bool metgrid_debug_dry{false};
bool metgrid_debug_psfc{false};
bool metgrid_debug_msf{false};
bool metgrid_interp_theta{false};
bool metgrid_basic_linear{false};
bool metgrid_use_below_sfc{true};
bool metgrid_use_sfc{true};
bool metgrid_retain_sfc{false};
amrex::Real metgrid_proximity{1000.0};
int metgrid_order{2};
int metgrid_force_sfc_k{0};

// 1D CDF output (for ingestion in AMR-Wind)
static int output_1d_column;
static int column_interval;
Expand Down
15 changes: 15 additions & 0 deletions Source/ERF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,21 @@ ERF::ReadParameters ()
// Flag to trigger initialization from input_sounding like WRF's ideal.exe
pp.query("init_sounding_ideal", init_sounding_ideal);

// Options for vertical interpolation of met_em*.nc data.
pp.query("metgrid_debug_quiescent", metgrid_debug_quiescent);
pp.query("metgrid_debug_isothermal", metgrid_debug_isothermal);
pp.query("metgrid_debug_dry", metgrid_debug_dry);
pp.query("metgrid_debug_psfc", metgrid_debug_psfc);
pp.query("metgrid_debug_msf", metgrid_debug_msf);
pp.query("metgrid_interp_theta", metgrid_interp_theta);
pp.query("metgrid_basic_linear", metgrid_basic_linear);
pp.query("metgrid_use_below_sfc", metgrid_use_below_sfc);
pp.query("metgrid_use_sfc", metgrid_use_sfc);
pp.query("metgrid_retain_sfc", metgrid_retain_sfc);
pp.query("metgrid_proximity", metgrid_proximity);
pp.query("metgrid_order", metgrid_order);
pp.query("metgrid_force_sfc_k", metgrid_force_sfc_k);

// Set default to FullState for now ... later we will try Perturbation
interpolation_type = StateInterpType::FullState;
pp.query_enum_case_insensitive("interpolation_type" ,interpolation_type);
Expand Down
Loading

0 comments on commit 2a69790

Please sign in to comment.