Recipe: Fortran program as OPeNDAP client: Difference between revisions

Pchakrab (talk | contribs)
Pchakrab (talk | contribs)
Line 237: Line 237:
===== Discussion =====
===== Discussion =====


The three (3) differences from the case where an individual downloaded file was being read are
The four (4) differences from the case where an individual downloaded file was being read are
 
# <code>T_file</code>: Instead of reading a downloaded NetCDF-4 file, we read an OPeNDAP URL.
# <code>T_file</code>: Instead of reading a downloaded NetCDF-4 file, we read an OPeNDAP URL.
# <code>start</code>: Via the OPeNDAP URL, we can now access all time levels. 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>nf90_inq_varid</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 nf90_inq_varid.
# <code>nf90_inq_varid</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 nf90_inq_varid.
# <code>start</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.


==== Compile and link ====
==== Compile and link ====