Skip to content

Commit

Permalink
Merge pull request #50 from JGCRI/acs-gridded-enriched
Browse files Browse the repository at this point in the history
have future filtering only operate on nc files
  • Loading branch information
abigailsnyder authored Apr 7, 2022
2 parents c44b4a9 + 1ea19d4 commit ef7f9f8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/tas_psl_stitching_paper1.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,12 @@ def get_orig_GSAT_data(target_df):
# read in each stitched realization, subset to 2015
entries = Path((OUTPUT_DIR + '/tas_psl_pr/stitched/'))
for entry in entries.iterdir():
print(entry.name)
ds = xr.open_dataset((OUTPUT_DIR + '/tas_psl_pr/stitched/') + entry.name)
ds = ds.sel(time = slice('2015-01-31', '2100-12-31')).copy()
ds.to_netcdf((OUTPUT_DIR + '/tas_psl_pr/stitched_future/') + entry.name)
del(ds)
if ('.nc' in entry.name) :
print(entry.name)
ds = xr.open_dataset((OUTPUT_DIR + '/tas_psl_pr/stitched/') + entry.name)
ds = ds.sel(time = slice('2015-01-31', '2100-12-31')).copy()
ds.to_netcdf((OUTPUT_DIR + '/tas_psl_pr/stitched_future/') + entry.name)
del(ds)



Expand Down

0 comments on commit ef7f9f8

Please sign in to comment.