How are some Level 1 or 2 NetCDF data files preprocessed to use effectively in GIS software?

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
GES DISC - ingridgs
Subject Matter Expert
Subject Matter Expert
Posts: 262
Joined: Fri Apr 23, 2021 9:14 am America/New_York
Answers: 1
Endorsed: 7 times

How are some Level 1 or 2 NetCDF data files preprocessed to use effectively in GIS software?

by GES DISC - ingridgs » Mon Nov 30, 2026 1:55 pm America/New_York

Some Level 1 and Level 2 NetCDF data files are natively structured in such a way that they can’t be easily visualized “as-is” using common GIS software, such as ArcGIS Pro or Quantum GIS (QGIS), because the science data variables are not associated with their corresponding coordinate values, like latitude, longitude, and time. Manual preprocessing on the data files is likely necessary in order to use them effectively with GIS software geoprocessing tools, and subsequently visualize them as map layers.

Data structured in this way can be used in ArcGIS Pro and QGIS software when the Level 1 or 2 satellite observation data have made the association with the NetCDF’s stored and indexed latitude, longitude, and time dimension values as coordinate variables at each observation point. This is the case, for example, with the TROPICS01BRTTL1B V1.0 data product, as well as older versions of OCO-2 and OCO-3 Lite NetCDF data granules.

Starting with the newer versions of OCO-2 and OCO-3 Lite data products, including the OCO3_L2_Lite_FP V11r, OCO3_L2_Lite_FP V11.2r, and OCO2_L2_Lite_FP V11.3r datasets, this tie has been added to the data files at the processing facility. The tie has been ensured by adding the new attribute "coordinates". Therefore, preprocessing for these newer versions of OCO data is not needed.

For data needing preprocessing to use in a GIS, a short Python code can make the necessary augmentation between the science data and coordinate values. In the Python code block below, insert the NetCDF (.nc or .nc4) input data file path (“input_data” variable), and replace the line data_var = data.variables[‘science data variable'] with data_var = data.variables['brightness_temperature'] for TROPICS01BRTTL1B V1.0 input data files, or data_var = data.variables[‘xco2’] for the older versions of OCO-2 or OCO-3 Lite data. You can run this Python code in an ArcGIS Pro Notebook, Jupyter Notebook, or as a Python script (.py):

Code: Select all

                      from netCDF4 import Dataset

                      input_data = r”Input NetCDF folder directory and file path with extension (.nc/.nc4)” 

                      data = Dataset(input_data, mode = 'a')

                      data_var = data.variables[‘science data variable’]

                      data_var.coordinates = 'time longitude latitude'

                      data.close()

                      print("Script complete.")
Once the code has been run successfully, to use these data files in ArcGIS Pro, open the “Make NetCDF Feature Layer” geoprocessing tool. For specific ESRI guidance on using the "Make NetCDF Feature Layer" tool, please see this documentation.

For TROPICS Level 1B data, the input variables to be used are "brightness_temperature" and "NonOceanFlag", while the row dimensions to be used are "spots" and "scans". If it is preferable to visualize land-only TROPICS observations, apply the definition query of "NonOceanFlag" = 0 to the output layer from the “Make NetCDF Feature Layer” tool, then export the output point feature layer to a shapefile if you wish to save it to your local disk.

For earlier versions of OCO data, the variables to be used in the geoprocessing tool are “xco2” (CO2 column-averaged dry-air CO2 mole fraction) and “xco2_quality_flag” (quality screening variable), and the row dimension variable to be used is "sounding_id". Please note that a value of 0 (zero) for the “xco2_quality_flag” variable displays quality controlled observations points and their xco2 values. This can be queried on the output point layer using the expression: “xco2_quality_flag” = 0.

Please be sure to read the OCO and TROPICS user guides carefully, which are accessible via the NASA Earthdata dataset landing page links above, in order to gain full context on the data’s quality control variables, and how to best interpret them.

Filters:

Post Reply