Skip to content

Commit

Permalink
Update API for CaseClass
Browse files Browse the repository at this point in the history
This first commit is done in anticipation of supporting time series files in
addition to history files, and also using intake-esm catalogs behind the
scenes.

1. start_date & end_date are not part of the class constructor
   -- basically all the __init__ routine should do is set up a catalog
   -- _find_hist_files() also doesn't rely on these variables either; this
      routine is essentially building the catalog, and we don't restrict the
      files listed until we are ready to call open_mfdataset()
2. _open_history_files() -> gen_dataset(); this routine is where start_date and
   end_date are specified, and it returns a dataset rather than updating a
   class member variable. Logic to apply start_date and end_date at this stage
   is much simpler than doing it in _find_hist_files() (or I figured out a much
   easier way to do it). This routine also now expects a list of variable names
   to include in the dataset.
3. compare_fields_at_lat_lon expects array of DataArrays, not array of cases
4. Added get_varnames_from_metadata_list() to utils/utils.py because I need
   this function to generate the list of variable names for gen_dataset() in
   several notebooks.

I also created a script that submits jobs to the slurm queue to re-run
notebooks, though it does not work for the trend_maps or plot_suite_00[34]
notebooks (I think because of the reliance on dask and NCAR_jobqueue).
  • Loading branch information
mnlevy1981 committed Sep 25, 2020
1 parent b02a220 commit 361cd79
Show file tree
Hide file tree
Showing 20 changed files with 6,128 additions and 5,215 deletions.
93 changes: 63 additions & 30 deletions notebooks/Sanity Check.ipynb

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions notebooks/logs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.err.*
*.out.*
390 changes: 192 additions & 198 deletions notebooks/plot_suite_003.ipynb

Large diffs are not rendered by default.

963 changes: 713 additions & 250 deletions notebooks/plot_suite_004.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 361cd79

Please sign in to comment.