This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Pandoc filter to convert text of form [@foo,@bar] to citations. | |
Handy for e.g. word documents... | |
""" | |
import re | |
from pandocfilters import toJSONFilter, Str |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CASE 1: 'ODV.nc' exported from ODV. | |
import xarray as xr | |
ds = xr.open_dataset('ODV.nc') | |
ds.rename({v: ds[v].long_name for v in ds if hasattr(ds[v], 'long_name')}) | |
# CASE 2: 'ODV.txt' in the tabular ODV text format. | |
import pandas as pd |