US-EPA-CAMD / easey-ui

Project Management repo for EPA Clean Air Markets Division (CAMD) Business Suite of applications
MIT License
0 stars 0 forks source link

Default Parameter Code Valid Value Value Corrections #6403

Open djw4erg opened 1 month ago

djw4erg commented 1 month ago

Overview

The DTO check for valid Default Parameter Codes values excludes "SORX" (Maximum SO2 Emission Rate). The Monitor Default edit screens Parameter dropdown does not include "Maximum SO2 Emission Rate" (SORX). Both imports and the screen should allow the use of "SORX".

The DTO check for valid Default Parameter Codes values excludes "SORX" (Maximum SO2 Emission Rate) and includes "BWA" (Moisture Fraction in Ambient Air). Twenty-three instances of Default Parameter Code "SORX" currently exist with all beginning on January 1st, 2009. No instances of "BWA" exists and could only be entered through a screen in ECMPS 1.0. The purpose of this ticket is to update the DTO check to allow the import and entry of MP JSON that contains "SORX" Default Parameter Codes.

Background

Issues Found During Performance Testing

Changes

Make the following generic crosscheck changes to:

  1. Allow the DTO checking for valid Default Parameter Codes to include "SORX".
  2. Allow the creation, editing, and display of "SORX" defaults in the Monitor Default create/edit screen.
  3. Correct the creation, editing, and display of "BWA" defaults in the Monitor Default create/edit screen.
Id Name Value 1 Value 2
11 Parameter to Category SORX DEFAULT1
191 Parameter Code to Units of Measure Code for Defaults BWA PCT2
191 Parameter Code to Units of Measure Code for Defaults SORX LBMMBTU
192 Parameter Code to Purpose Code for Defaults BWA PM
192 Parameter Code to Purpose Code for Defaults SORX MD
193 Parameter Code to Fuel Code for Defaults BWA [see note]3
193 Parameter Code to Fuel Code for Defaults SORX PNG
193 Parameter Code to Fuel Code for Defaults SORX NFS
193 Parameter Code to Fuel Code for Defaults SORX DSL
194 Parameter Code to Source Code for Defaults BWA DATA
194 Parameter Code to Source Code for Defaults SORX DATA
194 Parameter Code to Source Code for Defaults SORX DEF

Notes:

  1. Update the existing "Parameter to Category" "SORX" Value 2 to "DEFAULT".
  2. CAPD confirmed (Support Meeting October 10th 2024) to use "PCT" (Percentage) as the UOM for BWA in ECMPS 2.0, Any changes to this will be handled by a subsequent discussion and ticket.
    • CAPD confirmed this in the October 10th 2024 ECMPS Support Meeting.
    • The ECMPS 2.0 Reporting Instructions may need to be updated to match this change.
  3. Add a line for each Fuel Code in the CAMDECMPSMD FUEL_CODE table.
    • CAPD confirmed this in the October 10th 2024 ECMPS Support Meeting.
    • The ECMPS 2.0 Reporting Instructions may need to be updated to match this change.
  4. Value 3 is null for each row.
  5. The changes will affect the data returned by CAMDECMPSMD.VW_DEFAULTS_MASTER_DATA_RELATIONSHIPS, which is used by the DTO checks and to populate the Monitor Default screen dropdowns.

Technical Information

Currently the DTO check for the Default Parameter Code uses the following to get a list of the valid parameter codes.

`SELECT distinct parameter_code as "value" FROM camdecmpsmd.vw_defaults_master_data_relationships

SELECT * FROM camdecmpsmd.vw_defaults_master_data_relationships

It returns "BWA" but does not return "SORX". "BWA" is not a Default Parameter Code in the ECMPS 1.0 XSD's DefaultParameterCodeType, but "SORX" is.

Additional Information

Locations with "SORX" Default Parameter Codes

ORIS Facility Locations
1913 Inver Hills 1, 2, 3, 4, 5, 6
4014 Wheaton Generating Plant 1, 2, 3, 4, 5, 6
10143 Colver Green Energy AAB01
djw4erg commented 1 month ago

Issues Found During Performance Testing

Additional issues were found during performance testing. Per 9/12/2024 performance testing meeting, documenting these issues here as part of this ticket research.

Example 1: The following types of import and evaluation errors are generated for ORIS 1913, 1 & 2.

Import:

image

Evaluate: These are related to inactive SORX default records (1/1/2009 - 12/31/2009).

image

Example 2: The following types of import and evaluation errors are generated for ORIS 4014, 2, 3 and 4.

Import:

image

Evaluate: These are related to inactive SORX default records (1/1/2009 - 12/31/2017).

image

Reply

This issue is not really an "inactive record" issue in my opinion. The failing DTO check seems to implement DEFAULT-47-B, but it should implement the Default Parameter Code Type from the ECMPS 1.0 MP XSD. That type definition includes "SORX" (Maximum SO2 Emission Rate). The definition includes all the default parameter codes allowed by the ECMPS 2.0 check except for "BWA" (Moisture Fraction in Ambient Air). Changing the DTO check to match the XSD Default Parameter Code Type will eliminate the problem for "SORX".

Note that the "SORX" appears to be a pre-ECMPS relic with all 23 instances starting on 1/1/2009.

Additionally we probably need to check with Charlie to determine whether reporting "BWA" (Moisture Fraction in Ambient Air) for Monitor Defaults is actually allowed.