PSU-CSAR / vb-bagis-p

VB .NET source code for ArcMap BAGIS Parameters add-in
1 stars 1 forks source link

Error encountered when exporting parameters #14

Closed lbross closed 8 years ago

lbross commented 8 years ago

See GitHub issue #13 for screenshots and template. I was able to export the parameters successfully with this template and my test aoi's. Please tell me where I can download the AOI that is having the problem.

jdduh commented 8 years ago

AOI posted on ftp://basins.geog.pdx.edu/BAGIS/

animas_AOI_prms_for_George.zip (61MB)

There are two HRU layers. Parameters were calculated on hru_prms_contiguous only. You can find exported .zip and the template (BAGIS_Parameters.csv) it used in the AOI's zones folder. The output parameter file doesn't contain some of the data that are in the input template. The nmonth table also wasn't created (maybe related to the JH_Coef mod?).

jdduh commented 8 years ago

Line number 243 of the template file points to the description of the nmonths table.

image

lbross commented 8 years ago

This is fixed except for a question about the nradpl table (issue #15). In older template versions, there was no field indicating the number of rows in a single dimension table (nhru, nmonths). To compensate for this, we looked up the value of the dimension that bound the table. The problem is if the user (or BAGIS-P) edit the value for a dimension, it no longer correctly indicates the number of rows in the table. This happened when BAGIS-P updated the nhru dimension during processing to reflect the number of hru's in the export. This corrupted the export because the template was not read-in correctly and several tables were missed.

The current version of the template includes an 'len' field in each table header indicating the number of rows. BAGIS-P was updated to use this field when reading in the template tables and also to include it on the export file.

lbross commented 8 years ago

New release posted under version 1.8.0

jdduh commented 8 years ago

One more bug related to the nhru number in the template. The nhru value in the template is 82. When I use the template on an HRU layer that has 213 polygons, the output table only has 82 hru record. It seems that BAGIS-P try to read another line from the template and failed (because it reached the end of the table?). I did get an error message, but the output was successfully created.

image

lbross commented 8 years ago

There was another problem when reading the nhru table from the template. Logic was added to truncate the read if the input number of hrus < template number of hrus. If the number of input hrus exceeds the template number of hrus, logic was added to duplicate the last row of the template hru table to create a line for each additional hru. This code is shared between the edit hru parameters button and the export button.

New release posted under 1.9.0.