NCL Home> Application examples> File IO || Data files for some examples

Example pages containing: tips | resources | functions/procedures


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:

Here's a test script you can use to see if your version of NCL has OPeNDAP capabilities:

;---Path to file served by OPeNDAP server at NOAA
  url      = ""
  filename = ""

  exists = isfilepresent(url+filename)
  if(.not.exists) then
    print("OPeNDAP test unsuccessful.")
    print("Either the file doesn't exist, or NCL does")
    print("not have OPeNDAP cabilities on this system.")
    f = addfile(url + filename,"r")
    vnames = getfilevarnames(f)
  end if


Variable: vnames
Type: string
Total Size: 40 bytes
            5 values
Number of Dimensions: 1
Dimensions and sizes:   [5]
(0)     level
(1)     lon
(2)     lat
(3)     time
(4)     air