AERIoe plots with ceilometer could base height. #612
Replies: 4 comments 5 replies
-
@dennyh-ssec Awesome plot! Thanks for sharing! Would you consider submitting this as a blog post or an example? |
Beta Was this translation helpful? Give feedback.
-
@dennyh-ssec just as a note on the example @zssherman pointed to. You could follow that template without the need to add the data files to the act.test area. The example would then just run once merged so we would need to test it out ahead of time but that would somewhat streamline it. If you need help, let us know! Either way it would be great to get you as an author on a pull request! |
Beta Was this translation helpful? Give feedback.
-
@dennyh-ssec Let me know if you need help with this. |
Beta Was this translation helpful? Give feedback.
-
Great to have this example up in the gallery! |
Beta Was this translation helpful? Give feedback.
-
import act
import matplotlib.pyplot as plt
# Place your username and token here
username = 'Your_Username_here'
token = 'Your_Token_here'
# Download AERIoe data and ceilometer data
act.discovery.download_data(username, token, 'sgpaerioe1turnC1.c1', '2022-02-11', '2022-02-11')
act.discovery.download_data(username, token, 'sgpceilC1.b1', '2022-02-11', '2022-02-11')
# Read in AERIoe and ceilometer data
aerioe_ds = act.io.armfiles.read_netcdf('sgpaerioe1turnC1.c1/sgpaerioe1turnC1.c1.20220211.000354.nc')
ceil_ds = act.io.armfiles.read_netcdf('sgpceilC1.b1/sgpceilC1.b1.20220211.000005.nc')
# There isn't information content from the AERI above 3 km
# Remove data with a height above 3 km
aerioe_ds = aerioe_ds.sel(height=aerioe_ds.coords['height'] <= 3)
# Convert Ceilometer cloud base height to km
ceil_ds['first_cbh'] = ceil_ds['first_cbh']/1000
# Remove first_cbh if it is higher than 3 km
ceil_ds['first_cbh'] = ceil_ds['first_cbh'][~(ceil_ds['first_cbh'] > 3)]
# Create a TimeSeriesDisplay object
display = act.plotting.TimeSeriesDisplay(
{'AERIoe': aerioe_ds, 'Ceilometer': ceil_ds},
subplot_shape=(2,), figsize=(20,10)
)
# Plot data
display.plot('first_cbh', dsname='Ceilometer', marker='+', color='black', markeredgewidth=3,
linewidth=0, subplot_index=(0,), label='cbh')
display.plot('temperature', dsname='AERIoe', cmap='viridis', set_shading='nearest',
add_nan=True, subplot_index=(0,))
display.plot('first_cbh', dsname='Ceilometer', marker='+', color='black', markeredgewidth=3,
linewidth=0, subplot_index=(1,), label='cbh')
display.plot('waterVapor', dsname='AERIoe', cmap='act_HomeyerRainbow', set_shading='nearest',
add_nan=True, subplot_index=(1,))
plt.savefig('sgpaerioe1turnC1.c1.20220211.png')
Beta Was this translation helpful? Give feedback.
All reactions