Skip to content

Comments

Post process geogrid output to compute GWD input fields directly from source data#281

Open
islas wants to merge 20 commits intowrf-model:developfrom
islas:compute_gwdo
Open

Post process geogrid output to compute GWD input fields directly from source data#281
islas wants to merge 20 commits intowrf-model:developfrom
islas:compute_gwdo

Conversation

@islas
Copy link
Contributor

@islas islas commented Feb 4, 2026

These changes calculate the necessary fields in a manner that accounts for subgrid-scale orography. This in in support of subgrid orographic parameterization revisions for GWD in WRF.

Currently the gravity wave drag (GWD) input fields from WPS/geogrid are computed from averaging of the source data then performing the calculations for oa1-oa4, ol1-ol4, var, and con. This utility program instead calculates these orographic statistics directly from the source data at a subgrid-scale assuming the domain dx/dy are larger than the source data extent per value.

The code is designed to be run using the entry point ./util/compute_gwdo.py and will use ./namelist.wps if no namelist is provided.

The namelist is read to determine the geogrid domains output, source data tiles locations, and domain spacing. To avoid recalculating lat/lon positioning, the values are read from the mass staggered lat/lon locations within geo_em.d00.nc, geo_em.d01.nc, and so on. Source data is loaded as tiles are needed to compute the orographic statistics for a given domain cell based on the dx/dy extent of the cell at that lat/lon.

Once all calculations are done for all cells within a domain file, that file's original oa1-oa4, ol1-ol4, var, and con are modified with the newly calculated subgrid-scale statistics. Additionally, a MAX_EL field is created. This is repeated for all domains listed within the namelist.

@islas islas changed the base branch from master to develop February 4, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant