Re: NCL and OPeNDAP

From: Brandon Capasso <sblueknigt_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 05 2012 - 07:10:49 MDT

Mary,

Thank you for your prompt reply. I have already accounted for the staggered
grid in my script, I was getting blank u,v plots from the remote data due
to an error with res@vfXArray/res@vfYArray. I think I was also referring to
resV@sfXArray and resV@sfYArray with the same variable definitions.

BUT, I'm still not entirely sure why my script was working perfectly on the
netcdf file on my local machine (it was plotting the same thing as when
operating on the data remotely with opendap when I removed that second
definition, only defining vfXArray/vfYArray).

Also, I'm not sure what you mean by saying that it's not a valid plot. I
understand that the grid is curvilinear and very non-uniform, but my data
plot matches the grid definition at
http://tidesandcurrents.noaa.gov/ofs/cbofs/cbofs_info.html and the NOAA
forecast current images on the home page.

How would change your script to create a valid plot from the data? It seems
to me that it's doing what it's supposed to be doing.

Thanks again,

Brandon

On Tue, Jul 3, 2012 at 11:32 AM, Mary Haley <haley@ucar.edu> wrote:

> Brandon,
>
> Which variables are you trying to plot a vector plot of?
>
> I was able to plot "u" and "v", but I had to cheat because they weren't on
> the same grid.
>
> You will need to do this before you can plot u and v, since they are on
> staggered grids.
>
> The way I cheated was to just select a subset of u and v, such that they
> are the same size.
> I also had to subscript lat_u and lon_u the same way. Note that this
> won't create a correct
> plot, but I just wanted to verify that there were some values.
>
> See the attached script.
>
>
> --Mary
>
> On Jul 3, 2012, at 12:53 AM, Brandon Capasso wrote:
>
> > Greetings,
> >
> > I am trying to read and plot fields from a remote NetCDF file, but I am
> coming up with "blank" fields.
> >
> > When I use:
> >
> > cdf_file = addfile(path,"r")
> >
> > where path points to
> http://opendap.co-ops.nos.noaa.gov/thredds/dodsC/NOAA/CBOFS/MODELS/201207/nos.cbofs.fields.nowcast.20120703.t00z.nc,
> my script runs without error and apparently reads the file, but plots blank
> vector fields (as if there is no data). Furthermore, printVarSummary on the
> remote file returns the correct dimension/attribute info for the variables
> that I'm interested in (so I know ncl is reading the remote file).
> >
> > When operating on the same file downloaded/saved on my local machine, my
> script works perfectly and plots the vector fields without issue, so why am
> I getting blank fields when operating on the remote file?
> >
> > Regards,
> >
> > Brandon Capasso
> >
> >
> > _______________________________________________
> > 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 Thu Jul 5 07:11:08 2012

This archive was generated by hypermail 2.1.8 : Mon Jul 09 2012 - 10:45:32 MDT