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
Received on Wed Apr 22 2009 - 12:29:48 MDT
This archive was generated by hypermail 2.2.0 : Fri Apr 24 2009 - 14:12:40 MDT