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

Update NUOPC cap exchange fields #600

Merged
merged 1 commit into from
Feb 11, 2022
Merged

Conversation

danrosen25
Copy link
Collaborator

TYPE: enhancement

KEYWORDS: ESMF, NUOPC, UFSATM, RRFS

SOURCE: Daniel Rosen, NCAR

DESCRIPTION OF CHANGES: Updated NUOPC cap with additional fields for coupling to UFSATM (for RRFS-NWM coupling project). Moved field related code to separate file. Added configuration options for fields.

Included in PR

  • Add 3 dimensional soil fields smc, slc, stc (for coupling to UFSATM)
  • Update LSM forcings check (check for 2d or 3d import fields to run with coupled forcings)
  • Update NUOPC cap fill values
  • Add options for memory copy or pointer
  • Add options to initialize with prescribed values
  • Add options to check for missing values
  • Add options to fill missing values with prescribed values
  • Move fields utilities to WRFHydro_NUOPC_Fields.F90 (code cleanup)
  • Cleanup ESMF extension utilities
  • Set field timestamp to invalid for coldstarts (so that coupled models don't accept data as current)

ISSUE: none

TESTS CONDUCTED: Tested in RRFS-NWM coupling and LIS-WRFHYDRO coupling.

RRFS-NWM
workflow for coupled run is incomplete and requires manual steps that are not part of repo

LIS-Hydro (on Cheyenne)

  1. checkout: git clone -b feature/parflow --recursive [email protected]:NESII/lishydro.git
  2. configure: ./configure.sh
  3. build: ./build.sh
  4. setup usecase(example coupled_tuolumne.noahmp.nldas2): ./setuprun.sh coupled_tuolumne.noahmp.nldas2
  5. cd run/coupled_tuolumne.noahmp.nldas2
  6. run usecase : qsub run.sh

NOTES:

New Cap Configuration Options:

  • field_memory_import: copy field to internal memory or use array pointer
  • field_memory_export: copy field from internal memory or use array pointer
  • initialize_import: initialize import with missing values, zeros, external model coupling, prescribed data, from restart file, or model state (default)
  • initialize_export: initialize import with missing values, zeros, prescribed data, from restart file, or model state (default)
  • missing_import: handle missing import data - fail if import missing (default), prescribe values to missing cells, ignore missing cells
  • reset_import: reset import data to missing value after ModelAdvance

Checklist

Merging the PR depends on following checklist being completed. Add X between each of the square
brackets if they are completed in the PR itself. If a bullet is not relevant to you, please comment
on why below the bullet.

  • Closes issue #xxxx (An issue must exist or be created to be closed. The issue describes and documents the problem and general solution, the PR describes the technical details of the solution.)
  • Tests added (unit tests and/or regression/integration tests)
  • Backwards compatible
  • Requires new files? If so, how to generate them.
  • Documentation included
  • Short description in the Development section of NEWS.md

@danrosen25
Copy link
Collaborator Author

Hi @rcabell @kafitzgerald
Do you have a timeline for reviewing this change? If you'd like we can schedule a formal code review.

@rcabell
Copy link
Collaborator

rcabell commented Feb 1, 2022

@danrosen25 -- since this doesn't touch the main body of the WRF-Hydro code, and therefore isn't really exercised by the automated regression testing, I'll defer to you to indicate its readiness.

By the way, does this PR integrate with (or obviate) your other PRs that were in Draft status? (#550 and #578)

rcabell
rcabell previously approved these changes Feb 1, 2022
@danrosen25
Copy link
Collaborator Author

I tested the changes in two coupled systems, one for the additional features and one for backwards compatibility. I'll have to update (#550 and #578). I should be able to make progress on the GNU build but I need a collaborative decision for the zsoil issue.

@rsdunlapiv
Copy link
Contributor

@rcabell @scrasmussen @kafitzgerald what is the status of the merge of this PR? We are waiting for this merge in order to tag the upstream "LISHydro" repository, which points to WRF-Hydro as a submodule. Any update would be appreciated!

@rcabell
Copy link
Collaborator

rcabell commented Feb 9, 2022

@rcabell @scrasmussen @kafitzgerald what is the status of the merge of this PR? We are waiting for this merge in order to tag the upstream "LISHydro" repository, which points to WRF-Hydro as a submodule. Any update would be appreciated!

Hi Rocky -- sorry for the delay here, we are hoping to get it reviewed this week. I spoke briefly to Dan about it on Tuesday and he will get the branch rebased to the current WRF-Hydro master and then we can move pretty quickly. I'll keep you in the loop.

* Move fields utilities to WRFHydro_NUOPC_Fields.F90
* Add 3 dimensional soil fields smc, slc, stc
* Remove fields that aren't connected
* Update LSM forcings check
* Update NUOPC cap fill values
* Add options for memory copy or pointer
* Add options to initialize with prescribed values
* Add options to check for missing values
* Add options to fill missing values with prescribed values
* Cleanup field creation and fill
* Cleanup ESMF extension utilities
* Update error flags
* Set field timestamp to invalid for coldstarts
* Add WRFHYDRO model state debugging
* Fix WRFHYDRO NUOPC cap installation dependencies
@danrosen25
Copy link
Collaborator Author

The rebase was clean and reproduced bit-for-bit results for coupled_tar.noahmp_v4.0.1_cold.nldas2 on Discover. I overwrote the old feature/NUOPC head with the rebase. Now we're waiting on CI checks and review.

Copy link
Member

@scrasmussen scrasmussen left a comment

Choose a reason for hiding this comment

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

CI checks pass and scanning through code nothing seems to stand out to prevent it from being accepted. LGTM

@scrasmussen scrasmussen merged commit 2dbe34f into NCAR:master Feb 11, 2022
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.

None yet

4 participants