[ncl-talk] 答复: Can't work with reassign command ':=', and '::' call fortran command

Ziyuan Wang 1301111586 at pku.edu.cn
Thu Feb 23 14:43:37 MST 2017


Hi Alan

 

Now I installed ncl/6.30 with gcc/4.7.2, and run that scripts again, but now it see can’t read operator “::”, as error reported (attached 2.error)

fatal:syntax error: line 119 in file read_bpch.ncl before or near : 

    BIN:

-------^

fatal:error in statement

 

and line 119 in ncl is “; Call a Fortran routine to parse bytes into separate variables

BIN::bpch_hdr1( bytes, c_modelname, lon, lat, halfpolar, center180 )” (attached read_bpch.ncl)

Thank you

 

Ziyuan

发件人: alan.brammer at gmail.com [mailto:alan.brammer at gmail.com] 代表 Alan Brammer
发送时间: 2017年2月17日 14:52
收件人: Ziyuan Wang <1301111586 at pku.edu.cn>
抄送: ncl-talk at ucar.edu
主题: Re: [ncl-talk] Can't work with reassign command ':=', and '::' call fortran command

 

That operator was introduced in 6.2.1 it won’t work in versions prior to that.  6.2.1 is roughly 4 years old.  There will be lots of missing functionality if you’re stuck on < 6.1. 

 

To work around, you can replace all := with = and where needed add a delete(fti) or the appropriate variable on the line before. 

 

delete() will throw an error if the variable doesn’t exist though so you’ll need to go through and decide for each instance.  

 

You might want to email ncl-install at ucar.edu <mailto:ncl-install at ucar.edu>  about your installation problems (or one of the devs might help you out in here). 

 

 

 

Alan

 

 

 

 

 

##############################
Alan Brammer,

Post-Doc Researcher

 

Department of Atmospheric and Environmental Sciences,
University at Albany, State University of New York, Albany, NY, 12222

 <mailto:abrammer at albany.edu> abrammer at albany.edu
##############################

 

On 17 Feb 2017, at 14:37, Ziyuan Wang <1301111586 at pku.edu.cn <mailto:1301111586 at pku.edu.cn> > wrote:

 

Dear all Users:

I want to run a ncl scripts written by geos-chem model to read bpch files (read_bpch.ncl attached).

1.When I use ncl/6.1.0 or 6.0.0, it can't work with the re-assign operator :=, as error

fatal:syntax error: line 96 in file $NCL4GC/file_io/read_bpch.ncl before or near : 

  fti         :

--------------^

line 96 in bpch.ncl is "fti         := get_string_from_bpch( inFile, R, 40 ) " (attached 1.error)

2. When I use ncl/6.3.0, in our school cluster there's no intel/12.1.5, so I have to load gcc/4.7.2. Then it can't read fortran command. And for model compiling I also need intel fortran.

fatal:syntax error: line 119 in file $NCL4GC/file_io/read_bpch.ncl before or near : 

    BIN:

-------^

Line 129 in bpch.ncl is " BIN::bpch_hdr1( bytes, c_modelname, lon, lat, halfpolar, center180 )" (Attached 2.error)

3.So I'm wondering how can I change read_bpch.ncl code, to make the ':=' work in ncl/6.1.0

Thank you everyone

 

Ziyuan Wang

<read_bpch.ncl><1.error><2.error>_______________________________________________
ncl-talk mailing list
 <mailto:ncl-talk at ucar.edu> ncl-talk at ucar.edu
List instructions, subscriber options, unsubscribe:
 <http://mailman.ucar.edu/mailman/listinfo/ncl-talk> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170223/6efdcc93/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.error
Type: application/octet-stream
Size: 1008 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170223/6efdcc93/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_bpch.ncl
Type: application/octet-stream
Size: 7058 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170223/6efdcc93/attachment-0001.obj 


More information about the ncl-talk mailing list