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

Initial setup of WRF-runner #1

Merged
merged 4 commits into from
May 29, 2024
Merged

Initial setup of WRF-runner #1

merged 4 commits into from
May 29, 2024

Conversation

Peter9192
Copy link
Contributor

@Peter9192 Peter9192 commented May 14, 2024

This adds a script and proposed workflow for running WPS/WRF.

  • Namelists for our default setup are stored with this repo, so they are under version control
  • Each run gets its own dedicated directory outside of the WRF source code and also outside of this repo, so source code stays clean and under version control, and experiments inputs/outputs are isolated from one another.

Notes

  • Currently the included namelist only work partially (for domain 1)
  • Many todo's listed in README. Those are for future PRs.

To review this:

Check that you can run the script both on the login node (kill the job once it reaches WRF) and as a batch job through slurm, and that it reaches the command to execute WRF.

Currently WRF fails because there is an issue with the namelist; fixing the namelist can be part of a future issue.

@Peter9192 Peter9192 marked this pull request as ready for review May 14, 2024 15:35
@Peter9192 Peter9192 requested a review from ClaireDons May 14, 2024 15:35
Copy link
Contributor

@ClaireDons ClaireDons left a comment

Choose a reason for hiding this comment

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

The code fails for me when running geogrid.exe as I had another geogrid table linked. Once I changed my namelist.wps, the program ran with no issues. So, I think that it would be good to add a line which explicitly links the geogrid table required in wrf-runner.sh.

Just as a note, both geogrid.exe and metgrid.exe failed silently, which made identifying where the program failed difficult. This would need to be addressed within those programs though.

@Peter9192
Copy link
Contributor Author

The code fails for me when running geogrid.exe as I had another geogrid table linked.

I can reproduce this e.g. with ln -sf GEOGRID.TBL.FIRE GEOGRID.TBL This gives:

+ /home/pkalverla1/wrf-model/WPS/geogrid.exe
Parsed 50 entries in GEOGRID.TBL
Processing domain 1 of 1
ERROR: Could not open /projects/0/prjs0914/wrf-data/default/static/WPS_GEOG/landfire_data/index
+ /home/pkalverla1/wrf-model/WPS/ungrib.exe

Indeed it happily continues to run ungrib. Geogrid returns a 0 exit status despite the logged ERROR. Same for metgrid later on.

@Peter9192
Copy link
Contributor Author

For now I've linked the ARW table. We could consider to ship our own geogrid table with this WRF-runner in the future, depending on whether it needs to be customized (much).

@Peter9192
Copy link
Contributor Author

The error originates here:

https://github.com/wrf-model/WPS/blob/5a2ae63988e632405a4504cfb143ce7f0230a7a0/geogrid/src/source_data_module.F#L866-L878

The ERROR level is handled in mprintf:
https://github.com/wrf-model/WPS/blob/5a2ae63988e632405a4504cfb143ce7f0230a7a0/geogrid/src/module_debug.F#L316-L324

I suspect adding an integer to the stop command or using error stop instead could potentially fix this. See e.g. this thread

@Peter9192
Copy link
Contributor Author

Opened wrf-model/WPS#252 to see if this can be addressed in WPS.

@Peter9192
Copy link
Contributor Author

@ClaireDons could you have another go at this and approve/merge if ok? Then you can follow up with updated namelists, and getting w2w into the workflow.

@ClaireDons
Copy link
Contributor

@ClaireDons could you have another go at this and approve/merge if ok? Then you can follow up with updated namelists, and getting w2w into the workflow.

I reran the code and it runs through all WPS processes successfully and fails at the expected point, so will merge now.

@ClaireDons ClaireDons merged commit 872ddd0 into main May 29, 2024
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.

2 participants