Skip to content

Update STATIC workflow for new water mask spec - #334

Merged
nemo794 merged 2 commits into
isce-framework:developfrom
nemo794:bugfix_static_water_mask_inverted
Aug 17, 2026
Merged

Update STATIC workflow for new water mask spec#334
nemo794 merged 2 commits into
isce-framework:developfrom
nemo794:bugfix_static_water_mask_inverted

Conversation

@nemo794

@nemo794 nemo794 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This PR updates to the STATIC Workflow to reflect the current specification for the NISAR Water Mask, which uses the classifications (Per JPL D-107710):

Layer classes:
0: Not water – an area with valid data that is not open water (class 1), high-backscattering water (class 2), low-backscattering
non-water (class 3), landcover masked (class 4), height above nearest drainage masked (class 5), layover/shadow masked
(class 6), or ocean masked (class 254). Masking can result in “not water” (class 0) where land cover masking is applied.
1 -100: Ocean distance – distance from the coastline (unit: km)
101 -200: Inland water distance – distance from the boundary between inland water and land (unit: km)
255: Fill value (no data)

Background

When the Static Workflow was originally implemented in #144 , the classification used by the NISAR water mask at that time was:

The input water distance map, in the format specified by the NISAR Water Mask
Product Specification\ [1]_. A value of 0 indicates a water pixel. A value of
255 represents a no-data (invalid) pixel. Values in 1-200 represent non-water
pixels.

However, for the current water mask TIFF files being used in mission operations, 0 designates not-water, and 1-200 designates water. Here is a screenshot of NISAR_water_mask_N33_N34_W119_W118_30m_v0.5.0.tif, provided by M Zahn:

Screenshot 2026-07-08 at 5 06 38 PM

Due to this discrepancy, the static layers workflow was generating waterMask layers with the binary values 0 and 1 inverted. This PR resolves the issue.

@hfattahi

hfattahi commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for fixing the bug @nemo794 . Would you please confirm if you or Max have run this PR on one example and the water mask is fixed?

@jplzhan

jplzhan commented Jul 13, 2026

Copy link
Copy Markdown

@hfattahi I was able to run this PR last week on 4 examples, which I uploaded to S3. Has anyone had the chance to take a look?

@nemo794

nemo794 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Using the HDF5s @jplzhan generated with this PR in the production pipeline, it appears that the water mask values are corrected for the water mask. Below are screenshots from those granules, where Blue:Water and Brown:Not Water

Screenshot 2026-07-13 at 11 36 26 AM Screenshot 2026-07-13 at 11 31 58 AM Screenshot 2026-07-13 at 11 32 30 AM Screenshot 2026-07-13 at 11 32 40 AM

@nemo794

nemo794 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

I also added a fresh commit, which makes the classification values explicit in the STATIC runconfig's comments. (No code logic change.)

@hfattahi @oberonia78 Could you please re-review when you have a chance? Thanks!

@hfattahi hfattahi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @nemo794 . LGTM.

@gshiroma gshiroma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you, @nemo794 .

@nemo794

nemo794 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Thank you, @gshiroma and @hfattahi !

@nemo794
nemo794 merged commit 0d1600d into isce-framework:develop Aug 17, 2026
8 checks passed
@nemo794
nemo794 deleted the bugfix_static_water_mask_inverted branch August 17, 2026 23:19
Tyler-g-hudson added a commit that referenced this pull request Aug 20, 2026
commit fc8112c
Author: xhuang-jpl <118782850+xhuang-jpl@users.noreply.github.com>
Date:   Thu Aug 20 11:35:37 2026 -0700

    Update Soil Moisture SAS to v0.4.3 (#349)

    * sm r3.4

    * change the SM commit id for R4.0.2

    * update the SM SAS version to v0.4.3

    ---------

    Co-authored-by: Xiaodong Huang <xhuang@nisar-adt-dev-3.jpl.nasa.gov>

commit 0d1600d
Author: SamNemo <11642807+nemo794@users.noreply.github.com>
Date:   Mon Aug 17 16:19:06 2026 -0700

    Update STATIC workflow for new water mask spec (#334)

    * Update STATIC workflow for new water mask spec.

    * Update STATIC runconfig with explicit classification values for water mask

    ---------

    Co-authored-by: Samantha C. Niemoeller <samantha.c.niemoeller@jpl.nasa.gov>

commit be7b3d9
Author: Brian Hawkins <1729052+bhawkins@users.noreply.github.com>
Date:   Thu Aug 13 18:13:07 2026 -0500

    Fix failing unit test test.cxx.isce3.io.raster.raster (#348)

    * Check raster dimensions

    * Initialize all rows in mask file.

commit 0a8df45
Author: Tyler G. Hudson <tyler.g.hudson@gmail.com>
Date:   Tue Aug 11 17:25:18 2026 -0700

    Remove pyproj Dependency to Resolve conda-forge Feedstock Issues (#339)

    * Remove dead code in llhxyz.py that depends on pyproj

    * Update reprojection code in unwrap/preprocess.py

commit 54f2c28
Author: Gustavo H. X. Shiroma <52007211+gshiroma@users.noreply.github.com>
Date:   Thu Jun 25 23:50:55 2026 -0700

    Add radar grid decimation option to compute the static layers layover/shadow mask (#328)

    * disable polarimetric symmetrization by default

    * revert changes to `symmetrize_cross_pol_channels`

    * Update GCOV and GSLC specification XMLs

    * Revert changes to the GCOV and GSLC specification XMLs

    * add radargrid decimation option to compute the layover shadow mask

    * simplify parameter names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants