RainfallNZ / CASM_Horizons

CASM data processing specific to Horizons
1 stars 0 forks source link

Intensive Farm Land Use missing horticulture. #5

Closed RainfallNZ closed 4 years ago

RainfallNZ commented 4 years ago

Bug found in the "ScenarioLeachRateRaster" function.
When identifying Intensive Farming Land Uses, the land use of Horticulture-Other and Horticulture-Veg were misclassified to "Veg" and "Other". This meant they were not included in the Intensive Farm Land Use areas, as this was looking for land classed as "Horticulture-Veg" and "Horticulture-Other".

RainfallNZ commented 4 years ago

Bug caused by incorrect parsing of the CombinedClassName's in the ZoneLanduseLUCCode_To_ClassLUT.csv file. The CombinedClassNames were originally created by joining the Zone Name, land uses and land use capability number with "-". The parsing back into their individual constituent parts was done by separating the combined names based on "-"'s. The land use names of "Horticulture-Veg" and "Horticulture-Other" failed to be parsed correctly because they have the "-" separator in their name. They ended up being parsed as "Veg" and "Other". The bug was corrected by altering the parsing to be the section of the combined name between the two outside "-"'s.
This bug means that all scenarios that had changes applied to just the Intensive Farm Land Use areas are in error.
The scenarios in error are:

RainfallNZ commented 4 years ago

When updating the scenario for the plans year 5 and 20 applied to IFLU, the Whai_4a water sub-management zone increased (whereas all others decreased).
This was checked in QGIS, and found to be a "Horticulture-Other" land use in the North Island-NorthWest climate region (region 6), PAW=120 without irrigation and not irrigable. So the MPI leach rate was set to 16.
The Existing Table 14.2 Year 5 level for land use capability 2 (which is what this land was on) is 25, and 21 for year 20.
The PC2 Table 14.2 year 5 and 20 values were 42 and 35 respectively.
So this is correctly an increase in loss rate. This was a very small area down the Whanganui River from Kirikau

For PC2 year 20 Mana_1a-Horticulture-Other-2 also had a small increase of 9.4 %. This was not investigated as it was assumed to be a similar situation as for Whai_4a.
For PC2 Year 5 DH9 and 18 reductions for unconsented, 7 sub-management-zone-horticulture-veg/other areas were positive.