Skip to content

Commit

Permalink
checkup of indices description.
Browse files Browse the repository at this point in the history
  • Loading branch information
huard committed Feb 28, 2019
1 parent 0ca0ac1 commit bd96b24
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 103 deletions.
51 changes: 25 additions & 26 deletions xclim/precip.py
Expand Up @@ -13,43 +13,42 @@ class PrTas(Indicator):
context = 'hydro'


rain_on_frozen_ground_days = PrTas(identifier='rain_frzgr',
units='days',
standard_name='number_of_days_with_lwe_thickness_of_'
'precipitation_amount_above_threshold',
long_name='Number of rain on frozen ground days',
description="{freq} number of days with rain above {thresh} "
"after a series of seven days "
"with average daily temperature below 0℃. "
"Precipitation is assumed to be rain when the"
"daily average temperature is above 0℃.",
cell_methods='',
compute=_ind.rain_on_frozen_ground_days,
)
rain_on_frozen_ground_days = \
PrTas(identifier='rain_frzgr',
units='days',
standard_name='number_of_days_with_lwe_thickness_of_'
'precipitation_amount_above_threshold',
long_name='Number of rain on frozen ground days',
description="{freq} number of days with rain above {thresh} after a series of seven days "
"with average daily temperature below 0℃. Precipitation is assumed to be rain when the "
"daily average temperature is above 0℃.",
cell_methods='',
compute=_ind.rain_on_frozen_ground_days,
)

max_1day_precipitation_amount = Pr(identifier='rx1day',
units='mm/day',
standard_name='lwe_thickness_of_precipitation_amount',
long_name='maximum 1-day total precipitation',
description="{freq} maximum 1-day total precipitation",
cellmethods='time: sum within days time: maximum over days',
description="{freq} maximum 1-day total precipitation.",
cell_methods='time: sum within days time: maximum over days',
compute=_ind.max_1day_precipitation_amount,
)

max_n_day_precipitation_amount = Pr(identifier='rx{window}day',
units='mm',
standard_name='lwe_thickness_of_precipitation_amount',
long_name='maximum {window}-day total precipitation',
description="{freq} maximum {window}-day total precipitation",
cellmethods='time: sum within days time: maximum over days',
description="{freq} maximum {window}-day total precipitation.",
cell_methods='time: sum within days time: maximum over days',
compute=_ind.max_n_day_precipitation_amount,
)

wetdays = Pr(identifier='r{thresh}mm',
units='days',
standard_name='number_of_days_with_lwe_thickness_of_precipitation_amount_at_or_above_threshold',
long_name='Number of Wet Days (precip >= {thresh} mm)',
description='{freq} number of days with daily precipitation over {thresh} mm',
description='{freq} number of days with daily precipitation over {thresh} mm.',
cell_methods='time: sum within days time: sum over days',
compute=_ind.wetdays,
)
Expand All @@ -59,8 +58,8 @@ class PrTas(Indicator):
standard_name='number_of_days_with_lwe_thickness_of_'
'precipitation_amount_at_or_above_threshold',
long_name='Maximum consecutive wet days (Precip >= {thresh}mm)',
description='{freq} maximum number of days with daily '
'precipitation over {thresh} mm',
description='{freq} maximum number of consecutive days with daily '
'precipitation over {thresh} mm.',
cell_methods='time: sum within days time: sum over days',
compute=_ind.maximum_consecutive_wet_days,
)
Expand All @@ -70,18 +69,18 @@ class PrTas(Indicator):
standard_name='number_of_days_with_lwe_thickness_of_'
'precipitation_amount_below_threshold',
long_name='Maximum consecutive dry days (Precip < {thresh}mm)',
description='{freq} maximum number of days with daily '
'precipitation below {thresh} mm',
description='{freq} maximum number of consecutive days with daily '
'precipitation below {thresh} mm.',
cell_methods='time: sum within days time: sum over days',
compute=_ind.maximum_consecutive_dry_days,
)

daily_pr_intensity = Pr(identifier='sdii',
units='mm/day',
standard_name='lwe_thickness_of_precipitation_amount',
long_name='Average precipitation during Wet Days (SDII)',
description="{freq} Simple Daily Intensity Index (SDII) : {freq} average precipitation "
"for days with daily precipitation over {thresh} mm",
long_name='Average precipitation during wet days',
description="{freq} average precipitation for days with daily precipitation over {thresh} mm. "
"This indicator is also known as the 'Simple Daily Intensity Index' (SDII).",
cell_methods='',
compute=_ind.daily_pr_intensity,
)
Expand All @@ -90,7 +89,7 @@ class PrTas(Indicator):
units='mm',
standard_name='lwe_thickness_of_precipitation_amount',
long_name='Total precipitation',
description='{freq} total precipitation',
description='{freq} total precipitation.',
cell_methods='time: sum within days time: sum over days',
compute=_ind.precip_accumulation
)

0 comments on commit bd96b24

Please sign in to comment.