-
Notifications
You must be signed in to change notification settings - Fork 153
Using 'lat-lon' map projection in WRF, assigns Cassini projection in DART #811
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
Comments
Forgot to mention that DART uses the |
what would happen with WRF files that did have 0 as the projection type integer? would those still work? |
I don't know if WRF generates MAP_PROJ = 0 anymore. I guess at some point it did, perhaps the 'lat-lon' projection at one point was at '0', but testing version 3.9 for the latest versions 4.5 does not produce MAP_PROJ = 0 for any supported map projection that I can tell. Currently, if MAP_PROJ = 0, DART interprets as 'lat-lon' which is incorrect. If I implemented suggested changes, a MAP_PROJ = 0 should cause DART to error out. |
just for reference, i looked up some older wrfinput_d01 files from CONUS runs and they use map projection 1. so maybe this change wouldn't break anything. |
What was the WRF version of the wrfinput_d01? As far as I know map projection 1 has always referred to the lambert projection I would need to dig into the WRF code (WPS ) to find all possibilities when I find time |
yes - the conus runs i usually saw were using a lambert projection, not straight lat/lon. plotted on a lat/lon grid, the area was a section of a wedge, not a square. that was one of the reasons we used the wrf utils to map from lat/lon to i/j index in the wrf arrays. |
DART/models/wrf/module_map_utils.f90 Lines 94 to 102 in e79746d
This comment also needs updated as we are supporting different projections than this now. The following projection codes are parameters in module_map_utils.f90 but are not listed in the supported:
And in the model_mod, we allow for the use of the following projections: Lines 7432 to 7449 in e79746d
So at least we should add PROJ_CASSINI and PROJ_CYL to the list of supported. But what about the other 2 ( Finally, PROJ_GAUSS and PROJ_ROTLL are both listed in the supported projections and are parameters in module_map_utils.f90, but we do not allow for the use of them in the model_mod - so I don't know if we should keep them listed as supported or keep the parameters in module_map_utils.f90 |
@mjs2369 I agree the comments are confusing. From what I can tell the DART comments are inherited directly from the WRF code documentation and comments -- which are confusing. The WRF-ARW documentation states that 5 projections are supported, but if you go to the WPS geogrid source code which generates the maps, the comments suggest 6 projections are supported. Go a little deeper and source code shows support for 10 projections. It's potentially WRF-ARW, WRF-NMM dependent...... Technically this PR intended to only resolve the Cassini projection bug, but it would be worth identifying what integer WRF currently assigns to all 10 possible projections. |
For clarity, it looks like DART supports all possible projections (10 possible) within module_map_utils.f90. The integer mismatch between WRF and DART is at issue. The common projections will match with PR (lambert, lat-lon, mercator, polar,cassini), but will doublecheck others (PS_WGS84, GAUSS, CYL,ALBERS_NAD83, ROTLL). |
### Describe the bug
When using WRF-DART while applying WRF 'lat-lon' map projection for land/atmosphere -- DART misinterprets 'lat-lon' map projection as cassini.
Expectation:
When using WRF 'lat-lon', that DART uses the
map_latlon
andPROJ_LATLON
options in model_mod to perform interpolationWhat happens instead:
DART uses
map_cassini
andPROJ_CASSINI
instead. This occurs because WRF assign an integer value of '6' for the 'MAP_PROJ' attribute usingmap_latlon
, whereas DART assigns an integer value of '0' forPROJ_latlon
. DART incorrectly calls subroutinellij_cassini
instead ofllij_latlon
, which is the incorrect forward operator.### Which model(s) are you working with?
Tested with WRF version 3.9 thru 4.5
### Version of DART
Latest tag
### Have you modified the DART code?
No -- but quick fix would be to reassign the integers within DART such that
PROJ_LATLON = 6
andmap_latlon = 6
. Then assign cassini a different integer, such asPROJ_CASSINI = 106
ormap_cassini
= 106. See misc_definitions_module andmodel_mod.f90 for more details.
All other WRF supported map projections are aligned properly with DART -- including
lambert
,mercator
andpolar
. No changes required. The WRF-DART tutorial using thelambert
map projection.I thought this integer change for the
latlon
MAP_PROJ
occured between WRF version 3 and more recent versions of WRFv4+, and this change was missed during the WRF-DART version 4 tutorial updates, however, both WRFv3 and v4 versions have this integer mismatch with DART.Bug, first reported by Rui Sun (UCSD).
### Compiling information
Derecho using gfortan
The text was updated successfully, but these errors were encountered: