I use the Siphon library to retrieve a subset (using the ncss service) of a remote NetCDF dataset. Is there a convenient way of storing the result in a local .nc file or do I have to create a new Dataset for writing and then clone everything in there?
If you have a query (query
) and client (ncss
) set up, then you can do something like this:
with open('mydata.nc', 'wb') as outfile:
outfile.write(ncss.get_data_raw(query))