Re: PyNio and writing 3d variables

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 28 2011 - 09:14:13 MDT

Dear Hank,

Dave Brown, the PyNIO developer is out for a couple of weeks, and he may be the only one that can answer this.

Meanwhile, can you provide a short script that shows the problem? Also, what version of Python and NumPy are you using?


On Jul 27, 2011, at 8:31 AM, Hank Fisher wrote:

> I am having a curious problem. Currently I am unable to write a 3d variable to
> a netcdf file using PyNio. 2d are all fine and easy but none of the following
> methods seem to work....
> nc.variables['sst_data'] = d.astype(np.float32)
> or
> nc.variables['sst_data'][0] = d.astype(np.float32)
> or
> nc.variables['sst_data'].assign_value(d.astype(np.float32))
> I have verified the shape of both the Netcdf variable (sst_data) and the one
> containing the data (d). I have also experimented with reshaping d into 2d and
> 3d variables. Reshaping it into a 2d var and writing it to a 2d var works but
> no amount of manipulation will let me write anything to a 3d var.
> I am using a fairly old version of PyNio 1.03b1 but have found the same issue
> on 1.03b5. We will upgrade to 1.4 to see if that solves the problem but I would
> love to know, has anyone else has run into this problem?
> PyNio version 1.03b
> Red Hat Enterprise Linux Server release 5.6
> --
> --------------------------------------------------------------
> Hank Fisher Research Applications Laboratory
> 303-497-2817 National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
> --------------------------------------------------------------
> _______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:

pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Thu Jul 28 09:14:19 2011

This archive was generated by hypermail 2.1.8 : Fri Jul 29 2011 - 08:51:37 MDT