Feat req: Refactor wrf model_mod and models/wrf directory, unify WRF/WRF-CHEM
Nobody has claimed this yet.
- Dominant language
- Fortran
- Stars
- 263
- Forks
- 182
- Avg merge
- 11d 12h
- Merged PRs (30d)
- 7
Description
Use case
Refactor the wrf model_mod to make it easier/possible to:
- add state variables
- swap between wrf v3 and v4
- not assume the structure of the state variable in model_mod.
Is your feature request related to a problem?
The WRF model_mod has wrf_static_data_for_dart which is replicating functionality available in state_structure_mod.
-
Adding variable X to the state means altering the model_mod code to have a
wrf%dom(id)%type_X, rather than simply adding a line in the model_nml::wrf_state_variables. -
WRF has its own integer types (qtys), replicating (but not quite) the DART qty functionality.
https://github.com/NCAR/DART/blob/7ee9ed9c86330ba231fa29395dbb2db47d3a7e80/models/wrf/model_mod.f90#L323-L332
so you see code like this:
https://github.com/NCAR/DART/blob/7ee9ed9c86330ba231fa29395dbb2db47d3a7e80/models/wrf/model_mod.f90#L889-L890 -
WRF v3 vs. v4 - it is not clear for users what to change when moving from WRF v3 to v4. If possible, it would be good for the model_mod to be able to check the WRF version from the netcdf file.
-
Wider issue #389. Moving control of the state vector to core dart modules allows us to have general solutions for things like compression, removing missing values (so dart core code can assume every element of the state is valid), and other cool stuff.
Describe your preferred solution
Remove the state vector information from wrf_static_data_for_dart
Describe any alternatives you have considered
I think the wrf_static_data_for_dart is a road block for core dart development, however wrf-dart is widely used and has a lot of additional user developed code in circulation. There is 8000 lines of code in for wrf model_mod (+ unknown user modifications) so the refactoring needs to be approached with this in mind.
I think it is possible to simplify the bounds checks for each grid (staggered and various flavors of periodic), but I do not think the bounds check affects development of core dart.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.