More comprehensive unit harmonization
Change Summary
Unit harmonization is improved by:
- using a better map parsed from WRF Registries (yes, all of them, but not WPS)
- translations are generated manually using custom external tool
- includes all versions from WRFv4.0 onwards
- makes bracket cleaning superfluous
- extracting this map from the config yaml to avoid clutter
Related issue number
Checklist
- [x] Unit tests for the changes exist
- [x] Tests pass on CI
- [x] Documentation reflects the changes where applicable
There are some units which I didn't quite know how to translate:
- savedtke12d - top level eddy conductivity from previous timestep (
W/m.K)- is this
W m-1 K-1orW K m-1?
- is this
- maxMF - Maximum mass-flux (neg: all dry, pos: moist) (
m/s * area)- is this
m3 s-1orm-1 s-1or evenkg m2 s-1orkg s-1 m-2?
- is this
Small ping on this PR :)
As far as the units of uncertain translation go:
-
savedtke12dwithW/m.K: given how it is used in https://github.com/wrf-model/WRF/blob/master/Registry/registry.lake, I'd say match the thermal conductivity values elsewhere in the same registry...soW m-1 K-1. -
maxMFwithm/s * area: given how it is used in https://github.com/wrf-model/WRF/blob/v4.2/phys/module_bl_mynn.F, it is the product ofedmf_a(unit-which becomes dimensionless) andedmf_w(m s-1), which weirdly enough implies that it should bem s-1. I'm not too concerned about getting this perfectly right, as I'd hope that anybody digging that much into the weeds of the MYNN-EDMF scheme knows what they are doing to be able to properly use that field.
Hey, happy holidays! Sorry for the long delay on my part now... Didn't have too much time to spend on this until now due to AGU.
I added the changes, however I don't quite know what you would like to see here.
add new tests for each of the new categories of units handled in the expanded
unit_harmonization_map
What are the new categories you're referring to?
Small ping here :)
Thanks for the ping on this, and sorry for the very long delay! Unfortunately I'm a bit swamped with prelim-related stuff at the moment, so I won't be able to get back to this until next week. But, hopefully will be able to then.
Hey :) just a small reping. If and whenever you find the time of course!
Hey @jthielen, I'm just going to go ahead and merge this if you don't mind.
Hey @jthielen, I'm just going to go ahead and merge this if you don't mind.
Yes, please go ahead! Sorry for my continued inattentiveness. Hopefully things will be getting better soon.