-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Several updates for comparing ts and history
1. CaseClass has two new public methods: get_timeseries_files() and get_history_files(); both return lists of files for a given year and stream. For time series, users can also specify a list of varnames to further pare down the resulting list of files. 2. gen_dataset() now relies on the two functions mentioned in (1) to determine what files to open 3. Massive overhaul to compare_ts_and_hist: * Use open_mfdataset and case.get_history_files() to open ds_hist for a given stream and year; then loop through variables and check that get_timeseries_files() does not return an empty list * No longer run da.identical(); for now, we are only concerned with verifying that all variables from history files made it into time series * This puts "reinstate da.identical()" on a to-do item; even with dask I was running into memory issues comparing monthly 3D fields * Refactored so there is utils/compare_ts_and_hist.py that will eventually be a command-line tool for comparing a given stream and year but is currently imported via utils. Also wrote utils.utils.timeseries_and_history_comparison() which is just a wrapper that accounts for things like missing cice.h1 time series from year 1. I think compare_ts_and_hist.py should live with CaseClass when we refactor this package, while timeseries_and_history_comparison() is specific to the high-res analysis 4. Add ability to get cice.h and cice.h1 streams for both history and time series so (3) compares all five streams rather than just looking at a few specific variables in pop.h
- Loading branch information
1 parent
6341c3b
commit d604c92
Showing
7 changed files
with
319 additions
and
249 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.