NCPP / ocgis

OpenClimateGIS is a set of geoprocessing and calculation tools for CF-compliant climate datasets.
Other
70 stars 19 forks source link

Writing compressed netCDF files? #473

Closed aaschwanden closed 6 years ago

aaschwanden commented 6 years ago

Hi,

I'm extracting large data sets using a shape file from even larger data sets. Is there a way to write compressed netCDF files directly via ocgis.OcgOperations() ?

bekozi commented 6 years ago

Hi @aaschwanden, you can use output_format_options: http://ocgis.readthedocs.io/en/latest/operations.html#output-format-options

For what you need it would look like:

options = {'variable_kwargs': {'zlib': True, 'complevel': 4}}

Let me know if it doesn't work for you.

aaschwanden commented 6 years ago

Great, thanks. I’m at the AGU conference right now, I’ll try it out when I get back.

On Dec 10, 2017, at 3:49 PM, Ben Koziol notifications@github.com wrote:

Hi @aaschwanden, you can use output_format_options: http://ocgis.readthedocs.io/en/latest/operations.html#output-format-options

For what you need it would look like:

options = {'variable_kwargs': {'zlib': True, 'complevel': 4}} Let me know if it doesn't work for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

aaschwanden commented 6 years ago

Hi,

this worked for me.

Thanks,

Andy

On Dec 10, 2017, at 12:49 PM, Ben Koziol notifications@github.com wrote:

Hi @aaschwanden, you can use output_format_options: http://ocgis.readthedocs.io/en/latest/operations.html#output-format-options

For what you need it would look like:

options = {'variable_kwargs': {'zlib': True, 'complevel': 4}} Let me know if it doesn't work for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

bekozi commented 6 years ago

:+1: