m.prism.download
Downloads data from the PRISM Climate Group.
m.prism.download [-duf] [dataset=string [,string,...]] [start_date=string] [end_date=string] [separator=character] [--verbose] [--quiet] [--qq] [--ui]
Example:
m.prism.download dataset=string
grass.script.run_command("m.prism.download", dataset=None, start_date=None, end_date=None, separator="pipe", flags=None, verbose=None, quiet=None, superquiet=None)
Example:
gs.run_command("m.prism.download", dataset="string")
grass.tools.Tools.m_prism_download(dataset=None, start_date=None, end_date=None, separator="pipe", flags=None, verbose=None, quiet=None, superquiet=None)
Example:
tools = Tools()
tools.m_prism_download(dataset="string")
This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.
Parameters
dataset=string [,string,...]
Dataset index or ID
start_date=string
Start date for search in YYYY-MM-DD (today for today; first for first date of first data year)
end_date=string
End date for search in YYYY-MM-DD (today for today; first for last date of first data year)
separator=character
Field separator
Special characters: pipe, comma, space, tab, newline
Default: pipe
-d
List supported datasets and exit
-u
List URLs only without downloading
-f
List filenames only without downloading
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
dataset : str | list[str], optional
Dataset index or ID
start_date : str, optional
Start date for search in YYYY-MM-DD (today for today; first for first date of first data year)
end_date : str, optional
End date for search in YYYY-MM-DD (today for today; first for last date of first data year)
separator : str, optional
Field separator
Special characters: pipe, comma, space, tab, newline
Used as: input, separator, character
Default: pipe
flags : str, optional
Allowed values: d, u, f
d
List supported datasets and exit
u
List URLs only without downloading
f
List filenames only without downloading
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
dataset : str | list[str], optional
Dataset index or ID
start_date : str, optional
Start date for search in YYYY-MM-DD (today for today; first for first date of first data year)
end_date : str, optional
End date for search in YYYY-MM-DD (today for today; first for last date of first data year)
separator : str, optional
Field separator
Special characters: pipe, comma, space, tab, newline
Used as: input, separator, character
Default: pipe
flags : str, optional
Allowed values: d, u, f
d
List supported datasets and exit
u
List URLs only without downloading
f
List filenames only without downloading
verbose : bool, optional
Verbose module output
Default: None
quiet : bool, optional
Quiet module output
Default: None
superquiet : bool, optional
Very quiet module output
Default: None
Returns:
result : grass.tools.support.ToolResult | None
If the tool produces text as standard output, a ToolResult object will be returned. Otherwise, None
will be returned.
DESCRIPTION
m.prism.download downloads data from the PRISM Climate Group.
NOTES
This module anonymously logs in to their FTP server (HTTPS server for easier browsing) and download climate data for a specified time period.
EXAMPLES
List supported datasets and exit:
# use indices or datasets, but indices can change between module versions
m.prism.download -d
Download daily precipitation from 2020-01-01 to today:
# find the dataset name
m.prism.download -d | grep "daily" # found daily/ppt
# just list URLs for now
m.prism.download dataset=daily/ppt start_date=2020-01-01 end_date=today -u sep=newline
# actually download files
m.prism.download dataset=daily/ppt start_date=2020-01-01 end_date=today
# do something with the downloaded files
for file in $(m.prism.download dataset=daily/ppt start_date=2020-01-01 end_date=today -f sep=newline); do
echo $file
unzip $file
# more tasks...
done
SEE ALSO
m.cdo.download, m.tnm.download
AUTHOR
Huidae Cho, New Mexico State University
SOURCE CODE
Available at: m.prism.download source code
(history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819