Closed mx-moth closed 1 year ago
Using the gbr4.nc
file from emsarray-data
, and gbr4-points.csv as the input points:
$ emsarray extract-points emsarray-data/gbr4.nc gbr4-points.csv gbr4-points.nc
Outputs gbr4-points.nc (zipped because github does not allow uploading .nc
files)
@frizwi You can view the in-progress documentation for this functionality including example usage from Python at: https://emsarray--29.org.readthedocs.build/en/29/api/operations/point_extraction.html
An example command line invocation is:
$ emsarray extract-points emsarray-data/gbr4.nc gbr4-points.csv gbr4-points.nc
The command line interface prints usage:
$ emsarray extract-points --help
usage: emsarray extract-points [-h] [-c LON LAT] [-d DIM]
input-dataset points output-dataset
positional arguments:
input-dataset Path to input netCDF4 file
points Path to a CSV file with the points to extract
output-dataset Path to output netCDF4 file
options:
-h, --help show this help message and exit
-c LON LAT, --coordinate-columns LON LAT
Names of the longitude and latitude columns in the CSV
file. Defaults to 'lon' and 'lat'.
-d DIM, --point-dimension DIM
Name of the new dimension to index the point data
Format.drop_geometry()
methodemsarray.operations.point_extraction
module that can extract data at points given in a Pandas DataFrame.emsarray extract-points
command line entry pointCloses #13