Recipe: Fortran program as OPeNDAP client: Difference between revisions

Pchakrab (talk | contribs)
Pchakrab (talk | contribs)
Line 126: Line 126:


== Discussion ==
== Discussion ==
The four (4) differences from the case where an individual downloaded file was being read are
# <code>Line 31</code>: Instead of reading a downloaded NetCDF-4 file, we read an OPeNDAP URL.
# <code>Line 36</code>: While in the downloaded file, the temperature variable appears in the uppercase (T), on the OPeNDAP server, this variable is in lowercase (see http://opendap.nccs.nasa.gov:9090/dods/OSSE/GEOS-5.12/BETA9/0.5000_deg/inst/inst01hr_3d_T_Cv). This is reflected in the call to <code>nf90_inq_varid</code>.
# <code>Line 41</code>: Via the OPeNDAP URL, we now have access to all times for which data exists. The hourly <code>inst</code> files are available starting at 2005/15/15 2200z. Our desired time, 2006/09/18 0900z is then the 11772<sup>th</sup> file.
# <code>Line 63</code>: Same as the difference above, but for retrieving a subset of data.