[gradsusr] error in if command of grads

chinh ta huu chinhth2010 at gmail.com
Tue Aug 2 02:46:19 EDT 2011


Dear Dave
   I found error, thank you very much
Chinh

On Mon, Aug 1, 2011 at 9:49 PM, Dave Allured <dave.allured at noaa.gov> wrote:

> Chinh,
>
> I tried your module with different file names.  It worked fine with Grads
> version 2.0.a9.  I do not see the problem.
>
> Try this:
>
> 1.  Ensure that your module file "convert_txt.gs" is a plain ASCII text
> file, not something strange like an MS word file, or HTML, or Unicode or
> UTF.
>
> 2.  Add a simple print statement right after the if statement, and before
> the sdfopen statement.  Something like this:
>
>     say 'At line 5'
>
> 3.  Delete statements one at a time, starting with the write statement and
> working backward, and test each time.  See if that finds the problem.
>
> --Dave
>
> Delete the write statement, and
>
>
> On 8/1/2011 9:51 PM, chinh ta huu wrote:
>
>> Dear Sir/Madam
>>     I use if command for calculating but I had a problem as below
>> This is my module:
>>
>>        function main(args)
>>             year=subwrd(args,1)
>>             para=1
>> */if (para = 1)
>> /* 'sdfopen
>> /home/chinhth/DATA/HINCAST/**COLA/z500/COLA/JUN/'year'/z500**.nc<http://z500.nc>
>> <http://z500.nc>'
>>
>> 'set t 1'
>> 'set z 1'
>> 'set lat -90 90'
>> 'set lon 0 357.5'
>> 'set gxout print'
>> 'set prnopts %g 1 1'
>> 'd z500'
>>                 res=result
>>
>> w=write('/home/chinhth/DATA/**HINCAST/COLA/z500/COLA/JUN/'**
>> year'/'year'.txt',res)
>> */endif
>> /*But I don't understand one error occur as bellow:
>> */Unable to locate ENDIF statement for the IF statement at line 8
>>             In file convert_txt.gs <http://convert_txt.gs>/*
>>
>> Please tell me this problem
>> Thank you
>> Chinh
>>
>> --
>> (Mr.) Ta Huu Chinh
>> National, Weather Forecasting Center, Ha Noi, Viet Nam.
>> No: 4th, Dang Thai Than, Hoan Kiem, Ha Noi
>> Tel: 84-903-402-181
>> Fax: 84-43-824-4917
>> Email: chinhth2010 at gmail.com <mailto:chinhth2010 at gmail.com>
>>
>> Website: http://vn.myblog.yahoo.com/**chinhth2005/<http://vn.myblog.yahoo.com/chinhth2005/>
>> Website: http://bestknowledge-chinhth.**blogspot.com/<http://bestknowledge-chinhth.blogspot.com/>
>> Website: http://anhcuoidep.vn
>>
>


-- 
(Mr.) Ta Huu Chinh
National, Weather Forecasting Center, Ha Noi, Viet Nam.
No: 4th, Dang Thai Than, Hoan Kiem, Ha Noi
Tel: 84-903-402-181
Fax: 84-43-824-4917
Email: chinhth2010 at gmail.com
Website: http://vn.myblog.yahoo.com/chinhth2005/
Website: http://bestknowledge-chinhth.blogspot.com/
Website: http://anhcuoidep.vn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110801/1e55c55b/attachment-0003.html 


More information about the gradsusr mailing list