X

NV5 Geospatial Blog

Each month, NV5 Geospatial posts new blog content across a variety of categories. Browse our latest posts below to learn about important geospatial information or use the search bar to find a specific topic or author. Stay informed of the latest blog posts, events, and technologies by joining our email list!



Mapping Earthquake Deformation in Taiwan With ENVI

Mapping Earthquake Deformation in Taiwan With ENVI

12/15/2025

Unlocking Critical Insights With ENVI® Tools Taiwan sits at the junction of major tectonic plates and regularly experiences powerful earthquakes. Understanding how the ground moves during these events is essential for disaster preparedness, public safety, and building community resilience. But traditional approaches like field... Read More >

Comparing Amplitude and Coherence Time Series With ICEYE US GTR Data and ENVI SARscape

Comparing Amplitude and Coherence Time Series With ICEYE US GTR Data and ENVI SARscape

12/3/2025

Large commercial SAR satellite constellations have opened a new era for persistent Earth monitoring, giving analysts the ability to move beyond simple two-image comparisons into robust time series analysis. By acquiring SAR data with near-identical geometry every 24 hours, Ground Track Repeat (GTR) missions minimize geometric decorrelation,... Read More >

Empowering D&I Analysts to Maximize the Value of SAR

Empowering D&I Analysts to Maximize the Value of SAR

12/1/2025

Defense and intelligence (D&I) analysts rely on high-resolution imagery with frequent revisit times to effectively monitor operational areas. While optical imagery is valuable, it faces limitations from cloud cover, smoke, and in some cases, infrequent revisit times. These challenges can hinder timely and accurate data collection and... Read More >

Easily Share Workflows With the Analytics Repository

Easily Share Workflows With the Analytics Repository

10/27/2025

With the recent release of ENVI® 6.2 and the Analytics Repository, it’s now easier than ever to create and share image processing workflows across your organization. With that in mind, we wrote this blog to: Introduce the Analytics Repository Describe how you can use ENVI’s interactive workflows to... Read More >

Deploy, Share, Repeat: AI Meets the Analytics Repository

Deploy, Share, Repeat: AI Meets the Analytics Repository

10/13/2025

The upcoming release of ENVI® Deep Learning 4.0 makes it easier than ever to import, deploy, and share AI models, including industry-standard ONNX models, using the integrated Analytics Repository. Whether you're building deep learning models in PyTorch, TensorFlow, or using ENVI’s native model creation tools, ENVI... Read More >

1345678910Last
17649 Rate this article:
5.0

Native OPeNDAP support in IDL

Anonym

OPeNDAP is an acronym for "Open-source Project for a Network Data Access Protocol." From the OPeNDAP website: “OPeNDAP provides software which makes local data accessible to remote locations regardless of local storage format.” Through Unidata’s netCDF-4 library, IDL 8.2 includes native support for OPeNDAP, though currently only on Mac OS X and Linux. Joe Lee of The HDF Group has created an example of using OPeNDAP with a community-generated IDL client. I’d like to modify (and slightly expand) his example to instead use the native OPeNDAP support in IDL 8.2. Start with the URL to an AIRS level 3 standard daily product file (HDF-EOS format) hosted on The HDF Group’s OPeNDAP-enabled server:

 IDL> url = 'http://eosdap.hdfgroup.uiuc.edu:8080/opendap/data/NASAFILES/hdf4/AIRS.2008.10.27.L3.RetStd001.v5.2.2.0.G08303124144.hdf' 

Access the file at this URL using netCDF library calls. Open the file with NCDF_OPEN, which returns an identifier (a long integer) for the file:

 IDL> file_id = ncdf_open(url)

What’s in this file? Use NCDF_INQUIRE to find the number of variables, dimensions and attributes:

 IDL> info = ncdf_inquire(file_id) IDL> help, info ** Structure <85778ac>, 4 tags, length=16, data length=16, refs=1: NDIMS           LONG                26 NVARS           LONG               274 NGATTS          LONG                 0 RECDIM          LONG                -1

There are 274 variables in this file. Use NCDF_VARIDSINQ to get identifiers for all the variables:

 IDL> var_ids = ncdf_varidsinq(file_id) IDL> help, var_ids VAR_IDS         LONG      = Array[274]

Use NCDF_VARINQ to get information about the last variable in the file:

 IDL> help, ncdf_varinq(file_id, var_ids[-1]) ** Structure <85779ec>, 5 tags, length=40, data length=40, refs=1: NAME            STRING    'TopographyU274' DATATYPE        STRING    'FLOAT' NDIMS           LONG                 2 NATTS           LONG                 3 DIM             LONG      Array[2]

Extract data from this last variable in the remote file to your IDL session. Use NCDF_VARID to get an identifier for the variable, by name (note that this string is case-sensitive), and NCDF_VARGET to actually get the data, which will be stored locally in the variable topo.

 IDL> topo_id = ncdf_varid(file_id, 'TopographyU274') IDL> ncdf_varget, file_id, topo_id, topo IDL> help, topo TOPO            FLOAT     = Array[360, 180]

We’ve successfully pulled data from the remote file into IDL! To properly visualize these data, also get their geographic coordinates:

 IDL> latitude_id = ncdf_varid(file_id, 'LatitudeU271') IDL> longitude_id = ncdf_varid(file_id, 'LongitudeU272') IDL> ncdf_varget, file_id, latitude_id, latitude IDL> ncdf_varget, file_id, longitude_id, longitude IDL> help, longitude, latitude LONGITUDE       FLOAT     = Array[360] LATITUDE        FLOAT     = Array[180]

Then close the file:

 IDL> ncdf_close, file_id

Visualize these topography data as a contour plot in a map projection:

 IDL> m = map('Miller Cylindrical', $ > color='gray', $ > label_color='black', $ > label_position=0, $ ; move labels to edges > title='AIRS.2008.10.27.L3 Topography') IDL> nlevels = 11 IDL> levels = findgen(nlevels)*500 + 250 ; meters IDL> g = contour(topo, longitude, latitude, $ > overplot=m, $ >   c_value=levels, $ >   rgb_table=33, $ >   background_color='dark blue', $ >   /fill, $ >   grid_units='degrees') IDL> c = mapcontinents(color='white') IDL> cb = colorbar(target=g, $ >   position=[0.2, 0.13, 0.85, 0.15], $ >   title='Elevation (m)')

and save the visualization to a PNG file:

 IDL> p.save, 'idl_opendap_ex.png', resolution=150 

The result (click to embiggen): AIRS topography retrieved via OPeNDAP with IDL Grab the source code for this example from here.

Please login or register to post comments.