-
Notifications
You must be signed in to change notification settings - Fork 1
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
offline plotting of prediction and ground truth #15
base: main
Are you sure you want to change the base?
Conversation
Hi @clechartre and thanks for the PR. I have some high-level comments before a deeper code-review. We have a new zarr-archive on Tsa that will be the default MeteoSwiss archive after tomorrow (when creation is done). I have already merged and updated this PR-branch where possible with latest main-branch.
One more question: Do we still need |
This is already defined in constants.py
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.
I have merged this branch with #16, added some prints to the log file and some smaller comments. Before merge we should:
- Merge Updated code for latest single zarr archive #16 to have a clean history
- Discuss whether
cli_plotting.py
+vis.py
workflow is now redundant - Fix minor issues
offline.py
Outdated
vmin = target_all.min().values | ||
vmax = target_all.max().values | ||
|
||
for i in range(22): |
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.
for i in range(22): | |
for i in range(time_range): |
The length of the prediction should define the plotting range, no?
offline.py
Outdated
start_time = pd.to_datetime(start_time_str, format="%Y%m%d%H") | ||
|
||
# Output the prediction time range | ||
time_range = len(predictions[1, :, 1, 1]) # Number of time steps |
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.
time_range = len(predictions[1, :, 1, 1]) # Number of time steps | |
time_range = len(predictions[0, :, 0, 0]) # Number of time steps |
use first indices to avoid issues with edge cases
offline.py
Outdated
parser.add_argument( | ||
"--variable_to_plot", | ||
type=str, | ||
default="TQV", |
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.
default="TQV", | |
default="T_2M", |
Use more common variable as default. Future checkpoints might not contain TQV
variables are called x,y now
new example zarr archive placed in templates folder
default now points towards newly created templates folder
--> Maybe add a few words in the |
Purpose
Offline plotting function to handle the plotting of the prediction output as a numpy array against a single .zarr archive. Useful to verify the accuracy of the inference
Code changes:
offline.py
: created a module for this purposeslum_offline.sh
: automation of the offline.py module through batch systemChecklist
Before submitting this PR, please make sure:
Review
For the review process follow the guidelines at Checklist