opendap data access through NOAA erddap using NCL

From: Sam McClatchie <sam.mcclatchie_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 28 2012 - 21:22:52 MDT

Colleagues

I have the opendap-enabled ncl working on my computer and I have run the suggested test successfully: <http://www.ncl.ucar.edu/Applications/opendap.shtml>. I can access files directly on remote servers, but I am having trouble using the NOAA erddap facility < http://coastwatch.pfeg.noaa.gov/erddap/rest.html> from ncl.

The problem seems to be that erddap generates a url that is a concatenated url, file_label, and projection_selection, rather than a concatenated url, filename
(see <http://coastwatch.pfeg.noaa.gov/erddap/griddap/documentation.html>).

Erddap has some nice features I'd like to take advantage of < http://coastwatch.pfeg.noaa.gov/erddap/index.html>. Is there a function in NCL that can directly access the concatenated url, file_label, and projection_selection that erddap generates?

For example in R:

> download.file(url="http://coastwatch.pfeg.noaa.gov/erddap/griddap/erdBAssta5day.csv?sst[(2007-10-21)][0][(-75):50:(75)][(180):50:(360)]&.draw=surface&.vars=longitude|latitude|sst&.colorBar=Rainbow|C|Linear|0|32|", destfile="../data/test.csv")
trying URL 'http://coastwatch.pfeg.noaa.gov/erddap/griddap/erdBAssta5day.csv?sst[(2007-10-21)][0][(-75):50:(75)][(180):50:(360)]&.draw=surface&.vars=longitude|latitude|sst&.colorBar=Rainbow|C|Linear|0|32|'
Content type 'text/csv;charset=UTF-8' length unknown
opened URL
.......... .......... .......... .......... .........
downloaded 49 Kb

> tt <- read.csv("../data/test.csv")
> head(tt)
                  time altitude latitude longitude sst
1 UTC m degrees_north degrees_east degree_C
2 2007-10-21T12:00:00Z 0.0 -75.0 180.0 NaN
3 2007-10-21T12:00:00Z 0.0 -75.0 185.0 NaN
4 2007-10-21T12:00:00Z 0.0 -75.0 190.0 NaN
5 2007-10-21T12:00:00Z 0.0 -75.0 195.0 NaN
6 2007-10-21T12:00:00Z 0.0 -75.0 200.0 NaN
>

Best fishes

Sam

--
Sam McClatchie,
Supervisory oceanographer
Southwest Fisheries Science Center, NOAA, 
8604 La Jolla Shores Drive
La Jolla, CA 92037-1508, U.S.A.
email <Sam.McClatchie@noaa.gov>
Cellular:  858 752 8495
Research home page <http://fishocean.info>
                   /\
      ...>><xX(¡> 
                //// \\\\
                   <¡)Xx><<
              /////  \\\\\\
                        ><(((¡> 
  >><(((¡>   ...>><xX(¡>O<¡)Xx><<

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 28 21:23:08 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 24 2012 - 09:48:26 MDT