Skip to content

Commit

Permalink
from_netcdf: Conversion of flots to str in meaning
Browse files Browse the repository at this point in the history
  • Loading branch information
rbardaji committed May 30, 2019
1 parent 9d7a8f2 commit a640fa0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 100 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ __pycache__
/.vscode/

# Test code
/other_codes/
download_all_emso.py
examples.py
Comparing data from two CTDs.ipynb
Expand Down
99 changes: 0 additions & 99 deletions bodc2oceansites.py

This file was deleted.

5 changes: 4 additions & 1 deletion mooda/access/bodc.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,16 @@ def change2metadata(wf_in, keys2change):
wf.meaning["PSAL"]["long_name"] = "Practical salinity"
elif "TEMP" in parameter:
wf.rename(parameter, "TEMP")
wf.meaning["CNDC"]["long_name"] = "Sea temperature"
wf.meaning["TEMP"]["long_name"] = "Sea temperature"
elif "CNDC" in parameter:
wf.rename(parameter, "CNDC")
wf.meaning["CNDC"]["long_name"] = "Electrical conductivity"
elif "PREXMCAT" in parameter:
wf.rename(parameter, "PRES")
wf.meaning["PRES"]["long_name"] = "Sea pressure"
elif "PREXSINT" in parameter:
wf.rename(parameter, "PRESINT")
wf.meaning["PRESINT"]["long_name"] = "Interpolated values of sea pressure"

try:
# It is a profile (CTD)
Expand Down
4 changes: 4 additions & 0 deletions mooda/waterframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ def drop(ds_in):
continue
else:
self.meaning[variable] = dict(ds[variable].attrs)
# Conversion to all strings
for key, value in self.meaning[variable].items():
self.meaning[variable][key] = str(value)

# We add the meaning of DEPTH
self.meaning['DEPTH'] = {
"long_name": "depth_of_measure",
Expand Down

0 comments on commit a640fa0

Please sign in to comment.