lat = addfile("$PATH/TRACK_lat_200704.nc","r")
lon = addfile("$PATH/TRACK_lon_200704.nc","r")
As noted by Andrea, the above are incorrect. In fact, they are
incorrect in two ways: (a) the path and (b) the way
the file is opened.
path = getenv("PATH")
f = addfile (path+"TRACK_lat_200704.nc","r")
lat = f->lat
f = addfile (path+"TRACK_lon_200704.nc","r")
lon = f->lon
Please note that both "lat" and "lon" should have the missing value
attribute _FillValue
http://www.ncl.ucar.edu/Document/Functions/Built-in/getenv.shtml
I suggest that you download/read the mini-language manual at:
http://www.ncl.ucar.edu/Document/Manuals/
Good luck
Hahmann, Andrea N. wrote:
> Christine
>
> The correct syntax for what you want to do is:
>
> ff = addfile(<lat file name>,"r")
> lat = ff->lat (or name of field in netcdf file)
> ff = addfile(<lon file name>,"r")
> lon = ff->lon (or name of field in netcdf file)
>
> You need to open the files first, then read from them.
> Hope this helps,
>
> Andrea
>
> Andrea Hahmann, PhD.
> Senior Scientist
> Phone direct +45 4677 5471
> andrea.n.hahmann_at_risoe.dk
>
> Wind Energy Department
> Risų National Laboratory for Sustainable Energy
> Technical University of Denmark
> Building 118, P.O. Box 49
> DK-4000 Roskilde, Denmark
> Tel +45 4677 4677
> Fax +45 4677 5083
>
> -----Original Message-----
> From: ncl-talk-bounces_at_ucar.edu [mailto:ncl-talk-bounces_at_ucar.edu] On Behalf Of Christine.Radermacher_at_gfi.uib.no
> Sent: Wednesday, April 22, 2009 4:05 PM
> To: ncl-talk_at_ucar.edu
> Subject: track plots
>
>
> Hello,
>
> I would like to plot storm tracks with ncl.
> The tracks are stored in NetCDF and the latitude and longitude
> variables both have the form
>
> 1: lat1 lat2 lat3 missing missing ......
> 2: lat1 lat2 lat3 lat4 missing missing .....
> .
> .
> .
>
> so that each track is filled with missing values to a certain length.
>
> I tried to modify the traj_1.ncl script for that problem and modified
> the beginning like that:
>
> ;*************************************************
> ; traj_1.ncl
> ;*************************************************
> load "/usr/share/ncarg/nclscripts/csm/gsn_code.ncl"
> load "/usr/share/ncarg/nclscripts/csm/gsn_csm.ncl"
> ;**************************************************
> begin
> ;*************************************
> ; read in data
> ;************************************
>
> lat = addfile("$PATH/TRACK_lat_200704.nc","r")
> lon = addfile("$PATH/TRACK_lon_200704.nc","r")
> ntime=105
>
> Then I get the following error:
> warning:TextItem:libncarg Error:PLCHHQ - DATASET NOT LOADED CORRECTLY
> Segmentation fault
>
> I hope you could help me.
>
> Regards
> Christine
>
>
>
>
>
> ----- Ende der weitergeleiteten Nachricht -----
>
>
>
> ----- Ende der weitergeleiteten Nachricht -----
>
>
>
> ----- Ende der weitergeleiteten Nachricht -----
>
> _______________________________________________
> 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
>
-- ====================================================== Dennis J. Shea tel: 303-497-1361 | P.O. Box 3000 fax: 303-497-1333 | Climate Analysis Section | Climate & Global Dynamics Div. | National Center for Atmospheric Research | Boulder, CO 80307 | USA email: shea 'at' ucar.edu | ====================================================== _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Wed Apr 22 2009 - 13:13:39 MDT
This archive was generated by hypermail 2.2.0 : Fri Apr 24 2009 - 14:12:40 MDT