CEMPD / SMOKE

Create emissions inputs for multiple air quality modeling systems with unmatched speed and flexibility
https://www.cmascenter.org/smoke/
49 stars 22 forks source link

Gentpro issue for areas without Daylight Saving Time #92

Closed callen52 closed 6 months ago

callen52 commented 9 months ago

When processing meteorological data with Gentpro (PROFILE_METHOD = MET, although it's possible this affects other modes), I have found that the switch to and from Daylight Saving Time is not handled properly in states where DST is not observed, e.g. Arizona. The attached zip contains an example script, log, COSTCY (in which Arizona does not follow DST), and output ATPRO_DAILY. If you extract an Arizona county (e.g. 004013) from the ATPRO_DAILY result, you should see that the temperature value on March 12 is anomalously high (26°C, compared to surrounding dates which are around 15°C), and the temperature value on November 4 is anomalously low (-0.3°C, compared to surrounding dates which are around 15°C). Meteorological conditions from those days confirm that these numbers are wrong. States which follow DST are calculated correctly.

gentpro_test_for_github.zip

hnqtran commented 9 months ago

Some updates:

C..................  add first hour=1 value to previous daily total as
C                    DST adjustment for a proper Temporal processing.
                 IF( HOURIDX == 1 .AND. DST == -10000 ) THEN
                     DAYSRC( S,NDAY ) = DAYSRC( S,NDAY ) + HRLSRC( S,T )
                     PT = DT( S ) - 23
                     TOTSRC( S,PT:T-1,1 ) = DAYSRC( S,NDAY )
                END IF

                IF( HOURIDX == 24 .AND. DST ==  10000 ) THEN
                    TMPDSRC( S ) = TMPDSRC( S ) - HRLSRC( S,T )  ! skip one hour value
                END IF

In the above code lines, when DST started (DST == -10000), it caused the time processing loop skipping once (i.e., local time index HOURIDX (varying between 1 -24) skipped from 18 to 20 in counties that do observed DST; no skipping occurred for not-observing-DST counties).

To make up for this skipping, the daily temperature DAYSRC( S,NDAY ) adding to it the 1st hour value of the next day. This treatment applies for all counties, observing- and not-observing-DST alike, which inflated the accumulated daily temperature in not-observing-DST counties. As the result, the ratio of daily / monthly total temperature was anomaly increased in day when DST started. The opposite occurred when DST ended.

Fix is being developed and tested.

callen52 commented 6 months ago

I've confirmed this has been fixed.