scworland / restore-2018

scripts for predicting streamflow characteristics in ungaged basins for RESTORE
4 stars 2 forks source link

Inconsistency: Total NID storage and Total Normal Storage #18

Closed ghost closed 6 years ago

ghost commented 6 years ago

Inspection shows two gages with a total_nid_storage less than tot_norm_storage. I am computing a flood storage per square mile metric. For time being, I will just assume the two records got swapped accidently in original data entry but the numbers are correct. (CDA is log10 of contributing drainage area from NWIS.)

DD$flood_storage <- (DD$tot_nid_storage - DD$tot_norm_storage)/10^DD$CDA

DD[DD$flood_storage < 0,] 
two sites: 02295420 and 02296750

DD$flood_storage[DD$flood_storage < 0] <- (DD$tot_norm_storage[DD$flood_storage < 0] -
                                            DD$tot_nid_storage[DD$flood_storage < 0]) /
                                                     10^DD$CDA[DD$flood_storage < 0]
scworland commented 6 years ago

If they were swapped it was not on my end (I pulled the data directly from here: https://www.sciencebase.gov/catalog/item/58c301f2e4b0f37a93ed915a). The definitions from NID:

  1. (Acre-Feet, Number) Calculated field: Maximum value of normal storage and maximum storage. Accepted as the general storage of the dam.

  2. (Acre-Feet, Number) Normal storage, in acre-feet, which is defined as the total storage space in a reservoir below the normal retention level, including dead and inactive storage and excluding any flood control or surcharge storage. For normally dry flood control dams, the normal storage will be a zero value. If unknown, the value will be blank and not zero.

I don't really know what that means.

ghost commented 6 years ago

I understand the definitions having worked with the NID circa 1999. Easiest it to assume that some clerk back in the day populating NID at some point swapped some numbers. It a single major dam is the core source of storage, then a simple one time mistake is quite possible. I did not expect it to have a source in any coding logic of yours.

scworland commented 6 years ago

Well, assuming it is my mistake is often fairly safe 😜 !

Should I make the change in the all_gage_data.feather file? You might want to run your same test on the all_huc12_covariates.feather (https://github.com/scworland-usgs/restore-2018/tree/master/data/huc12) file as well.

ghost commented 6 years ago

No we stand pat for now but as part of modeling building, at least my script must trap the issue.

scworland commented 6 years ago

For the regionalizations that I am doing I want to make sure the covariates are correct to help identify parameters. If you are fairly confident there is a mistake, I should probably change the master file.

ghost commented 6 years ago

Problem with both sites is that the number of dams is kind of nonzero (consulting tot_major tot_ndams), so a mistake of a swap for a single dam record in the NID is not likely. So the question is how the original aggregation of the NID worked in NHD+ For the record, I have consulted the station manuscripts of the USGS and no relevant information is therein.