Generates multiple-year time series of the frequency of non-overlapping dry spells of a user-selected length for user-selected seasons specified with flexible dates (e.g., (12 Jan - 15 May)), based upon a daily dry day threshold
5 /flexseasonalnonoverlapDSfreq publicproc: {mystream daterange dslength thold minfrac}inputs mystream a: T daterange minfrac seasonalAverage 0 flagge :a: -999 replaceNaN 0 thold flagrange [T]integral dup T dslength shiftGRID [T]regridLB sub dslength flagge [T]differences 1 flagge T :a: T daterange 0 6 getinterval VALUES T dslength 1 sub shiftGRIDT first cvsunits 0 6 getinterval ( - ) daterange 8 16 getinterval 3 array astore concat nip seasonalAverage T differential_mul T 2 indexT replaceGRID :a mul :publicproc nip
Minimum fraction of non-missing daily values that must exist in each month of the chosen season for the function to return a non-missing value for that season
4 /flexseasonalfreqGT publicproc: {mystream daterange thold minfrac}inputs mystream thold flaggt T daterange minfrac seasonalAverage T differential_mul :publicproc nip
Description flexseasonalfreqGT accepts an input stream of daily temperature or precipitation values, a date range that designates a season in the format (dd mmm - dd mmm), where dd is day of month and mmm is the month abbreviation and spaces exist before and after the dash ( - ), a parameter that designates the fraction of daily values per season that must be non-missing for a season to be considered non-missing, and a daily threshold value, and calculates the frequency of days with values greater than the threshold for each year in the user-selected series. For a value to be calculated for a season, the season has to have at least "minfrac" fraction (a value between 0. and 1.) of daily values that are non-missing. Examples SOURCESFUNCEMENordestedailystationPCPN (19 Jan - 5 May) 6 0.92 flexseasonalfreqGT This example calculates the number of days in every 19 Jan - 5 May season in which daily precipitation totals from the FUNCEME data set are greater than 6 mm/day. For a value to be calculated for any given season, the season must be composed of 92% non-missing values.
Count of daily values per season that exceed a user-defined threshold
Calculates the frequency of daily values greater than a user-defined threshold for a user-defined season specified with flexible dates (e.g., (12 Jan - 15 May))
Seasonal range of interest specified by three-letter month abbreviations separated by a dash
4 /flexseasonalfreqLT publicproc: {mystream daterange thold minfrac} inputs mystream thold flaglt T daterange minfrac seasonalAverage T differential_mul :publicproc nip
Count of daily values per season that fall below a user-defined threshold
Multiple-year time series of the frequency of days with precipitation or temperature less than a user-selected threshold for a selected season.
Description flexseasonalfreqLT accepts an input stream of daily temperature or precipitation values, a parameter that designates the fraction of daily values per season that must be non-missing, and a daily threshold value, and calculates the frequency of day with values less than the threshold for each year in the user-selected series. For a value to be calculated for a season, the season has to have at least "minfrac" fraction (a value between 0. and 1.) of non-missing daily values. Example SOURCES FUNCEMENordestedailystationPCPN (16 Jan - 5 May) 6 0.92 flexseasonalfreqLT This example calculates the number of days in every 16 Jan - 5 May season in which daily precipitation totals from the FUNCEME data set are less than 6 mm/day. For a value to be calculated for any given season, each season must be composed of 92% non-missing values.
Calculates seasonal totals of daily values, assuming missing values have the mean value of the non-missing values
3 /flexseastotAvgFill publicproc: {mystream daterange minfrac}inputs mystream T daterange minfrac seasonalAverage T differential_mul :publicproc nip
Input variable of daily values to be totalled
Description flexseastotAvgFill accepts as input a stream of daily precipitation values, a date range defining the season of interest, and a parameter that designates the fraction of daily values that must be non-missing, and calculates the seasonal total precipitation for each year in the user-selected series. For a seasonal total to be calculated, the season must have at least "minfrac" fraction (a value between 0. and 1.) of non-missing daily values. Example SOURCES FUNCEMENordestedailystationPCPN (20 Jan - 14 Mar) 0.92 flexseastotAvgFill This example calculates in every 20 Jan - 14 Mar season the total precipitation for each year in the FUNCEME precipitation data set for every such season in which the season has at least 92% non-missing daily values. Live Example Link
Total of daily values by user-selected season, assigning the missing daily values in a month the average value of the non-missing values in each month
4 /flexseasonalmeandailyvalueGT publicproc: {mystream daterange thold minfrac}inputs mystream a: T daterange minfrac seasonalAverage 0 flagge :a: thold maskle T daterange 0.0 seasonalAverage :a mul :publicproc nip
Description flexseasonalmeandailyvalueGT accepts an input stream of daily precipitation or temperature values, a date range that designates a season in the format (dd mmm - dd mmm), where dd is day of month and mmm is the month abbreviation and spaces exist before and after the dash ( - ), a daily temperature or precipitation threshold, and a parameter that designates the fraction of daily values per season that must be non-missing for a season to be considered non-missing, and calculates for each season the mean value of daily values greater than the user-specified value. For a value to be calculated for a season, the season has to have at least "minfrac" fraction (a value between 0. and 1.) of non-missing daily values. Example SOURCES FUNCEMENordestedailystationPCPN STNID 45 VALUE T (Jan 1973) (May 2002) RANGEEDGES (14 Jan - 20 May) 3 0.92 flexseasonalmeandailyvalueGT This example calculates the mean over a season defined from January 14 to May 20 of the daily precipitation values that are greater than 3 mm/day for station 45 in the FUNCEME daily precipitation dataset, between 1973 and 2002. The seasonal mean is calculated only for those seasons in which the season has at least 92% non-missing daily precipitation values. Live Example Link
Seasonal mean of daily values that exceed a user-defined threshold
Produces multiple-year time series of the mean value of daily precipitation or temperature values greater than a user-selected threshold for user-selected seasons specified with flexible dates (e.g., (12 Jan - 15 May))
Total of daily values by user-selected season, assigning the missing daily values in a month a zero value
3 /flexseastotZeroFill publicproc: {mystream daterange minfrac}inputs mystream dup T daterange minfrac seasonalAverage 0 mul exch 0 replaceNaN T daterange 1. seasonalAverage add T differential_mul :publicproc nip
Generates a multiple-year time series of total precipitation for a user-selected season, assuming missing values have a value of zero
Description flexseastotZeroFill accepts an input stream of daily precipitation values, the start and end dates of the season of interest, and a parameter that designates the fraction of daily values per season that must be non-missing for a season to be considered non-missing, and calculates the seasonal total precipitation for each year in the user-selected series. For a seasonal total to be calculated, the season must have at least "minfrac" fraction (a value between 0. and 1.) of non-missing daily values. When calculating monthly totals, this function assigns a value of zero to the [(1 - minfrac) * n] missing values. Example SOURCES FUNCEMENordestedailystationPCPN (19 Jan - 29 Mar) 0.92 flexseastotZeroFill This example calculates the 19 January - 29 March seasonal total precipitation for each year in the FUNCEME precipitation data set for every season in which the season has at least 92% non-missing daily values. When calculating a seasonal total, the missing values that exist are assigned a value of zero.
Generates multiple-year time series of the frequency of non-overlapping wet spells of a user-selected length for user-selected seasons specified with flexible dates (e.g., (12 Jan - 15 May)), based upon a daily wet day threshold
Wet spell length to search for, in terms of number of continuous days with precipitation more than thold
5 /flexseasonalnonoverlapWSfreq publicproc: {mystream daterange wslength thold minfrac}inputs mystream a: T daterange minfrac seasonalAverage 0 flagge :a: -999 replaceNaN 0 thold flagnotrange [T]integral dup T wslength shiftGRID [T]regridLB sub wslength flagge [T]differences 1 flagge T :a: T daterange 0 6 getinterval VALUES T wslength 1 sub shiftGRIDT first cvsunits 0 6 getinterval ( - ) daterange 8 16 getinterval 3 array astore concat nip seasonalAverage T differential_mul T 2 indexT replaceGRID :a mul :publicproc nip
Daily precipitation threshold (in units of precipitation units used in input dataset) used to define individual wet days
Description flexseasonalnonoverlapWSfreq accepts an input stream of daily precipitation values, a parameter that designates the fraction of daily values that must be non-missing for a season to be considered non-missing, and a date range that designates a season in the format (dd mmm - dd mmm), where dd is day of month and mmm is the month abbreviation and spaces exist before and after the dash ( - ) to define the season of interest, and calculates for each season the frequency of non-overlapping wet spells that are at least as long as a user-determined length, with a user-determined threshold for designating individual wet days. For this function, once a wet spell has been found, no more wet spells are counted until after the next dry day, no matter how long the wet spell may be. For a value to be calculated for a season, the season must have at least "minfrac" fraction (a value between 0. and 1.) of non-missing daily values. Wet spells overlapping with the edges of the season are counted only if a part at least as long as the user-determined length is included in said season. Example SOURCES FUNCEMENordestedailystationPCPN (14 Jan - 20 May) 5 0 0.92 flexseasonalnonoverlapWSfreq This example calculates the number of non-overlapping wet spells of at least five days in length, between January 14 and May 20 of each year, with wet days designated as those that receive more than 0 mm/day, from the FUNCEME daily precipitation data set. For a value to be calculated for each season, the season must have at least 92% non-missing daily values.
Daily precipitation threshold (in units of precipitation units used in input dataset) used to define individual dry days
Dry spell length to search for, in terms of number of continuous days with precipitation less than or equal to thold
Description flexseasonalnonoverlapDSfreq accepts an input stream of daily precipitation values, a parameter that designates the fraction of daily values per season that must be non-missing for a season to be considered non-missing, and a date range that designates a season in the format (dd mmm - dd mmm), where dd is day of month and mmm is the month abbreviation and spaces exist before and after the dash ( - ) to define the season of interest, and calculates for each season the frequency of non-overlapping dry spells that are at least as long as a user-determined length, with a user-determined threshold for designating individual dry days. For this function, once a dry spell has been found, no more dry spells are counted until after the next wet day, no matter how long the dry spell may be. For a value to be calculated for a season, the season must have at least "minfrac" fraction (a value between 0. and 1.) of non-missing daily values. Dry spells overlapping with the edges of the season are counted only if a part at least as long as the user-determined length is included in said season. Example SOURCES FUNCEMENordestedailystationPCPN (14 Jan - 20 May) 5 0 0.92 flexseasonalnonoverlapDSfreq This example calculates the number of non-overlapping dry spells of at least five days in length, between January 14 and May 20 of each year, with dry days designated as those that receive 0 mm/day, from the FUNCEME daily precipitation data set. For a value to be calculated for each season, the season must have at least 92% non-missing daily values. Live Example Link
Seasonal range of interest specified in parentheses in the following format: (dd mmm - dd mmm) , where dd is day of month, mmm is the three-letter month abbreviation, and there are spaces on each side of the dash. For example: (15 Jan - 10 May)
Minimum fraction of non-missing daily values that must exist in a season for the function to return a non-missing value for that season
Threshold daily value