The training notebooks use four complementary visualization patterns to evaluate MERRA-2 CNN and SatPM output against ground monitors. Spatial maps reveal geographic biases; scatter plots expose the full distribution of paired estimates; diel cycle plots diagnose hour-by-hour behavior; and time series charts track individual grid-cell trajectories. All patterns share a common color vocabulary (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/NASAARSET/PM2.5_AQ_Online_2026/llms.txt
Use this file to discover all available pages before exploring further.
Oranges colormap) and rely on either Cartopy, seaborn, or matplotlib directly.
Spatial Maps with F_plot_map
F_plot_map renders a Cartopy PlateCarree projection with coastlines, country borders, US state lines, and major lakes. It simultaneously draws a filled gridded field (from an xarray.DataArray) and an overlaid scatter of point observations, making it easy to compare gridded model output with station measurements at a glance. The function uses xarray’s built-in .plot() method for the gridded field and ax.scatter() for the point overlay.
Signature
Feature Set
The function draws coastlines plus three Cartopy features with distinct line styles:Example Calls
Plot the time-averaged SatPM gridded field:Scatter Plot: Satellite vs. Monitor Comparison
Seaborn’sscatterplot is used to plot paired (monitor, model) values, colored by a third dimension. The notebook uses o_ax = sns.scatterplot(...) directly — there is no wrapping plt.subplots() call; the returned axes object is used for all subsequent formatting.
Hourly Comparison — Colored by Hour of Day
The hourly scatter useslocal_hour_of_day as the hue and draws a 1:1 reference line spanning [0, 200]:
Daily Comparison — Colored by Latitude
The daily scatter useslat_grid as the hue and draws a 1:1 reference line spanning [0, 100]:
The 1:1 reference line coordinates differ between the hourly scatter (
[0, 200]) and the daily scatter ([0, 100]), reflecting the wider dynamic range possible in hourly vs. daily-averaged PM2.5.Diel Cycle Plot
The diel (diurnal) cycle plot shows the median PM2.5 for each hour of day (0–23) with an interquartile range shaded band. This pattern is ideal for diagnosing whether MERRA-2 CNN captures morning rush-hour peaks or nocturnal boundary-layer buildup.Compute the Diel Statistics
All monitor and model diel statistics are stored in a single DataFrame. Note the MERRA-2 CNN IQR columns use distinct names with theMERRA2_CNN_ prefix:
Plot Monitor and Model Together
The figure usesplt.figure() / add_subplot() (not plt.subplots()). Monitor elements use color='black'; MERRA-2 CNN elements use color='red':
Time Series — Single Grid Cell
A wide-format line plot (figsize=(15, 5)) shows daily PM2.5 over the full study period for one selected grid cell. The figure uses plt.figure() / add_subplot() (not plt.subplots()). Monitor data are plotted in black with the label 'Monitor Average'; MERRA-2 CNN data in red with the label 'MERRA-2 CNN Average':
Visual Checklist
Use this checklist when reviewing each figure before including it in a report.Spatial map checklist
Spatial map checklist
-
Colorbar_Limitsappropriate for the season and region (not driven by outliers) - Point markers visible at the map scale (adjust
n_pointsizeif needed) -
Colorbar_Labelset with units (e.g.,'PM$_{2.5}$ [µg/m$^{3}$]') -
Plot_Titleincludes dataset name, statistic, and time period - Domain extent matches
[n_lon_min, n_lon_max, n_lat_min, n_lat_max]
Scatter plot checklist
Scatter plot checklist
- 1:1 line drawn with
o_ax.plot([0,200],[0,200],'k--')for hourly or[0,100]for daily - Hue variable (hour-of-day or latitude) shown in legend
- R² and Bias from
F_compute_metricsannotated on figure or reported in caption
Diel cycle checklist
Diel cycle checklist
- IQR shading drawn with
fill_betweenbefore the median line so the line is not obscured - X-axis runs 0–23 with readable tick labels
- Both monitor (
color='black') and model (color='red') plotted on the same axes - Y-axis starts at 0 unless negative values are present
Time series checklist
Time series checklist
- Figure width ≥ 15 inches to avoid crowded x-axis dates
- Monitor line uses
color='black', label'Monitor Average' - MERRA-2 CNN line uses
color='red', label'MERRA-2 CNN Average' - X-axis date format legible (use
o_fig.autofmt_xdate()if labels overlap) - Grid cell or location name stated in the title via
s_location
