-
Notifications
You must be signed in to change notification settings - Fork 154
fix: vtec extrapolation calculation in TIEGCM #852
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
Conversation
ebb6828
to
f564745
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one question, a little unrelated to the PR, but concerns val11, 12, 21, 22
DART/models/tiegcm/model_mod.f90
Line 429 in f564745
bogus_level = 1 !HK what should this be? Do only 2D fields have VERTISUNDEF? |
Looks like you made this comment 4 years ago and I share the same concern - if 1 is a valid value for level, then is 1 a good value for a bogus_level? It doesn't look like it really matters, since any 2D variables (that therefore have VERTISUNDEF) are not using the value for level at all when it is passed into get_dart_vector_index (note that level becomes kloc)
DART/assimilation_code/modules/io/state_structure_mod.f90
Lines 1626 to 1631 in f564745
if (ndims == 1) then | |
get_dart_vector_index = offset + iloc - 1 | |
else if(ndims == 2) then | |
get_dart_vector_index = offset + iloc + (jloc-1)*dsize(1) - 1 | |
else if(ndims == 3) then | |
get_dart_vector_index = offset + iloc + (jloc-1)*dsize(1) + (kloc-1)*dsize(1)*dsize(2) - 1 |
But just something to think about. Feel free to just tell me to disregard this - other than this I see no issues with the changes here so I'll go ahead and approve
Its hanging out from this comment: DART/models/tiegcm/model_mod.f90 Lines 353 to 356 in f564745
I am not sure what the correct thing to do is still, or if there are calls to model_interpolate with VERTISUNDEF. |
Let's just punt on this for now then, the rest of the PR looks great |
my guess is that the level=1 code was put in before the state structure was used, and all three indices were used to compute the location in the state vector. it may not matter anymore because the state structure code knows about 2d fields. also, the answer to the question on line 419: it doesn't - but we had usually used something that was simple/fast to interpolate so the code didn't go through a long computation to find a value that wasn't going to be used other than a yes/no counter. |
- result of 4 corners was not being stored correctly, overwritting corner11 - domain of ZG was incorrect - units of ZG for need to be m in the vtec calculation fixes #851
Description:
Fixes problems in model_interpolate for VTEC
I've taken out the todo "test vtec" 🙃
Fixes issue
fixes #851
Types of changes
Documentation changes needed?
Tests
None yet, just compiled user reported changes.
Derecho is down today.
Checklist for merging
Checklist for release
Testing Datasets