Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71089 > unrolled thread

Saving a file as netCDF4 in Python

Started byJamie Mitchell <jamiemitchell1604@gmail.com>
First post2014-05-08 03:33 -0700
Last post2014-05-08 03:33 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Saving a file as netCDF4 in Python Jamie Mitchell <jamiemitchell1604@gmail.com> - 2014-05-08 03:33 -0700

#71089 — Saving a file as netCDF4 in Python

FromJamie Mitchell <jamiemitchell1604@gmail.com>
Date2014-05-08 03:33 -0700
SubjectSaving a file as netCDF4 in Python
Message-ID<e42892df-c236-4eee-8508-af18385b97d5@googlegroups.com>
Dear all,

Apologies as this sounds like a very simple question but I can't find an answer anywhere. 

I have loaded a netCDF4 file into python as follows:

swh=netCDF4.Dataset('path/to/netCDFfile,'r')

I then isolate the variables I wish to plot:

hs=swh.variables['hs']
year=swh.variables['year']

I would then like to save these hs and year variables so that I don't have to isolate them every time I want to plot them.

Any help would be much appreciated.

Cheers,

Jamie 

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web