Examples#
Worked examples, one per job, each from loading the data to a checked result. Each page says whether it runs when the docs build.
Average a time series by local hour and by season: move UTC data to local time and average it by hour and by season, and what to do when a time will not convert.
Convert a methane flux from moles to mass: convert a flux between moles and mass with a molecular weight, and why pint’s
ktis not a kilotonne.Total an inventory over a region: why
integrate(), nottotal_emissions, is the total, and how to move an inventory to another grid without losing mass.Draw a map of an inventory: add state lines, tick labels, the grid and a locator map (a small map of where it is) to a map, and draw any gridded field the same way.
Read a sounding and compute its potential temperature: download soundings from Wyoming into a folder, read them on the same heights, and when
get_soundingsdownloads.Get HRRR winds at a point: six hours of 10 m winds at the nearest HRRR grid point, asked for in UTC or in local time.
Sample CarbonTracker at points: download one day of CarbonTracker, sample it at points such as the ends of STILT back trajectories, and average them.
Estimate a background: lair’s background methods side by side on one series, what each needs, and when to use which.