-
Notifications
You must be signed in to change notification settings - Fork 21
AM5/ESM45 needed adjustments #690
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #690 +/- ##
==========================================
- Coverage 85.32% 85.19% -0.14%
==========================================
Files 68 68
Lines 4490 4518 +28
==========================================
+ Hits 3831 3849 +18
- Misses 659 669 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bae7bb2 to
e3b1016
Compare
|
Not ready yet. There are some more netcdf attributes that need special handling. xarray loses metadata by default |
…" which is now users are writing it. Also, remove the _unmsk note from the error message so folks don't use it
.false. is now replacing False as the variable attribute trigger
fre/tests/test_files/reduced_ascii_files/atmos_cmip.ua_unmsk.cdl
Outdated
Show resolved
Hide resolved
This reverts commit 0fe44fd.
ilaflott
left a comment
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 had more thoughts
| for static_source_dict in pp_input_static_files: | ||
| outfile = output_subdir/f"{date}.{static_source_dict['source']}.nc" | ||
| test = xr.load_dataset(outfile) | ||
|
|
||
| assert "wet_c" not in test | ||
| assert "mister" in test | ||
| assert "darcy" in test | ||
| assert "wins" in test | ||
|
|
||
| assert np.all(test["mister"].values==np.float64(1.0)) | ||
| assert np.all(test["darcy"].values==np.float64(2.0)) | ||
| assert np.all(test["wins"].values==np.float64(3.0)) |
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.
how many static test cases are there? can we be more careful/explicit with checking the static case? We're overloading the variable test here... within a pytest test routine, at a different scope level. Gives me anxiety!
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'll agree the static test cases here do not give any additional functionality, and kind of confuse things. I would argue that static regrid-xy functionality can remain untested as it's a subset of temporary regrid-xy which is already tested.
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'm going to remove this static-flavored regridding testing because it truly adds nothing to the test coverage, and adds some confusion as you point out.
Regridding static files is literally identical to the temporal files all the way to the fregrid call.
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.
... can we not just make a second separate regrid static function?
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.
as a unit test, i mean
- Improve merge-netcdf variable names for clarity - Promote useful mask-atmos-plevel debug logging message to info - Rephrase two try/except's as a humble if
This reverts commit d4ab40a.
Describe your changes
cdo merge.cdo mergedoes not work for more than 100 variables, and even with fewer variables inserts duplicate coordinate variables. It's possible there are slight metadata issues but the resulting climos work fine for analysis scriptsfre app mask-atmos-plevelneeds to trigger on pressure_mask =.false.instead ofFalseand update test case. Also, keep the _unmsk legacy behavior trigger, but remove it from the error message so users don't see it.Issue ticket number and link #677
Checklist before requesting a review