Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add L4C as convenience DOI value #92

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
env:
# Prevent timeouts with micromamba (libmamba) during dependency installation
MAMBA_NO_LOW_SPEED_LIMIT: 1
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@v2
with:
cache-environment: true
create-args: --category main dev
environment-file: conda-lock.yml
environment-name: gedi_subset
micromamba-version: latest
micromamba-version: 1.5.10-0

- name: Install GEDI Subsetter
run: python -m pip install --no-deps -e .
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ The format is based on [Keep a Changelog], and this project adheres to

## Unreleased

### Added

- Add "L4C" as a valid value for the `doi` input, for convenience
([#90](https://github.com/MAAP-Project/gedi-subsetter/issues/90))

## 0.8.0 (2024-08-13)

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions algorithm_config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
algorithm_description: Subset GEDI L1B, L2A, L2B, or L4A granules within an area of interest (AOI)
algorithm_description: Subset GEDI L1B, L2A, L2B, L4A, or L4C granules within an area of interest (AOI)
algorithm_name: gedi-subset
algorithm_version: 0.8.0
algorithm_version: 0.9.0
repository_url: https://github.com/MAAP-Project/gedi-subsetter.git
docker_container_url: mas.maap-project.org/root/maap-workspaces/base_images/python:v4.0.0
docker_container_url: mas.maap-project.org/root/maap-workspaces/custom_images/maap_base:v4.1.0
disk_space: 20GB
queue: maap-dps-worker-32vcpu-64gb
build_command: gedi-subsetter/bin/build-dps
Expand Down
2 changes: 1 addition & 1 deletion bin/algo/delete
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ branch=$(git rev-parse --abbrev-ref HEAD)
algorithm_name=$(grep "^algorithm_name:" "${yaml_file}" | sed -E 's/algorithm_name: ([^[:space:]]+).*/\1/')
algorithm_version=$(grep "^algorithm_version:" "${yaml_file}" | sed -E 's/algorithm_version: ([^[:space:]]+).*/\1/')
[[ "${branch}" != "main" ]] && algorithm_version=${branch}
algorithm_id="${algorithm_name}:${algorithm_version}"
algorithm_id="${algorithm_name}:${VERSION:-${algorithm_version}}"

if [[ -z "${yes}" ]]; then
read -rp "Are you sure you want to delete algorithm '${algorithm_id}'? [yes/NO] "
Expand Down
23 changes: 18 additions & 5 deletions docs/MAAP_USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [L2A](#l2a)
- [L2B](#l2b)
- [L4A](#l4a)
- [L4C](#l4c)
- [Running a GEDI Subsetting DPS Job](#running-a-gedi-subsetting-dps-job)
- [Submitting a DPS Job](#submitting-a-dps-job)
- [Checking the DPS Job Status](#checking-the-dps-job-status)
Expand All @@ -22,7 +23,7 @@ At a high level, the GEDI subsetting algorithm does the following:
- Queries the MAAP CMR for granules from a specified GEDI collection that
intersect a specified Area of Interest (AOI) (as a GeoJSON file). This is
limited to GEDI collections granule data files are in HDF5 format, which are
L1B, L2A, L2B, and L4A.
L1B, L2A, L2B, L4A, and L4C.
- For each granule within the specified AOI, downloads its HDF5 (`.h5`) file.
- Subsets each data file by selecting specified datasets within the file and
limiting data to values that match a specified query condition.
Expand Down Expand Up @@ -242,6 +243,7 @@ supply one of the following "logical" names as the value of the `doi` input
|L2A |[10.5067/GEDI/GEDI02_A.002](https://doi.org/10.5067/GEDI/GEDI02_A.002)
|L2B |[10.5067/GEDI/GEDI02_B.002](https://doi.org/10.5067/GEDI/GEDI02_B.002)
|L4A |[10.3334/ORNLDAAC/2056](https://doi.org/10.3334/ORNLDAAC/2056)
|L4C (_Added in version 0.9.0_) |[10.3334/ORNLDAAC/2338](https://doi.org/10.3334/ORNLDAAC/2338)

If, however, a new version of a collection is published, the new version will
have a different DOI assigned, and the old version of the collection will likely
Expand Down Expand Up @@ -270,7 +272,6 @@ inputs = dict(
doi="L1B", # or a specific DOI
lat="geolocation/latitude_bin0",
lon="geolocation/longitude_bin0",
beams="all",
columns=...,
query=...,
)
Expand All @@ -284,7 +285,6 @@ inputs = dict(
doi="L2A", # or a specific DOI
lat="lat_lowestmode", # or "lat_highestreturn"
lon="lon_lowestmode", # or "lon_highestreturn"
beams="all",
columns="rh50,rh98",
query="quality_flag == 1 and sensitivity > 0.95",
)
Expand All @@ -298,7 +298,6 @@ inputs = dict(
doi="L2B", # or a specific DOI
lat="geolocation/lat_lowestmode", # or "geolocation/lat_highestreturn"
lon="geolocation/lon_lowestmode", # or "geolocation/lon_highestreturn"
beams="all",
columns="rh100",
query="l2a_quality_flag == 1 and l2b_quality_flag == 1 and sensitivity > 0.95",
)
Expand All @@ -312,12 +311,26 @@ inputs = dict(
doi="L4A", # or a specific DOI
lat="lat_lowestmode",
lon="lon_lowestmode",
beams="all",
columns="agbd, agbd_se, sensitivity, geolocation/sensitivity_a2",
query="l2_quality_flag == 1 and l4_quality_flag == 1 and sensitivity > 0.95 and `geolocation/sensitivity_a2` > 0.95",
)
```

#### L4C

> _Added in version 0.9.0_

```python
inputs = dict(
aoi=...,
doi="L4C", # or a specific DOI
lat="lat_lowestmode",
lon="lon_lowestmode",
columns="wsci, sensitivity, geolocation/sensitivity_a2",
query="l2_quality_flag == 1 and wsci_quality_flag == 1 and sensitivity > 0.95 and `geolocation/sensitivity_a2` > 0.95",
)
```

## Running a GEDI Subsetting DPS Job

### Submitting a DPS Job
Expand Down
1 change: 1 addition & 0 deletions src/gedi_subset/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"L2A": "10.5067/GEDI/GEDI02_A.002",
"L2B": "10.5067/GEDI/GEDI02_B.002",
"L4A": "10.3334/ORNLDAAC/2056",
"L4C": "10.3334/ORNLDAAC/2338",
}

DEFAULT_LIMIT = 100_000
Expand Down