-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Climate Stripes plotting capability (#867)
* ADD: New example showing how to use ACT to work with ARM and Satellite data * ENH: Updating tests * ENH: Adding in averaging to the TSI data. * ADD: Adding new test * ADD: New plot * ENH: Adding climate stripes plot * ENH: Updates for stripe plot * ENH: Adding example * ENH: Updating documentation * ENH: New image with new cmap
- Loading branch information
1 parent
70a757c
commit 35b93bf
Showing
4 changed files
with
173 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
Example plot using stripes | ||
-------------------------- | ||
Plot up climate stripes plots from already | ||
existing climatologies from ARM data. | ||
Author: Adam Theisen | ||
""" | ||
|
||
import act | ||
import matplotlib.pyplot as plt | ||
|
||
# SGP E13 MET data has already been processed to yearly averages, | ||
# removing data flagged by embedded qc and DQRs | ||
url = 'https://raw.githubusercontent.com/AdamTheisen/ARM-Climatologies/refs/heads/main/results/sgpmetE13.b1_temp_mean_Y.csv' | ||
col_names = ['time', 'temperature', 'count'] | ||
ds = act.io.read_csv(url, column_names=col_names, index_col=0, parse_dates=True) | ||
|
||
# Drop years with less than 500000 samples | ||
ds = ds.where(ds['count'] > 500000) | ||
|
||
# Create plot display | ||
display = act.plotting.TimeSeriesDisplay(ds, figsize=(10, 2)) | ||
reference = ['2003-01-01', '2013-01-01'] | ||
display.plot_stripes('temperature', reference_period=reference) | ||
|
||
plt.show() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters