Mercurial > repos > greg > insect_phenology_model
changeset 112:bcb12b7e8563 draft
Uploaded
author | greg |
---|---|
date | Tue, 29 May 2018 09:00:25 -0400 |
parents | 37ac68b6ff10 |
children | bb61458966df |
files | insect_phenology_model.R insect_phenology_model.xml test-data/30_year_normals.csv test-data/output.pdf test-data/output_combined1.csv test-data/output_combined2.csv test-data/output_combined3.csv test-data/output_combined4.csv test-data/output_f1_3.csv test-data/output_f1_4.csv test-data/output_f2_3.csv test-data/output_f2_4.csv test-data/output_p_3.csv test-data/output_p_4.csv test-data/plot.pdf test-data/state_college.csv test-data/state_college_partial.csv test-data/state_college_ytd.csv |
diffstat | 18 files changed, 2177 insertions(+), 513 deletions(-) [+] |
line wrap: on
line diff
--- a/insect_phenology_model.R Tue Feb 13 13:47:32 2018 -0500 +++ b/insect_phenology_model.R Tue May 29 09:00:25 2018 -0400 @@ -6,20 +6,24 @@ make_option(c("--adult_mortality"), action="store", dest="adult_mortality", type="integer", help="Adjustment rate for adult mortality"), make_option(c("--adult_accumulation"), action="store", dest="adult_accumulation", type="integer", help="Adjustment of degree-days accumulation (old nymph->adult)"), make_option(c("--egg_mortality"), action="store", dest="egg_mortality", type="integer", help="Adjustment rate for egg mortality"), - make_option(c("--input"), action="store", dest="input", help="Temperature data for selected location"), + make_option(c("--input_norm"), action="store", dest="input_norm", help="30 year normals temperature data for selected station"), + make_option(c("--input_ytd"), action="store", dest="input_ytd", default=NULL, help="Year-to-date temperature data for selected location"), make_option(c("--insect"), action="store", dest="insect", help="Insect name"), make_option(c("--insects_per_replication"), action="store", dest="insects_per_replication", type="integer", help="Number of insects with which to start each replication"), - make_option(c("--location"), action="store", dest="location", help="Selected location"), + make_option(c("--life_stages"), action="store", dest="life_stages", help="Selected life stages for plotting"), + make_option(c("--life_stages_adult"), action="store", dest="life_stages_adult", default=NULL, help="Adult life stages for plotting"), + make_option(c("--life_stages_nymph"), action="store", dest="life_stages_nymph", default=NULL, help="Nymph life stages for plotting"), + make_option(c("--location"), action="store", dest="location", default=NULL, help="Selected location"), make_option(c("--min_clutch_size"), action="store", dest="min_clutch_size", type="integer", help="Adjustment of minimum clutch size"), make_option(c("--max_clutch_size"), action="store", dest="max_clutch_size", type="integer", help="Adjustment of maximum clutch size"), + make_option(c("--num_days_ytd"), action="store", dest="num_days_ytd", default=NULL, type="integer", help="Total number of days in the year-to-date temperature dataset"), make_option(c("--nymph_mortality"), action="store", dest="nymph_mortality", type="integer", help="Adjustment rate for nymph mortality"), make_option(c("--old_nymph_accumulation"), action="store", dest="old_nymph_accumulation", type="integer", help="Adjustment of degree-days accumulation (young nymph->old nymph)"), - make_option(c("--num_days"), action="store", dest="num_days", type="integer", help="Total number of days in the temperature dataset"), - make_option(c("--output"), action="store", dest="output", help="Output dataset"), make_option(c("--oviposition"), action="store", dest="oviposition", type="integer", help="Adjustment for oviposition rate"), make_option(c("--photoperiod"), action="store", dest="photoperiod", type="double", help="Critical photoperiod for diapause induction/termination"), + make_option(c("--plot_generations_separately"), action="store", dest="plot_generations_separately", help="Plot Plot P, F1 and F2 as separate lines or pool across them"), + make_option(c("--plot_std_error"), action="store", dest="plot_std_error", help="Plot Standard error"), make_option(c("--replications"), action="store", dest="replications", type="integer", help="Number of replications"), - make_option(c("--std_error_plot"), action="store", dest="std_error_plot", help="Plot Standard error"), make_option(c("--young_nymph_accumulation"), action="store", dest="young_nymph_accumulation", type="integer", help="Adjustment of degree-days accumulation (egg->young nymph)") ) @@ -27,9 +31,9 @@ args <- parse_args(parser, positional_arguments=TRUE); opt <- args$options; -add_daylight_length = function(temperature_data_frame, num_columns, num_rows) { +add_daylight_length = function(temperature_data_frame, num_rows) { # Return a vector of daylight length (photoperido profile) for - # the number of days specified in the input temperature data + # the number of days specified in the input_ytd temperature data # (from Forsythe 1995). p = 0.8333; latitude = temperature_data_frame$LATITUDE[1]; @@ -45,52 +49,98 @@ daylight_length_vector[i] = 24 - darkness_length; } # Append daylight_length_vector as a new column to temperature_data_frame. - temperature_data_frame[, num_columns+1] = daylight_length_vector; + temperature_data_frame = append_vector(temperature_data_frame, daylight_length_vector, "DAYLEN"); return(temperature_data_frame); } -dev.egg = function(temperature) { - dev.rate = -0.9843 * temperature + 33.438; - return(dev.rate); +append_vector = function(data_frame, vec, new_column_name) { + num_columns = dim(data_frame)[2]; + current_column_names = colnames(data_frame); + # Append vector vec as a new column to data_frame. + data_frame[,num_columns+1] = vec; + # Reset the column names with the additional column for later access. + colnames(data_frame) = append(current_column_names, new_column_name); + return(data_frame); } -dev.emerg = function(temperature) { - emerg.rate = -0.5332 * temperature + 24.147; - return(emerg.rate); -} - -dev.old = function(temperature) { - n34 = -0.6119 * temperature + 17.602; - n45 = -0.4408 * temperature + 19.036; - dev.rate = mean(n34 + n45); - return(dev.rate); +get_file_path = function(life_stage, base_name, life_stage_nymph=NULL, life_stage_adult=NULL) { + if (!is.null(life_stage_nymph)) { + lsi = get_life_stage_index(life_stage, life_stage_nymph=life_stage_nymph); + file_name = paste(lsi, tolower(life_stage_nymph), base_name, sep="_"); + } else if (!is.null(life_stage_adult)) { + lsi = get_life_stage_index(life_stage, life_stage_adult=life_stage_adult); + file_name = paste(lsi, tolower(life_stage_adult), base_name, sep="_"); + } else { + lsi = get_life_stage_index(life_stage); + file_name = paste(lsi, base_name, sep="_"); + } + file_path = paste("output_plots_dir", file_name, sep="/"); + return(file_path); } -dev.young = function(temperature) { - n12 = -0.3728 * temperature + 14.68; - n23 = -0.6119 * temperature + 25.249; - dev.rate = mean(n12 + n23); - return(dev.rate); +get_life_stage_index = function(life_stage, life_stage_nymph=NULL, life_stage_adult=NULL) { + # Name collection elements so that they + # are displayed in logical order. + if (life_stage=="Egg") { + lsi = "01"; + } else if (life_stage=="Nymph") { + if (life_stage_nymph=="Young") { + lsi = "02"; + } else if (life_stage_nymph=="Old") { + lsi = "03"; + } else if (life_stage_nymph=="Total") { + lsi="04"; + } + } else if (life_stage=="Adult") { + if (life_stage_adult=="Pre-vittelogenic") { + lsi = "05"; + } else if (life_stage_adult=="Vittelogenic") { + lsi = "06"; + } else if (life_stage_adult=="Diapausing") { + lsi = "07"; + } else if (life_stage_adult=="Total") { + lsi = "08"; + } + } else if (life_stage=="Total") { + lsi = "09"; + } + return(lsi); } +get_mean_and_std_error = function(p_replications, f1_replications, f2_replications) { + # P mean. + p_m = apply(p_replications, 1, mean); + # P standard error. + p_se = apply(p_replications, 1, sd) / sqrt(opt$replications); + # F1 mean. + f1_m = apply(f1_replications, 1, mean); + # F1 standard error. + f1_se = apply(f1_replications, 1, sd) / sqrt(opt$replications); + # F2 mean. + f2_m = apply(f2_replications, 1, mean); + # F2 standard error. + f2_se = apply(f2_replications, 1, sd) / sqrt(opt$replications); + return(list(p_m, p_se, f1_m, f1_se, f2_m, f2_se)) +} -get_date_labels = function(temperature_data_frame, num_rows) { - # Keep track of the years to see if spanning years. - month_labels = list(); - current_month_label = NULL; - for (i in 1:num_rows) { - # Get the year and month from the date which - # has the format YYYY-MM-DD. - date = format(temperature_data_frame$DATE[i]); - items = strsplit(date, "-")[[1]]; - month = items[2]; - month_label = month.abb[as.integer(month)]; - if (!identical(current_month_label, month_label)) { - month_labels[length(month_labels)+1] = month_label; - current_month_label = month_label; - } +get_next_normals_row = function(norm_data_frame, year, is_leap_year, index) { + # Return the next 30 year normals row formatted + # appropriately for the year-to-date data. + latitude = norm_data_frame[index,"LATITUDE"][1]; + longitude = norm_data_frame[index,"LONGITUDE"][1]; + # Format the date. + mmdd = norm_data_frame[index,"MMDD"][1]; + date_str = paste(year, mmdd, sep="-"); + doy = norm_data_frame[index,"DOY"][1]; + if (!is_leap_year) { + # Since all normals data includes Feb 29, we have to + # subtract 1 from DOY if we're not in a leap year since + # we removed the Feb 29 row from the data frame above. + doy = as.integer(doy) - 1; } - return(c(unlist(month_labels))); + tmin = norm_data_frame[index,"TMIN"][1]; + tmax = norm_data_frame[index,"TMAX"][1]; + return(list(latitude, longitude, date_str, doy, tmin, tmax)); } get_temperature_at_hour = function(latitude, temperature_data_frame, row, num_days) { @@ -164,6 +214,112 @@ return(c(curr_mean_temp, averages)) } +get_tick_index = function(index, last_tick, ticks, month_labels) { + # The R code tries hard not to draw overlapping tick labels, and so + # will omit labels where they would abut or overlap previously drawn + # labels. This can result in, for example, every other tick being + # labelled. We'll keep track of the last tick to make sure all of + # the month labels are displayed, and missing ticks are restricted + # to Sundays which have no labels anyway. + if (last_tick==0) { + return(length(ticks)+1); + } + last_saved_tick = ticks[[length(ticks)]]; + if (index-last_saved_tick<3) { + last_saved_month = month_labels[[length(month_labels)]]; + if (last_saved_month=="") { + # We're safe overwriting a tick + # with no label (i.e., a Sunday tick). + return(length(ticks)); + } else { + # Don't eliminate a Month label. + return(NULL); + } + } + return(length(ticks)+1); +} + +get_total_days = function(is_leap_year) { + # Get the total number of days in the current year. + if (is_leap_year) { + return(366); + } else { + return(365); + } +} + +get_x_axis_ticks_and_labels = function(temperature_data_frame, num_rows, start_doy_ytd, end_doy_ytd) { + # Keep track of the years to see if spanning years. + month_labels = list(); + ticks = list(); + current_month_label = NULL; + last_tick = 0; + for (i in 1:num_rows) { + if (start_doy_ytd > 1 & i==start_doy_ytd-1) { + # Add a tick for the end of the 30 year normnals data + # that was prepended to the year-to-date data. + tick_index = get_tick_index(i, last_tick, ticks, month_labels) + ticks[tick_index] = i; + month_labels[tick_index] = "End prepended 30 year normals"; + last_tick = i; + } else if (end_doy_ytd > 0 & i==end_doy_ytd+1) { + # Add a tick for the start of the 30 year normnals data + # that was appended to the year-to-date data. + tick_index = get_tick_index(i, last_tick, ticks, month_labels) + ticks[tick_index] = i; + month_labels[tick_index] = "Start appended 30 year normals"; + last_tick = i; + } else if (i==num_rows) { + # Add a tick for the last day of the year. + tick_index = get_tick_index(i, last_tick, ticks, month_labels) + ticks[tick_index] = i; + month_labels[tick_index] = ""; + last_tick = i; + } else { + # Get the year and month from the date which + # has the format YYYY-MM-DD. + date = format(temperature_data_frame$DATE[i]); + # Get the month label. + items = strsplit(date, "-")[[1]]; + month = items[2]; + month_label = month.abb[as.integer(month)]; + if (!identical(current_month_label, month_label)) { + # Add an x-axis tick for the month. + tick_index = get_tick_index(i, last_tick, ticks, month_labels) + ticks[tick_index] = i; + month_labels[tick_index] = month_label; + current_month_label = month_label; + last_tick = i; + } + tick_index = get_tick_index(i, last_tick, ticks, month_labels) + if (!is.null(tick_index)) { + # Get the day. + day = weekdays(as.Date(date)); + if (day=="Sunday") { + # Add an x-axis tick if we're on a Sunday. + ticks[tick_index] = i; + # Add a blank month label so it is not displayed. + month_labels[tick_index] = ""; + last_tick = i; + } + } + } + } + return(list(ticks, month_labels)); +} + +is_leap_year = function(date_str) { + # Extract the year from the date_str. + date = format(date_str); + items = strsplit(date, "-")[[1]]; + year = as.integer(items[1]); + if (((year %% 4 == 0) & (year %% 100 != 0)) | (year %% 400 == 0)) { + return(TRUE); + } else { + return(FALSE); + } +} + mortality.adult = function(temperature) { if (temperature < 12.7) { mortality.probability = 0.002; @@ -197,125 +353,432 @@ return(mortality.probability); } -parse_input_data = function(input_file, num_rows) { - # Read in the input temperature datafile into a data frame. - temperature_data_frame = read.csv(file=input_file, header=T, strip.white=TRUE, sep=","); - num_columns = dim(temperature_data_frame)[2]; - if (num_columns == 6) { - # The input data has the following 6 columns: +parse_input_data = function(input_ytd, input_norm, num_days_ytd, location) { + if (is.null(input_ytd)) { + # We're analysing only the 30 year normals data, so create an empty + # data frame for containing temperature data after it is converted + # from the 30 year normals format to the year-to-date format. + temperature_data_frame = data.frame(matrix(ncol=6, nrow=0)); + colnames(temperature_data_frame) = c("LATITUDE", "LONGITUDE", "DATE", "DOY", "TMIN", "TMAX"); + # Base all dates on the current date since 30 year + # normals data does not include any dates. + year = format(Sys.Date(), "%Y"); + start_date = paste(year, "01", "01", sep="-"); + end_date = paste(year, "12", "31", sep="-"); + # Set invalid start and end DOY. + start_doy_ytd = 0; + end_doy_ytd = 0; + } else { + # Read the input_ytd temperature datafile into a data frame. + # The input_ytd data has the following 6 columns: # LATITUDE, LONGITUDE, DATE, DOY, TMIN, TMAX - # Set the column names for access when adding daylight length.. - colnames(temperature_data_frame) = c("LATITUDE","LONGITUDE", "DATE", "DOY", "TMIN", "TMAX"); - # Add a column containing the daylight length for each day. - temperature_data_frame = add_daylight_length(temperature_data_frame, num_columns, num_rows); - # Reset the column names with the additional column for later access. - colnames(temperature_data_frame) = c("LATITUDE","LONGITUDE", "DATE", "DOY", "TMIN", "TMAX", "DAYLEN"); + temperature_data_frame = read.csv(file=input_ytd, header=T, strip.white=TRUE, stringsAsFactors=FALSE, sep=","); + # Set the temperature_data_frame column names for access. + colnames(temperature_data_frame) = c("LATITUDE", "LONGITUDE", "DATE", "DOY", "TMIN", "TMAX"); + # Get the start date. + start_date = temperature_data_frame$DATE[1]; + end_date = temperature_data_frame$DATE[num_days_ytd]; + # Extract the year from the start date. + date_str = format(start_date); + date_str_items = strsplit(date_str, "-")[[1]]; + year = date_str_items[1]; + # Save the first DOY to later check if start_date is Jan 1. + start_doy_ytd = as.integer(temperature_data_frame$DOY[1]); + end_doy_ytd = as.integer(temperature_data_frame$DOY[num_days_ytd]); + } + # See if we're in a leap year. + is_leap_year = is_leap_year(start_date); + # Get the number of days in the year. + total_days = get_total_days(is_leap_year); + # Read the input_norm temperature datafile into a data frame. + # The input_norm data has the following 10 columns: + # STATIONID, LATITUDE, LONGITUDE, ELEV_M, NAME, ST, MMDD, DOY, TMIN, TMAX + norm_data_frame = read.csv(file=input_norm, header=T, strip.white=TRUE, stringsAsFactors=FALSE, sep=","); + # Set the norm_data_frame column names for access. + colnames(norm_data_frame) = c("STATIONID", "LATITUDE","LONGITUDE", "ELEV_M", "NAME", "ST", "MMDD", "DOY", "TMIN", "TMAX"); + # All normals data includes Feb 29 which is row 60 in + # the data, so delete that row if we're not in a leap year. + if (!is_leap_year) { + norm_data_frame = norm_data_frame[-c(60),]; } - return(temperature_data_frame); + # Set the location to be the station name if the user elected no to enter it. + if (is.null(location) | length(location)==0) { + location = norm_data_frame$NAME[1]; + } + if (is.null(input_ytd)) { + # Convert the 30 year normals data to the year-to-date format. + for (i in 1:total_days) { + temperature_data_frame[i,] = get_next_normals_row(norm_data_frame, year, is_leap_year, i); + } + } else { + # Merge the year-to-date data with the 30 year normals data. + if (start_doy_ytd > 1) { + # The year-to-date data starts after Jan 1, so create a + # temporary data frame to contain the 30 year normals data + # from Jan 1 to the date immediately prior to start_date. + tmp_data_frame = temperature_data_frame[FALSE,]; + for (i in 1:start_doy_ytd-1) { + tmp_data_frame[i,] = get_next_normals_row(norm_data_frame, year, is_leap_year, i); + } + # Next merge the temporary data frame with the year-to-date data frame. + temperature_data_frame = rbind(tmp_data_frame, temperature_data_frame); + } + # Define the next row for the year-to-date data from the 30 year normals data. + first_normals_append_row = end_doy_ytd + 1; + # Append the 30 year normals data to the year-to-date data. + for (i in first_normals_append_row:total_days) { + temperature_data_frame[i,] = get_next_normals_row(norm_data_frame, year, is_leap_year, i); + } + } + # Add a column containing the daylight length for each day. + temperature_data_frame = add_daylight_length(temperature_data_frame, total_days); + return(list(temperature_data_frame, start_date, end_date, start_doy_ytd, end_doy_ytd, is_leap_year, total_days, location)); } - -render_chart = function(chart_type, insect, location, latitude, start_date, end_date, days, maxval, plot_std_error, - group1, group2, group3, group1_std_error, group2_std_error, group3_std_error, date_labels) { - if (chart_type == "pop_size_by_life_stage") { - title = paste(insect, ": Total pop. by life stage :", location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" "); - legend_text = c("Egg", "Nymph", "Adult"); - columns = c(4, 2, 1); - } else if (chart_type == "pop_size_by_generation") { - title = paste(insect, ": Total pop. by generation :", location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" "); - legend_text = c("P", "F1", "F2"); - columns = c(1, 2, 4); - } else if (chart_type == "adult_pop_size_by_generation") { - title = paste(insect, ": Adult pop. by generation :", location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" "); +render_chart = function(ticks, date_labels, chart_type, plot_std_error, insect, location, latitude, start_date, end_date, days, maxval, + replications, life_stage, group, group_std_error, group2=NULL, group2_std_error=NULL, group3=NULL, group3_std_error=NULL, + life_stages_adult=NULL, life_stages_nymph=NULL) { + if (chart_type=="pop_size_by_life_stage") { + if (life_stage=="Total") { + title = paste(insect, ": Reps", replications, ":", life_stage, "Pop :", location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" "); + legend_text = c("Egg", "Nymph", "Adult"); + columns = c(4, 2, 1); + plot(days, group, main=title, type="l", ylim=c(0, maxval), axes=FALSE, lwd=2, xlab="", ylab="", cex=3, cex.lab=3, cex.axis=3, cex.main=3); + legend("topleft", legend_text, lty=c(1, 1, 1), col=columns, cex=3); + lines(days, group2, lwd=2, lty=1, col=2); + lines(days, group3, lwd=2, lty=1, col=4); + axis(side=1, at=ticks, labels=date_labels, las=2, font.axis=3, xpd=TRUE, cex=3, cex.lab=3, cex.axis=3, cex.main=3); + axis(side=2, font.axis=3, xpd=TRUE, cex=3, cex.lab=3, cex.axis=3, cex.main=3); + if (plot_std_error=="yes") { + # Standard error for group. + lines(days, group+group_std_error, lty=2); + lines(days, group-group_std_error, lty=2); + # Standard error for group2. + lines(days, group2+group2_std_error, col=2, lty=2); + lines(days, group2-group2_std_error, col=2, lty=2); + # Standard error for group3. + lines(days, group3+group3_std_error, col=4, lty=2); + lines(days, group3-group3_std_error, col=4, lty=2); + } + } else { + if (life_stage=="Egg") { + title = paste(insect, ": Reps", replications, ":", life_stage, "Pop :", location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" "); + legend_text = c(life_stage); + columns = c(4); + } else if (life_stage=="Nymph") { + stage = paste(life_stages_nymph, "Nymph Pop :", sep=" "); + title = paste(insect, ": Reps", replications, ":", stage, location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" "); + legend_text = c(paste(life_stages_nymph, life_stage, sep=" ")); + columns = c(2); + } else if (life_stage=="Adult") { + stage = paste(life_stages_adult, "Adult Pop", sep=" "); + title = paste(insect, ": Reps", replications, ":", stage, location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" "); + legend_text = c(paste(life_stages_adult, life_stage, sep=" ")); + columns = c(1); + } + plot(days, group, main=title, type="l", ylim=c(0, maxval), axes=FALSE, lwd=2, xlab="", ylab="", cex=3, cex.lab=3, cex.axis=3, cex.main=3); + legend("topleft", legend_text, lty=c(1), col="black", cex=3); + axis(side=1, at=ticks, labels=date_labels, las=2, font.axis=3, xpd=TRUE, cex=3, cex.lab=3, cex.axis=3, cex.main=3); + axis(side=2, font.axis=3, xpd=TRUE, cex=3, cex.lab=3, cex.axis=3, cex.main=3); + if (plot_std_error=="yes") { + # Standard error for group. + lines(days, group+group_std_error, lty=2); + lines(days, group-group_std_error, lty=2); + } + } + } else if (chart_type=="pop_size_by_generation") { + if (life_stage=="Total") { + title_str = ": Total Pop by Gen :"; + } else if (life_stage=="Egg") { + title_str = ": Egg Pop by Gen :"; + } else if (life_stage=="Nymph") { + title_str = paste(":", life_stages_nymph, "Nymph Pop by Gen", ":", sep=" "); + } else if (life_stage=="Adult") { + title_str = paste(":", life_stages_adult, "Adult Pop by Gen", ":", sep=" "); + } + title = paste(insect, ": Reps", replications, title_str, location, ": Lat", latitude, ":", start_date, "-", end_date, sep=" "); legend_text = c("P", "F1", "F2"); columns = c(1, 2, 4); - } - plot(days, group1, main=title, type="l", ylim=c(0, maxval), axes=F, lwd=2, xlab="", ylab="", cex=3, cex.lab=3, cex.axis=3, cex.main=3); - legend("topleft", legend_text, lty=c(1, 1, 1), col=columns, cex=3); - lines(days, group2, lwd=2, lty=1, col=2); - lines(days, group3, lwd=2, lty=1, col=4); - axis(1, at=c(1:length(date_labels)) * 30 - 15, cex.axis=3, labels=date_labels); - axis(2, cex.axis=3); - if (plot_std_error==1) { - # Standard error for group1. - lines(days, group1+group1_std_error, lty=2); - lines(days, group1-group1_std_error, lty=2); - # Standard error for group2. - lines(days, group2+group2_std_error, col=2, lty=2); - lines(days, group2-group2_std_error, col=2, lty=2); - # Standard error for group3. - lines(days, group3+group3_std_error, col=4, lty=2); - lines(days, group3-group3_std_error, col=4, lty=2); + plot(days, group, main=title, type="l", ylim=c(0, maxval), axes=FALSE, lwd=2, xlab="", ylab="", cex=3, cex.lab=3, cex.axis=3, cex.main=3); + legend("topleft", legend_text, lty=c(1, 1, 1), col=columns, cex=3); + lines(days, group2, lwd=2, lty=1, col=2); + lines(days, group3, lwd=2, lty=1, col=4); + axis(side=1, at=ticks, labels=date_labels, las=2, font.axis=3, xpd=TRUE, cex=3, cex.lab=3, cex.axis=3, cex.main=3); + axis(side=2, font.axis=3, xpd=TRUE, cex=3, cex.lab=3, cex.axis=3, cex.main=3); + if (plot_std_error=="yes") { + # Standard error for group. + lines(days, group+group_std_error, lty=2); + lines(days, group-group_std_error, lty=2); + # Standard error for group2. + lines(days, group2+group2_std_error, col=2, lty=2); + lines(days, group2-group2_std_error, col=2, lty=2); + # Standard error for group3. + lines(days, group3+group3_std_error, col=4, lty=2); + lines(days, group3-group3_std_error, col=4, lty=2); + } } } -temperature_data_frame = parse_input_data(opt$input, opt$num_days); -# All latitude values are the same, so get the value from the first row. +# Determine if we're plotting generations separately. +if (opt$plot_generations_separately=="yes") { + plot_generations_separately = TRUE; +} else { + plot_generations_separately = FALSE; +} +# Display the total number of days in the Galaxy history item blurb. +cat("Year-to-date number of days: ", opt$num_days_ytd, "\n"); + +# Parse the inputs. +data_list = parse_input_data(opt$input_ytd, opt$input_norm, opt$num_days_ytd, opt$location); +temperature_data_frame = data_list[[1]]; +# Information needed for plots. +start_date = data_list[[2]]; +end_date = data_list[[3]]; +start_doy_ytd = data_list[[4]]; +end_doy_ytd = data_list[[5]]; +is_leap_year = data_list[[6]]; +total_days = data_list[[7]]; +total_days_vector = c(1:total_days); +location = data_list[[8]]; + +# Create copies of the temperature data for generations P, F1 and F2 if we're plotting generations separately. +if (plot_generations_separately) { + temperature_data_frame_P = data.frame(temperature_data_frame); + temperature_data_frame_F1 = data.frame(temperature_data_frame); + temperature_data_frame_F2 = data.frame(temperature_data_frame); +} + +# Get the ticks date labels for plots. +ticks_and_labels = get_x_axis_ticks_and_labels(temperature_data_frame, total_days, start_doy_ytd, end_doy_ytd); +ticks = c(unlist(ticks_and_labels[1])); +date_labels = c(unlist(ticks_and_labels[2])); +# All latitude values are the same, so get the value for plots from the first row. latitude = temperature_data_frame$LATITUDE[1]; -num_columns = dim(temperature_data_frame)[2]; -date_labels = get_date_labels(temperature_data_frame, opt$num_days); + +# Determine the specified life stages for processing. +# Split life_stages into a list of strings for plots. +life_stages_str = as.character(opt$life_stages); +life_stages = strsplit(life_stages_str, ",")[[1]]; +# Determine the data we need to generate for plotting. +process_eggs = FALSE; +process_nymphs = FALSE; +process_young_nymphs = FALSE; +process_old_nymphs = FALSE; +process_total_nymphs = FALSE; +process_adults = FALSE; +process_previttelogenic_adults = FALSE; +process_vittelogenic_adults = FALSE; +process_diapausing_adults = FALSE; +process_total_adults = FALSE; +for (life_stage in life_stages) { + if (life_stage=="Total") { + process_eggs = TRUE; + process_nymphs = TRUE; + process_adults = TRUE; + } else if (life_stage=="Egg") { + process_eggs = TRUE; + } else if (life_stage=="Nymph") { + process_nymphs = TRUE; + } else if (life_stage=="Adult") { + process_adults = TRUE; + } +} +if (process_nymphs) { + # Split life_stages_nymph into a list of strings for plots. + life_stages_nymph_str = as.character(opt$life_stages_nymph); + life_stages_nymph = strsplit(life_stages_nymph_str, ",")[[1]]; + for (life_stage_nymph in life_stages_nymph) { + if (life_stage_nymph=="Young") { + process_young_nymphs = TRUE; + } else if (life_stage_nymph=="Old") { + process_old_nymphs = TRUE; + } else if (life_stage_nymph=="Total") { + process_total_nymphs = TRUE; + } + } +} +if (process_adults) { + # Split life_stages_adult into a list of strings for plots. + life_stages_adult_str = as.character(opt$life_stages_adult); + life_stages_adult = strsplit(life_stages_adult_str, ",")[[1]]; + for (life_stage_adult in life_stages_adult) { + if (life_stage_adult=="Pre-vittelogenic") { + process_previttelogenic_adults = TRUE; + } else if (life_stage_adult=="Vittelogenic") { + process_vittelogenic_adults = TRUE; + } else if (life_stage_adult=="Diapausing") { + process_diapausing_adults = TRUE; + } else if (life_stage_adult=="Total") { + process_total_adults = TRUE; + } + } +} # Initialize matrices. -Eggs.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -YoungNymphs.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -OldNymphs.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -Previtellogenic.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -Vitellogenic.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -Diapausing.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); - -newborn.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -adult.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -death.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); - -P.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -P_adults.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -F1.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -F1_adults.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -F2.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); -F2_adults.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); - -population.replications = matrix(rep(0, opt$num_days*opt$replications), ncol=opt$replications); +if (process_eggs) { + Eggs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); +} +if (process_young_nymphs | process_total_nymphs) { + YoungNymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); +} +if (process_old_nymphs | process_total_nymphs) { + OldNymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); +} +if (process_previttelogenic_adults | process_total_adults) { + Previttelogenic.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); +} +if (process_vittelogenic_adults | process_total_adults) { + Vittelogenic.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); +} +if (process_diapausing_adults | process_total_adults) { + Diapausing.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); +} +newborn.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); +adult.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); +death.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); +if (plot_generations_separately) { + # P is Parental, or overwintered adults. + P.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + # F1 is the first field-produced generation. + F1.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + # F2 is the second field-produced generation. + F2.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + if (process_eggs) { + P_eggs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F1_eggs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F2_eggs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + } + if (process_young_nymphs) { + P_young_nymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F1_young_nymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F2_young_nymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + } + if (process_old_nymphs) { + P_old_nymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F1_old_nymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F2_old_nymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + } + if (process_total_nymphs) { + P_total_nymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F1_total_nymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F2_total_nymphs.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + } + if (process_previttelogenic_adults) { + P_previttelogenic_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F1_previttelogenic_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F2_previttelogenic_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + } + if (process_vittelogenic_adults) { + P_vittelogenic_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F1_vittelogenic_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F2_vittelogenic_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + } + if (process_diapausing_adults) { + P_diapausing_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F1_diapausing_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F2_diapausing_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + } + if (process_total_adults) { + P_total_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F1_total_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + F2_total_adults.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); + } +} +# Total population. +population.replications = matrix(rep(0, total_days*opt$replications), ncol=opt$replications); # Process replications. -for (N.replications in 1:opt$replications) { +for (current_replication in 1:opt$replications) { # Start with the user-defined number of insects per replication. num_insects = opt$insects_per_replication; # Generation, Stage, degree-days, T, Diapause. vector.ini = c(0, 3, 0, 0, 0); - # Overwintering, previttelogenic, degree-days=0, T=0, no-diapause. + # Replicate to create a matrix where the columns are + # Generation, Stage, degree-days, T, Diapause and the + # rows are the initial number of insects per replication. vector.matrix = rep(vector.ini, num_insects); - # Complete matrix for the population. + # Complete transposed matrix for the population, so now + # the rows are Generation, Stage, degree-days, T, Diapause vector.matrix = base::t(matrix(vector.matrix, nrow=5)); # Time series of population size. - Eggs = rep(0, opt$num_days); - YoungNymphs = rep(0, opt$num_days); - OldNymphs = rep(0, opt$num_days); - Previtellogenic = rep(0, opt$num_days); - Vitellogenic = rep(0, opt$num_days); - Diapausing = rep(0, opt$num_days); - - N.newborn = rep(0, opt$num_days); - N.adult = rep(0, opt$num_days); - N.death = rep(0, opt$num_days); - - overwintering_adult.population = rep(0, opt$num_days); - first_generation.population = rep(0, opt$num_days); - second_generation.population = rep(0, opt$num_days); - - P.adult = rep(0, opt$num_days); - F1.adult = rep(0, opt$num_days); - F2.adult = rep(0, opt$num_days); - + if (process_eggs) { + Eggs = rep(0, total_days); + } + if (process_young_nymphs | process_total_nymphs) { + YoungNymphs = rep(0, total_days); + } + if (process_old_nymphs | process_total_nymphs) { + OldNymphs = rep(0, total_days); + } + if (process_previttelogenic_adults | process_total_adults) { + Previttelogenic = rep(0, total_days); + } + if (process_vittelogenic_adults | process_total_adults) { + Vittelogenic = rep(0, total_days); + } + if (process_diapausing_adults | process_total_adults) { + Diapausing = rep(0, total_days); + } + N.newborn = rep(0, total_days); + N.adult = rep(0, total_days); + N.death = rep(0, total_days); + overwintering_adult.population = rep(0, total_days); + first_generation.population = rep(0, total_days); + second_generation.population = rep(0, total_days); + if (plot_generations_separately) { + # P is Parental, or overwintered adults. + # F1 is the first field-produced generation. + # F2 is the second field-produced generation. + if (process_eggs) { + P.egg = rep(0, total_days); + F1.egg = rep(0, total_days); + F2.egg = rep(0, total_days); + } + if (process_young_nymphs) { + P.young_nymph = rep(0, total_days); + F1.young_nymph = rep(0, total_days); + F2.young_nymph = rep(0, total_days); + } + if (process_old_nymphs) { + P.old_nymph = rep(0, total_days); + F1.old_nymph = rep(0, total_days); + F2.old_nymph = rep(0, total_days); + } + if (process_total_nymphs) { + P.total_nymph = rep(0, total_days); + F1.total_nymph = rep(0, total_days); + F2.total_nymph = rep(0, total_days); + } + if (process_previttelogenic_adults) { + P.previttelogenic_adult = rep(0, total_days); + F1.previttelogenic_adult = rep(0, total_days); + F2.previttelogenic_adult = rep(0, total_days); + } + if (process_vittelogenic_adults) { + P.vittelogenic_adult = rep(0, total_days); + F1.vittelogenic_adult = rep(0, total_days); + F2.vittelogenic_adult = rep(0, total_days); + } + if (process_diapausing_adults) { + P.diapausing_adult = rep(0, total_days); + F1.diapausing_adult = rep(0, total_days); + F2.diapausing_adult = rep(0, total_days); + } + if (process_total_adults) { + P.total_adult = rep(0, total_days); + F1.total_adult = rep(0, total_days); + F2.total_adult = rep(0, total_days); + } + } total.population = NULL; - - averages.day = rep(0, opt$num_days); - # All the days included in the input temperature dataset. - for (row in 1:opt$num_days) { + averages.day = rep(0, total_days); + # All the days included in the input_ytd temperature dataset. + for (row in 1:total_days) { # Get the integer day of the year for the current row. doy = temperature_data_frame$DOY[row]; # Photoperiod in the day. photoperiod = temperature_data_frame$DAYLEN[row]; - temp.profile = get_temperature_at_hour(latitude, temperature_data_frame, row, opt$num_days); + temp.profile = get_temperature_at_hour(latitude, temperature_data_frame, row, total_days); mean.temp = temp.profile[1]; averages.temp = temp.profile[2]; averages.day[row] = averages.temp; @@ -341,6 +804,7 @@ death.probability = opt$egg_mortality * mortality.egg(mean.temp); } else if (vector.individual[2] == 1 | vector.individual[2] == 2) { + # Nymph. death.probability = opt$nymph_mortality * mortality.nymph(mean.temp); } else if (vector.individual[2] == 3 | vector.individual[2] == 4 | vector.individual[2] == 5) { @@ -361,7 +825,7 @@ else { # End of diapause. if (vector.individual[1] == 0 && vector.individual[2] == 3) { - # Overwintering adult (previttelogenic). + # Overwintering adult (pre-vittelogenic). if (photoperiod > opt$photoperiod && vector.individual[3] > 68 && doy < 180) { # Add 68C to become fully reproductively matured. # Transfer to vittelogenic. @@ -369,7 +833,7 @@ vector.matrix[i,] = vector.individual; } else { - # Add to # Add average temperature for current day. + # Add average temperature for current day. vector.individual[3] = vector.individual[3] + averages.temp; # Add 1 day in current stage. vector.individual[4] = vector.individual[4] + 1; @@ -377,7 +841,7 @@ } } if (vector.individual[1] != 0 && vector.individual[2] == 3) { - # Not overwintering adult (previttelogenic). + # Not overwintering adult (pre-vittelogenic). current.gen = vector.individual[1]; if (vector.individual[3] > 68) { # Add 68C to become fully reproductively matured. @@ -492,7 +956,7 @@ } vector.matrix[i,] = vector.individual; } - # Old nymph to adult: previttelogenic or diapausing? + # Old nymph to adult: pre-vittelogenic or diapausing? if (vector.individual[2] == 2) { # Add average temperature for current day. vector.individual[3] = vector.individual[3] + averages.temp; @@ -535,19 +999,33 @@ # Update population size for the next day. num_insects = num_insects - num_insects.death + num_insects.newborn; - # Aggregate results by day. - # Egg population size. - Eggs[row] = sum(vector.matrix[,2]==0); - # Young nymph population size. - YoungNymphs[row] = sum(vector.matrix[,2]==1); - # Old nymph population size. - OldNymphs[row] = sum(vector.matrix[,2]==2); - # Previtellogenic population size. - Previtellogenic[row] = sum(vector.matrix[,2]==3); - # Vitellogenic population size. - Vitellogenic[row] = sum(vector.matrix[,2]==4); - # Diapausing population size. - Diapausing[row] = sum(vector.matrix[,2]==5); + # Aggregate results by day. Due to multiple transpose calls + # on vector.matrix above, the columns of vector.matrix + # are now Generation, Stage, degree-days, T, Diapause, + if (process_eggs) { + # For egg population size, column 2 (Stage), must be 0. + Eggs[row] = sum(vector.matrix[,2]==0); + } + if (process_young_nymphs | process_total_nymphs) { + # For young nymph population size, column 2 (Stage) must be 1. + YoungNymphs[row] = sum(vector.matrix[,2]==1); + } + if (process_old_nymphs | process_total_nymphs) { + # For old nymph population size, column 2 (Stage) must be 2. + OldNymphs[row] = sum(vector.matrix[,2]==2); + } + if (process_previttelogenic_adults | process_total_adults) { + # For pre-vittelogenic population size, column 2 (Stage) must be 3. + Previttelogenic[row] = sum(vector.matrix[,2]==3); + } + if (process_vittelogenic_adults | process_total_adults) { + # For vittelogenic population size, column 2 (Stage) must be 4. + Vittelogenic[row] = sum(vector.matrix[,2]==4); + } + if (process_diapausing_adults | process_total_adults) { + # For diapausing population size, column 2 (Stage) must be 5. + Diapausing[row] = sum(vector.matrix[,2]==5); + } # Newborn population size. N.newborn[row] = num_insects.newborn; @@ -558,117 +1036,637 @@ total.population = c(total.population, num_insects); - # Overwintering adult population size. + # For overwintering adult (P) population + # size, column 1 (Generation) must be 0. overwintering_adult.population[row] = sum(vector.matrix[,1]==0); - # First generation population size. + # For first field generation (F1) population + # size, column 1 (Generation) must be 1. first_generation.population[row] = sum(vector.matrix[,1]==1); - # Second generation population size. + # For second field generation (F2) population + # size, column 1 (Generation) must be 2. second_generation.population[row] = sum(vector.matrix[,1]==2); - # P adult population size. - P.adult[row] = sum(vector.matrix[,1]==0); - # F1 adult population size. - F1.adult[row] = sum((vector.matrix[,1]==1 & vector.matrix[,2]==3) | (vector.matrix[,1]==1 & vector.matrix[,2]==4) | (vector.matrix[,1]==1 & vector.matrix[,2]==5)); - # F2 adult population size - F2.adult[row] = sum((vector.matrix[,1]==2 & vector.matrix[,2]==3) | (vector.matrix[,1]==2 & vector.matrix[,2]==4) | (vector.matrix[,1]==2 & vector.matrix[,2]==5)); - } # End of days specified in the input temperature data. + if (plot_generations_separately) { + if (process_eggs) { + # For egg life stage of generation P population size, + # column 1 (generation) is 0 and column 2 (Stage) is 0. + P.egg[row] = sum(vector.matrix[,1]==0 & vector.matrix[,2]==0); + # For egg life stage of generation F1 population size, + # column 1 (generation) is 1 and column 2 (Stage) is 0. + F1.egg[row] = sum(vector.matrix[,1]==1 & vector.matrix[,2]==0); + # For egg life stage of generation F2 population size, + # column 1 (generation) is 2 and column 2 (Stage) is 0. + F2.egg[row] = sum(vector.matrix[,1]==2 & vector.matrix[,2]==0); + } + if (process_young_nymphs) { + # For young nymph life stage of generation P population + # size, the following combination is required: + # - column 1 (Generation) is 0 and column 2 (Stage) is 1 (Young nymph) + P.young_nymph[row] = sum(vector.matrix[,1]==0 & vector.matrix[,2]==1); + # For young nymph life stage of generation F1 population + # size, the following combination is required: + # - column 1 (Generation) is 1 and column 2 (Stage) is 1 (Young nymph) + F1.young_nymph[row] = sum(vector.matrix[,1]==1 & vector.matrix[,2]==1); + # For young nymph life stage of generation F2 population + # size, the following combination is required: + # - column 1 (Generation) is 2 and column 2 (Stage) is 1 (Young nymph) + F2.young_nymph[row] = sum(vector.matrix[,1]==2 & vector.matrix[,2]==1); + } + if (process_old_nymphs) { + # For old nymph life stage of generation P population + # size, the following combination is required: + # - column 1 (Generation) is 0 and column 2 (Stage) is 2 (Old nymph) + P.old_nymph[row] = sum(vector.matrix[,1]==0 & vector.matrix[,2]==2); + # For old nymph life stage of generation F1 population + # size, the following combination is required: + # - column 1 (Generation) is 1 and column 2 (Stage) is 2 (Old nymph) + F1.old_nymph[row] = sum(vector.matrix[,1]==1 & vector.matrix[,2]==2); + # For old nymph life stage of generation F2 population + # size, the following combination is required: + # - column 1 (Generation) is 2 and column 2 (Stage) is 2 (Old nymph) + F2.old_nymph[row] = sum(vector.matrix[,1]==2 & vector.matrix[,2]==2); + } + if (process_total_nymphs) { + # For total nymph life stage of generation P population + # size, one of the following combinations is required: + # - column 1 (Generation) is 0 and column 2 (Stage) is 1 (Young nymph) + # - column 1 (Generation) is 0 and column 2 (Stage) is 2 (Old nymph) + P.total_nymph[row] = sum((vector.matrix[,1]==0 & vector.matrix[,2]==1) | (vector.matrix[,1]==0 & vector.matrix[,2]==2)); + # For total nymph life stage of generation F1 population + # size, one of the following combinations is required: + # - column 1 (Generation) is 1 and column 2 (Stage) is 1 (Young nymph) + # - column 1 (Generation) is 1 and column 2 (Stage) is 2 (Old nymph) + F1.total_nymph[row] = sum((vector.matrix[,1]==1 & vector.matrix[,2]==1) | (vector.matrix[,1]==1 & vector.matrix[,2]==2)); + # For total nymph life stage of generation F2 population + # size, one of the following combinations is required: + # - column 1 (Generation) is 2 and column 2 (Stage) is 1 (Young nymph) + # - column 1 (Generation) is 2 and column 2 (Stage) is 2 (Old nymph) + F2.total_nymph[row] = sum((vector.matrix[,1]==2 & vector.matrix[,2]==1) | (vector.matrix[,1]==2 & vector.matrix[,2]==2)); + } + if (process_previttelogenic_adults) { + # For previttelogenic adult life stage of generation P population + # size, the following combination is required: + # - column 1 (Generation) is 0 and column 2 (Stage) is 3 (Pre-vittelogenic) + P.previttelogenic_adult[row] = sum(vector.matrix[,1]==0 & vector.matrix[,2]==3); + # For previttelogenic adult life stage of generation F1 population + # size, the following combination is required: + # - column 1 (Generation) is 1 and column 2 (Stage) is 3 (Pre-vittelogenic) + F1.previttelogenic_adult[row] = sum(vector.matrix[,1]==1 & vector.matrix[,2]==3); + # For previttelogenic adult life stage of generation F2 population + # size, the following combination is required: + # - column 1 (Generation) is 2 and column 2 (Stage) is 3 (Pre-vittelogenic) + F2.previttelogenic_adult[row] = sum(vector.matrix[,1]==2 & vector.matrix[,2]==3); + } + if (process_vittelogenic_adults) { + # For vittelogenic adult life stage of generation P population + # size, the following combination is required: + # - column 1 (Generation) is 0 and column 2 (Stage) is 4 (Vittelogenic) + P.vittelogenic_adult[row] = sum(vector.matrix[,1]==0 & vector.matrix[,2]==4); + # For vittelogenic adult life stage of generation F1 population + # size, the following combination is required: + # - column 1 (Generation) is 1 and column 2 (Stage) is 4 (Vittelogenic) + F1.vittelogenic_adult[row] = sum(vector.matrix[,1]==1 & vector.matrix[,2]==4); + # For vittelogenic adult life stage of generation F2 population + # size, the following combination is required: + # - column 1 (Generation) is 2 and column 2 (Stage) is 4 (Vittelogenic) + F2.vittelogenic_adult[row] = sum(vector.matrix[,1]==2 & vector.matrix[,2]==4); + } + if (process_diapausing_adults) { + # For diapausing adult life stage of generation P population + # size, the following combination is required: + # - column 1 (Generation) is 0 and column 2 (Stage) is 5 (Diapausing) + P.diapausing_adult[row] = sum(vector.matrix[,1]==0 & vector.matrix[,2]==5); + # For diapausing adult life stage of generation F1 population + # size, the following combination is required: + # - column 1 (Generation) is 1 and column 2 (Stage) is 5 (Diapausing) + F1.diapausing_adult[row] = sum(vector.matrix[,1]==1 & vector.matrix[,2]==5); + # For diapausing adult life stage of generation F2 population + # size, the following combination is required: + # - column 1 (Generation) is 2 and column 2 (Stage) is 5 (Diapausing) + F2.diapausing_adult[row] = sum(vector.matrix[,1]==2 & vector.matrix[,2]==5); + } + if (process_total_adults) { + # For total adult life stage of generation P population + # size, one of the following combinations is required: + # - column 1 (Generation) is 0 and column 2 (Stage) is 3 (Pre-vittelogenic) + # - column 1 (Generation) is 0 and column 2 (Stage) is 4 (Vittelogenic) + # - column 1 (Generation) is 0 and column 2 (Stage) is 5 (Diapausing) + P.total_adult[row] = sum((vector.matrix[,1]==0 & vector.matrix[,2]==3) | (vector.matrix[,1]==0 & vector.matrix[,2]==4) | (vector.matrix[,1]==0 & vector.matrix[,2]==5)); + # For total adult life stage of generation F1 population + # size, one of the following combinations is required: + # - column 1 (Generation) is 1 and column 2 (Stage) is 3 (Pre-vittelogenic) + # - column 1 (Generation) is 1 and column 2 (Stage) is 4 (Vittelogenic) + # - column 1 (Generation) is 1 and column 2 (Stage) is 5 (Diapausing) + F1.total_adult[row] = sum((vector.matrix[,1]==1 & vector.matrix[,2]==3) | (vector.matrix[,1]==1 & vector.matrix[,2]==4) | (vector.matrix[,1]==1 & vector.matrix[,2]==5)); + # For total adult life stage of generation F2 population + # size, one of the following combinations is required: + # - column 1 (Generation) is 2 and column 2 (Stage) is 3 (Pre-vittelogenic) + # - column 1 (Generation) is 2 and column 2 (Stage) is 4 (Vittelogenic) + # - column 1 (Generation) is 2 and column 2 (Stage) is 5 (Diapausing) + F2.total_adult[row] = sum((vector.matrix[,1]==2 & vector.matrix[,2]==3) | (vector.matrix[,1]==2 & vector.matrix[,2]==4) | (vector.matrix[,1]==2 & vector.matrix[,2]==5)); + } + } + } # End of days specified in the input_ytd temperature data. averages.cum = cumsum(averages.day); # Define the output values. - Eggs.replications[,N.replications] = Eggs; - YoungNymphs.replications[,N.replications] = YoungNymphs; - OldNymphs.replications[,N.replications] = OldNymphs; - Previtellogenic.replications[,N.replications] = Previtellogenic; - Vitellogenic.replications[,N.replications] = Vitellogenic; - Diapausing.replications[,N.replications] = Diapausing; + if (process_eggs) { + Eggs.replications[,current_replication] = Eggs; + } + if (process_young_nymphs | process_total_nymphs) { + YoungNymphs.replications[,current_replication] = YoungNymphs; + } + if (process_old_nymphs | process_total_nymphs) { + OldNymphs.replications[,current_replication] = OldNymphs; + } + if (process_previttelogenic_adults | process_total_adults) { + Previttelogenic.replications[,current_replication] = Previttelogenic; + } + if (process_vittelogenic_adults | process_total_adults) { + Vittelogenic.replications[,current_replication] = Vittelogenic; + } + if (process_diapausing_adults | process_total_adults) { + Diapausing.replications[,current_replication] = Diapausing; + } + newborn.replications[,current_replication] = N.newborn; + adult.replications[,current_replication] = N.adult; + death.replications[,current_replication] = N.death; + if (plot_generations_separately) { + # P is Parental, or overwintered adults. + P.replications[,current_replication] = overwintering_adult.population; + # F1 is the first field-produced generation. + F1.replications[,current_replication] = first_generation.population; + # F2 is the second field-produced generation. + F2.replications[,current_replication] = second_generation.population; + if (process_eggs) { + P_eggs.replications[,current_replication] = P.egg; + F1_eggs.replications[,current_replication] = F1.egg; + F2_eggs.replications[,current_replication] = F2.egg; + } + if (process_young_nymphs) { + P_young_nymphs.replications[,current_replication] = P.young_nymph; + F1_young_nymphs.replications[,current_replication] = F1.young_nymph; + F2_young_nymphs.replications[,current_replication] = F2.young_nymph; + } + if (process_old_nymphs) { + P_old_nymphs.replications[,current_replication] = P.old_nymph; + F1_old_nymphs.replications[,current_replication] = F1.old_nymph; + F2_old_nymphs.replications[,current_replication] = F2.old_nymph; + } + if (process_total_nymphs) { + P_total_nymphs.replications[,current_replication] = P.total_nymph; + F1_total_nymphs.replications[,current_replication] = F1.total_nymph; + F2_total_nymphs.replications[,current_replication] = F2.total_nymph; + } + if (process_previttelogenic_adults) { + P_previttelogenic_adults.replications[,current_replication] = P.previttelogenic_adult; + F1_previttelogenic_adults.replications[,current_replication] = F1.previttelogenic_adult; + F2_previttelogenic_adults.replications[,current_replication] = F2.previttelogenic_adult; + } + if (process_vittelogenic_adults) { + P_vittelogenic_adults.replications[,current_replication] = P.vittelogenic_adult; + F1_vittelogenic_adults.replications[,current_replication] = F1.vittelogenic_adult; + F2_vittelogenic_adults.replications[,current_replication] = F2.vittelogenic_adult; + } + if (process_diapausing_adults) { + P_diapausing_adults.replications[,current_replication] = P.diapausing_adult; + F1_diapausing_adults.replications[,current_replication] = F1.diapausing_adult; + F2_diapausing_adults.replications[,current_replication] = F2.diapausing_adult; + } + if (process_total_adults) { + P_total_adults.replications[,current_replication] = P.total_adult; + F1_total_adults.replications[,current_replication] = F1.total_adult; + F2_total_adults.replications[,current_replication] = F2.total_adult; + } + } + population.replications[,current_replication] = total.population; + # End processing replications. +} - newborn.replications[,N.replications] = N.newborn; - adult.replications[,N.replications] = N.adult; - death.replications[,N.replications] = N.death; - - P.replications[,N.replications] = overwintering_adult.population; - P_adults.replications[,N.replications] = P.adult; - F1.replications[,N.replications] = first_generation.population; - F1_adults.replications[,N.replications] = F1.adult; - F2.replications[,N.replications] = second_generation.population; - F2_adults.replications[,N.replications] = F2.adult; - - population.replications[,N.replications] = total.population; +if (process_eggs) { + # Mean value for eggs. + eggs = apply(Eggs.replications, 1, mean); + temperature_data_frame = append_vector(temperature_data_frame, eggs, "EGG"); + # Standard error for eggs. + eggs.std_error = apply(Eggs.replications, 1, sd) / sqrt(opt$replications); + temperature_data_frame = append_vector(temperature_data_frame, eggs.std_error, "EGGSE"); +} +if (process_nymphs) { + # Calculate nymph populations for selected life stage. + for (life_stage_nymph in life_stages_nymph) { + if (life_stage_nymph=="Young") { + # Mean value for young nymphs. + young_nymphs = apply(YoungNymphs.replications, 1, mean); + temperature_data_frame = append_vector(temperature_data_frame, young_nymphs, "YOUNGNYMPH"); + # Standard error for young nymphs. + young_nymphs.std_error = apply(YoungNymphs.replications / sqrt(opt$replications), 1, sd); + temperature_data_frame = append_vector(temperature_data_frame, young_nymphs.std_error, "YOUNGNYMPHSE"); + } else if (life_stage_nymph=="Old") { + # Mean value for old nymphs. + old_nymphs = apply(OldNymphs.replications, 1, mean); + temperature_data_frame = append_vector(temperature_data_frame, old_nymphs, "OLDNYMPH"); + # Standard error for old nymphs. + old_nymphs.std_error = apply(OldNymphs.replications / sqrt(opt$replications), 1, sd); + temperature_data_frame = append_vector(temperature_data_frame, old_nymphs.std_error, "OLDNYMPHSE"); + } else if (life_stage_nymph=="Total") { + # Mean value for all nymphs. + total_nymphs = apply((YoungNymphs.replications+OldNymphs.replications), 1, mean); + temperature_data_frame = append_vector(temperature_data_frame, total_nymphs, "TOTALNYMPH"); + # Standard error for all nymphs. + total_nymphs.std_error = apply((YoungNymphs.replications+OldNymphs.replications) / sqrt(opt$replications), 1, sd); + temperature_data_frame = append_vector(temperature_data_frame, total_nymphs.std_error, "TOTALNYMPHSE"); + } + } +} +if (process_adults) { + # Calculate adult populations for selected life stage. + for (life_stage_adult in life_stages_adult) { + if (life_stage_adult == "Pre-vittelogenic") { + # Mean value for previttelogenic adults. + previttelogenic_adults = apply(Previttelogenic.replications, 1, mean); + temperature_data_frame = append_vector(temperature_data_frame, previttelogenic_adults, "PRE-VITADULT"); + # Standard error for previttelogenic adults. + previttelogenic_adults.std_error = apply(Previttelogenic.replications, 1, sd) / sqrt(opt$replications); + temperature_data_frame = append_vector(temperature_data_frame, previttelogenic_adults.std_error, "PRE-VITADULTSE"); + } else if (life_stage_adult == "Vittelogenic") { + # Mean value for vittelogenic adults. + vittelogenic_adults = apply(Vittelogenic.replications, 1, mean); + temperature_data_frame = append_vector(temperature_data_frame, vittelogenic_adults, "VITADULT"); + # Standard error for vittelogenic adults. + vittelogenic_adults.std_error = apply(Vittelogenic.replications, 1, sd) / sqrt(opt$replications); + temperature_data_frame = append_vector(temperature_data_frame, vittelogenic_adults.std_error, "VITADULTSE"); + } else if (life_stage_adult == "Diapausing") { + # Mean value for vittelogenic adults. + diapausing_adults = apply(Diapausing.replications, 1, mean); + temperature_data_frame = append_vector(temperature_data_frame, diapausing_adults, "DIAPAUSINGADULT"); + # Standard error for vittelogenic adults. + diapausing_adults.std_error = apply(Diapausing.replications, 1, sd) / sqrt(opt$replications); + temperature_data_frame = append_vector(temperature_data_frame, diapausing_adults.std_error, "DIAPAUSINGADULTSE"); + } else if (life_stage_adult=="Total") { + # Mean value for all adults. + total_adults = apply((Previttelogenic.replications+Vittelogenic.replications+Diapausing.replications), 1, mean); + temperature_data_frame = append_vector(temperature_data_frame, total_adults, "TOTALADULT"); + # Standard error for all adults. + total_adults.std_error = apply((Previttelogenic.replications+Vittelogenic.replications+Diapausing.replications), 1, sd) / sqrt(opt$replications); + temperature_data_frame = append_vector(temperature_data_frame, total_adults.std_error, "TOTALADULTSE"); + } + } } -# Mean value for eggs. -eggs = apply(Eggs.replications, 1, mean); -# Standard error for eggs. -eggs.std_error = apply(Eggs.replications, 1, sd) / sqrt(opt$replications); - -# Mean value for nymphs. -nymphs = apply((YoungNymphs.replications+OldNymphs.replications), 1, mean); -# Standard error for nymphs. -nymphs.std_error = apply((YoungNymphs.replications+OldNymphs.replications) / sqrt(opt$replications), 1, sd); - -# Mean value for adults. -adults = apply((Previtellogenic.replications+Vitellogenic.replications+Diapausing.replications), 1, mean); -# Standard error for adults. -adults.std_error = apply((Previtellogenic.replications+Vitellogenic.replications+Diapausing.replications), 1, sd) / sqrt(opt$replications); +if (plot_generations_separately) { + m_se = get_mean_and_std_error(P.replications, F1.replications, F2.replications); + P = m_se[[1]]; + P.std_error = m_se[[2]]; + F1 = m_se[[3]]; + F1.std_error = m_se[[4]]; + F2 = m_se[[5]]; + F2.std_error = m_se[[6]]; + if (process_eggs) { + m_se = get_mean_and_std_error(P_eggs.replications, F1_eggs.replications, F2_eggs.replications); + P_eggs = m_se[[1]]; + P_eggs.std_error = m_se[[2]]; + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_eggs, "EGG-P"); + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_eggs.std_error, "EGG-P-SE"); + F1_eggs = m_se[[3]]; + F1_eggs.std_error = m_se[[4]]; + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_eggs, "EGG-F1"); + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_eggs.std_error, "EGG-F1-SE"); + F2_eggs = m_se[[5]]; + F2_eggs.std_error = m_se[[6]]; + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_eggs, "EGG-F2"); + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_eggs.std_error, "EGG-F2-SE"); + } + if (process_young_nymphs) { + m_se = get_mean_and_std_error(P_young_nymphs.replications, F1_young_nymphs.replications, F2_young_nymphs.replications); + P_young_nymphs = m_se[[1]]; + P_young_nymphs.std_error = m_se[[2]]; + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_young_nymphs, "YOUNGNYMPH-P"); + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_young_nymphs.std_error, "YOUNGNYMPH-P-SE"); + F1_young_nymphs = m_se[[3]]; + F1_young_nymphs.std_error = m_se[[4]]; + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_young_nymphs, "YOUNGNYMPH-F1"); + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_young_nymphs.std_error, "YOUNGNYMPH-F1-SE"); + F2_young_nymphs = m_se[[5]]; + F2_young_nymphs.std_error = m_se[[6]]; + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_young_nymphs, "YOUNGNYMPH-F2"); + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_young_nymphs.std_error, "YOUNGNYMPH-F2-SE"); + } + if (process_old_nymphs) { + m_se = get_mean_and_std_error(P_old_nymphs.replications, F1_old_nymphs.replications, F2_old_nymphs.replications); + P_old_nymphs = m_se[[1]]; + P_old_nymphs.std_error = m_se[[2]]; + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_old_nymphs, "OLDNYMPH-P"); + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_old_nymphs.std_error, "OLDNYMPH-P-SE"); + F1_old_nymphs = m_se[[3]]; + F1_old_nymphs.std_error = m_se[[4]]; + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_old_nymphs, "OLDNYMPH-F1"); + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_old_nymphs.std_error, "OLDNYMPH-F1-SE"); + F2_old_nymphs = m_se[[5]]; + F2_old_nymphs.std_error = m_se[[6]]; + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_old_nymphs, "OLDNYMPH-F2"); + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_old_nymphs.std_error, "OLDNYMPH-F2-SE"); + } + if (process_total_nymphs) { + m_se = get_mean_and_std_error(P_total_nymphs.replications, F1_total_nymphs.replications, F2_total_nymphs.replications); + P_total_nymphs = m_se[[1]]; + P_total_nymphs.std_error = m_se[[2]]; + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_total_nymphs, "TOTALNYMPH-P"); + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_total_nymphs.std_error, "TOTALNYMPH-P-SE"); + F1_total_nymphs = m_se[[3]]; + F1_total_nymphs.std_error = m_se[[4]]; + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_total_nymphs, "TOTALNYMPH-F1"); + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_total_nymphs.std_error, "TOTALNYMPH-F1-SE"); + F2_total_nymphs = m_se[[5]]; + F2_total_nymphs.std_error = m_se[[6]]; + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_total_nymphs, "TOTALNYMPH-F2"); + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_total_nymphs.std_error, "TOTALNYMPH-F2-SE"); + } + if (process_previttelogenic_adults) { + m_se = get_mean_and_std_error(P_previttelogenic_adults.replications, F1_previttelogenic_adults.replications, F2_previttelogenic_adults.replications); + P_previttelogenic_adults = m_se[[1]]; + P_previttelogenic_adults.std_error = m_se[[2]]; + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_previttelogenic_adults, "PRE-VITADULT-P"); + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_previttelogenic_adults.std_error, "PRE-VITADULT-P-SE"); + F1_previttelogenic_adults = m_se[[3]]; + F1_previttelogenic_adults.std_error = m_se[[4]]; + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_previttelogenic_adults, "PRE-VITADULT-F1"); + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_previttelogenic_adults.std_error, "PRE-VITADULT-F1-SE"); + F2_previttelogenic_adults = m_se[[5]]; + F2_previttelogenic_adults.std_error = m_se[[6]]; + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_previttelogenic_adults, "PRE-VITADULT-F2"); + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_previttelogenic_adults.std_error, "PRE-VITADULT-F2-SE"); + } + if (process_vittelogenic_adults) { + m_se = get_mean_and_std_error(P_vittelogenic_adults.replications, F1_vittelogenic_adults.replications, F2_vittelogenic_adults.replications); + P_vittelogenic_adults = m_se[[1]]; + P_vittelogenic_adults.std_error = m_se[[2]]; + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_vittelogenic_adults, "VITADULT-P"); + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_vittelogenic_adults.std_error, "VITADULT-P-SE"); + F1_vittelogenic_adults = m_se[[3]]; + F1_vittelogenic_adults.std_error = m_se[[4]]; + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_vittelogenic_adults, "VITADULT-F1"); + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_vittelogenic_adults.std_error, "VITADULT-F1-SE"); + F2_vittelogenic_adults = m_se[[5]]; + F2_vittelogenic_adults.std_error = m_se[[6]]; + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_vittelogenic_adults, "VITADULT-F2"); + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_vittelogenic_adults.std_error, "VITADULT-F2-SE"); + } + if (process_diapausing_adults) { + m_se = get_mean_and_std_error(P_diapausing_adults.replications, F1_diapausing_adults.replications, F2_diapausing_adults.replications); + P_diapausing_adults = m_se[[1]]; + P_diapausing_adults.std_error = m_se[[2]]; + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_diapausing_adults, "DIAPAUSINGADULT-P"); + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_diapausing_adults.std_error, "DIAPAUSINGADULT-P-SE"); + F1_diapausing_adults = m_se[[3]]; + F1_diapausing_adults.std_error = m_se[[4]]; + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_diapausing_adults, "DIAPAUSINGADULT-F1"); + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_diapausing_adults.std_error, "DIAPAUSINGADULT-F1-SE"); + F2_diapausing_adults = m_se[[5]]; + F2_diapausing_adults.std_error = m_se[[6]]; + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_diapausing_adults, "DIAPAUSINGADULT-F2"); + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_diapausing_adults.std_error, "DIAPAUSINGADULT-F2-SE"); + } + if (process_total_adults) { + m_se = get_mean_and_std_error(P_total_adults.replications, F1_total_adults.replications, F2_total_adults.replications); + P_total_adults = m_se[[1]]; + P_total_adults.std_error = m_se[[2]]; + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_total_adults, "TOTALADULT-P"); + temperature_data_frame_P = append_vector(temperature_data_frame_P, P_total_adults.std_error, "TOTALADULT-P-SE"); + F1_total_adults = m_se[[3]]; + F1_total_adults.std_error = m_se[[4]]; + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_total_adults, "TOTALADULT-F1"); + temperature_data_frame_F1 = append_vector(temperature_data_frame_F1, F1_total_adults.std_error, "TOTALADULT-F1-SE"); + F2_total_adults = m_se[[5]]; + F2_total_adults.std_error = m_se[[6]]; + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_total_adults, "TOTALADULT-F2"); + temperature_data_frame_F2 = append_vector(temperature_data_frame_F2, F2_total_adults.std_error, "TOTALADULT-F2-SE"); + } +} -# Mean value for P. -P = apply(P.replications, 1, mean); -# Standard error for P. -P.std_error = apply(P.replications, 1, sd) / sqrt(opt$replications); - -# Mean value for P adults. -P_adults = apply(P_adults.replications, 1, mean); -# Standard error for P_adult. -P_adults.std_error = apply(P_adults.replications, 1, sd) / sqrt(opt$replications); - -# Mean value for F1. -F1 = apply(F1.replications, 1, mean); -# Standard error for F1. -F1.std_error = apply(F1.replications, 1, sd) / sqrt(opt$replications); - -# Mean value for F1 adults. -F1_adults = apply(F1_adults.replications, 1, mean); -# Standard error for F1 adult. -F1_adults.std_error = apply(F1_adults.replications, 1, sd) / sqrt(opt$replications); +# Save the analyzed data for combined generations. +file_path = paste("output_data_dir", "04_combined_generations.csv", sep="/"); +write.csv(temperature_data_frame, file=file_path, row.names=F); +if (plot_generations_separately) { + # Save the analyzed data for generation P. + file_path = paste("output_data_dir", "01_generation_P.csv", sep="/"); + write.csv(temperature_data_frame_P, file=file_path, row.names=F); + # Save the analyzed data for generation F1. + file_path = paste("output_data_dir", "02_generation_F1.csv", sep="/"); + write.csv(temperature_data_frame_F1, file=file_path, row.names=F); + # Save the analyzed data for generation F2. + file_path = paste("output_data_dir", "03_generation_F2.csv", sep="/"); + write.csv(temperature_data_frame_F2, file=file_path, row.names=F); +} -# Mean value for F2. -F2 = apply(F2.replications, 1, mean); -# Standard error for F2. -F2.std_error = apply(F2.replications, 1, sd) / sqrt(opt$replications); - -# Mean value for F2 adults. -F2_adults = apply(F2_adults.replications, 1, mean); -# Standard error for F2 adult. -F2_adults.std_error = apply(F2_adults.replications, 1, sd) / sqrt(opt$replications); - -# Display the total number of days in the Galaxy history item blurb. -cat("Number of days: ", opt$num_days, "\n"); - -dev.new(width=20, height=30); - -# Start PDF device driver to save charts to output. -pdf(file=opt$output, width=20, height=30, bg="white"); -par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)); - -# Data analysis and visualization plots only within a single calendar year. -days = c(1:opt$num_days); -start_date = temperature_data_frame$DATE[1]; -end_date = temperature_data_frame$DATE[opt$num_days]; - -# Subfigure 1: population size by life stage. -maxval = max(eggs+eggs.std_error, nymphs+nymphs.std_error, adults+adults.std_error); -render_chart("pop_size_by_life_stage", opt$insect, opt$location, latitude, start_date, end_date, days, maxval, - opt$std_error_plot, adults, nymphs, eggs, adults.std_error, nymphs.std_error, eggs.std_error, date_labels); -# Subfigure 2: population size by generation. -maxval = max(F2); -render_chart("pop_size_by_generation", opt$insect, opt$location, latitude, start_date, end_date, days, maxval, - opt$std_error_plot, P, F1, F2, P.std_error, F1.std_error, F2.std_error, date_labels); -# Subfigure 3: adult population size by generation. -maxval = max(F2_adults) + 100; -render_chart("adult_pop_size_by_generation", opt$insect, opt$location, latitude, start_date, end_date, days, maxval, - opt$std_error_plot, P_adults, F1_adults, F2_adults, P_adults.std_error, F1_adults.std_error, F2_adults.std_error, - date_labels); - -# Turn off device driver to flush output. -dev.off(); +if (plot_generations_separately) { + for (life_stage in life_stages) { + if (life_stage == "Egg") { + # Start PDF device driver. + dev.new(width=20, height=30); + file_path = get_file_path(life_stage, "egg_pop_by_generation.pdf") + pdf(file=file_path, width=20, height=30, bg="white"); + par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)); + # Egg population size by generation. + maxval = max(P_eggs+F1_eggs+F2_eggs) + 100; + render_chart(ticks, date_labels, "pop_size_by_generation", opt$plot_std_error, opt$insect, location, latitude, + start_date, end_date, total_days_vector, maxval, opt$replications, life_stage, group=P_eggs, group_std_error=P_eggs.std_error, + group2=F1_eggs, group2_std_error=F1_eggs.std_error, group3=F2_eggs, group3_std_error=F2_eggs.std_error); + # Turn off device driver to flush output. + dev.off(); + } else if (life_stage == "Nymph") { + for (life_stage_nymph in life_stages_nymph) { + # Start PDF device driver. + dev.new(width=20, height=30); + file_path = get_file_path(life_stage, "nymph_pop_by_generation.pdf", life_stage_nymph=life_stage_nymph) + pdf(file=file_path, width=20, height=30, bg="white"); + par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)); + if (life_stage_nymph=="Young") { + # Young nymph population size by generation. + maxval = max(P_young_nymphs+F1_young_nymphs+F2_young_nymphs) + 100; + group = P_young_nymphs; + group_std_error = P_young_nymphs.std_error; + group2 = F1_young_nymphs; + group2_std_error = F1_young_nymphs.std_error; + group3 = F2_young_nymphs; + group3_std_error = F2_young_nymphs.std_error; + } else if (life_stage_nymph=="Old") { + # Total nymph population size by generation. + maxval = max(P_old_nymphs+F1_old_nymphs+F2_old_nymphs) + 100; + group = P_old_nymphs; + group_std_error = P_old_nymphs.std_error; + group2 = F1_old_nymphs; + group2_std_error = F1_old_nymphs.std_error; + group3 = F2_old_nymphs; + group3_std_error = F2_old_nymphs.std_error; + } else if (life_stage_nymph=="Total") { + # Total nymph population size by generation. + maxval = max(P_total_nymphs+F1_total_nymphs+F2_total_nymphs) + 100; + group = P_total_nymphs; + group_std_error = P_total_nymphs.std_error; + group2 = F1_total_nymphs; + group2_std_error = F1_total_nymphs.std_error; + group3 = F2_total_nymphs; + group3_std_error = F2_total_nymphs.std_error; + } + render_chart(ticks, date_labels, "pop_size_by_generation", opt$plot_std_error, opt$insect, location, latitude, + start_date, end_date, total_days_vector, maxval, opt$replications, life_stage, group=group, group_std_error=group_std_error, + group2=group2, group2_std_error=group2_std_error, group3=group3, group3_std_error=group3_std_error, life_stages_nymph=life_stage_nymph); + # Turn off device driver to flush output. + dev.off(); + } + } else if (life_stage == "Adult") { + for (life_stage_adult in life_stages_adult) { + # Start PDF device driver. + dev.new(width=20, height=30); + file_path = get_file_path(life_stage, "adult_pop_by_generation.pdf", life_stage_adult=life_stage_adult) + pdf(file=file_path, width=20, height=30, bg="white"); + par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)); + if (life_stage_adult=="Pre-vittelogenic") { + # Pre-vittelogenic adult population size by generation. + maxval = max(P_previttelogenic_adults+F1_previttelogenic_adults+F2_previttelogenic_adults) + 100; + group = P_previttelogenic_adults; + group_std_error = P_previttelogenic_adults.std_error; + group2 = F1_previttelogenic_adults; + group2_std_error = F1_previttelogenic_adults.std_error; + group3 = F2_previttelogenic_adults; + group3_std_error = F2_previttelogenic_adults.std_error; + } else if (life_stage_adult=="Vittelogenic") { + # Vittelogenic adult population size by generation. + maxval = max(P_vittelogenic_adults+F1_vittelogenic_adults+F2_vittelogenic_adults) + 100; + group = P_vittelogenic_adults; + group_std_error = P_vittelogenic_adults.std_error; + group2 = F1_vittelogenic_adults; + group2_std_error = F1_vittelogenic_adults.std_error; + group3 = F2_vittelogenic_adults; + group3_std_error = F2_vittelogenic_adults.std_error; + } else if (life_stage_adult=="Diapausing") { + # Diapausing adult population size by generation. + maxval = max(P_diapausing_adults+F1_diapausing_adults+F2_diapausing_adults) + 100; + group = P_diapausing_adults; + group_std_error = P_diapausing_adults.std_error; + group2 = F1_diapausing_adults; + group2_std_error = F1_diapausing_adults.std_error; + group3 = F2_diapausing_adults; + group3_std_error = F2_diapausing_adults.std_error; + } else if (life_stage_adult=="Total") { + # Total adult population size by generation. + maxval = max(P_total_adults+F1_total_adults+F2_total_adults) + 100; + group = P_total_adults; + group_std_error = P_total_adults.std_error; + group2 = F1_total_adults; + group2_std_error = F1_total_adults.std_error; + group3 = F2_total_adults; + group3_std_error = F2_total_adults.std_error; + } + render_chart(ticks, date_labels, "pop_size_by_generation", opt$plot_std_error, opt$insect, location, latitude, + start_date, end_date, total_days_vector, maxval, opt$replications, life_stage, group=group, group_std_error=group_std_error, + group2=group2, group2_std_error=group2_std_error, group3=group3, group3_std_error=group3_std_error, life_stages_adult=life_stage_adult); + # Turn off device driver to flush output. + dev.off(); + } + } else if (life_stage == "Total") { + # Start PDF device driver. + # Name collection elements so that they + # are displayed in logical order. + dev.new(width=20, height=30); + file_path = get_file_path(life_stage, "total_pop_by_generation.pdf") + pdf(file=file_path, width=20, height=30, bg="white"); + par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)); + # Total population size by generation. + maxval = max(P+F1+F2) + 100; + render_chart(ticks, date_labels, "pop_size_by_generation", opt$plot_std_error, opt$insect, location, latitude, + start_date, end_date, total_days_vector, maxval, opt$replications, life_stage, group=P, group_std_error=P.std_error, + group2=F1, group2_std_error=F1.std_error, group3=F2, group3_std_error=F2.std_error); + # Turn off device driver to flush output. + dev.off(); + } + } +} else { + for (life_stage in life_stages) { + if (life_stage == "Egg") { + # Start PDF device driver. + dev.new(width=20, height=30); + file_path = get_file_path(life_stage, "egg_pop.pdf") + pdf(file=file_path, width=20, height=30, bg="white"); + par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)); + # Egg population size. + maxval = max(eggs+eggs.std_error) + 100; + render_chart(ticks, date_labels, "pop_size_by_life_stage", opt$plot_std_error, opt$insect, location, latitude, + start_date, end_date, total_days_vector, maxval, opt$replications, life_stage, group=eggs, group_std_error=eggs.std_error); + # Turn off device driver to flush output. + dev.off(); + } else if (life_stage == "Nymph") { + for (life_stage_nymph in life_stages_nymph) { + # Start PDF device driver. + dev.new(width=20, height=30); + file_path = get_file_path(life_stage, "nymph_pop.pdf", life_stage_nymph=life_stage_nymph) + pdf(file=file_path, width=20, height=30, bg="white"); + par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)); + if (life_stage_nymph=="Total") { + # Total nymph population size. + group = total_nymphs; + group_std_error = total_nymphs.std_error; + } else if (life_stage_nymph=="Young") { + # Young nymph population size. + group = young_nymphs; + group_std_error = young_nymphs.std_error; + } else if (life_stage_nymph=="Old") { + # Old nymph population size. + group = old_nymphs; + group_std_error = old_nymphs.std_error; + } + maxval = max(group+group_std_error) + 100; + render_chart(ticks, date_labels, "pop_size_by_life_stage", opt$plot_std_error, opt$insect, location, latitude, + start_date, end_date, total_days_vector, maxval, opt$replications, life_stage, group=group, group_std_error=group_std_error, + life_stages_nymph=life_stage_nymph); + # Turn off device driver to flush output. + dev.off(); + } + } else if (life_stage == "Adult") { + for (life_stage_adult in life_stages_adult) { + # Start PDF device driver. + dev.new(width=20, height=30); + file_path = get_file_path(life_stage, "adult_pop.pdf", life_stage_adult=life_stage_adult) + pdf(file=file_path, width=20, height=30, bg="white"); + par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)); + if (life_stage_adult=="Total") { + # Total adult population size. + group = total_adults; + group_std_error = total_adults.std_error + } else if (life_stage_adult=="Pre-vittelogenic") { + # Pre-vittelogenic adult population size. + group = previttelogenic_adults; + group_std_error = previttelogenic_adults.std_error + } else if (life_stage_adult=="Vittelogenic") { + # Vittelogenic adult population size. + group = vittelogenic_adults; + group_std_error = vittelogenic_adults.std_error + } else if (life_stage_adult=="Diapausing") { + # Diapausing adult population size. + group = diapausing_adults; + group_std_error = diapausing_adults.std_error + } + maxval = max(group+group_std_error) + 100; + render_chart(ticks, date_labels, "pop_size_by_life_stage", opt$plot_std_error, opt$insect, location, latitude, + start_date, end_date, total_days_vector, maxval, opt$replications, life_stage, group=group, group_std_error=group_std_error, + life_stages_adult=life_stage_adult); + # Turn off device driver to flush output. + dev.off(); + } + } else if (life_stage == "Total") { + # Start PDF device driver. + dev.new(width=20, height=30); + file_path = get_file_path(life_stage, "total_pop.pdf") + pdf(file=file_path, width=20, height=30, bg="white"); + par(mar=c(5, 6, 4, 4), mfrow=c(3, 1)); + # Total population size. + maxval = max(eggs+eggs.std_error, total_nymphs+total_nymphs.std_error, total_adults+total_adults.std_error) + 100; + render_chart(ticks, date_labels, "pop_size_by_life_stage", opt$plot_std_error, opt$insect, location, latitude, + start_date, end_date, total_days_vector, maxval, opt$replications, life_stage, group=total_adults, group_std_error=total_adults.std_error, + group2=total_nymphs, group2_std_error=total_nymphs.std_error, group3=eggs, group3_std_error=eggs.std_error); + # Turn off device driver to flush output. + dev.off(); + } + } +}
--- a/insect_phenology_model.xml Tue Feb 13 13:47:32 2018 -0500 +++ b/insect_phenology_model.xml Tue May 29 09:00:25 2018 -0400 @@ -4,57 +4,229 @@ <requirement type="package" version="1.4.4">r-optparse</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ +#import os +#set output_data_dir = "output_data_dir" +#set output_plots_dir = "output_plots_dir" +#set error_file = $os.path.join($output_data_dir, "04_combined_generations.csv") +#set life_stages = list() +#set plot_adult_life_stage = $plot_adult_life_stage_cond.plot_adult_life_stage +#set plot_nymph_life_stage = $plot_nymph_life_stage_cond.plot_nymph_life_stage +#if str($plot_egg_life_stage) == "yes": + $life_stages.append("Egg") +#end if +#if str($plot_nymph_life_stage) == "yes": + $life_stages.append("Nymph") +#end if +#if str($plot_adult_life_stage) == "yes": + $life_stages.append("Adult") +#end if +#if str($plot_egg_life_stage) == "yes" and str($plot_nymph_life_stage) == "yes" and str($plot_adult_life_stage) == "yes": + $life_stages.append("Total") +#end if +#set life_stages = ",".join($life_stages) +mkdir output_data_dir && +mkdir output_plots_dir && Rscript '$__tool_directory__/insect_phenology_model.R' --adult_mortality $adult_mortality --adult_accumulation $adult_accumulation --egg_mortality $egg_mortality ---input '$input' +#if str($merge_ytd_temperature_data_cond.merge_ytd_temperature_data) == "yes": + --input_ytd '$merge_ytd_temperature_data_cond.input_ytd' + --location '$merge_ytd_temperature_data_cond.location' + --num_days_ytd $merge_ytd_temperature_data_cond.input_ytd.metadata.data_lines +#end if +--input_norm '$input_norm' --insect '$insect' --insects_per_replication $insects_per_replication ---location '$location' +--life_stages '$life_stages' +#if str($plot_adult_life_stage) == "yes": + --life_stages_adult '$plot_adult_life_stage_cond.life_stages_adult' +#end if +#if str($plot_nymph_life_stage) == "yes": + --life_stages_nymph '$plot_nymph_life_stage_cond.life_stages_nymph' +#end if --max_clutch_size $max_clutch_size --min_clutch_size $min_clutch_size --nymph_mortality $nymph_mortality ---num_days $input.metadata.data_lines --old_nymph_accumulation $old_nymph_accumulation ---output '$output' --oviposition $oviposition --photoperiod $photoperiod --replications $replications ---std_error_plot $std_error_plot ---young_nymph_accumulation $young_nymph_accumulation]]></command> +--plot_generations_separately $plot_generations_separately +--plot_std_error $plot_std_error +--young_nymph_accumulation $young_nymph_accumulation +&>ipm_log.txt; +if [[ $? -ne 0 ]]; then + cp ipm_log.txt '$error_file'; + exit 1; +fi]]></command> <inputs> - <param name="input" type="data" format="csv" label="Temperature data" /> - <param name="location" type="text" value="" optional="false" label="Location" /> + <param name="input_norm" type="data" format="csv" label="30 year normals temperature data"> + <validator type="expression" message="30 year normals temperature data must have 10 columns and 366 rows">value is not None and value.metadata.columns==10 and value.metadata.data_lines==366</validator> + </param> + <conditional name="merge_ytd_temperature_data_cond"> + <param name="merge_ytd_temperature_data" type="select" label="Merge year-to-date temperature data with 30 year normals temperature data?"> + <option value="yes" selected="true">Yes</option> + <option value="no">No</option> + </param> + <when value="yes"> + <param name="input_ytd" type="data" format="csv" label="Year-to-date temperature data"> + <validator type="expression" message="Year-to-date temperature data must have 6 columns">value is not None and value.metadata.columns==6</validator> + </param> + <param name="location" type="text" value="" optional="true" label="Location" help="Enter the location or leave blank to use the station name from 30 year normals data."/> + </when> + <when value="no"/> + </conditional> <param name="insect" type="select" label="Select insect"> - <option value="Brown Marmorated Stink Bug" selected="True">Brown Marmorated Stink Bug</option> + <option value="BMSB" selected="True">Brown Marmorated Stink Bug</option> </param> - <param name="replications" type="integer" value="10" min="1" label="Number of replications" /> - <param name="insects_per_replication" type="integer" value="1000" min="1" label="Number of insects with which to start each replication" /> - <param name="photoperiod" type="float" value="13.5" min="0" label="Critical photoperiod for diapause induction/termination" /> - <param name="egg_mortality" type="integer" value="1" min="0" label="Adjustment rate for egg mortality" /> - <param name="nymph_mortality" type="integer" value="1" min="0" label="Adjustment rate for nymph mortality" /> - <param name="adult_mortality" type="integer" value="1" min="0" label="Adjustment rate for adult mortality" /> - <param name="oviposition" type="integer" value="1" min="0" label="Adjustment oviposition rate" /> - <param name="min_clutch_size" type="integer" value="0" min="0" label="Adjustment of minimum clutch size" /> - <param name="max_clutch_size" type="integer" value="0" min="0" label="Adjustment of maximum clutch size" /> - <param name="young_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (egg->young nymph)" /> - <param name="old_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (young nymph->old nymph)" /> - <param name="adult_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (old nymph->adult)" /> - <param name="std_error_plot" type="select" label="Plot standard error?"> - <option value="1" selected="True">Yes</option> - <option value="0">No</option> + <param name="replications" type="integer" value="10" min="2" label="Number of replications"/> + <param name="insects_per_replication" type="integer" value="1000" min="1" label="Number of insects with which to start each replication"/> + <param name="photoperiod" type="float" value="13.5" min="0" label="Critical photoperiod for diapause induction/termination"/> + <param name="egg_mortality" type="integer" value="1" min="0" label="Adjustment rate for egg mortality"/> + <param name="nymph_mortality" type="integer" value="1" min="0" label="Adjustment rate for nymph mortality"/> + <param name="adult_mortality" type="integer" value="1" min="0" label="Adjustment rate for adult mortality"/> + <param name="oviposition" type="integer" value="1" min="0" label="Adjustment oviposition rate"/> + <param name="min_clutch_size" type="integer" value="0" min="0" label="Adjustment of minimum clutch size"/> + <param name="max_clutch_size" type="integer" value="0" min="0" label="Adjustment of maximum clutch size"/> + <param name="young_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (egg->young nymph)"/> + <param name="old_nymph_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (young nymph->old nymph)"/> + <param name="adult_accumulation" type="integer" value="0" min="0" label="Adjustment of degree-days accumulation (old nymph->adult)"/> + <param name="plot_generations_separately" type="select" label="Plot generations separately?"> + <option value="yes" selected="True">Yes</option> + <option value="no">No</option> + </param> + <param name="plot_egg_life_stage" type="select" label="Plot egg life stage?"> + <option value="yes" selected="true">Yes</option> + <option value="no">No</option> + </param> + <conditional name="plot_nymph_life_stage_cond"> + <param name="plot_nymph_life_stage" type="select" label="Plot nymph life stage?"> + <option value="yes" selected="true">Yes</option> + <option value="no">No</option> + </param> + <when value="yes"> + <param name="life_stages_nymph" type="select" multiple="true" label="Select nymph life stage"> + <option value="Total" selected="true">All</option> + <option value="Young">Young</option> + <option value="Old">Old</option> + </param> + </when> + <when value="no"/> + </conditional> + <conditional name="plot_adult_life_stage_cond"> + <param name="plot_adult_life_stage" type="select" label="Plot adult life stage?"> + <option value="yes" selected="true">Yes</option> + <option value="no">No</option> + </param> + <when value="yes"> + <param name="life_stages_adult" type="select" multiple="true" label="Select adult life stage"> + <option value="Total" selected="true">All</option> + <option value="Pre-vittelogenic">Pre-vittelogenic</option> + <option value="Vittelogenic">Vittelogenic</option> + <option value="Diapausing">Diapausing</option> + </param> + </when> + <when value="no"/> + </conditional> + <param name="plot_std_error" type="select" label="Plot standard error?"> + <option value="yes" selected="True">Yes</option> + <option value="no">No</option> </param> </inputs> <outputs> - <data name="output" format="pdf" label="${tool.name} ${location}, on ${on_string}" /> + <collection name="output_data_collection" type="list" label="${tool.name} (data), on ${on_string}"> + <discover_datasets pattern="__name__" directory="output_data_dir" format="csv"/> + </collection> + <collection name="output_plots_collection" type="list" label="${tool.name} (plots), on ${on_string}"> + <discover_datasets pattern="__name__" directory="output_plots_dir" format="pdf"/> + </collection> </outputs> <tests> <test> - <param name="input" value="state_college.csv" ftype="csv" /> - <param name="location" value="State College PA" /> - <param name="replications" value="10" /> - <output name="output" file="output.pdf" ftype="pdf" compare="contains" /> + <param name="input_norm" value="30_year_normals.csv" ftype="csv"/> + <param name="merge_ytd_temperature_data" value="no"/> + <param name="replications" value="2"/> + <param name="plot_generations_separately" value="no"/> + <param name="plot_egg_life_stage" value="no"/> + <param name="life_stages_nymph" value="Young"/> + <param name="life_stages_adult" value="Pre-vittelogenic"/> + <output_collection name="output_data_collection" type="list"> + <element name="04_combined_generations.csv" file="output_combined1.csv" ftype="csv" compare="contains"/> + </output_collection> + <output_collection name="output_plots_collection" type="list"> + <element name="02_young_nymph_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + <element name="05_pre-vittelogenic_adult_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + </output_collection> + </test> + <test> + <param name="input_norm" value="30_year_normals.csv" ftype="csv"/> + <param name="input_ytd" value="state_college_partial.csv" ftype="csv"/> + <param name="location" value="State College PA"/> + <param name="replications" value="2"/> + <param name="plot_generations_separately" value="no"/> + <param name="plot_egg_life_stage" value="no"/> + <param name="life_stages_nymph" value="Young"/> + <param name="life_stages_adult" value="Pre-vittelogenic"/> + <output_collection name="output_data_collection" type="list"> + <element name="04_combined_generations.csv" file="output_combined1.csv" ftype="csv" compare="contains"/> + </output_collection> + <output_collection name="output_plots_collection" type="list"> + <element name="02_young_nymph_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + <element name="05_pre-vittelogenic_adult_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + </output_collection> + </test> + <test> + <param name="input_norm" value="30_year_normals.csv" ftype="csv"/> + <param name="input_ytd" value="state_college_ytd.csv" ftype="csv"/> + <param name="location" value="State College PA"/> + <param name="replications" value="2"/> + <param name="plot_generations_separately" value="no"/> + <output_collection name="output_data_collection" type="list"> + <element name="04_combined_generations.csv" file="output_combined2.csv" ftype="csv" compare="contains"/> + </output_collection> + <output_collection name="output_plots_collection" type="list"> + <element name="01_egg_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + <element name="04_total_nymph_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + <element name="08_total_adult_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + <element name="09_total_pop.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + </output_collection> + </test> + <test> + <param name="input_norm" value="30_year_normals.csv" ftype="csv"/> + <param name="input_ytd" value="state_college_partial.csv" ftype="csv"/> + <param name="location" value="State College PA"/> + <param name="replications" value="2"/> + <param name="plot_egg_life_stage" value="no"/> + <param name="life_stages_nymph" value="Old"/> + <param name="plot_adult_life_stage" value="no"/> + <output_collection name="output_data_collection" type="list"> + <element name="01_generation_P.csv" file="output_p_3.csv" ftype="csv" compare="contains"/> + <element name="02_generation_F1.csv" file="output_f1_3.csv" ftype="csv" compare="contains"/> + <element name="03_generation_F2.csv" file="output_f2_3.csv" ftype="csv" compare="contains"/> + <element name="04_combined_generations.csv" file="output_combined3.csv" ftype="csv" compare="contains"/> + </output_collection> + <output_collection name="output_plots_collection" type="list"> + <element name="03_old_nymph_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + </output_collection> + </test> + <test> + <param name="input_norm" value="30_year_normals.csv" ftype="csv"/> + <param name="input_ytd" value="state_college_ytd.csv" ftype="csv"/> + <param name="location" value="State College PA"/> + <param name="replications" value="2"/> + <output_collection name="output_data_collection" type="list"> + <element name="01_generation_P.csv" file="output_p_4.csv" ftype="csv" compare="contains"/> + <element name="02_generation_F1.csv" file="output_f1_4.csv" ftype="csv" compare="contains"/> + <element name="03_generation_F2.csv" file="output_f2_4.csv" ftype="csv" compare="contains"/> + <element name="04_combined_generations.csv" file="output_combined4.csv" ftype="csv" compare="contains"/> + </output_collection> + <output_collection name="output_plots_collection" type="list"> + <element name="01_egg_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + <element name="04_total_nymph_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + <element name="08_total_adult_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + <element name="09_total_pop_by_generation.pdf" file="plot.pdf" ftype="pdf" compare="contains"/> + </output_collection> </test> </tests> <help> @@ -66,8 +238,12 @@ **Required options** + * **30 year normals temperature data** - the dataset from your history containing the 30-year normals temperature data (available at http://pestwatch.psu.edu/ghcn). + * **Merge year-to-date temperature data with 30 year normals temperature data** - select Yes to merge a year-to-date temperature dataset from your history into the selected 30 year normals temperature data. + + * **Year-to-date temperature data** - the dataset from your history containing the year-to-date temperature data (available at http://pestwatch.psu.edu/minmax). + * **Location** - the location associated with the selected temperature data. - * **Temperature data** - select the dataset from your history containing the temperature data. * **Select insect** - currently only the Brown Marmorated Stink Bug can be analyzed. * **Number of replications** - number of replications. * **Number of insects with which to start each replication** - the analysis for each replication will start with this number of insects. @@ -81,8 +257,17 @@ * **Adjustment of degree-days accumulation (egg->young nymph)** - adjustment of degree-days accumulation (egg->young nymph). * **Adjustment of degree-days accumulation (young nymph->old nymph)** - adjustment of degree-days accumulation (young nymph->old nymph). * **Adjustment of degree-days accumulation (old nymph->adult)** - adjustment of degree-days accumulation (old nymph->adult). + * **Plot generations separately** - select "Yes" to plot P, F1 and F2 as separate lines or "no" to pool across generations, resulting in a total for the selected life states. + * **Plot egg life stage** - select "Yes" to plot the egg life stage. If all life stages (egg, nymph and adult) are selected for plotting, one output for the total will be produced. + * **Plot nymph life stage** - select "Yes" to plot the nymph life stage. If all life stages (egg, nymph and adult) are selected for plotting, one output for the total will be produced. + + * **Select nymph life stage** - select the nymph life stage for plotting. + + * **Plot adult life stage** - select "Yes" to plot the adult life stage. If all life stages (egg, nymph and adult) are selected for plotting, one output for the total will be produced. + + * **Select adult life stage** - select the adult life stage for plotting. + * **Plot standard error** - add standard error lines to plot. - </help> <citations> <citation type="doi">10.3389/fphys.2016.00165</citation>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/30_year_normals.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,367 @@ +stationid,latitude,longitude,elev_m,name,st,mmdd,doy,tmin,tmax +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-01, 001,-6.8,2.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-02, 002,-6.8,2.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-03, 003,-6.9,2.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-04, 004,-7.0,2.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-05, 005,-7.1,2.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-06, 006,-7.1,2.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-07, 007,-7.2,2.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-08, 008,-7.2,2.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-09, 009,-7.3,2.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-10, 010,-7.3,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-11, 011,-7.4,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-12, 012,-7.4,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-13, 013,-7.4,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-14, 014,-7.5,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-15, 015,-7.5,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-16, 016,-7.5,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-17, 017,-7.6,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-18, 018,-7.6,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-19, 019,-7.6,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-20, 020,-7.6,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-21, 021,-7.6,2.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-22, 022,-7.6,2.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-23, 023,-7.6,2.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-24, 024,-7.6,2.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-25, 025,-7.6,2.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-26, 026,-7.6,2.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-27, 027,-7.6,2.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-28, 028,-7.6,2.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-29, 029,-7.6,2.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-30, 030,-7.5,2.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,01-31, 031,-7.5,2.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-01, 032,-7.4,2.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-02, 033,-7.4,2.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-03, 034,-7.4,2.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-04, 035,-7.3,3.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-05, 036,-7.3,3.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-06, 037,-7.2,3.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-07, 038,-7.2,3.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-08, 039,-7.1,3.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-09, 040,-7.1,3.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-10, 041,-7.0,3.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-11, 042,-6.9,3.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-12, 043,-6.8,3.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-13, 044,-6.7,3.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-14, 045,-6.7,3.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-15, 046,-6.6,4.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-16, 047,-6.4,4.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-17, 048,-6.3,4.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-18, 049,-6.2,4.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-19, 050,-6.1,4.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-20, 051,-6.0,4.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-21, 052,-5.9,4.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-22, 053,-5.7,4.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-23, 054,-5.6,5.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-24, 055,-5.5,5.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-25, 056,-5.3,5.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-26, 057,-5.2,5.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-27, 058,-5.1,5.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-28, 059,-4.9,5.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,02-29, 060,-4.8,5.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-01, 061,-4.8,6.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-02, 062,-4.6,6.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-03, 063,-4.4,6.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-04, 064,-4.3,6.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-05, 065,-4.1,6.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-06, 066,-3.9,6.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-07, 067,-3.8,7.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-08, 068,-3.6,7.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-09, 069,-3.4,7.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-10, 070,-3.3,7.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-11, 071,-3.1,7.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-12, 072,-2.9,8.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-13, 073,-2.7,8.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-14, 074,-2.6,8.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-15, 075,-2.4,8.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-16, 076,-2.2,8.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-17, 077,-2.0,9.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-18, 078,-1.8,9.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-19, 079,-1.7,9.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-20, 080,-1.4,9.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-21, 081,-1.3,10.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-22, 082,-1.1,10.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-23, 083,-0.9,10.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-24, 084,-0.7,10.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-25, 085,-0.6,11.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-26, 086,-0.4,11.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-27, 087,-0.2,11.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-28, 088,0.0,11.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-29, 089,0.2,11.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-30, 090,0.3,12.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,03-31, 091,0.6,12.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-01, 092,0.7,12.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-02, 093,0.9,12.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-03, 094,1.1,13.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-04, 095,1.3,13.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-05, 096,1.4,13.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-06, 097,1.6,13.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-07, 098,1.8,14.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-08, 099,2.0,14.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-09, 100,2.2,14.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-10, 101,2.3,14.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-11, 102,2.5,15.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-12, 103,2.7,15.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-13, 104,2.9,15.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-14, 105,3.1,15.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-15, 106,3.2,15.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-16, 107,3.4,16.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-17, 108,3.6,16.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-18, 109,3.8,16.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-19, 110,3.9,16.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-20, 111,4.2,17.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-21, 112,4.3,17.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-22, 113,4.5,17.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-23, 114,4.7,17.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-24, 115,4.9,17.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-25, 116,5.1,18.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-26, 117,5.2,18.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-27, 118,5.4,18.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-28, 119,5.6,18.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-29, 120,5.8,18.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,04-30, 121,5.9,19.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-01, 122,6.1,19.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-02, 123,6.3,19.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-03, 124,6.5,19.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-04, 125,6.7,19.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-05, 126,6.9,19.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-06, 127,7.1,20.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-07, 128,7.2,20.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-08, 129,7.4,20.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-09, 130,7.6,20.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-10, 131,7.8,20.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-11, 132,7.9,20.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-12, 133,8.2,21.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-13, 134,8.3,21.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-14, 135,8.5,21.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-15, 136,8.7,21.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-16, 137,8.9,21.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-17, 138,9.1,21.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-18, 139,9.3,22.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-19, 140,9.4,22.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-20, 141,9.6,22.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-21, 142,9.8,22.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-22, 143,10.0,22.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-23, 144,10.2,22.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-24, 145,10.4,23.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-25, 146,10.6,23.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-26, 147,10.7,23.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-27, 148,10.9,23.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-28, 149,11.1,23.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-29, 150,11.3,23.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-30, 151,11.5,24.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,05-31, 152,11.7,24.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-01, 153,11.8,24.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-02, 154,12.1,24.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-03, 155,12.2,24.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-04, 156,12.4,24.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-05, 157,12.6,25.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-06, 158,12.8,25.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-07, 159,12.9,25.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-08, 160,13.1,25.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-09, 161,13.3,25.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-10, 162,13.4,25.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-11, 163,13.6,26.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-12, 164,13.8,26.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-13, 165,13.9,26.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-14, 166,14.1,26.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-15, 167,14.3,26.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-16, 168,14.4,26.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-17, 169,14.6,27.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-18, 170,14.7,27.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-19, 171,14.9,27.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-20, 172,15.0,27.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-21, 173,15.2,27.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-22, 174,15.3,27.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-23, 175,15.4,27.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-24, 176,15.5,28.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-25, 177,15.7,28.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-26, 178,15.8,28.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-27, 179,15.9,28.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-28, 180,15.9,28.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-29, 181,16.1,28.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,06-30, 182,16.2,28.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-01, 183,16.2,28.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-02, 184,16.3,28.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-03, 185,16.4,28.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-04, 186,16.4,29.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-05, 187,16.6,29.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-06, 188,16.6,29.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-07, 189,16.7,29.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-08, 190,16.7,29.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-09, 191,16.7,29.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-10, 192,16.8,29.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-11, 193,16.8,29.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-12, 194,16.8,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-13, 195,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-14, 196,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-15, 197,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-16, 198,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-17, 199,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-18, 200,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-19, 201,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-20, 202,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-21, 203,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-22, 204,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-23, 205,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-24, 206,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-25, 207,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-26, 208,16.9,29.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-27, 209,16.8,29.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-28, 210,16.8,29.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-29, 211,16.8,29.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-30, 212,16.8,29.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,07-31, 213,16.8,29.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-01, 214,16.7,29.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-02, 215,16.7,29.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-03, 216,16.7,29.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-04, 217,16.6,29.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-05, 218,16.6,29.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-06, 219,16.6,29.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-07, 220,16.5,29.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-08, 221,16.5,28.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-09, 222,16.4,28.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-10, 223,16.4,28.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-11, 224,16.3,28.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-12, 225,16.3,28.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-13, 226,16.2,28.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-14, 227,16.2,28.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-15, 228,16.1,28.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-16, 229,16.1,28.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-17, 230,16.0,28.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-18, 231,15.9,28.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-19, 232,15.8,28.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-20, 233,15.7,28.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-21, 234,15.7,28.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-22, 235,15.6,28.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-23, 236,15.4,28.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-24, 237,15.4,27.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-25, 238,15.3,27.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-26, 239,15.2,27.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-27, 240,15.0,27.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-28, 241,14.9,27.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-29, 242,14.8,27.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-30, 243,14.6,27.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,08-31, 244,14.5,27.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-01, 245,14.3,27.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-02, 246,14.2,26.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-03, 247,14.0,26.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-04, 248,13.8,26.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-05, 249,13.7,26.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-06, 250,13.4,26.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-07, 251,13.3,26.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-08, 252,13.1,25.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-09, 253,12.9,25.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-10, 254,12.7,25.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-11, 255,12.4,25.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-12, 256,12.2,25.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-13, 257,12.0,24.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-14, 258,11.8,24.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-15, 259,11.5,24.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-16, 260,11.3,24.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-17, 261,11.1,24.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-18, 262,10.8,23.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-19, 263,10.6,23.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-20, 264,10.3,23.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-21, 265,10.1,23.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-22, 266,9.8,22.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-23, 267,9.6,22.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-24, 268,9.3,22.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-25, 269,9.1,22.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-26, 270,8.8,22.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-27, 271,8.6,21.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-28, 272,8.3,21.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-29, 273,8.1,21.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,09-30, 274,7.8,21.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-01, 275,7.6,20.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-02, 276,7.3,20.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-03, 277,7.1,20.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-04, 278,6.9,20.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-05, 279,6.7,19.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-06, 280,6.4,19.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-07, 281,6.2,19.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-08, 282,6.0,19.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-09, 283,5.8,19.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-10, 284,5.6,18.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-11, 285,5.4,18.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-12, 286,5.2,18.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-13, 287,5.1,18.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-14, 288,4.9,18.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-15, 289,4.7,17.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-16, 290,4.6,17.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-17, 291,4.4,17.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-18, 292,4.2,17.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-19, 293,4.1,17.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-20, 294,3.9,16.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-21, 295,3.8,16.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-22, 296,3.7,16.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-23, 297,3.5,16.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-24, 298,3.4,16.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-25, 299,3.3,15.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-26, 300,3.1,15.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-27, 301,3.0,15.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-28, 302,2.9,15.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-29, 303,2.8,15.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-30, 304,2.7,14.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,10-31, 305,2.6,14.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-01, 306,2.4,14.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-02, 307,2.3,14.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-03, 308,2.2,14.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-04, 309,2.1,13.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-05, 310,1.9,13.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-06, 311,1.8,13.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-07, 312,1.7,13.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-08, 313,1.6,13.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-09, 314,1.4,12.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-10, 315,1.3,12.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-11, 316,1.2,12.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-12, 317,1.0,12.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-13, 318,0.9,11.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-14, 319,0.7,11.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-15, 320,0.6,11.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-16, 321,0.4,11.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-17, 322,0.3,11.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-18, 323,0.1,10.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-19, 324,-0.1,10.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-20, 325,-0.2,10.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-21, 326,-0.4,10.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-22, 327,-0.6,9.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-23, 328,-0.7,9.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-24, 329,-0.9,9.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-25, 330,-1.1,9.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-26, 331,-1.3,8.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-27, 332,-1.4,8.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-28, 333,-1.7,8.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-29, 334,-1.8,8.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,11-30, 335,-2.0,7.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-01, 336,-2.2,7.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-02, 337,-2.4,7.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-03, 338,-2.6,7.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-04, 339,-2.8,7.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-05, 340,-2.9,6.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-06, 341,-3.2,6.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-07, 342,-3.3,6.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-08, 343,-3.5,6.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-09, 344,-3.7,6.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-10, 345,-3.9,5.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-11, 346,-4.1,5.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-12, 347,-4.2,5.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-13, 348,-4.4,5.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-14, 349,-4.6,5.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-15, 350,-4.7,4.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-16, 351,-4.9,4.7 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-17, 352,-5.1,4.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-18, 353,-5.2,4.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-19, 354,-5.3,4.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-20, 355,-5.4,4.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-21, 356,-5.6,3.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-22, 357,-5.7,3.8 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-23, 358,-5.8,3.6 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-24, 359,-6.0,3.5 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-25, 360,-6.1,3.4 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-26, 361,-6.2,3.3 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-27, 362,-6.3,3.2 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-28, 363,-6.4,3.1 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-29, 364,-6.5,3.0 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-30, 365,-6.6,2.9 +USC00360785,40.3844,-76.0339,106.7,BLUE MARSH LAKE,PA,12-31, 366,-6.7,2.8
--- a/test-data/output.pdf Tue Feb 13 13:47:32 2018 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -1 0 obj -<< -/Creator (R) ->> -endobj -2 0 obj -<< /Type /Catalog /Pages 3 0 R >> -endobj -7 0 obj -<< /Type /Page /Parent 3 0 R /Contents 8 0 R /Resources 4 0 R >> -endobj -3 0 obj -<< /Type /Pages /Kids [ 7 0 R ] /Count 1 /MediaBox [0 0 1440 1440] >> -endobj -4 0 obj -<< -/ProcSet [/PDF /Text] -/Font <</F2 10 0 R /F3 11 0 R >> -/ExtGState << >> -/ColorSpace << /sRGB 5 0 R >> ->> -endobj -5 0 obj -[/ICCBased 6 0 R] -endobj -9 0 obj -<< -/Type /Encoding /BaseEncoding /WinAnsiEncoding -/Differences [ 45/minus 96/quoteleft -144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent -/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space] ->> -endobj -10 0 obj -<< /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica -/Encoding 9 0 R >> -endobj -11 0 obj -<< /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Helvetica-Bold -/Encoding 9 0 R >> -endobj -trailer -<< /Size 12 /Info 1 0 R /Root 2 0 R >> -startxref -%%EOF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_combined1.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,1 @@ +"LATITUDE","LONGITUDE","DATE","DOY","TMIN","TMAX","DAYLEN","YOUNGNYMPH","YOUNGNYMPHSE","PRE-VITADULT","PRE-VITADULTSE"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_combined2.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,1 @@ +"LATITUDE","LONGITUDE","DATE","DOY","TMIN","TMAX","DAYLEN","EGG","EGGSE","TOTALNYMPH","TOTALNYMPHSE","TOTALADULT","TOTALADULTSE"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_combined3.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,1 @@ +"LATITUDE","LONGITUDE","DATE","DOY","TMIN","TMAX","DAYLEN","OLDNYMPH","OLDNYMPHSE"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_combined4.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,1 @@ +"LATITUDE","LONGITUDE","DATE","DOY","TMIN","TMAX","DAYLEN","EGG","EGGSE","TOTALNYMPH","TOTALNYMPHSE","TOTALADULT","TOTALADULTSE"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_f1_3.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,1 @@ +"LATITUDE","LONGITUDE","DATE","DOY","TMIN","TMAX","DAYLEN","OLDNYMPH-F1","OLDNYMPH-F1-SE"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_f1_4.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,1 @@ +"LATITUDE","LONGITUDE","DATE","DOY","TMIN","TMAX","DAYLEN","EGG-F1","EGG-F1-SE","TOTALNYMPH-F1","TOTALNYMPH-F1-SE","TOTALADULT-F1","TOTALADULT-F1-SE"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_f2_3.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,1 @@ +"LATITUDE","LONGITUDE","DATE","DOY","TMIN","TMAX","DAYLEN","OLDNYMPH-F2","OLDNYMPH-F2-SE"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_f2_4.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,1 @@ +"LATITUDE","LONGITUDE","DATE","DOY","TMIN","TMAX","DAYLEN","EGG-F2","EGG-F2-SE","TOTALNYMPH-F2","TOTALNYMPH-F2-SE","TOTALADULT-F2","TOTALADULT-F2-SE"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_p_3.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,1 @@ +"LATITUDE","LONGITUDE","DATE","DOY","TMIN","TMAX","DAYLEN","OLDNYMPH-P","OLDNYMPH-P-SE"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output_p_4.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,1 @@ +"LATITUDE","LONGITUDE","DATE","DOY","TMIN","TMAX","DAYLEN","EGG-P","EGG-P-SE","TOTALNYMPH-P","TOTALNYMPH-P-SE","TOTALADULT-P","TOTALADULT-P-SE"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/plot.pdf Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,49 @@ +%PDF-1.4 +1 0 obj +/CreationDate +/ModDate +/Title (R Graphics Output) +/Producer +/Creator (R) +endobj +2 0 obj +<< /Type /Catalog /Pages 3 0 R >> +endobj +7 0 obj +<< /Type /Page /Parent 3 0 R /Contents 8 0 R /Resources 4 0 R >> +endobj +3 0 obj +<< /Type /Pages /Kids [ 7 0 R ] /Count 1 /MediaBox [0 0 1440 2160] >> +endobj +4 0 obj +<< +/ProcSet [/PDF /Text] +/Font <</F2 10 0 R /F3 11 0 R /F4 12 0 R >> +/ExtGState << >> +/ColorSpace << /sRGB 5 0 R >> +>> +endobj +5 0 obj +[/ICCBased 6 0 R] +endobj +9 0 obj +<< +/Type /Encoding /BaseEncoding /WinAnsiEncoding +/Differences [ 45/minus 96/quoteleft +144/dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent +/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space] +>> +endobj +10 0 obj +<< /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica +/Encoding 9 0 R >> +endobj +11 0 obj +<< /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Helvetica-Bold +/Encoding 9 0 R >> +endobj +12 0 obj +<< /Type /Font /Subtype /Type1 /Name /F4 /BaseFont /Helvetica-Oblique +/Encoding 9 0 R >> +endobj +%%EOF
--- a/test-data/state_college.csv Tue Feb 13 13:47:32 2018 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,184 +0,0 @@ -LATITUDE,LONGITUDE,DATE,DOY,TMIN,TMAX - 40.81849,-77.84637,2017-04-01,091,3.30,7.66 - 40.81849,-77.84637,2017-04-02,092,1.69,15.19 - 40.81849,-77.84637,2017-04-03,093,3.48,18.81 - 40.81849,-77.84637,2017-04-04,094,9.28,18.75 - 40.81849,-77.84637,2017-04-05,095,8.14,19.01 - 40.81849,-77.84637,2017-04-06,096,4.59,12.02 - 40.81849,-77.84637,2017-04-07,097,1.19,3.66 - 40.81849,-77.84637,2017-04-08,098,-0.56,13.85 - 40.81849,-77.84637,2017-04-09,099,-2.32,21.96 - 40.81849,-77.84637,2017-04-10,100,7.90,26.25 - 40.81849,-77.84637,2017-04-11,101,9.25,26.48 - 40.81849,-77.84637,2017-04-12,102,8.95,19.78 - 40.81849,-77.84637,2017-04-13,103,4.00,15.47 - 40.81849,-77.84637,2017-04-14,104,5.09,20.10 - 40.81849,-77.84637,2017-04-15,105,8.44,25.02 - 40.81849,-77.84637,2017-04-16,106,14.13,26.54 - 40.81849,-77.84637,2017-04-17,107,8.23,20.59 - 40.81849,-77.84637,2017-04-18,108,3.27,20.96 - 40.81849,-77.84637,2017-04-19,109,9.76,13.40 - 40.81849,-77.84637,2017-04-20,110,10.70,25.45 - 40.81849,-77.84637,2017-04-21,111,11.74,22.34 - 40.81849,-77.84637,2017-04-22,112,4.90,13.43 - 40.81849,-77.84637,2017-04-23,113,0.43,20.16 - 40.81849,-77.84637,2017-04-24,114,1.21,17.18 - 40.81849,-77.84637,2017-04-25,115,9.93,14.30 - 40.81849,-77.84637,2017-04-26,116,11.38,23.36 - 40.81849,-77.84637,2017-04-27,117,12.42,23.94 - 40.81849,-77.84637,2017-04-28,118,11.79,25.11 - 40.81849,-77.84637,2017-04-29,119,11.14,24.38 - 40.81849,-77.84637,2017-04-30,120,12.08,25.29 - 40.81849,-77.84637,2017-05-01,121,13.37,25.43 - 40.81849,-77.84637,2017-05-02,122,10.78,15.74 - 40.81849,-77.84637,2017-05-03,123,5.09,16.41 - 40.81849,-77.84637,2017-05-04,124,4.07,14.99 - 40.81849,-77.84637,2017-05-05,125,8.04,17.02 - 40.81849,-77.84637,2017-05-06,126,5.92,12.78 - 40.81849,-77.84637,2017-05-07,127,2.90,12.05 - 40.81849,-77.84637,2017-05-08,128,1.22,13.07 - 40.81849,-77.84637,2017-05-09,129,-1.45,17.87 - 40.81849,-77.84637,2017-05-10,130,5.94,19.31 - 40.81849,-77.84637,2017-05-11,131,7.90,11.11 - 40.81849,-77.84637,2017-05-12,132,8.75,12.95 - 40.81849,-77.84637,2017-05-13,133,5.68,14.39 - 40.81849,-77.84637,2017-05-14,134,5.94,19.81 - 40.81849,-77.84637,2017-05-15,135,7.37,22.14 - 40.81849,-77.84637,2017-05-16,136,5.18,26.96 - 40.81849,-77.84637,2017-05-17,137,11.12,31.63 - 40.81849,-77.84637,2017-05-18,138,15.39,32.05 - 40.81849,-77.84637,2017-05-19,139,13.92,29.51 - 40.81849,-77.84637,2017-05-20,140,9.38,13.55 - 40.81849,-77.84637,2017-05-21,141,12.60,17.19 - 40.81849,-77.84637,2017-05-22,142,10.93,23.45 - 40.81849,-77.84637,2017-05-23,143,6.24,21.30 - 40.81849,-77.84637,2017-05-24,144,10.97,21.61 - 40.81849,-77.84637,2017-05-25,145,11.91,18.55 - 40.81849,-77.84637,2017-05-26,146,13.00,19.09 - 40.81849,-77.84637,2017-05-27,147,9.28,22.35 - 40.81849,-77.84637,2017-05-28,148,13.02,19.25 - 40.81849,-77.84637,2017-05-29,149,15.61,25.52 - 40.81849,-77.84637,2017-05-30,150,14.89,20.32 - 40.81849,-77.84637,2017-05-31,151,12.29,24.32 - 40.81849,-77.84637,2017-06-01,152,9.02,22.91 - 40.81849,-77.84637,2017-06-02,153,10.83,22.70 - 40.81849,-77.84637,2017-06-03,154,10.01,25.36 - 40.81849,-77.84637,2017-06-04,155,8.05,16.85 - 40.81849,-77.84637,2017-06-05,156,14.04,23.52 - 40.81849,-77.84637,2017-06-06,157,13.20,21.63 - 40.81849,-77.84637,2017-06-07,158,9.99,17.12 - 40.81849,-77.84637,2017-06-08,159,9.42,23.51 - 40.81849,-77.84637,2017-06-09,160,10.71,25.54 - 40.81849,-77.84637,2017-06-10,161,15.90,29.01 - 40.81849,-77.84637,2017-06-11,162,15.11,31.46 - 40.81849,-77.84637,2017-06-12,163,15.59,31.82 - 40.81849,-77.84637,2017-06-13,164,18.19,34.21 - 40.81849,-77.84637,2017-06-14,165,19.55,29.87 - 40.81849,-77.84637,2017-06-15,166,17.02,27.22 - 40.81849,-77.84637,2017-06-16,167,17.59,26.76 - 40.81849,-77.84637,2017-06-17,168,17.43,29.03 - 40.81849,-77.84637,2017-06-18,169,20.91,31.44 - 40.81849,-77.84637,2017-06-19,170,17.51,24.38 - 40.81849,-77.84637,2017-06-20,171,14.80,25.74 - 40.81849,-77.84637,2017-06-21,172,13.97,26.99 - 40.81849,-77.84637,2017-06-22,173,12.72,29.78 - 40.81849,-77.84637,2017-06-23,174,19.03,25.44 - 40.81849,-77.84637,2017-06-24,175,15.76,27.33 - 40.81849,-77.84637,2017-06-25,176,12.89,24.84 - 40.81849,-77.84637,2017-06-26,177,9.91,23.03 - 40.81849,-77.84637,2017-06-27,178,10.84,20.57 - 40.81849,-77.84637,2017-06-28,179,8.10,25.23 - 40.81849,-77.84637,2017-06-29,180,14.48,29.26 - 40.81849,-77.84637,2017-06-30,181,19.94,30.59 - 40.81849,-77.84637,2017-07-01,182,20.79,29.10 - 40.81849,-77.84637,2017-07-02,183,17.01,29.60 - 40.81849,-77.84637,2017-07-03,184,17.01,29.60 - 40.81849,-77.84637,2017-07-04,185,20.43,23.44 - 40.81849,-77.84637,2017-07-05,186,20.43,23.44 - 40.81849,-77.84637,2017-07-06,187,19.56,22.32 - 40.81849,-77.84637,2017-07-07,188,19.35,28.04 - 40.81849,-77.84637,2017-07-08,189,15.93,25.53 - 40.81849,-77.84637,2017-07-09,190,11.83,26.33 - 40.81849,-77.84637,2017-07-10,191,12.38,27.23 - 40.81849,-77.84637,2017-07-11,192,17.98,28.99 - 40.81849,-77.84637,2017-07-12,193,21.06,29.84 - 40.81849,-77.84637,2017-07-13,194,21.07,28.19 - 40.81849,-77.84637,2017-07-14,195,19.22,28.46 - 40.81849,-77.84637,2017-07-15,196,16.50,24.54 - 40.81849,-77.84637,2017-07-16,197,14.44,28.05 - 40.81849,-77.84637,2017-07-17,198,17.26,30.80 - 40.81849,-77.84637,2017-07-18,199,17.44,31.69 - 40.81849,-77.84637,2017-07-19,200,16.67,32.40 - 40.81849,-77.84637,2017-07-20,201,19.12,32.13 - 40.81849,-77.84637,2017-07-21,202,20.94,31.43 - 40.81849,-77.84637,2017-07-22,203,19.30,28.36 - 40.81849,-77.84637,2017-07-23,204,20.25,30.59 - 40.81849,-77.84637,2017-07-24,205,18.56,28.17 - 40.81849,-77.84637,2017-07-25,206,15.18,22.72 - 40.81849,-77.84637,2017-07-26,207,12.03,26.34 - 40.81849,-77.84637,2017-07-27,208,16.35,29.74 - 40.81849,-77.84637,2017-07-28,209,16.35,26.24 - 40.81849,-77.84637,2017-07-29,210,11.05,23.78 - 40.81849,-77.84637,2017-07-30,211,7.73,28.01 - 40.81849,-77.84637,2017-07-31,212,13.66,30.13 - 40.81849,-77.84637,2017-08-01,213,15.11,30.81 - 40.81849,-77.84637,2017-08-02,214,16.56,30.22 - 40.81849,-77.84637,2017-08-03,215,15.69,28.57 - 40.81849,-77.84637,2017-08-04,216,16.07,30.48 - 40.81849,-77.84637,2017-08-05,217,12.30,23.46 - 40.81849,-77.84637,2017-08-06,218,11.46,23.44 - 40.81849,-77.84637,2017-08-07,219,15.40,18.35 - 40.81849,-77.84637,2017-08-08,220,12.19,25.48 - 40.81849,-77.84637,2017-08-09,221,9.23,26.69 - 40.81849,-77.84637,2017-08-10,222,9.53,25.78 - 40.81849,-77.84637,2017-08-11,223,16.54,26.25 - 40.81849,-77.84637,2017-08-12,224,16.29,26.87 - 40.81849,-77.84637,2017-08-13,225,14.17,26.51 - 40.81849,-77.84637,2017-08-14,226,13.98,22.43 - 40.81849,-77.84637,2017-08-15,227,17.69,28.88 - 40.81849,-77.84637,2017-08-16,228,14.84,29.43 - 40.81849,-77.84637,2017-08-17,229,13.40,29.96 - 40.81849,-77.84637,2017-08-18,230,19.42,29.00 - 40.81849,-77.84637,2017-08-19,231,14.40,28.28 - 40.81849,-77.84637,2017-08-20,232,12.31,27.77 - 40.81849,-77.84637,2017-08-21,233,14.27,30.25 - 40.81849,-77.84637,2017-08-22,234,18.44,31.05 - 40.81849,-77.84637,2017-08-23,235,14.22,24.64 - 40.81849,-77.84637,2017-08-24,236,10.30,23.00 - 40.81849,-77.84637,2017-08-25,237,12.57,21.39 - 40.81849,-77.84637,2017-08-26,238,10.93,23.29 - 40.81849,-77.84637,2017-08-27,239,9.96,23.45 - 40.81849,-77.84637,2017-08-28,240,9.26,22.38 - 40.81849,-77.84637,2017-08-29,241,13.80,19.09 - 40.81849,-77.84637,2017-08-30,242,10.88,24.45 - 40.81849,-77.84637,2017-08-31,243,13.15,24.42 - 40.81849,-77.84637,2017-09-01,244,7.82,17.91 - 40.81849,-77.84637,2017-09-02,245,6.20,13.16 - 40.81849,-77.84637,2017-09-03,246,12.37,19.35 - 40.81849,-77.84637,2017-09-04,247,10.67,26.97 - 40.81849,-77.84637,2017-09-05,248,15.39,21.54 - 40.81849,-77.84637,2017-09-06,249,13.80,18.10 - 40.81849,-77.84637,2017-09-07,250,9.30,18.45 - 40.81849,-77.84637,2017-09-08,251,8.86,18.11 - 40.81849,-77.84637,2017-09-09,252,8.44,18.21 - 40.81849,-77.84637,2017-09-10,253,3.93,9.19 - 40.81849,-77.84637,2017-09-11,254,4.98,22.12 - 40.81849,-77.84637,2017-09-12,255,8.70,24.06 - 40.81849,-77.84637,2017-09-13,256,12.75,23.14 - 40.81849,-77.84637,2017-09-14,257,16.60,19.18 - 40.81849,-77.84637,2017-09-15,258,14.89,25.28 - 40.81849,-77.84637,2017-09-16,259,14.73,25.42 - 40.81849,-77.84637,2017-09-17,260,14.85,27.42 - 40.81849,-77.84637,2017-09-18,261,16.12,26.18 - 40.81849,-77.84637,2017-09-19,262,13.36,25.46 - 40.81849,-77.84637,2017-09-20,263,10.90,28.76 - 40.81849,-77.84637,2017-09-21,264,11.68,28.44 - 40.81849,-77.84637,2017-09-22,265,13.10,29.03 - 40.81849,-77.84637,2017-09-23,266,10.11,30.51 - 40.81849,-77.84637,2017-09-24,267,12.33,31.11 - 40.81849,-77.84637,2017-09-25,268,15.03,31.81 - 40.81849,-77.84637,2017-09-26,269,16.01,30.96 - 40.81849,-77.84637,2017-09-27,270,15.03,31.27 - 40.81849,-77.84637,2017-09-28,271,9.61,21.39 - 40.81849,-77.84637,2017-09-29,272,6.03,20.71 - 40.81849,-77.84637,2017-09-30,273,2.85,15.23
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/state_college_partial.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,184 @@ +LATITUDE,LONGITUDE,DATE,DOY,TMIN,TMAX + 40.81849,-77.84637,2017-04-01,091,3.30,7.66 + 40.81849,-77.84637,2017-04-02,092,1.69,15.19 + 40.81849,-77.84637,2017-04-03,093,3.48,18.81 + 40.81849,-77.84637,2017-04-04,094,9.28,18.75 + 40.81849,-77.84637,2017-04-05,095,8.14,19.01 + 40.81849,-77.84637,2017-04-06,096,4.59,12.02 + 40.81849,-77.84637,2017-04-07,097,1.19,3.66 + 40.81849,-77.84637,2017-04-08,098,-0.56,13.85 + 40.81849,-77.84637,2017-04-09,099,-2.32,21.96 + 40.81849,-77.84637,2017-04-10,100,7.90,26.25 + 40.81849,-77.84637,2017-04-11,101,9.25,26.48 + 40.81849,-77.84637,2017-04-12,102,8.95,19.78 + 40.81849,-77.84637,2017-04-13,103,4.00,15.47 + 40.81849,-77.84637,2017-04-14,104,5.09,20.10 + 40.81849,-77.84637,2017-04-15,105,8.44,25.02 + 40.81849,-77.84637,2017-04-16,106,14.13,26.54 + 40.81849,-77.84637,2017-04-17,107,8.23,20.59 + 40.81849,-77.84637,2017-04-18,108,3.27,20.96 + 40.81849,-77.84637,2017-04-19,109,9.76,13.40 + 40.81849,-77.84637,2017-04-20,110,10.70,25.45 + 40.81849,-77.84637,2017-04-21,111,11.74,22.34 + 40.81849,-77.84637,2017-04-22,112,4.90,13.43 + 40.81849,-77.84637,2017-04-23,113,0.43,20.16 + 40.81849,-77.84637,2017-04-24,114,1.21,17.18 + 40.81849,-77.84637,2017-04-25,115,9.93,14.30 + 40.81849,-77.84637,2017-04-26,116,11.38,23.36 + 40.81849,-77.84637,2017-04-27,117,12.42,23.94 + 40.81849,-77.84637,2017-04-28,118,11.79,25.11 + 40.81849,-77.84637,2017-04-29,119,11.14,24.38 + 40.81849,-77.84637,2017-04-30,120,12.08,25.29 + 40.81849,-77.84637,2017-05-01,121,13.37,25.43 + 40.81849,-77.84637,2017-05-02,122,10.78,15.74 + 40.81849,-77.84637,2017-05-03,123,5.09,16.41 + 40.81849,-77.84637,2017-05-04,124,4.07,14.99 + 40.81849,-77.84637,2017-05-05,125,8.04,17.02 + 40.81849,-77.84637,2017-05-06,126,5.92,12.78 + 40.81849,-77.84637,2017-05-07,127,2.90,12.05 + 40.81849,-77.84637,2017-05-08,128,1.22,13.07 + 40.81849,-77.84637,2017-05-09,129,-1.45,17.87 + 40.81849,-77.84637,2017-05-10,130,5.94,19.31 + 40.81849,-77.84637,2017-05-11,131,7.90,11.11 + 40.81849,-77.84637,2017-05-12,132,8.75,12.95 + 40.81849,-77.84637,2017-05-13,133,5.68,14.39 + 40.81849,-77.84637,2017-05-14,134,5.94,19.81 + 40.81849,-77.84637,2017-05-15,135,7.37,22.14 + 40.81849,-77.84637,2017-05-16,136,5.18,26.96 + 40.81849,-77.84637,2017-05-17,137,11.12,31.63 + 40.81849,-77.84637,2017-05-18,138,15.39,32.05 + 40.81849,-77.84637,2017-05-19,139,13.92,29.51 + 40.81849,-77.84637,2017-05-20,140,9.38,13.55 + 40.81849,-77.84637,2017-05-21,141,12.60,17.19 + 40.81849,-77.84637,2017-05-22,142,10.93,23.45 + 40.81849,-77.84637,2017-05-23,143,6.24,21.30 + 40.81849,-77.84637,2017-05-24,144,10.97,21.61 + 40.81849,-77.84637,2017-05-25,145,11.91,18.55 + 40.81849,-77.84637,2017-05-26,146,13.00,19.09 + 40.81849,-77.84637,2017-05-27,147,9.28,22.35 + 40.81849,-77.84637,2017-05-28,148,13.02,19.25 + 40.81849,-77.84637,2017-05-29,149,15.61,25.52 + 40.81849,-77.84637,2017-05-30,150,14.89,20.32 + 40.81849,-77.84637,2017-05-31,151,12.29,24.32 + 40.81849,-77.84637,2017-06-01,152,9.02,22.91 + 40.81849,-77.84637,2017-06-02,153,10.83,22.70 + 40.81849,-77.84637,2017-06-03,154,10.01,25.36 + 40.81849,-77.84637,2017-06-04,155,8.05,16.85 + 40.81849,-77.84637,2017-06-05,156,14.04,23.52 + 40.81849,-77.84637,2017-06-06,157,13.20,21.63 + 40.81849,-77.84637,2017-06-07,158,9.99,17.12 + 40.81849,-77.84637,2017-06-08,159,9.42,23.51 + 40.81849,-77.84637,2017-06-09,160,10.71,25.54 + 40.81849,-77.84637,2017-06-10,161,15.90,29.01 + 40.81849,-77.84637,2017-06-11,162,15.11,31.46 + 40.81849,-77.84637,2017-06-12,163,15.59,31.82 + 40.81849,-77.84637,2017-06-13,164,18.19,34.21 + 40.81849,-77.84637,2017-06-14,165,19.55,29.87 + 40.81849,-77.84637,2017-06-15,166,17.02,27.22 + 40.81849,-77.84637,2017-06-16,167,17.59,26.76 + 40.81849,-77.84637,2017-06-17,168,17.43,29.03 + 40.81849,-77.84637,2017-06-18,169,20.91,31.44 + 40.81849,-77.84637,2017-06-19,170,17.51,24.38 + 40.81849,-77.84637,2017-06-20,171,14.80,25.74 + 40.81849,-77.84637,2017-06-21,172,13.97,26.99 + 40.81849,-77.84637,2017-06-22,173,12.72,29.78 + 40.81849,-77.84637,2017-06-23,174,19.03,25.44 + 40.81849,-77.84637,2017-06-24,175,15.76,27.33 + 40.81849,-77.84637,2017-06-25,176,12.89,24.84 + 40.81849,-77.84637,2017-06-26,177,9.91,23.03 + 40.81849,-77.84637,2017-06-27,178,10.84,20.57 + 40.81849,-77.84637,2017-06-28,179,8.10,25.23 + 40.81849,-77.84637,2017-06-29,180,14.48,29.26 + 40.81849,-77.84637,2017-06-30,181,19.94,30.59 + 40.81849,-77.84637,2017-07-01,182,20.79,29.10 + 40.81849,-77.84637,2017-07-02,183,17.01,29.60 + 40.81849,-77.84637,2017-07-03,184,17.01,29.60 + 40.81849,-77.84637,2017-07-04,185,20.43,23.44 + 40.81849,-77.84637,2017-07-05,186,20.43,23.44 + 40.81849,-77.84637,2017-07-06,187,19.56,22.32 + 40.81849,-77.84637,2017-07-07,188,19.35,28.04 + 40.81849,-77.84637,2017-07-08,189,15.93,25.53 + 40.81849,-77.84637,2017-07-09,190,11.83,26.33 + 40.81849,-77.84637,2017-07-10,191,12.38,27.23 + 40.81849,-77.84637,2017-07-11,192,17.98,28.99 + 40.81849,-77.84637,2017-07-12,193,21.06,29.84 + 40.81849,-77.84637,2017-07-13,194,21.07,28.19 + 40.81849,-77.84637,2017-07-14,195,19.22,28.46 + 40.81849,-77.84637,2017-07-15,196,16.50,24.54 + 40.81849,-77.84637,2017-07-16,197,14.44,28.05 + 40.81849,-77.84637,2017-07-17,198,17.26,30.80 + 40.81849,-77.84637,2017-07-18,199,17.44,31.69 + 40.81849,-77.84637,2017-07-19,200,16.67,32.40 + 40.81849,-77.84637,2017-07-20,201,19.12,32.13 + 40.81849,-77.84637,2017-07-21,202,20.94,31.43 + 40.81849,-77.84637,2017-07-22,203,19.30,28.36 + 40.81849,-77.84637,2017-07-23,204,20.25,30.59 + 40.81849,-77.84637,2017-07-24,205,18.56,28.17 + 40.81849,-77.84637,2017-07-25,206,15.18,22.72 + 40.81849,-77.84637,2017-07-26,207,12.03,26.34 + 40.81849,-77.84637,2017-07-27,208,16.35,29.74 + 40.81849,-77.84637,2017-07-28,209,16.35,26.24 + 40.81849,-77.84637,2017-07-29,210,11.05,23.78 + 40.81849,-77.84637,2017-07-30,211,7.73,28.01 + 40.81849,-77.84637,2017-07-31,212,13.66,30.13 + 40.81849,-77.84637,2017-08-01,213,15.11,30.81 + 40.81849,-77.84637,2017-08-02,214,16.56,30.22 + 40.81849,-77.84637,2017-08-03,215,15.69,28.57 + 40.81849,-77.84637,2017-08-04,216,16.07,30.48 + 40.81849,-77.84637,2017-08-05,217,12.30,23.46 + 40.81849,-77.84637,2017-08-06,218,11.46,23.44 + 40.81849,-77.84637,2017-08-07,219,15.40,18.35 + 40.81849,-77.84637,2017-08-08,220,12.19,25.48 + 40.81849,-77.84637,2017-08-09,221,9.23,26.69 + 40.81849,-77.84637,2017-08-10,222,9.53,25.78 + 40.81849,-77.84637,2017-08-11,223,16.54,26.25 + 40.81849,-77.84637,2017-08-12,224,16.29,26.87 + 40.81849,-77.84637,2017-08-13,225,14.17,26.51 + 40.81849,-77.84637,2017-08-14,226,13.98,22.43 + 40.81849,-77.84637,2017-08-15,227,17.69,28.88 + 40.81849,-77.84637,2017-08-16,228,14.84,29.43 + 40.81849,-77.84637,2017-08-17,229,13.40,29.96 + 40.81849,-77.84637,2017-08-18,230,19.42,29.00 + 40.81849,-77.84637,2017-08-19,231,14.40,28.28 + 40.81849,-77.84637,2017-08-20,232,12.31,27.77 + 40.81849,-77.84637,2017-08-21,233,14.27,30.25 + 40.81849,-77.84637,2017-08-22,234,18.44,31.05 + 40.81849,-77.84637,2017-08-23,235,14.22,24.64 + 40.81849,-77.84637,2017-08-24,236,10.30,23.00 + 40.81849,-77.84637,2017-08-25,237,12.57,21.39 + 40.81849,-77.84637,2017-08-26,238,10.93,23.29 + 40.81849,-77.84637,2017-08-27,239,9.96,23.45 + 40.81849,-77.84637,2017-08-28,240,9.26,22.38 + 40.81849,-77.84637,2017-08-29,241,13.80,19.09 + 40.81849,-77.84637,2017-08-30,242,10.88,24.45 + 40.81849,-77.84637,2017-08-31,243,13.15,24.42 + 40.81849,-77.84637,2017-09-01,244,7.82,17.91 + 40.81849,-77.84637,2017-09-02,245,6.20,13.16 + 40.81849,-77.84637,2017-09-03,246,12.37,19.35 + 40.81849,-77.84637,2017-09-04,247,10.67,26.97 + 40.81849,-77.84637,2017-09-05,248,15.39,21.54 + 40.81849,-77.84637,2017-09-06,249,13.80,18.10 + 40.81849,-77.84637,2017-09-07,250,9.30,18.45 + 40.81849,-77.84637,2017-09-08,251,8.86,18.11 + 40.81849,-77.84637,2017-09-09,252,8.44,18.21 + 40.81849,-77.84637,2017-09-10,253,3.93,9.19 + 40.81849,-77.84637,2017-09-11,254,4.98,22.12 + 40.81849,-77.84637,2017-09-12,255,8.70,24.06 + 40.81849,-77.84637,2017-09-13,256,12.75,23.14 + 40.81849,-77.84637,2017-09-14,257,16.60,19.18 + 40.81849,-77.84637,2017-09-15,258,14.89,25.28 + 40.81849,-77.84637,2017-09-16,259,14.73,25.42 + 40.81849,-77.84637,2017-09-17,260,14.85,27.42 + 40.81849,-77.84637,2017-09-18,261,16.12,26.18 + 40.81849,-77.84637,2017-09-19,262,13.36,25.46 + 40.81849,-77.84637,2017-09-20,263,10.90,28.76 + 40.81849,-77.84637,2017-09-21,264,11.68,28.44 + 40.81849,-77.84637,2017-09-22,265,13.10,29.03 + 40.81849,-77.84637,2017-09-23,266,10.11,30.51 + 40.81849,-77.84637,2017-09-24,267,12.33,31.11 + 40.81849,-77.84637,2017-09-25,268,15.03,31.81 + 40.81849,-77.84637,2017-09-26,269,16.01,30.96 + 40.81849,-77.84637,2017-09-27,270,15.03,31.27 + 40.81849,-77.84637,2017-09-28,271,9.61,21.39 + 40.81849,-77.84637,2017-09-29,272,6.03,20.71 + 40.81849,-77.84637,2017-09-30,273,2.85,15.23
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/state_college_ytd.csv Tue May 29 09:00:25 2018 -0400 @@ -0,0 +1,100 @@ +LATITUDE,LONGITUDE,DATE,DOY,TMIN,TMAX + 40.80134,-77.86835,2018-01-01,001,-20.26,-9.74 + 40.80134,-77.86835,2018-01-02,002,-14.29,-8.32 + 40.80134,-77.86835,2018-01-03,003,-19.25,-3.36 + 40.80134,-77.86835,2018-01-04,004,-13.33,-6.89 + 40.80134,-77.86835,2018-01-05,005,-16.53,-12.07 + 40.80134,-77.86835,2018-01-06,006,-17.72,-12.55 + 40.80134,-77.86835,2018-01-07,007,-20.16,-6.60 + 40.80134,-77.86835,2018-01-08,008,-7.99,3.50 + 40.80134,-77.86835,2018-01-09,009,-5.41,3.07 + 40.80134,-77.86835,2018-01-10,010,-8.00,4.18 + 40.80134,-77.86835,2018-01-11,011,-0.20,12.67 + 40.80134,-77.86835,2018-01-12,012,2.38,16.38 + 40.80134,-77.86835,2018-01-13,013,-12.51,1.50 + 40.80134,-77.86835,2018-01-14,014,-16.12,-7.91 + 40.80134,-77.86835,2018-01-15,015,-16.65,-5.04 + 40.80134,-77.86835,2018-01-16,016,-6.14,-2.58 + 40.80134,-77.86835,2018-01-17,017,-14.44,-6.61 + 40.80134,-77.86835,2018-01-18,018,-12.40,-2.44 + 40.80134,-77.86835,2018-01-19,019,-4.40,5.32 + 40.80134,-77.86835,2018-01-20,020,0.72,8.64 + 40.80134,-77.86835,2018-01-21,021,3.06,6.34 + 40.80134,-77.86835,2018-01-22,022,3.09,8.95 + 40.80134,-77.86835,2018-01-23,023,2.35,9.01 + 40.80134,-77.86835,2018-01-24,024,-3.07,2.04 + 40.80134,-77.86835,2018-01-25,025,-6.44,-0.72 + 40.80134,-77.86835,2018-01-26,026,-9.51,5.99 + 40.80134,-77.86835,2018-01-27,027,-5.10,9.99 + 40.80134,-77.86835,2018-01-28,028,-1.03,8.57 + 40.80134,-77.86835,2018-01-29,029,-5.84,4.95 + 40.80134,-77.86835,2018-01-30,030,-9.58,-0.43 + 40.80134,-77.86835,2018-01-31,031,-11.68,-0.44 + 40.80134,-77.86835,2018-02-01,032,-1.10,8.19 + 40.80134,-77.86835,2018-02-02,033,-10.86,-0.76 + 40.80134,-77.86835,2018-02-03,034,-11.08,-1.19 + 40.80134,-77.86835,2018-02-04,035,-2.60,-0.23 + 40.80134,-77.86835,2018-02-05,036,-9.35,0.85 + 40.80134,-77.86835,2018-02-06,037,-7.56,-1.36 + 40.80134,-77.86835,2018-02-07,038,-5.10,0.79 + 40.80134,-77.86835,2018-02-08,039,-10.09,-3.75 + 40.80134,-77.86835,2018-02-09,040,-12.70,0.51 + 40.80134,-77.86835,2018-02-10,041,-2.88,5.99 + 40.80134,-77.86835,2018-02-11,042,0.76,6.80 + 40.80134,-77.86835,2018-02-12,043,-6.21,3.97 + 40.80134,-77.86835,2018-02-13,044,-10.04,2.79 + 40.80134,-77.86835,2018-02-14,045,0.30,8.46 + 40.80134,-77.86835,2018-02-15,046,3.36,18.49 + 40.80134,-77.86835,2018-02-16,047,-2.37,12.56 + 40.80134,-77.86835,2018-02-17,048,-7.41,0.46 + 40.80134,-77.86835,2018-02-18,049,-3.16,4.39 + 40.80134,-77.86835,2018-02-19,050,0.50,5.05 + 40.80134,-77.86835,2018-02-20,051,-0.80,22.58 + 40.80134,-77.86835,2018-02-21,052,7.72,23.23 + 40.80134,-77.86835,2018-02-22,053,0.74,6.89 + 40.80134,-77.86835,2018-02-23,054,2.28,5.92 + 40.80134,-77.86835,2018-02-24,055,4.33,6.73 + 40.80134,-77.86835,2018-02-25,056,6.11,11.69 + 40.80134,-77.86835,2018-02-26,057,-0.37,11.10 + 40.80134,-77.86835,2018-02-27,058,-4.11,13.17 + 40.80134,-77.86835,2018-02-28,059,-2.18,17.90 + 40.80134,-77.86835,2018-03-01,060,6.02,11.61 + 40.80134,-77.86835,2018-03-02,061,-1.03,3.00 + 40.80134,-77.86835,2018-03-03,062,-2.10,2.03 + 40.80134,-77.86835,2018-03-04,063,-3.50,5.08 + 40.80134,-77.86835,2018-03-05,064,-6.67,4.95 + 40.80134,-77.86835,2018-03-06,065,-7.71,3.54 + 40.80134,-77.86835,2018-03-07,066,-0.74,3.48 + 40.80134,-77.86835,2018-03-08,067,-3.88,0.31 + 40.80134,-77.86835,2018-03-09,068,-3.31,0.05 + 40.80134,-77.86835,2018-03-10,069,-5.00,2.10 + 40.80134,-77.86835,2018-03-11,070,-7.37,5.51 + 40.80134,-77.86835,2018-03-12,071,-4.72,1.93 + 40.80134,-77.86835,2018-03-13,072,-4.08,1.61 + 40.80134,-77.86835,2018-03-14,073,-4.61,-1.02 + 40.80134,-77.86835,2018-03-15,074,-3.90,2.32 + 40.80134,-77.86835,2018-03-16,075,-5.15,0.28 + 40.80134,-77.86835,2018-03-17,076,-7.89,6.63 + 40.80134,-77.86835,2018-03-18,077,-3.63,10.45 + 40.80134,-77.86835,2018-03-19,078,-4.49,8.01 + 40.80134,-77.86835,2018-03-20,079,-3.55,2.47 + 40.80134,-77.86835,2018-03-21,080,-3.44,1.55 + 40.80134,-77.86835,2018-03-22,081,-3.83,6.05 + 40.80134,-77.86835,2018-03-23,082,-2.85,4.62 + 40.80134,-77.86835,2018-03-24,083,-5.87,8.40 + 40.80134,-77.86835,2018-03-25,084,-7.32,5.64 + 40.80134,-77.86835,2018-03-26,085,-5.39,8.86 + 40.80134,-77.86835,2018-03-27,086,0.45,3.33 + 40.80134,-77.86835,2018-03-28,087,2.11,7.94 + 40.80134,-77.86835,2018-03-29,088,5.79,14.16 + 40.80134,-77.86835,2018-03-30,089,0.63,12.72 + 40.80134,-77.86835,2018-03-31,090,-3.31,14.13 + 40.80134,-77.86835,2018-04-01,091,3.20,10.54 + 40.80134,-77.86835,2018-04-02,092,-0.15,6.90 + 40.80134,-77.86835,2018-04-03,093,2.23,8.17 + 40.80134,-77.86835,2018-04-04,094,-0.87,11.30 + 40.80134,-77.86835,2018-04-05,095,-3.37,4.04 + 40.80134,-77.86835,2018-04-06,096,-2.22,13.64 + 40.80134,-77.86835,2018-04-07,097,-4.31,2.84 + 40.80134,-77.86835,2018-04-08,098,-6.89,2.72 + 40.80134,-77.86835,2018-04-09,099,-3.82,3.49