Recipe: Python program as OPeNDAP client: Difference between revisions

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


==== Code ====
==== Code ====
The code below reads the temperature data inside the box bounded by latitudes 25<sup>o</sup>N, 50<sup>o</sup>N and longitudes -130<sup>o</sup>N, -65<sup>o</sup>N, computes the maximum and minimum temperatures and plots (using the matplotlib package) the surface (level=71) temperature.
This code accesses the collection <code>inst01hr_3d_T_Cv</code> from the OPeNDAP server and reads a subset of the temperature data (all levels inside the bounding box specified above) and computes its max/min. It then computes the max/min of the above data at the surface (level=72).
This code accesses the collection <code>inst01hr_3d_T_Cv</code> from the OPeNDAP server and reads a subset of the temperature data (all levels inside the bounding box specified above) and computes its max/min. It then computes the max/min of the above data at the surface (level=72).