USEPA / useeior

Estimating potential environmental impacts of goods and services in the US economy
MIT License
33 stars 21 forks source link

Tweaks to support two region disaggregation #277

Closed bl-young closed 9 months ago

bl-young commented 9 months ago

Note failures are due to documentation issues present in linkstateiorImportF

jvendries commented 9 months ago

Regarding the validation failures from print2RvalidationResults for the 2R model GAEEIOv1.0-75-GHG-19:

There are several things at play that are likely the cause of the validation failures.


For the economic throughput failures:

image

This validation checks that total commodity output,

x = model$q (for commodity models),

is equal to

c = model$L_d * y,

where y is production demand (complete rather than domestic in the validation, by default). In this case, the sector that fails is 211/US-GA, and there are 2 issues:

A) c is negative. This is because the y vector used has a value of -2249548539 for this sector. This value is present in

model$DemandVectors$vectors$2019_US-GA_Production_Completefor 211/US-GA, whereasmodel$DemandVectors$vectors$2019_RoUS_Production_Complete for the same sector has a value of 0.

Additional inspection of the stateior model file and model build process is required to understand the exact source of this value. This is not the only commodity with a negative value in the final demand vector, but it is the only commodity with a negative value in c.

B) The total commodity value varies considerably when calculated by

rowSums(model$U) vs. colSums(model$V)

The first has a value of 1.629220e+09 (for both U and U_d), while the second has a value of 3.299345e+06. Also worth noting is that while there are other sectors for which commodity values vary depending on calculation method, none vary by this much (table shows rowSums(model$U)/colSums(model$V):

image


For the flow (LCI) failures: image

For sector 211/US-GA, failure happens for all LCI flows where the value is not equal to 0 (10 in total). I believe this is tied to the failure of c in the economic throughput validation, and propagates to the calculation of flows via the LCI validation calculation.

For the other sectors: the failures do not happen for all LCI flows where the value is not equal to 0; i.e., there are some sectors where some flows pass and other fail. It happens for some combination of these specific flows for each sector, (minimum 2, max 5 flow failures per sector):

image

I think that is this has something to do in the transformation from B to B_chi, as the latter matrix uses model$q to divide the flows from the former to transform from industry to commodity based matrix.

bl-young commented 9 months ago

thanks for the thorough review! For the demand vector in particular, I do wonder what is different in the disaggregated model because I believe the GA model for 2019 non-disaggregated passes the validation.