MetReLoad API reference¶
Top-level package for MetReLoad.
The merra2 module¶
-
class
metreload.merra2.
MERRA2Dataset
(ds)¶ Class for MERRA-2 datasets
-
close
()¶ Close the dataset
-
static
open
(collection, username, password, base_url='https://goldsmr4.gesdisc.eosdis.nasa.gov/dods')¶ Open a MERRA-2 data collection
Parameters: - collection (str) – Earth Science Data Types Name of the collection (9 characters)
- username (str) –
- password (str) –
- base_url (str, optional) – Base url for requests, default https://goldsmr4.gesdisc.eosdis.nasa.gov/dods
-
subset
(location=None, start_time=None, end_time=None, variables=None)¶ Subset the data accordingly
Parameters: - location (tuple) – Location in the form of tuple (lat, lon) or (north, west, south, east)
- in WGS84 system. (coordinates) –
- start_time (str) – Timestamp in the form YYYY-MM-DDTHH
- end_time (str) – See above.
- variables (list) – List of variables to include, or None to include all
-
to_dataframe
()¶ Convert to pandas DataFrame
-
to_netcdf
(savedir)¶ Save to netCDF4 files
Parameters: savedir (str) – Path to save files to
-
to_xarray
()¶ Convert to xarray Dataset
-
The gis module¶
Module for various GIS tasks
author: Erkka Rinne <erkka.rinne@vtt.fi>
-
metreload.gis.
get_shapefile_bbox
(file_path)¶ Get the bounding box (extents) of a shapefile layer
Returns: bbox – Bounding as (west, east, south, north) Return type: tuple Raises: RuntimeError