NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Roy- Basically, you want to use the url (including any opendap constraints) as the path argument to nc_open(). As with any other dataset, you then need to read the actual data using e.g. nc_vara(). The tricky part is this: in order to see what the metadata is (dimensions variables, etc), you probably should use ncdump -h "url+constraint" to see what what the library did when it translated the dap model to the netcdf-3 model. One you have that metadata, you can just write your program using that information. =Dennis Heimbigner Unidata p.s. we probably should put some documentation about this. Roy Mendelssohn - NOAA Federal wrote:
Hi All: I am still a little confused on how to use opendap from within the netcdf library, The online documentation says I put the URL, including the constraint, into the "open file" command ( which will differ by language). So since I am including the constraint into the URL of the open command, is that, and the data is transferred, or is is viewed as a virtual datasets and I need to do the usual reads to extract the data? If the latter, is the size (and therefore the relative indexing) based on the virtual dataset or the actual one? I looked in the library examples for a program that did this and didn't find it, if there is a test program in there somewhere you can point me to it would be much appreciated. -Roy ********************** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ********************** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center 1352 Lighthouse Avenue Pacific Grove, CA 93950-2097 e-mail: Roy.Mendelssohn@xxxxxxxx (Note new e-mail address) voice: (831)-648-9029 fax: (831)-648-8440 www: http://www.pfeg.noaa.gov/ "Old age and treachery will overcome youth and skill.""From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr._______________________________________________ netcdfgroup mailing list netcdfgroup@xxxxxxxxxxxxxxxxFor list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/
netcdfgroup
archives: