This branch is an improvement of the ncextract tool:
The tool now allows to read both NetCDF and GRIB files. I have added to requirements.txt the library cfgrib.
The tool is now able to read input files whose coordinates are not named 'lat' or 'lon', as it was hard coded up until now. This was a problem because files in the Climate Data Store use the names 'latitude' and 'longitude'. Any coordinate name that starts with 'x', 'y', 'lat' or 'lon' will be recognised now.
I have divided the previous code in three functions: read_inputmaps, read_points and extract_timeseries. In this way, the function extract_timeseries can be imported an used in the pipeline of any Python script.
from lisfloodutilities.ncextract import extract_timeseries
This branch is an improvement of the
ncextract
tool:cfgrib
.read_inputmaps
,read_points
andextract_timeseries
. In this way, the functionextract_timeseries
can be imported an used in the pipeline of any Python script.I have updated the documentation and test.