Skip to content

Commit

Permalink
fixed warning in join_l3, now printing nan fields in L2
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteVandecrux committed Jul 1, 2024
1 parent 16fdf84 commit 46004ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pypromice/process/join_l3.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def join_l3(config_folder, site, folder_l3, folder_gcnet, outpath, variables, me
filepath = os.path.join(folder_gcnet, stid+'.csv')
isNead = True
if not os.path.isfile(filepath):
logger.info(stid+' is from an project '+folder_l3+' or '+folder_gcnet)
logger.info(stid+' was listed as station but could not be found in '+folder_l3+' nor '+folder_gcnet)
continue

l3, _ = loadArr(filepath, isNead)
Expand Down
6 changes: 5 additions & 1 deletion src/pypromice/process/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ def prepare_and_write(dataset, outpath, vars_df=None, meta_dict=None, time='60mi
d2 = roundValues(d2, vars_df)

# Get variable names to write out
col_names = getColNames(vars_df, d2, remove_nan_fields=True)
if d2.attrs['level'] == 'L3':
remove_nan_fields = True
else:
remove_nan_fields = False
col_names = getColNames(vars_df, d2, remove_nan_fields=remove_nan_fields)

# Define filename based on resample rate
t = int(pd.Timedelta((d2['time'][1] - d2['time'][0]).values).total_seconds())
Expand Down

0 comments on commit 46004ea

Please sign in to comment.