Re: ncl-talk Digest, Vol 88, Issue 33

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 18 2011 - 08:06:15 MDT

[1] Assuming you have looked at your file via

%> ncdump -h pmer.nc
or
%> ncl_filedump pmer.nc

=============================================

[2]
  f1 = addfile("pmer.nc","r")
  p=f1->p
  lat = f1->lat ; <====
  lon = f1->lon ; <====
  nlat = dimsizes(lat)
  nlon = dimsizes(lon)

or

  f1 = addfile("pmer.nc","r")
  p=f1->p
  lat = p&lat ; <====
  lon = p&lon ; <====
  nlat = dimsizes(lat)
  nlon = dimsizes(lon)

On 3/18/11 7:46 AM, zilore mumba wrote:
> Assistance sought,
> Being new to ncl, I am still learning to use the documentation. I have a data
> file in NetCdf format. I tried to make a contour plot using native_2.ncl. I have
> defined as in the code snippet below my variable p and lon ,lat. I get the error
> "either file (f1) isn't defined or the variable (lat) is not a variable in the
> file".
> What is the correct way to do it?
> Assistance will be appreciated.
> Zilore
>
>
>
> ;*****************************************************
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> ;*****************************************************
> begin
> f1 = addfile("pmer.nc","r")
> p=f1->p
> lat = p->lat
> lon = p->lon
> nlat = dimsizes(lat)
> nlon = dimsizes(lon)
> ;**************************************
>
>
>
>
> _______________________________________________
> 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 Fri Mar 18 08:06:32 2011

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2011 - 16:15:59 MDT