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

Fix azimuth, split same-date ARs, new output CSVs, finish QC notebook #18

Merged
merged 32 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a091c2a
add IVT strength properties, re-run notebook
Aug 16, 2023
f86d1fa
re-run notebook
Aug 16, 2023
a615641
add strength attributes to shp output, rerun nb
Aug 16, 2023
6b3b64e
rerun nb
Aug 16, 2023
89e3981
sub branch for avalanche analysis
Aug 17, 2023
dcce7e4
finish exploratory nb
Aug 17, 2023
5fbcffe
created sub dir for notebooks
Aug 17, 2023
801525c
undo new sub dir... save for later!
Aug 17, 2023
d258077
first commit
Aug 21, 2023
bef2f4d
fixed azimuth & event export functions, re-ran nbs
Aug 22, 2023
cf569e8
add circmean function to event dissolve/agg
Aug 22, 2023
d8f3bb4
add CSV outputs for landfall ARs
Aug 22, 2023
e85791d
added new output CSVs to master detection function
Aug 22, 2023
d764f81
fix CSV export headers
Aug 22, 2023
16f7041
rename index as 'event_id' in event output
Aug 22, 2023
5448d48
Qc plotting
Aug 23, 2023
799a241
fixed missing row in CSV out; del pipeline nb
Aug 23, 2023
de26b7f
fixed events CSV output index/geom column mixup
Aug 23, 2023
40be37b
fixed issue with event id indexing, updated README
Aug 23, 2023
3e4a8ad
rerun nb
Aug 24, 2023
699eabb
added time/space heatmap plots
Aug 24, 2023
c118446
move funcs to top of nb for easy collapse
Aug 24, 2023
56572ac
finished QC nb
Aug 25, 2023
5f28347
export env with seaborn
Aug 25, 2023
968a23f
rerun nb
Aug 25, 2023
22b38e8
black formatting
Aug 25, 2023
d90db61
add coastal impact, qc/plot module, atmos phenoms
Sep 7, 2023
7d27b4e
added canada polygon
Sep 7, 2023
c1e37c3
re-run nb
Sep 7, 2023
ccae682
filled in bib details
Sep 7, 2023
b9a3590
revise nb & readme
Sep 7, 2023
6a8e53f
resolve conflict: linting, cell execution wiggles, retain spatial ove…
charparr Sep 8, 2023
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
1,205 changes: 1,205 additions & 0 deletions AR_QC.ipynb

Large diffs are not rendered by default.

433 changes: 243 additions & 190 deletions AR_avalanche_exploration.ipynb

Large diffs are not rendered by default.

113 changes: 60 additions & 53 deletions AR_detection.ipynb

Large diffs are not rendered by default.

561 changes: 0 additions & 561 deletions AR_full_pipeline.ipynb

This file was deleted.

8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Atmospheric Rivers and Avalanches

## Background
This codebase will download [ERA5 6 hourly pressure level data](https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-pressure-levels?tab=overview) from 1993-2023 in the vicinity of SE Alaska and apply an atmospheric river (AR) detection algorithm. Outputs will include a datacube of AR objects and multiple attributed shapefiles for future work correlating avalanche events to ARs.
This codebase will download [ERA5 6 hourly pressure level data](https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-pressure-levels?tab=overview) in the vicinity of Alaska and apply an atmospheric river (AR) detection algorithm. Outputs will include a datacube of AR objects and multiple attributed shapefiles for future work correlating avalanche events to ARs.

The AR detection algorithm used here is adapted from [Guan & Waliser (2015)](https://agupubs.onlinelibrary.wiley.com/doi/full/10.1002/2015JD024257) and uses a combination of vertically integrated water vapor transport (IVT), geometric shape, and directional criteria to define ARs. See the annotated bibilography document for more detail and other references. Users of this codebase should know the following information about atmospheric river criteria:

Expand All @@ -24,7 +24,7 @@ The overall orientation of the object (i.e., the direction of the shape elongati
- All download specifications and model parameters are defined in `config.py`.
- The `download.py` script will download the necessary ERA5 input data.
- The `compute_ivt.py` script will transform the downloaded ERA5 input data into a datacube with the additional variables of IVT magnitude, direction, and an IVT quantile value.
- The `ar_detection.py` module contains a collection of AR detection functions that will filter AR candidates based on the criteria and create shapefile outputs of objects classified as ARs. These functions may be orchestrated from a notebook (see `AR_detection.ipynb` and `AR_full_pipeline.ipynb`) or ran as a script.
- The `ar_detection.py` module contains a collection of AR detection functions that will filter AR candidates based on the criteria and create shapefile outputs of objects classified as ARs. These functions may be orchestrated from a notebook (see `AR_detection.ipynb`) or ran as a script.

## Usage
1. Register for a Climate Data Store (CDS) account and install the CDS API client according to the instructions [here].(https://cds.climate.copernicus.eu/api-how-to). Be sure to accept the user agreement.
Expand All @@ -33,4 +33,6 @@ The overall orientation of the object (i.e., the direction of the shape elongati
5. Review parameters in `config.py` and adjust if desired. Note that there is a download request limit of 120,000 items, so adjusting the timestep or date range may overload the request and break the script.
6. Execute `download.py`
7. Execute `compute_ivt.py`
8. Execute `ar_detection.py`, or use either `AR_detection.ipynb` or `AR_full_pipeline.ipynb` to orchestrate the detection.
8. Execute `ar_detection.py` or use `AR_detection.ipynb` to orchestrate the detection.
9. Examine the results using the `AR_QC.ipynb` notebook.
10. Explore spatiotemporal relationships between avalanches and AR events using the `AR_avalanche_exploration.ipynb` notebook.
38 changes: 33 additions & 5 deletions annotated_bib.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
# Bibliography


### Atmospheric Rivers Literature:

Guan, B., and Waliser, D. E. (2015), Detection of atmospheric rivers: Evaluation and application of an algorithm for global studies, J. Geophys. Res. Atmos., 120, 12514– 12535, doi:10.1002/2015JD024257.
- Guan, B., and Waliser, D. E. (2015). Detection of atmospheric rivers: Evaluation and application of an algorithm for global studies. doi:10.1002/2015JD024257.

- Ralph et al. (2004). Satellite and CALJET Aircraft Observations of Atmospheric Rivers over the Eastern North Pacific Ocean during the Winter of 1997/98. doi:10.1175/1520-0493(2004)132<1721:SACAOO>2.0.CO;2.

[Ralph et al., 2004; Neiman et al., 2008]
- Neiman et al. (2008). Meteorological Characteristics and Overland Precipitation Impacts of Atmospheric Rivers Affecting the West Coast of North America Based on Eight Years of SSM/I Satellite Observations doi:10.1175/2007JHM855.1.

[Zhu and Newell, 1998],
- Zhu and Newell (1998). A Proposed Algorithm for Moisture Fluxes from Atmospheric Rivers. doi:10.1175/1520-0493(1998)126<0725:APAFMF>2.0.CO;2.

[Wick et al., 2013; Jiang et al., 2014; Backes et al., 2015].
- Wick et al. (2013). Evaluation of Forecasts of the Water Vapor Signature of Atmospheric Rivers in Operational Numerical Weather Prediction Models. doi: 10.1175/WAF-D-13-00025.1.

Rutz et al. [2014]
- Jiang et al. (2014). Intermediate frequency atmospheric disturbances: A dynamical bridge connecting western U.S. extreme precipitation with East Asian cold surges. doi: 10.1002/2013JD021209.

- Backes et al. (2015). A Climatology of the Vertical Structure of Water Vapor Transport to the Sierra Nevada in Cool Season Atmospheric River Precipitation Events. doi: 10.1175/JHM-D-14-0077.1.

- Rutz et al. (2014). Climatological Characteristics of Atmospheric Rivers and Their Inland Penetration over the Western United States. doi: 10.1175/MWR-D-13-00168.1.




### Geospatial Data:

- ERA5: https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-complete?tab=overview

- Alaska Polygon: https://github.com/ua-snap/geospatial-vector-veracity/tree/main/vector_data/polygon/boundaries/alaska_coast_simplified

- Canada Polygon: https://www.sciencebase.gov/catalog/item/5ab555c6e4b081f61ab78093




### Atmospheric Phenomena Data:

- ENSO: https://origin.cpc.ncep.noaa.gov/products/analysis_monitoring/ensostuff/ONI_v5.php

- PDO Index: https://ds.data.jma.go.jp/tcc/tcc/products/elnino/decadal/pdo_doc.html#PDO_INDEX ; https://www.ncei.noaa.gov/pub/data/cmb/ersst/v5/index/ersst.v5.pdo.dat
Loading