merra package¶
Submodules¶
merra.download module¶
The download module implements a command line script for downloading MERRA2 reanalysis data from the NASA GESDISC repository.
-
merra.download.
folder_get_version_first_last
(root, fmt='MERRA2_{stream}.tavg1_2d_lnd_Nx.{time:%Y%m%d}.nc4', subpaths=['{time:%Y}', '{time:%m}'])[source]¶ Get product version and first and last product which exists under the root folder.
Parameters: - root (string) – Root folder on local filesystem
- fmt (string, optional) – formatting string
- subpaths (list, optional) – format of the subdirectories under root.
Returns: - version (string) – Found product version
- start (datetime.datetime) – First found product datetime
- end (datetime.datetime) – Last found product datetime
-
merra.download.
get_first_folder
(root, subpaths)[source]¶ …
Parameters: - root (string) –
…
- subpaths (list of strings) –
…
Returns: directory – …
Return type: list of strings
- root (string) –
-
merra.download.
get_first_formatted_dir_in_dir
(folder, fmt)[source]¶ Get the (alphabetically) first directory in a directory which can be formatted according to fmt.
Parameters: - folder (string) – path to folder
- fmt – formatting rule
Returns: first_elem – path to last directory
Return type: string
-
merra.download.
get_last_folder
(root, subpaths)[source]¶ …
Parameters: - root (string) –
…
- subpaths (list of strings) –
…
Returns: directory – …
Return type: list of strings
- root (string) –
-
merra.download.
get_last_formatted_dir_in_dir
(folder, fmt)[source]¶ Get the (alphabetically) last directory in a directory which can be formatted according to fmt.
Parameters: - folder (string) – path to folder
- fmt – formatting rule
Returns: last_elem – path to last directory
Return type: string
-
merra.download.
get_start_date
(product)[source]¶ Define start date of product version.
Parameters: product (string) – product specification Returns: datetime – timestamp of start date Return type: datetime.datetime
merra.grid module¶
The grid module implements the asymmetrical GMAO 0.5 x 0.625 grid used in MERRA2 as a pygeogrids BasicGrid instance.