SPARROW VERSION 2.9 SUMMARY OF REVISIONS Updates since version 6 include: Version 9 sparrow_main.sas 10/25/07 - Modified macro clear_data to delete new data set model_parm_predict. This supports the corrections to the bootstrapping of confidence intervals (see modifications to sparrow_compile). 10/25/07 - Modified main macro: added the data set mean_delivery_vars to the list of data sets to be backed up. This facilitates the inclusion of mean_delivery_vars as a permanent SPARROW output data set. sparrow_predict.sas 09/12/07 - Modified the predict macro: Placed macro variable conditioning statements so that the matrix exclude list is set to 0 if &retrans_exclude_list is null. The checks placed in the function locin were not sufficient to handle the case where &retrans_exclude_list is null. sparrow_compile.sas 10/25/07 - Made a number of corrections to the confidence interval bootstrapping algorithm. The corrections make the program fully compatible with the documentation. Created the macro set_model_parm_predict that creates the data set model_parm_predict used to evaluate the numerator of the CI. According to the documentation, the numerator does not include mean_exp_weighted_error. The inclusion of this new data set allows the evaluation of the model component of the parametric prediction (that is, without the mean_exp_weighted_error adjustment) to be done once for all subsequent evaluations of the bootstrap confidence intervals (which are done separately by prediction variable). Modified the macro compile_ci_get_bounds to use the model_parm_predict data set rather than dir_rslt.predict as the source for the parametric predictions. Modified the macros compile_ci_set_storage and compile_ci_add_data by placing a negative sign before the randomly selected bootstrap model error term. This makes the bootstrap simulation of the necessary distribution consistent with the documentation. The change has little effect if the distribution of errors is approximately symmetric. sparrow_setdata.sas 10/25/07 - MOdified the macro mean_adjust_delivery_vars to save the mean_delivery_vars data set to the permanent results directory and use this data set except in cases where the a new estimation is requested. This modification was required because if if_estimate is no and model prediction includes only a subset of the reaches used in model estimation, then computing mean delivery variables from the subset of reaches makes the means inconsistent with the means that were used to estimate the model coefficients - resulting in biased predictions. Preprocesses Updated the image processing programs: aggregate_data_from_images.sas and allocate_data_to_ws_by_image.sas. Version 8 sparrow_main.sas 2/1/07 - Modified the main macro by adding the file boot_detail to the list of SAS files to be backed up at the beginning of a SPARROW prediction run. See notes for this date in sparrow_compile.sas for a description of the contents of this file. The creation of this file is presently undocumented, and will only be activated if code is modified in the sparrow_compile.sas file. 6/6/07 - Modified the main macro to include the file error_report in the backup function. sparrow_calibrate.sas 6/6/07 - Expanded the error message given when the file error_report is created. sparrow_compile.sas 2/1/07 - Modified macro compile_ci_set_storage and compile_ci_add_data to optionally output bootstrap iteration estimates for selected prediction variables and a subset of reaches, based on the specification of the undocumented control variables boot_detail_reaches and boot_detail_predvars specified at the top of the sparrow_compile.sas file. If detailed bootstrap output is requested (see comments above the boot_detail_reaches and boot_detail_predvars control variable specifications) SPARROW creates the file bood_detail in the results directory containing detailed bootstrap iteration output for selected reaches. These files can be used to create other output prediction variables, including large basin incremental delivered flux. Also added code at the end of the summarize_predict macro to reconfigure the boot_detail file so it has columns for individual prediction variables. Version 7 sparrow_main.sas 12/13/06 - Added statement in main macro to execute the macro make_nested_area (see setdata). This adds the variable nested station area to the station_data file. 12/13/06 - Added statement in main macro to execute the macro check_station_vars (see setdata). This macro checks to see if the station variables file has any missing values for critical station variables, such as the staid or ls_weight variables. The macro also notes, but does not error flag, if a monitored reach has no lat/lon, thereby causing the flux to be dropped from the map of station residuals. sparrow_calibrate.sas 11/20/06 - Modified call symput('flag_zero_load',trim(left(1))) ; to read: call symput('flag_zero_load',trim(left(char(1)))) ; This fixes an error that ocurred due to 1 being numeric. sparrow_setdata.sas 12/13/06 - Added the new macro make_nested_area which computes the nested area for each monitoring station and merges this variable in with the station_data file. 12/13/06 - Added the new macro check_station_vars. This macro checks to see if the station variables file has any missing values for critical station variables, such as the staid or ls_weight variables. The macro also notes, but does not error flag, if a monitored reach has no lat/lon, thereby causing the flux to be dropped from the map of station residuals.