|
From: Hayes, W. <bh...@ca...> - 2015-06-13 23:25:57
|
FYI, I tried your command
>>> x = cdutil.ANNUALCYCLE.departures(v)
and it works for me using cdat
in UVCDAT 2.2.0 under Ubuntu 2.2.0
and also UVCDAT 1.5.0-rc5 under Ubuntu 13.10.
Bill Hayes
On Sat, Jun 13, 2015 at 1:28 PM, sudipta sarkar <sdp...@gm...>
wrote:
> Sorry I meant "cdutil.ANNUALCYCLE.departures" function.
> What I am trying to do is quite simple:
>
> *>>> o3tor_anom = cdutil.ANNUALCYCLE.departures(o3tor) this is where I get
> the error. *
>
>
> Here is the complete error stack:
>
> Traceback (most recent call last):
>
> File "<stdin>", line 1, in <module>
>
> File
> "/usr/local/uvcdat/2.2.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cdutil/times.py",
> line 1303, in departures
>
> u=self.month_fix(slab)
>
> File
> "/usr/local/uvcdat/2.2.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cdutil/times.py",
> line 1257, in month_fix
>
> t.toRelativeTime("months since "+str(tc))
>
> File
> "/usr/local/uvcdat/2.2.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cdms2/axis.py",
> line 852, in toRelativeTime
>
> self[i]=tmp2
>
> File
> "/usr/local/uvcdat/2.2.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cdms2/axis.py",
> line 1903, in __setitem__
>
> return apply(self._obj_.setitem,(index,numpy.ma.filled(value)))
>
> IOError: cdunif: write access to read-only file
>
>
> The complete info for the "o3tor" variable is given below, just in case
> you think there is something wrong with the variable:
>
>
> o3tor.info()
>
> *** Description of Slab variable_2 ***
>
> id: variable_2
>
> shape: (123, 120, 288)
>
> filename: /Users/ssarkar1/data/RP_work/TOC/Aura_MLS_TropO3_Col_monthly.nc
>
> missing_value: [999999]
>
> comments:
>
> grid_name: grid_120x288
>
> grid_type: None
>
> time_statistic:
>
> long_name:
>
> units:
>
> Grid has Python id 0x11376a790.
>
> Gridtype: generic
>
> Grid shape: (120, 288)
>
> Order: yx
>
> ** Dimension 1 **
>
> id: time
>
> Designated a time axis.
>
> units: months since 2004-10
>
> Length: 123
>
> First: 0
>
> Last: 122
>
> Other axis attributes:
>
> calendar: gregorian
>
> axis: T
>
> Python id: 0x11376a6d0
>
> ** Dimension 2 **
>
> id: latitude
>
> Designated a latitude axis.
>
> units: degrees_north
>
> Length: 120
>
> First: -59.5
>
> Last: 59.5
>
> Other axis attributes:
>
> axis: Y
>
> Python id: 0x11375ac50
>
> ** Dimension 3 **
>
> id: longitude
>
> Designated a longitude axis.
>
> units: degrees_east
>
> Length: 288
>
> First: -179.375
>
> Last: 179.375
>
> Other axis attributes:
>
> topology: circular
>
> modulo: [ 360.]
>
> axis: X
>
> Python id: 0x11376a610
>
> *** End of description for variable_2 ***
>
>
> BTW this same command works in another setup where I have the cat-lite
> with complete anaconda stack of tools. But gives me this error when trying
> to run from CDAT.
>
> On Sat, Jun 13, 2015 at 2:56 PM, Rajeev S Kurup <raj...@gm...>
> wrote:
>
>> Hi Sudipta Sarkar;
>>
>> That error message does not seem to be coming from
>> cdutil.ANNUALCYCLE.departures function.
>> There is no cdutil.CLIMATOLOGY.departures function too
>>
>> Could you post the whole error message or the script part where you get
>> this error ?
>>
>> On Sun, Jun 14, 2015 at 12:05 AM, sudipta sarkar <sdp...@gm...>
>> wrote:
>>
>>> Hi Arulalan
>>> I am not trying to write to any file. All I am trying to do is to call
>>> the "cdutil.CLIMATOLOGY.departures" function and I get this error. I am not
>>> sure if the function internally tries to write to a location that is not
>>> accessible as a non root.
>>>
>>>
>>> On Sat, Jun 13, 2015 at 12:16 PM, Arulalan T <aru...@gm...>
>>> wrote:
>>>
>>>> Dear Sudipta Sarkar,
>>>>
>>>> On 13 June 2015 at 20:25, sudipta sarkar <sdp...@gm...> wrote:
>>>>
>>>>> Hi All,
>>>>> I installed CDAT in its usual location under /usr/local as root but
>>>>> now I am trying to use CDAT as a non-root user. When I do that I get this
>>>>> error when trying to use the command "cdutil.ANNUALCYCLE.departures".
>>>>> The error that I get is:
>>>>>
>>>>> "IOError: cdunif: write access to read-only file"
>>>>>
>>>>
>>>> You can access CDAT as normal user. In fact it will be accessible by
>>>> all users if it has installed in the path /usr/local.
>>>>
>>>> Your IO error says that you do not have write access.
>>>> I guess you are trying to write the variable to netcdf out file.
>>>> You make sure that you have write access in location (directory) where
>>>> the outfile is specified.
>>>>
>>>> Also I would suggest you to join & post queries in UV-CDAT mailing list.
>>>> http://uvcdat.llnl.gov/mailing-list.html
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> So does this error have anything to do with user privilege and access
>>>>> issues? Can I only run CDAT as root?
>>>>>
>>>>> If this has nothing to do with access permission issues then please
>>>>> let me know what may be causing this?
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>> _______________________________________________
>>>>> Cdat-discussion mailing list
>>>>> Cda...@li...
>>>>> https://lists.sourceforge.net/lists/listinfo/cdat-discussion
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Arulalan.T
>>>> Project Associate
>>>> Centre for Atmospheric Sciences
>>>> Indian Institute of Technology Delhi
>>>>
>>>> My Experiments In Gnu/Linux ! : http://tuxcoder.wordpress.com
>>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Cdat-discussion mailing list
>>> Cda...@li...
>>> https://lists.sourceforge.net/lists/listinfo/cdat-discussion
>>>
>>>
>>
>>
>> --
>> Rajeev S Kurup
>> Research Scholar
>> Center for Atmospheric Sciences
>> IIT Delhi
>> Hauz Khas
>> New Delhi
>> email; raj...@gm...
>> Ph: 08802650783
>>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Cdat-discussion mailing list
> Cda...@li...
> https://lists.sourceforge.net/lists/listinfo/cdat-discussion
>
>
|