Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Explore an Example NISAR GCOV Backscatter Time Series


This notebook introduces the analysis of multi-temporal SAR backscatter image data stacks using the NISAR L2 GCOV data product. GCOV data are a geocoded data product that provides radiometric and terrain corrected backscatter measurements in γ0\gamma^{0} at linear (power) scale.

This notebook demonstrates:

  1. Accessing and loading of a GCOV times series via HTTPS requests

  2. Subsetting to an area of interest

  3. Saving the subset time series as a local Zarr Store

  4. Converting between power and sB scales

  5. Generating a time series animation and saving it as a gif

  6. Calculating a time series of mean backscatter.

This notebook will be access a SAR data stack over Pokhara, Nepal for an introduction to time series processing. The data were acquired by NISAR’s L-band sensor and are available from the Alaska Satellite Facility.

Nepal is an interesting site for this analysis due to the significant seasonality of precipitation that is characteristic for this region. Nepal is said to have five seasons: spring, summer, monsoon, autumn and winter. Precipitation is low in the winter (November - March) and peaks dramatically in the summer, with top rain rates in July, August, and September (see figure to the right). As SAR is sensitive to changes in soil moisture, these weather patterns have a noticeable impact on the Radar Cross Section (σ\sigma) time series information.

We will analyze the variation of γ0\gamma^{0} values over time and will interpret them in the context of rainfall rates in the imaged area.


Overview

  1. Prerequisites

  2. Search Time Series Data

  3. Load the Data with xarray and fsspec using HTTPS requests

  4. Save the time series as a local Zarr Store

  5. Load the time series from the local Zarr Store

  6. Data Conversion between dB and Power Scales

  7. SAR Time Series Animation

  8. Calculate the Time Series of Means

  9. Summary

  10. Resources and references


1. Prerequisites

PrerequisiteImportanceNotes
The isce3 software environment for this cookbookNecessary
How to search and access NISAR data in your AOINecessaryIf you wish to process data in your AOI instead of the example data
Familiarity with xarrayHelpful
Familiarity with matplotlibHelpful
  • Rough Notebook Time Estimate: 15 minutes (this is based on a 5 image time series and will change as more data become available)


If you have run this notebook before and already saved a local copy of the time series, skip ahead to section 5.

Found 5 GCOV products:
['https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_024_026_A_016_4005_DHDH_A_20260627T234740_20260627T234815_P05023_N_F_J_001/NISAR_L2_PR_GCOV_024_026_A_016_4005_DHDH_A_20260627T234740_20260627T234815_P05023_N_F_J_001.h5', 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_025_026_A_016_4005_DHDH_A_20260709T234739_20260709T234814_P05023_N_F_J_001/NISAR_L2_PR_GCOV_025_026_A_016_4005_DHDH_A_20260709T234739_20260709T234814_P05023_N_F_J_001.h5', 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_026_026_A_016_4005_DHDH_A_20260721T234739_20260721T234813_P05023_N_F_J_001/NISAR_L2_PR_GCOV_026_026_A_016_4005_DHDH_A_20260721T234739_20260721T234813_P05023_N_F_J_001.h5', 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_028_026_A_016_4005_DHDH_A_20260814T234737_20260814T234812_P05023_N_F_J_001/NISAR_L2_PR_GCOV_028_026_A_016_4005_DHDH_A_20260814T234737_20260814T234812_P05023_N_F_J_001.h5', 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_029_026_A_016_4005_DHDH_A_20260826T234737_20260826T234812_P05023_N_F_J_001/NISAR_L2_PR_GCOV_029_026_A_016_4005_DHDH_A_20260826T234737_20260826T234812_P05023_N_F_J_001.h5']

2b. Retain only the URL for the most recent version of each product in the search results

Data is occasionally re-released with an updated version. Versions are recorded as a Composite Release Identifier (CRID) in a product’s filename. We can use the CRID to retain only the most recent version of each product in the list of URLs.

Retained 5 GCOV products:
['https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_024_026_A_016_4005_DHDH_A_20260627T234740_20260627T234815_P05023_N_F_J_001/NISAR_L2_PR_GCOV_024_026_A_016_4005_DHDH_A_20260627T234740_20260627T234815_P05023_N_F_J_001.h5', 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_025_026_A_016_4005_DHDH_A_20260709T234739_20260709T234814_P05023_N_F_J_001/NISAR_L2_PR_GCOV_025_026_A_016_4005_DHDH_A_20260709T234739_20260709T234814_P05023_N_F_J_001.h5', 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_026_026_A_016_4005_DHDH_A_20260721T234739_20260721T234813_P05023_N_F_J_001/NISAR_L2_PR_GCOV_026_026_A_016_4005_DHDH_A_20260721T234739_20260721T234813_P05023_N_F_J_001.h5', 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_028_026_A_016_4005_DHDH_A_20260814T234737_20260814T234812_P05023_N_F_J_001/NISAR_L2_PR_GCOV_028_026_A_016_4005_DHDH_A_20260814T234737_20260814T234812_P05023_N_F_J_001.h5', 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_029_026_A_016_4005_DHDH_A_20260826T234737_20260826T234812_P05023_N_F_J_001/NISAR_L2_PR_GCOV_029_026_A_016_4005_DHDH_A_20260826T234737_20260826T234812_P05023_N_F_J_001.h5']

2c. Remove a problematic provisional GCOV product

There are obvious processing issues with the NISAR_L2_PR_GCOV_025_026_A_016_4005_DHDH_A_20260709T234739_20260709T234814_P05023_N_F_J_001 and NISAR_L2_PR_GCOV_026_026_A_016_4005_DHDH_A_20260721T234739_20260721T234813_P05023_N_F_J_001 products, so remove them from the results. This notebook currently uses provisional data, and issues such as these will be resolved when the validated data are released. See the NISAR Data User Guide for information on known issues with the provisional data.

If you wish to see how these scenes would impact the time series, skip the following code cell that removes them.

Image of the NISAR_L2_PR_GCOV_025_026_A_016_4005_DHDH_A_20260709T234739_20260709T234814_P05023_N_F_J_001 product showing processing issues.

NISAR_L2_PR_GCOV_025_026_A_016_4005_DHDH_A_20260709T234739_20260709T234814_P05023_N_F_J_001

Retained 3 GCOV products:
['https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_024_026_A_016_4005_DHDH_A_20260627T234740_20260627T234815_P05023_N_F_J_001/NISAR_L2_PR_GCOV_024_026_A_016_4005_DHDH_A_20260627T234740_20260627T234815_P05023_N_F_J_001.h5', 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_028_026_A_016_4005_DHDH_A_20260814T234737_20260814T234812_P05023_N_F_J_001/NISAR_L2_PR_GCOV_028_026_A_016_4005_DHDH_A_20260814T234737_20260814T234812_P05023_N_F_J_001.h5', 'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/NISAR_L2_GCOV_PROVISIONAL_V1/NISAR_L2_PR_GCOV_029_026_A_016_4005_DHDH_A_20260826T234737_20260826T234812_P05023_N_F_J_001/NISAR_L2_PR_GCOV_029_026_A_016_4005_DHDH_A_20260826T234737_20260826T234812_P05023_N_F_J_001.h5']

3. Load the Data with xarray and fsspec using HTTPS requests

3a. Retrieve your Earthdata Login Bearer Token

Image of the Earthdata Login Generate Token web page

View or generate a Bearer Token in “Generate Token” tab of the Profile page in your Earthdata Login account: https://urs.earthdata.nasa.gov/profile

Enter your EDL Bearer Token ········

3b. Lazily load the Frequency A data for each GCOV product into an xarray.DataTree

Lazily load the frequencyA group of the GCOV data.

Notes on Chunking

This notebook utilizes Dask chunking to break large arrays into smaller blocks. Chunking allows users to inspect and process subsets of a dataset without loading entire arrays into memory at once. This notebook uses a chunk size of 8 MB.

For additional benchmarking and recommendations for NISAR direct-access workflows, see Henry Rodman’s Reading NISAR granules directly from S3.

CPU times: user 1.08 s, sys: 605 ms, total: 1.69 s
Wall time: 17.1 s

3c. Create a list of datetimes for the time dimension of the time series

[datetime.datetime(2026, 6, 27, 23, 47, 40), datetime.datetime(2026, 8, 14, 23, 47, 37), datetime.datetime(2026, 8, 26, 23, 47, 37)]

3d. Convert the Datatrees into DataArrays that include a time dimension

CPU times: user 10.7 ms, sys: 1.38 ms, total: 12.1 ms
Wall time: 11.3 ms
Loading...

3e. Extract the HHHH covariance layers and spatially subset them to an AOI

Loading...

3f. Visually confirm the subset AOI’s location

Plot the subset bounds on a basemap to verify the expected location

Loading...

4. (Optional) Save the time series as a local Zarr Store

Up to this point, you have lazily loaded the time series data into xarray data structures. These hold only pointers to data stored remotely in an S3 Bucket. Accessing the values in a large dataset from S3 in Earthdata can be slow. If you are not careful in how you work with the them, you may access the same data multiple times, slowing your work even more. Additionally, Earthdata S3 Bucket credentials expire after one hour, so if you don’t complete your work within that time, you may have to repeat many slow steps in your analysis.

To mitigate these pain points, you can save your subset time series to a Zarr Store on your local volume.

  • Local data access is much faster than remote access.

    • It is still wise to avoid recomputing values via careful use of xarray.

  • If you set down your work for the day or restart your notebook kernel or JupyterHub server, you can quickly reload your locally stored data.

  • You are no longer time-constrained by short-lived Earthdata S3 Bucket credentials.

4a. Create directories to hold the time series data and output plots

4b. Save the time series as a Zarr Store

Until now, we have not accessed any values in our xarray data structures; we have manipulated pointers to the data. To save the data to a Zarr Store, all values in the subset must be accessed, which is slow over the network.

CPU times: user 9.06 s, sys: 4.86 s, total: 13.9 s
Wall time: 1min 59s
<xarray.backends.zarr.ZarrStore at 0x33b4076a0>

4c. Close the open files to the data


5. (Optional) Load the time series from the local Zarr Store

If you have opted to run Step 4 of this notebook and saved a local Zarr Store, you can start the notebook from from this step when re-running it.

5a. Load the Zarr Store

CPU times: user 5.81 ms, sys: 4.1 ms, total: 9.91 ms
Wall time: 12.5 ms
Loading...

6. Data Conversion between dB and Power Scales

Focused SAR image data may come in uncalibrated digital numbers (DN) and need to be calibrated to correspond to proper radar cross section information. However, NISAR data is already radiometrically calibrated and has a scaling factor of 1.0, so we do not need to worry about this.

The data at hand are radiometrically terrain corrected images, which are expressed as terrain flattened γ0\gamma^0 backscatter coefficients. For forest and land cover monitoring applications γo\gamma^o is the preferred metric.

We often visualize backscatter in log scale (dB), as plotting in a linear (Power) scale may obscure subtleties. However, we must compute statistics in linear scale, so you may have need to convert back and forth between Power and dB.

NISAR GCOV data are provided in Power scale.

6a. Convert the HHHH data from power to dB

To convert from power to dB, apply: γdBo=10log⁡10(γpowero)\gamma^o_{dB} = 10 {\log_{10}(\gamma^o_{power})}

CPU times: user 429 ms, sys: 232 ms, total: 661 ms
Wall time: 237 ms
Loading...

6b. Plot the histogram of the dB data and confirm a normal distribution

<Figure size 640x480 with 1 Axes>

6c. Convert from dB back to power

While dB-scaled images are often visually pleasing, they are not a good basis for mathematical operations. For instance, when computing the mean backscatter, we cannot simply average data in log scale.

Please note that the correct scale in which operations need to be performed is the power scale. This is critical, e.g. when speckle filters are applied, when spatial operations like block averaging are performed, or other statistics across time series are analyzed.

To convert from dB to power, apply: γpwro=10γdBo10\gamma^o_{pwr} = 10^{\frac{\gamma^o_{dB}}{10}}

Loading...

Plot the histogram of the Power-scale data

<Figure size 640x480 with 1 Axes>

7. SAR Time Series Animation

This section introduces you to the handling and analysis of SAR time series stacks. A focus will be put on time series visualizations, which allow us to inspect time series in more depth.

Animations will display interactively and be saved as gifs.

7a. Create a Time Series Animation from the dB Subset

7b. Create a javascript animation of the time-series running inline in the notebook:

Loading...

7c. Save the animation (animation.gif):


8. Calculate the Time Series of Means

Calculate the Time Series of Means Across the HHHH

To create the time series of means:

  1. Compute subset means for each time-step using data in power scale (γpwro\gamma^o_{pwr}) .

  2. Convert the resulting mean values into dB scale for visualization.

8a. Identify the axis on which to take the means

Note that the Dataset dimensions are (‘time’, ‘yCoordinates’, ‘xCoordinates’)

('time', 'yCoordinates', 'xCoordinates')

8b. Compute the means in power scale:

Since we want to take the means across the spatial dimensions (dims 1 and 2) on each day, we should pass axis=(1, 2) to np.mean.

This will compute the backscatter means spatially, while leaving the time dimension in place.

Loading...

8c. Convert the resulting mean value time-series to dB scale for visualization

Loading...

8d. Plot the time series of means

Plot both the Power and dB time series of means

<Figure size 1600x400 with 2 Axes>

8e. Create Two-Panel Figure, Animating Both the Imagery and the Daily Global Means μγdB0\mu_{\gamma^0_{dB}}

8f. Create a javascript animation of the time-series running inline in the notebook:

Loading...

Save the animated time-series and histogram (animation_histogram.gif):


9. Summary

Having completed this workflow, you have:

  • Searched and downloaded a NISAR GCOV time series

  • Subset the data to a specific polarization and AOI

  • Converted the data between linear and logarithmic scales

  • Generated a backscatter time series animation and output it as a gif

  • Calculated the time series of means, animated it, and output it as a gif


10. Resources and references