File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ def convert_units(ds):
169169def check_lev (ds , invert = None ):
170170 """Check for order of levels and invert if neccessary"""
171171
172- if ds .ta . cf ["vertical" ].attrs .get ("positive" ) == "down" and invert is None :
172+ if ds .cf ["vertical" ].attrs .get ("positive" ) == "down" and invert is None :
173173 invert = True
174174 # if "vertical" in ds.cf and auto is True:
175175 # positive = ds.cf["vertical"].attrs.get("positive", None)
@@ -179,7 +179,7 @@ def check_lev(ds, invert=None):
179179 # warnings.warn("could not determine positive attribute of vertical axis.")
180180 # return ds
181181 if invert is True :
182- kwargs = {ds .ta . cf ["vertical" ].name : ds . ta .cf ["vertical" ][::- 1 ]}
182+ kwargs = {ds .cf ["vertical" ].name : ds .cf ["vertical" ][::- 1 ]}
183183 print ("inverting vertical axis" )
184184 return ds .reindex (** kwargs )
185185 return ds
Original file line number Diff line number Diff line change 22
33import pandas as pd
44import pyremo as pr
5- from pyremo .preproc import gfile , remap
5+ from pyremo .preproc import get_gcm_dataset , remap
66from pyremo .tutorial import load_dataset , mpi_esm , mpi_esm_tos
77from pyremo .preproc .utils import get_filename
88
@@ -16,7 +16,9 @@ def ds():
1616
1717# @pytest.fixture
1818def gcm_ds1 ():
19- return gfile (mpi_esm (use_cftime = True ), tos = mpi_esm_tos (use_cftime = True ).tos )
19+ return get_gcm_dataset (
20+ mpi_esm (use_cftime = True ), tos = mpi_esm_tos (use_cftime = True ).tos
21+ )
2022
2123
2224# @pytest.fixture
@@ -32,7 +34,7 @@ def gcm_ds2():
3234 }
3335
3436 file_dict = {k : load_dataset (f ).encoding ["source" ] for k , f in files .items ()}
35- return gfile (file_dict , tos = mpi_esm_tos (use_cftime = True ).tos )
37+ return get_gcm_dataset (file_dict , tos = mpi_esm_tos (use_cftime = True ).tos )
3638
3739
3840# @requires_pyintorg
You can’t perform that action at this time.
0 commit comments