Skip to content
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

Wrf forward operators #708

Merged
merged 20 commits into from
Aug 15, 2024
Merged

Wrf forward operators #708

merged 20 commits into from
Aug 15, 2024

Conversation

braczka
Copy link
Contributor

@braczka braczka commented Aug 6, 2024

Description:

Adds bug fixes to implementation of surface temperature and specific humidity forward operator calculations. Adds documentation for these fixes, and also provides more description of the forward operator process in general and linkage between the observations and the required WRF field outputs. Documentation added to both WRF Tutorial and WRF model
page.

Also addresses minor diagnostic script bug for WRF tutorial.

Fixes issue

Addresses bug #700, bug #672. Loosely related to #404

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

Tests

Ran WRF-Tutorial to verify changes work.

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

Fixes Q2 to SH2 conversion bug and also
improves code comments of when operating
on Q2(vapor mixing ratio) and SH2
(specific humidity)
Updating 2M temp obs definition such that it
horizontally interpolates on WRF surface output (T2)
instead of interpolating on bottom level of
WRF 3D temperature (T)
Adding docs to FO bug fixes and also
providing description of linkage between
observation types and required WRF field
outputs
@braczka braczka added Documentation Improvements or additions to documentation wrf Weather Research & Forecasting Model labels Aug 6, 2024
@braczka braczka self-assigned this Aug 6, 2024
models/wrf/tutorial/README.rst Outdated Show resolved Hide resolved
models/wrf/tutorial/README.rst Outdated Show resolved Hide resolved
models/wrf/tutorial/README.rst Outdated Show resolved Hide resolved
models/wrf/tutorial/README.rst Outdated Show resolved Hide resolved
models/wrf/tutorial/README.rst Outdated Show resolved Hide resolved
models/wrf/tutorial/README.rst Show resolved Hide resolved
models/wrf/tutorial/README.rst Outdated Show resolved Hide resolved
The number of WRF output fields required to support an observation type can vary. For
observation types where there is a direct analog to a WRF output field, the forward
operator consists of only spatial interpolation, thus requires only a single output
variable (e.g. METAR_TEMPERATURE_2_METER). For observation types that require multiple
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is worth being clear here about model_interpolate vs forward operators.



A critical piece of observation metadata includes the observation type
(``METAR_TEMPERATURE_2_METER``) which is linked to the observation quantity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quantity rather than observation quantity:

Suggested change
(``METAR_TEMPERATURE_2_METER``) which is linked to the observation quantity
(``METAR_TEMPERATURE_2_METER``) which is linked to the quantity

Comment on lines 44 to 46
- The WRF ``model_mod.f90`` file reads WRF netCDF files directly to acquire the model state
data. Earlier versions required ``wrf_to_dart`` and ``dart_to_wrf`` programs which
are no longer necessary.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a bit weird to talk about the .f90 file reading anything.

Suggested change
- The WRF ``model_mod.f90`` file reads WRF netCDF files directly to acquire the model state
data. Earlier versions required ``wrf_to_dart`` and ``dart_to_wrf`` programs which
are no longer necessary.
- The WRF ``model_mod`` reads a WRF netCDF file for each WRF domain to acquire the model state
meta data, static data such as surface elevation.

It would be good to be clear hear that model_mod does not read state, only the meta data (variable, size, dimensions). Model_mod does read in static data.

I think it is safe to remove the note about old versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good on my end. There are 2 changes that could lead to changes in results within the WRF model_mod: 1) the corrected conversion from vapor mixing ratio to specific humidity and 2) when a temperature observation is defined as a 'surface' obs it will interpolate on the T2 WRF variable as default, instead of interpolating on bottom level of THM/T. Agreed this PR description does not do a great job of describing the bug fixes-- which were found during the documentation process.

The obs_diag.csh fix, in hindsight, is unrelated -- but is a bug that needed to be fixed while running the WRF tutorial -- which is the test case for these changes. I was able to implement the WRF tutorial successfully. Also included a fix with the WRF driver.csh code which likes to resubmit assim_advance.csh jobs spuriously. Seems to be related with transition to Derecho and I previously tried to address it with sleep statements which was suboptimal and didn't always work. I turned off the resubmission capability and replaced with a warning instead.

@hkershaw-brown I think I addressed all your comments so far -- if the science changing fixes need more documentation I can provide that. It's tough to detect physical differences in the tutorial result based on the surface temperature updates because of the brevity of the tutorial (2 assimilation cycles). If I should reorganize the PR description or organization, let me know......

driver.csh has ability to check for assim_advance
jobs that fail, and resubmits. Switch to derecho
has led to false detections, which leads to errors.
Removed resubmission and replaced with warning
Alternative to modifying METART obs_def
@braczka braczka marked this pull request as ready for review August 9, 2024 20:03
@hkershaw-brown
Copy link
Member

@braczka sterling work on this Brett! I'll take a look next week. Have a great weekend

@braczka
Copy link
Contributor Author

braczka commented Aug 9, 2024

Thank you --- forgot to mention too this PR will not address the WRF boundary perturbation documentation. I am still sorting through that and it is not important for functionality. Because this PR includes bug fixes which affect science results this should have more urgency and be pushed through. I will likely address WRF boundary perturbation documentation more fully when designing a nested WRF-DART tutorial, coming soon.

Copy link
Member

@hkershaw-brown hkershaw-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!

@hkershaw-brown hkershaw-brown added the release! bundle with next release label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation release! bundle with next release wrf Weather Research & Forecasting Model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants