Skip to content

Commit

Permalink
fixed function names
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteVandecrux committed Jun 13, 2024
1 parent cb1f6a3 commit d1d46b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pypromice/process/get_l2tol3.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def get_l2tol3():
m = getMeta(args.metadata)

# Define Level 2 dataset from file
l2 = xr.open_dataset(args.inpath)

with xr.open_dataset(args.inpath) as l2:
l2.load()
if 'bedrock' in l2.attrs.keys():
l2.attrs['bedrock'] = l2.attrs['bedrock'] == 'True'
if 'number_of_booms' in l2.attrs.keys():
Expand Down
5 changes: 3 additions & 2 deletions src/pypromice/process/join_l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def loadArr(infile):
df = pd.read_csv(infile, index_col=0, parse_dates=True)
ds = xr.Dataset.from_dataframe(df)
elif infile.split('.')[-1].lower() == 'nc':
ds = xr.open_dataset(infile)
with xr.open_dataset(infile) as ds:
ds.load()

try:
name = ds.attrs['station_id']
Expand All @@ -44,7 +45,7 @@ def loadArr(infile):
return ds, name


def join_levels():
def join_l2():
args = parse_arguments_join()

# Define variables and metadata (either from file or pypromice package defaults)
Expand Down

0 comments on commit d1d46b7

Please sign in to comment.