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

  • To: Ryan May <rmay@xxxxxxxx>
  • Subject: Re: [python-users] [netCDF4] Error when saving >2GB NETCDF file >> NetCDF: Operation not allowed in define mode
  • From: Andrew Joros <andrew.joros@xxxxxxxxx>
  • Date: Mon, 21 Nov 2016 11:43:12 -0800
Ended up finding a way to reduce the filesize output from WRF.


-anj


On Wed, Nov 16, 2016 at 12:32 PM, Ryan May <rmay@xxxxxxxx> wrote:

> Andrew,
>
> 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)?
>
> Ryan
>
> On Tue, Nov 15, 2016 at 8:56 PM, Andrew Joros <andrew.joros@xxxxxxxxx>
> wrote:
>
>> Hi all,
>>
>> I am across this error when trying to write a new NETCDF from subset of a
>> LARGE NETCDF file :
>> Traceback (most recent call last):
>>   File "wrfextract.py", 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: http://www.unidata.ucar.edu/mailing_lists/
>>
>
>
>
> --
> Ryan May, Ph.D.
> Software Engineer
> UCAR/Unidata
> Boulder, CO
>
  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the python-users archives: