Skip to content

API Reference

get_prism_daily_single(variable, date, return_path=False, **kwargs)

Download data for a single day

Parameters:

Name Type Description Default
variable str

Either tmean, tmax, tmin, or ppt

required
date str

The date to download in the format YYYY-MM-DD

required
dest_path str

Folder to download to, defaults to the current working directory.

'the'
return_path bool

Returns the full path to the final bil file, default False

False
keep_zip bool

Keeps the originally downloaded zip file, default True

'True'

get_prism_dailys(variable, min_date=None, max_date=None, dates=None, **kwargs)

Downlaod PRISM Daily data

Parameters:

Name Type Description Default
variable str

Either tmean, tmax, tmin, or ppt

required
min_date str

Start date to download in the format YYYY-MM-DD

None
max_date str

End date to download in the format YYYY-MM-DD. Note min and max are inclusive.

None
dates list of python datetimes

Specific dates to download, should be a list of python datetimes.
years and months parameters are ignored if this is set.

None
dest_path str

Folder to download to, defaults to the current working directory.

'the'
keep_zip bool

Keeps the originally downloaded zip files, default True

'True'

get_prism_monthly_single(variable, year=None, month=None, date=None, return_path=False, **kwargs)

Download data for a single day

Parameters:

Name Type Description Default
variable str

Either tmean, tmax, tmin, or ppt

required
year int

The year to download

None
month int

The month to download

None
date str

The date to download as a python datetime. The day should be set to 01. If set than year and month are ignored.

None
dest_path str

Folder to download to, defaults to the current working directory.

'the'
return_path bool

Returns the full path to the final bil file, default False

False
keep_zip bool

Keeps the originally downloaded zip file, default True

'True'

get_prism_monthlys(variable, years=None, months=None, dates=None, **kwargs)

Download monthly PRISM data

Parameters:

Name Type Description Default
variable str

Either tmean, tmax, tmin, or ppt

required
years list of integers

The years to download

None
months list of integers

The months to download

None
dates list of python datetimes

Specific months to download, should be a list of python datetimes. The day for each date should be set to the 1st
years and months parameters are ignored if this is set.

None
dest_path str

Folder to download to, defaults to the current working directory.

'the'
keep_zip bool

Keeps the originally downloaded zip files, default True

'True'

get_prism_normals(variable, resolution, months=None, annual=False, **kwargs)

Download 30 year normals PRISM data

Parameters:

Name Type Description Default
variable str

Either tmean, tmax, tmin, or ppt

required
resolution str

The spatial resolution, either 4km or 800m.

required
months list of integers

The months to download. If None (the default) all 12 months are downloaded.

None
annual boolean

Whether to download the annualized normals. If True then months is ignored. False by default.

False
dest_path str

Folder to download to, defaults to the current working directory.

'the'
keep_zip bool

Keeps the originally downloaded zip files, default True

'True'

pyPRISMClimate.utils

prism_iterator(path, recursive=False)

Returns a list of metadata for all PRISM bil files located in path

Parameters:

Name Type Description Default
path str

Path to a folder to search for PRISM files

required
recursive boolean

If False (default) only search in the path given, it True then search the full directory tree. The metadata returned will include the full path of each file regardless.

False

Returns:

Type Description
list

List of dictionaries where each entry contains metadata for a single PRISM bil file.