Re: ncl_convert2nc expression syntax

From: Laura Briley <auraell_at_nyahnyahspammersnyahnyah>
Date: Tue Oct 22 2013 - 12:38:43 MDT

I was thinking that it might have to do with csh, too, but when I run the
command you suggest this is the error I get:
laura% csh -xv ncl_convert2nc
MERRA100.prod.assim.tavgM_2d_flx_Nx.197901.SUB.hdf
ncl_convert2nc: No such file or directory.

But both the data file and ncl_convert2nc exist:
laura% ls *.hdf
MERRA100.prod.assim.tavgM_2d_flx_Nx.197901.SUB.hdf

laura% which ncl_convert2nc
/Users/laura/NCL/bin/ncl_convert2nc

Laura Briley
Research Associate
Great Lakes Integrated Sciences + Assessments

On 10/22/13 2:24 PM, "David Brown" <dbrown@ucar.edu> wrote:

>I am guessing that the error you are getting is coming from the csh
>scripting in ncl_convert2nc that invokes the actual NCL code.
>So my suggestion would be to run the command prefixed by 'csh -xv':
>
>csh -xv ncl_convert2nc MERRA100.prod.assim.tavgM_2d_flx_Nx.197901.hdf
>
>When I do this on my mac I get a lot of output that ends with 'exit 0',
>indicating that the shell thinks the program ran okay, which in my case
>it does.
>But for you it may help to locate the line in the script that causes the
>error (probably something to do with an 'if' statement).
>
>If you can capture the output and send it to us it may help us diagnose
>your problem.
> -dave
>
>
>On Oct 22, 2013, at 10:47 AM, Laura Briley <auraell@umich.edu> wrote:
>
>> % uname -a
>> Darwin Laura-Brileys-MacBook.local 10.8.0 Darwin Kernel Version 10.8.0:
>> Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
>>
>> Thanks for your help
>>
>>
>> Laura Briley
>> Research Associate
>> Great Lakes Integrated Sciences + Assessments
>>
>>
>>
>>
>> On 10/22/13 12:45 PM, "Dennis Shea" <shea@ucar.edu> wrote:
>>
>>> I started this earlier ... then got side tracked.
>>>
>>> ===
>>>
>>> I ran on my MAC and another linux system using 6.1.2
>>> and the beta version of 6.2.0
>>>
>>> Further, for 'fun', I made the time dimension unlimited.
>>>
>>> No problems on either system.
>>>
>>> As a .hdf file
>>>
>>> %> ncl_convert2nc MERRA100.prod.assim.tavgM_2d_flx_Nx.197901.hdf -u
>>> TIME_EOSGRID
>>>
>>> As a hdfeos file (add either .he2 or .hdfeos)
>>>
>>> %> ncl_convert2nc MERRA100.prod.assim.tavgM_2d_flx_Nx.197901.hdf.he2 -u
>>> TIME_EOSGRID
>>>
>>> I have attached a dump of the file.
>>>
>>> Not sure of your issue. Please post the output from
>>>
>>> %> uname -a
>>>
>>> ==========
>>>
>>>
>>>
>>> On 10/22/13 10:24 AM, Wei Huang wrote:
>>>> Laura,
>>>>
>>>> Sorry, I mean I could NOT reproduce your issue on my Mac.
>>>> 6.1.2 on my Mac generated a NetCDF file properly.
>>>>
>>>> Wei
>>>>
>>>> huangwei@ucar.edu
>>>> VETS/CISL
>>>> National Center for Atmospheric Research
>>>> P.O. Box 3000 (1850 Table Mesa Dr.)
>>>> Boulder, CO 80307-3000 USA
>>>> (303) 497-8924
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Oct 22, 2013, at 10:20 AM, Wei Huang <huangwei@ucar.edu> wrote:
>>>>
>>>>> Laura,
>>>>>
>>>>> I could reproduce your issue.
>>>>>
>>>>> You may try:
>>>>>
>>>>> ncl_convert2nc MERRA100.prod.assim.tavgM_2d_flx_Nx.197901.hdf.he5
>>>>>
>>>>> as this one is truly a HDF-EOS data.
>>>>>
>>>>> Wei
>>>>>
>>>>> huangwei@ucar.edu
>>>>> VETS/CISL
>>>>> National Center for Atmospheric Research
>>>>> P.O. Box 3000 (1850 Table Mesa Dr.)
>>>>> Boulder, CO 80307-3000 USA
>>>>> (303) 497-8924
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Oct 22, 2013, at 9:31 AM, Laura Briley <auraell@umich.edu> wrote:
>>>>>
>>>>>> Hi,
>>>>>> I am trying to use the ncl_convert2nc command to convert hdf files
>>>>>>to
>>>>>> netcdf but get the error: "if: Expression Syntax". Here is the
>>>>>> important information that I think you need:
>>>>>>
>>>>>> [Laura-Brileys-MacBook:~] laura% ncl -V
>>>>>> 6.1.2
>>>>>> [Laura-Brileys-MacBook:My Passport/Data/MERRA] laura% ncl_convert2nc
>>>>>> MERRA100.prod.assim.tavgM_2d_flx_Nx.197901.hdf
>>>>>> if: Expression Syntax.
>>>>>> [Laura-Brileys-MacBook:My Passport/Data/MERRA] laura% uname -a
>>>>>> Darwin Laura-Brileys-MacBook.local 10.8.0 Darwin Kernel Version
>>>>>> 10.8.0: Tue Jun 7 16:33:36 PDT 2011;
>>>>>> root:xnu-1504.15.3~1/RELEASE_I386 i386
>>>>>>
>>>>>> I have put one of the files on your ftp site:
>>>>>> MERRA100.prod.assim.tavgM_2d_flx_Nx.197901.hdf
>>>>>>
>>>>>> Others have had the same problem but I have not come across any
>>>>>> solutions yet:
>>>>>> http://www.ncl.ucar.edu/Support/talk_archives/2011/3210.html
>>>>>> http://www.ncl.ucar.edu/Support/talk_archives/2010/2138.html
>>>>>>
>>>>>> Laura Briley
>>>>>> _______________________________________________
>>>>>> ncl-talk mailing list
>>>>>> List instructions, subscriber options, unsubscribe:
>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Oct 22 12:39:03 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 01 2013 - 08:58:14 MDT