OPeNDAP (formerly DODS)
OPeNDAP is a means by which a user can access a remote file over the internet. There are certain caveats to using this functionality in NCL:
- The file must be located on a OPeNDAP server
- Only certain operating systems are currently OPeNDAP enabled. NCL can only perform OPeNDAP operations on these supported systems.
- OPeNDAP works with addfile, addfiles, and isfilepresent.
Actual Script
begin
; The URL is so long, break it into two pieces.
url = "http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/"
filename = "ncep.reanalysis.dailyavgs/pressure/air.1948.nc"
exists = isfilepresent(url+filename)
if(.not.exists) then
print("OPeNDAP test unsuccessful.")
print("Either file doesn't exist, or NCL does not have OPeNDAP /
capabilities on this system")
else
f = addfile(url + filename,"r")
variables = getfilevarnames(f)
print(variables) ; will print a list of variable names on the file
end if
end