[ncl-talk] problem with adding file
Krishnamoorthy Chandramouli
chandrakrishna.90 at gmail.com
Wed Aug 30 02:48:58 MDT 2017
Try checking if the variable actually exist as precip in the nc file
ncdump -v precip [your-nc-file]
Also if possible share the file, so that someone will try and help.
*Regards,*
*Krishnamoorthy Chandramouli*
On Wed, Aug 30, 2017 at 3:39 PM, Setareh Rahimi <setareh.rahimi at gmail.com>
wrote:
> Dear all,
>
> Please have a look at the attached file, which is a screenshot of
> ncl_filedump command .
>
> what is your idea?
>
> Best wishes,
>
> On Wed, Aug 30, 2017 at 2:24 AM, Mary Haley <haley at ucar.edu> wrote:
>
>> As another test, please see if you can look at the file using
>> "ncl_filedump" from the UNIX command line. But, first make sure you have
>> the file correctly spelled:
>>
>> ls precip.mon.total.v6.nc
>>
>> then:
>>
>> ncl_filedump precip.mon.total.v6.nc
>>
>> This is the same thing as the 2-line script that Dennis asked you to
>> try. If this works, then you can also verify at the same time if "precip"
>> is a variable in that file.
>>
>> If you get any errors from the ncl_filedump command, respond back to
>> ncl-talk with all of the error messages included.
>>
>> --Mary
>>
>>
>>
>> On Tue, Aug 29, 2017 at 11:45 AM, Dennis Shea <shea at ucar.edu> wrote:
>>
>>> Hello ... Please respond to ncl-talk and not directly to me.
>>>
>>> Your script has:
>>>
>>> *f * = addfile("precip.mon.total.v6.nc","r")
>>> prc =* f*->precip({tStrt:tLast},:,:) ; whole grid
>>>
>>> The error message is:
>>>
>>> fatal: file (*f*) isn't defined
>>>
>>> I am not sure what the problem would be. Someone else will have to
>>> respond.
>>>
>>> ---
>>> What does the following yoeld? Likely the same error.
>>>
>>> *f * = addfile("precip.mon.total.v6.nc","r")
>>> print(*f*)
>>>
>>> =====================================================
>>> NOTE:
>>> You do *not* have to load the following libraries from NCL 6.2.0
>>> onward. So for 6.3.0, they are *automatically loaded.*
>>>
>>> load"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>>> load"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>>> load"$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>>>
>>> From 6.4.0, the following are automatically loaded:
>>>
>>> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>>> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>>> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>>> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>>> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/bootstrap.ncl"
>>> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/extval.ncl"
>>> "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>>>
>>>
>>> On Tue, Aug 29, 2017 at 9:27 AM, Setareh Rahimi <
>>> setareh.rahimi at gmail.com> wrote:
>>>
>>>> dear Dennis,
>>>>
>>>> Thank you for your advice, but both data file and script are in the
>>>> same directory.
>>>>
>>>> Regards,
>>>>
>>>> On Tue 29 Aug 2017 at 19:12, Dennis Shea <shea at ucar.edu> wrote:
>>>>
>>>>> By default, NCL always looks in the 'current directory'.
>>>>> My guess is that the data file is not in the same directory as the NCL
>>>>> script.
>>>>>
>>>>> dirp = "/some/path/to/file/"
>>>>> filp = "precip.mon.total.v6.nc"
>>>>>
>>>>> pthp = dirp + filp
>>>>> f = addfile(pthp, "r")
>>>>>
>>>>> or
>>>>>
>>>>> f = addfile(dirp + filp, "r")
>>>>>
>>>>>
>>>>> On Tue, Aug 29, 2017 at 8:26 AM, Setareh Rahimi <
>>>>> setareh.rahimi at gmail.com> wrote:
>>>>>
>>>>>> Dear all,
>>>>>>
>>>>>> Once I put my NCL command line in NCL environment, it returns me an
>>>>>> error.
>>>>>>
>>>>>> Please have a look at the attached files, which contain a screenshot
>>>>>> of the error and my script.
>>>>>>
>>>>>> Please help me as soon as possible.
>>>>>>
>>>>>> Best wishes,
>>>>>> --
>>>>>> S.Rahimi
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> ncl-talk mailing list
>>>>>> ncl-talk at ucar.edu
>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>>
>>>>>>
>>>>> --
>>>> S.Rahimi
>>>>
>>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
>
> --
> S.Rahimi
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170830/49ce7f65/attachment.html>
More information about the ncl-talk
mailing list