[ncl-talk] problem with adding file

Setareh Rahimi setareh.rahimi at gmail.com
Sat Sep 2 10:18:52 MDT 2017


Dear all,

Thank you for your help and advice, Mary was right, there was a problem
with the file when I transferred to another system. Now the problem is
fixed.

Thank you so much,

Best wishes,

On Wed, Aug 30, 2017 at 8:54 PM, Dennis Shea <shea at ucar.edu> wrote:

> Several people have successfully run your script no only under different
> NCL version but also on I would say this is not an NCL issue.
>
> It has been suggested that you may have an incomplete file or a corrupted
> file. Perhaps, this is the problem?
>
> At this point you have nothing to lose. Please delete your file and
> re-download the file. Follow the download instructions.
>
>
>
> On Wed, Aug 30, 2017 at 9:29 AM, Dennis Shea <shea at ucar.edu> wrote:
>
>> % GPCC> ncl spi.ncl   >&!   out.spi
>>
>> It works fine with 6.3.0, 6.4.0 and 6.5.0-beta
>>
>> See attachment.
>>
>> On Wed, Aug 30, 2017 at 8:45 AM, Setareh Rahimi <setareh.rahimi at gmail.com
>> > wrote:
>>
>>> So what is the problem? , I do know there is no problem whit the file.
>>>
>>> May I ask you please run the script and check if that works correctly?
>>>
>>> Regards,
>>>
>>> On Wed, Aug 30, 2017 at 5:59 PM, Dennis Shea <shea at ucar.edu> wrote:
>>>
>>>> I have both v6 and v7 from:
>>>>   https://www.esrl.noaa.gov/psd/data/gridded/data.gpcc.html
>>>>
>>>> %> cd DATA/PRECIP/GPCC
>>>> %> ls -l  precip.mon.total.v[6-7].nc
>>>>
>>>> -rw-r--r-- 1 shea cgdcas 1368593336  2014 precip.mon.total.v6.nc
>>>> -rw-r--r-- 1 shea cgdcas  348532141   2017 precip.mon.total.v7.nc
>>>>
>>>> See the above URL for descriptions.
>>>> ===
>>>>
>>>> %> ncl_filedump precip.mon.total.v6.nc
>>>>
>>>> and
>>>>
>>>> %> ncl_filedump precip.mon.total.v7.nc
>>>>
>>>> both work fine.
>>>>
>>>> ====
>>>> I thought that you have a permissions problem.
>>>> However, if Matlab reads the file and NCL does not then that is not the
>>>> case.
>>>>
>>>>
>>>>
>>>> On Wed, Aug 30, 2017 at 3:29 AM, Setareh Rahimi <
>>>> setareh.rahimi at gmail.com> wrote:
>>>>
>>>>> It dose exist as precip, I also checked this in Matlab and foud out it
>>>>> is as precip( see attached files please), I have done with this file some
>>>>> plots before, it worked about a few months ago, but wonder what happened
>>>>> currently?!!!!
>>>>>
>>>>> Thank you
>>>>>
>>>>> On Wed, Aug 30, 2017 at 1:18 PM, Krishnamoorthy Chandramouli <
>>>>> chandrakrishna.90 at gmail.com> wrote:
>>>>>
>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170902/70e7c1e5/attachment.html>


More information about the ncl-talk mailing list