Re: [python-users] [netCDF4] Error when saving >2GB NETCDF file >> NetCDF: Operation not allowed in define mode

  • To: Andrew Joros <andrew.joros@xxxxxxxxx>
  • Subject: Re: [python-users] [netCDF4] Error when saving >2GB NETCDF file >> NetCDF: Operation not allowed in define mode
  • From: Ryan May <rmay@xxxxxxxx>
  • Date: Wed, 16 Nov 2016 13:32:49 -0700

What does your call to Dataset for the one you're writing to look like?
What exactly is lons there?

Can you reproduce this with a simple example (e.g. creating a 2GB array of
ones to write to the file)?


On Tue, Nov 15, 2016 at 8:56 PM, Andrew Joros <andrew.joros@xxxxxxxxx>

> Hi all,
> I am across this error when trying to write a new NETCDF from subset of a
> Traceback (most recent call last):
>   File "", line 204, in <module>
>     longitude[:] = lons
>   File "netCDF4/_netCDF4.pyx", line 3996, in 
> netCDF4._netCDF4.Variable.__setitem__
> (netCDF4/_netCDF4.c:43637)
>   File "netCDF4/_netCDF4.pyx", line 4208, in
> netCDF4._netCDF4.Variable._put (netCDF4/_netCDF4.c:45517)
> RuntimeError: NetCDF: Operation not allowed in define mode
> -bash-4.1$ lt /Input/WRF_AIC/WRFCorn/wrfout*
> I googled around online and I have come across discussion about how saving
> Netcdf files >2GB is problematic. Haven't found a Python solution though.
> I am using the netCDF4 package in Python FYI.
> Has anyone come across as solution in Python for this?
> Thanks
> -anj
> _______________________________________________
> NOTE: All exchanges posted to Unidata maintained email lists are
> recorded in the Unidata inquiry tracking system and made publicly
> available through the web.  Users who post to any of the lists we
> maintain are reminded to remove any personal information that they
> do not want to be made public.
> python-users mailing list
> python-users@xxxxxxxxxxxxxxxxxxxxxxxx
> For list information, to unsubscribe, or change your membership options,
> visit:

Ryan May, Ph.D.
Software Engineer
Boulder, CO
  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the python-users archives: