API
Data sources
Point observations
In general, these modules provide an add_data
function for retrieving data,
for example, monetio.aeronet.add_data()
.
AERONET
See AERONET for more information.
|
Load AERONET data from the AERONET Web Service. |
|
Read a local file downloaded from the AERONET Web Service. |
Load the AERONET site list as a |
- monetio.aeronet.add_data(dates=None, product='AOD15', *, inv_type=None, latlonbox=None, siteid=None, daily=False, lunar=False, freq=None, detect_dust=False, interp_to_aod_values=None, n_procs=1, verbose=10)
Load AERONET data from the AERONET Web Service.
- Parameters
dates (array-like of
datetime-like
) – Expressing the desired min and max dates to retrieve. If unset, the current day will be fetched.product (
str
)inv_type (
str
) – Inversion product type.latlonbox (array-like of
float
) –[lat1, lon1, lat2, lon2]
, wherelat1, lon1
is the lower-left corner andlat2, lon2
is the upper-right corner.siteid (
str
) – Site identifier string.See https://aeronet.gsfc.nasa.gov/aeronet_locations_v3.txt for all valid site IDs.
Warning
Whether you will obtain data depends on the sites active during the dates time period.
Note
siteid takes precendence over latlonbox if both are specified.
daily (
bool
) – Load daily averaged data.lunar (
bool
) – Load provisional lunar “Direct Moon” data instead of the default “Direct Sun”. Only for non-inversion products.freq (
str
) – Frequency used to resample the DataFrame.detect_dust (
bool
)interp_to_aod_values (array-like of
float
) – Values to interpolate AOD values to.Currently requires pytspack.
n_procs (
int
) – For joblib.verbose (
int
) – For joblib.
- Returns
- monetio.aeronet.add_local(fname, *, freq=None, detect_dust=False, interp_to_aod_values=None)
Read a local file downloaded from the AERONET Web Service.
- Parameters
fname – Suitable input for
pandas.read_csv()
, e.g. a relative path as a string or a path-like.
- monetio.aeronet.get_valid_sites()
Load the AERONET site list as a
DataFrame
, reading from https://aeronet.gsfc.nasa.gov/aeronet_locations_v3.txt.
AirNow
See AirNow for more information.
|
Retrieve and load AirNow data as a DataFrame. |
- monetio.airnow.add_data(dates, *, download=False, wide_fmt=True, n_procs=1, daily=False)
Retrieve and load AirNow data as a DataFrame.
Note: to obtain full hourly data you must pass all desired hours in dates.
- Parameters
dates (array-like of
datetime-like
) – Passed tobuild_urls()
.download (
bool
, optional) – Whether to first download the AirNow files to the local directory.wide_fmt (
bool
)n_procs (
int
) – For Dask.daily (
bool
) – Whether to get daily data only (only unique days in dates will be used).Info: https://files.airnowtech.org/airnow/docs/DailyDataFactSheet.pdf
Note:
daily_data_v2.dat
(includes AQI) is not available for all times, so we usedaily_data.dat
.
- Returns
Profile observations
GEOMS – The Generic Earth Observation Metadata Standard
This is a format for storing profile data, used by several LiDAR networks.
It is currently TOLNet’s format of choice.
For more info, see: https://evdc.esa.int/documentation/geoms/
|
Open a file in GEOMS format, e.g. |
- monetio.geoms.open_dataset(fp, *, rename_all=True, squeeze=True)
Open a file in GEOMS format, e.g. modern TOLNet files.
- Parameters
fp – File path.
rename_all (
bool
, default:True
) – Rename all non-coordinate variables:lowercase
convert
.
to_
as done for the coordinate variables regardless of this setting. These conversions allow for easy access to the variables as attributes, e.g.
ds.integration_time
squeeze (
bool
, default:True
) – Apply.squeeze()
before returning the Dataset. This simplifies working with the Dataset for the case of one instrument/location.
- Returns
Utility functions
There are a few top-level utility functions.
|
Rename latitude/longitude to |
|
Rename latitude/longitude to |
|
Apply |
|
Assign 2-D latitude/longitude grid from 1-D latitude/longitude variables, setting |
Grid tools
|