-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metgrid interpolator #1630
Merged
AMLattanzi
merged 26 commits into
erf-model:development
from
wiersema1:metgrid_interpolator
Dec 6, 2024
Merged
Metgrid interpolator #1630
AMLattanzi
merged 26 commits into
erf-model:development
from
wiersema1:metgrid_interpolator
Dec 6, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t. This includes,\n * an updated vertical interpolator used when interpolating met_em files onto the ERF vertical grid.\n * option to either interpolate potential temperature or interpolate pressure and temperature then calculate potential temperature.\n * debugging runtime options to overwrite incoming met_em data with idealized hard-coded values.
wiersema1
force-pushed
the
metgrid_interpolator
branch
from
October 1, 2024 20:34
d4769fa
to
44bae4b
Compare
… to use fixed-size amrex Array1D variables instead of amrex Vector. This was done in an attempt to satisfy HIP, which would choke when resizing Vectors.
…eta an input parameter.
…ABs for each met_em timestamp to a single FAB since we only ever need access to these FABs for whatever met_em time is currently being worked on. Minor clean up of the metgrid initialization code.
…roughout Initialization/ERF_init_from_metgrid.cpp.
…n the vertical interpolation scheme used for met_em data
… into metgrid_interpolator
AMLattanzi
changed the title
**DO NOT MERGE** Metgrid interpolator
Metgrid interpolator
Nov 13, 2024
… "real" that there are sufficient points in a relaxation zone for computing the laplacian.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a WRF-styled vertical interpolation and quality control to the init_type="metgrid" initialization. This approach closely follows that used in WRF's real.exe (see WRF/dyn_em/module_initialize_real.F). The WRF quality control algorithm prunes data if points are deemed "too close" in pressure, which becomes messy in ERF since we are on a height-based grid and we don't yet have pressure on the ERF grid since it is calculated using the variables that we are interpolating. In an attempt to be apples-to-apples with WRF, the ERF QC checks whether points are problematically close together by calculating a pressure difference assuming a baroclinic atmosphere. This approach seems to work well except for some cases near the surface where ERF QC differs from WRF QC and results in a slightly different selection of points being fed into the vertical interpolator (see attached figures).
There are several new input parameters and the docs have been updated accordingly. Default values are in parenthesis below.
metgrid_interp_theta controls how potential temperature is to be set when init_type="metgrid". Previously, potential temperature was calculated using the origin data and then vertically interpolated onto the ERF grid. This now corresponds to metgrid_interp_theta=true. When metgrid_interp_theta=false, the origin data pressure and temperature are vertically interpolated onto the ERF grid and then used to calculate the potential temperature. Note that pressure is interpolated not with respect to height but rather p_0exp(-CONST_GRAVz/(t_0*R_d)), i.e., pressure in a baroclinic atmosphere. All other variables are interpolated with respect to height.
Several debugging options are also included, which will likely be useful for future development. The input parameters are as follows.
These changes have been evaluated using several test cases that all use met_em files generated with GFS origin data. These include,