-
Notifications
You must be signed in to change notification settings - Fork 19
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
Revise location_index for IODA file in Trajectory sampler #3279
Open
metdyn
wants to merge
13
commits into
develop
Choose a base branch
from
feature/ygyu/NPW_1_file
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t location_index for IODA file exact match the single input NPW observation file default use_NWP_1_file=0 recovers the strict Time interval cut stratgy as python [T1, T1+Epoch).
metdyn
added
the
0 Diff Trivial
The changes in this pull request are trivially zero-diff (documentation, build failure, &c.)
label
Jan 4, 2025
tclune
reviewed
Jan 6, 2025
tclune
reviewed
Jan 6, 2025
tclune
reviewed
Jan 6, 2025
tclune
requested changes
Jan 6, 2025
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.
- Lots of unguarded output to console. If just for debugging and meant to be deleted later, just let me know. Otherwise add conditionals or delete.
- I cannot be sure if
use_NWP_1_file
is meant as a control or as a counter. If the former then the values should be named constants rather than literals "0", "1". If the latter, then a better name would make this clear.
metdyn
commented
Jan 6, 2025
metdyn
commented
Jan 6, 2025
tclune
reviewed
Jan 6, 2025
You are right. I removed these write statements, except the warning when the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
0 Diff Trivial
The changes in this pull request are trivially zero-diff (documentation, build failure, &c.)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Types of change(s)
Checklist
make tests
)Description
location_index_ioda
in Trajectory sampler is creating problems (found by @mjkagnes123), when the code is using the previously designed index mapping scheme. For the 29 IODA files (NPW platform), about 6 of them shows either missing points and/or extra points that does not belong to a single IODA file. This is because, we did not expect to see, e.g.,aircraft.20190801T210000Z.nc4 contains time points: [20 points at 15 Z, mid, 20 points at 21 Z ]
aircraft.20190802T030000Z.nc4 contains time points: [10 points at 21 Z, mid, 20 points at 03 Z ]
Our time slice scheme follows the python convention and will create a file:
aircraft.jedi.20190802_0300z.nc4 contains time points: [30 points at 21 Z, mid, zero points at 03 Z].
In this case, we would not be able to recover the IODA location_index in aircraft.20190802T030000Z.nc4. In other words, we have extra points at lower bound and missing points at upper bound. This does not occur, if observation files does not contain exactly points at 21 Z or 03Z. This explains why we had the right
location_index_ioda
for about 60% of the NPW platforms (IODA files), but wrong index for the rest.Now,
location_index_ioda
in Trajectory sampler is revised to allow for reading in a single observation input file, such assondes.20190801T210000Z.nc4
, then generate the sampled GEOVAL values along the trajectory (in time ordered sequence) and return an array index (location_index_ioda) mapping back to the location points in the input IODA file, with the exact number of points. This is controlled by settingjedi.use_NWP_1_file: .true.
in HISTORY.rc.Note, the default (
use_NWP_1_file=0
) is our standard method, using our designed PYTHON style for time slicing: [ T1 , T1 + Epoch), with T1=21Z, Epoch=6 hr, for example. Here we will analyze an expanded time window [T1 - Epoch, T1 + 2*Epoch).Related Issue