Example pages containing:
tidbits |
resources |
functions/procedures
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
url = "http://test.opendap.org/opendap/data/nc/"
filename = url + "123.nc"
exists = isfilepresent(filename)
if(.not.exists) then
print("OPeNDAP isfilepresent test unsuccessful.")
print("Either file doesn't exist, or NCL does not have OPeNDAP capabilities on this system")
else
print("OPeNDAP isfilepresent test successful.")
f = addfile(filename,"r")
vars = getfilevarnames(f)
print(vars) ; should be (in any order): "l","j","i","cross","aloan",
; "shot","order","bears"
end if