Skip to content

Commit

Permalink
Merge pull request #64 from nsidc/swe-new-column
Browse files Browse the repository at this point in the history
Support new column in SWE data
  • Loading branch information
mfisher87 authored Mar 6, 2024
2 parents c7d0950 + dea9f75 commit 24fc9c3
Show file tree
Hide file tree
Showing 7 changed files with 1,045 additions and 1,037 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v0.20.0 (2024-03-06)

* Support new SWE column: `percentPeakSWE`.


# v0.19.1 (2024-03-06)

* Fix ingest code to put legends in the location mandated by the specification.
Expand Down Expand Up @@ -33,7 +38,7 @@
* Change of variable ids.


* # v0.17.0 (2024-02-08)
# v0.17.0 (2024-02-08)

* Overhaul and document interfaces with Snow Surface Properties and Snow Water
Equivalent providers.
Expand Down
2 changes: 1 addition & 1 deletion VERSION.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export SERVER_VERSION="v0.19.1"
export SERVER_VERSION="v0.20.0"
6 changes: 3 additions & 3 deletions doc/interfaces/incoming_snow_water_equivalent/data_points.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ provider: "External"
with no separator, and continuing until the end of the file. The beginning of the
body is indicated by a standard CSV header row.
* SWE data files **MUST** be named `SnowToday_USwest_{YYYYMMDD}_SWEsummary.txt`, e.g.
`SnowToday_USwest_20230920_SWEsummary.txt`.
`SnowToday_USwest_20240305_SWEsummary.txt`.
* SWE data files **MUST** be pushed, one at a time, to the incoming dir, e.g.
`{incomingDir}/SnowToday_USwest_20230920_SWEsummary.txt`.
`{incomingDir}/SnowToday_USwest_20240305_SWEsummary.txt`.
* SWE CSV data **MUST** include `Name`, `Lat`, `Lon`, `Elev_m`, `SWE`, `normSWE`,
`dSWE` columns.
* SWE CSV data **MAY** include additional columns, but the ingest process will drop
them.

<details>
<summary>Example</summary>
```{.yaml filename="SnowToday_USwest_20230920_SWEsummary.txt (example)" include="example_data/SnowToday_USwest_20230920_SWEsummary.txt"}
```{.yaml filename="SnowToday_USwest_20240305_SWEsummary.txt (example)" include="example_data/SnowToday_USwest_20240305_SWEsummary.txt"}
```
</details>

This file was deleted.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions snow_today_webapp_ingest/ingest/legends.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def generate_swe_legends(
colormap_id = variable_params["colormapId"]
colormap = colormaps_json[str(colormap_id)]["colors"]

to_path.mkdir(exist_ok=True)
to_path.mkdir(exist_ok=True, parents=True)
make_legend(
colormap=colormap,
# This value range could be static every day, or it could change
Expand Down Expand Up @@ -81,7 +81,7 @@ def generate_ssp_legends(
output_fn = f"{region_id}_{variable_id}.svg"
output_fp = to_path / output_fn

to_path.mkdir(exist_ok=True)
to_path.mkdir(exist_ok=True, parents=True)
make_legend(
colormap=colormap,
# This value range could be static every day, or it could change
Expand Down
1 change: 1 addition & 0 deletions snow_today_webapp_ingest/ingest/swe_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'Elev_m',
'SWE',
'normSWE',
'percentPeakSWE',
'dSWE',
'State',
'HUC02',
Expand Down

0 comments on commit 24fc9c3

Please sign in to comment.