Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve time-stepping issue in ELMO when used within WRF-CMAQ and MPAS-CMAQ #181

Merged
merged 1 commit into from
Dec 2, 2022

Conversation

bnmurphy
Copy link
Contributor

@bnmurphy bnmurphy commented Dec 1, 2022

Contact:
Ben Murphy, Center for Environmental Measurement and Modeling, US EPA

Priority: High

Description and/or issue being addressed: ELMO gives erroneous results in WRF-CMAQ and when using met inputs not aligned with hour time steps.

Impact on results: This PR resolves the problem by adjusting the algorithm for identifying when the initial time step is hit for the simulation and synchronization cycles.

Issue:
This Pull Request addresses issue #179

Significance: This model bug fix should be adopted as soon as possible for any user running WRF-CMAQ or using met inputs with time steps not aligned with hourly structure. Simulations for offline CMAQ with hourly met inputs are unaffected.

Tests conducted:
The code has been checked for the 2016 Southeast benchmark domain using 5 min met inputs. It's also been checked on the 2018 NE benchmark with default inputs. Only intel in optimized mode has been run. Reviewers within EPA have run this code for the 12 km CONUS case using WRF-CMAQ and the differences in results between the ELMO and CONC files are of the same magnitude as numerical noise.

@bnmurphy bnmurphy added the bug label Dec 1, 2022
@bnmurphy bnmurphy changed the base branch from main to 5.4+ December 1, 2022 04:45
@bnmurphy bnmurphy changed the base branch from 5.4+ to main December 1, 2022 04:52
@bnmurphy bnmurphy changed the base branch from main to 5.4+ December 1, 2022 04:52
 On branch elmo_time_step
	modified:   CCTM/src/driver/ELMO_DATA.F
	modified:   CCTM/src/driver/ELMO_PROC.F
	modified:   CCTM/src/driver/driver.F
	modified:   CCTM/src/init/initscen.F
@lizadams
Copy link
Contributor

lizadams commented Dec 1, 2022

@bnmurphy - did you want me to try and replicate or test this issue and bug fix?

@bnmurphy
Copy link
Contributor Author

bnmurphy commented Dec 1, 2022

@lizadams - if it's not too much trouble. If it fits within your workflow to do a WRF-CMAQ test on your system, that would be helpful. But if not, it would also be good to verify that the offline CMAQ is still working on a non-EPA system.

Copy link
Contributor

@lizadams lizadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure of the best way to reproduce the issue and test the fix. Please advise.

@chogrefe
Copy link
Contributor

chogrefe commented Dec 2, 2022

@lizadams , the issue can be reproduced by simply running two-way WRF-CMAQ. With the current version of the code, all variables in AELMO are low by roughly a factor of 8-10, though the factor depends on the specific setup and calling frequency. The problem is most easily seen by comparing a variable like PMF_SI to ASIJ from ACONC since these should be a 1:1 match, or by looking at meteorological variables like TSURF and PRES in AELMO. After applying the bug fix, AELMO variables have the correct order of magnitude and are consistent between AELMO and ACONC for 1:1 matched variables like PMF_SI or PMF_TI (ATIJ in ACONC), except for numerical noise that's also present when comparing these variables between AELMO and ACONC for the offline model. @bnmurphy , @fisidi , please add or correct anything I might have missed or misstated.

@bnmurphy
Copy link
Contributor Author

bnmurphy commented Dec 2, 2022

Yes, @chogrefe, I think this sums it up perfectly. Sorry for giving little context or scope, @lizadams.

@lizadams
Copy link
Contributor

lizadams commented Dec 2, 2022

I created VERDI plots showing ATIJ[ACONC]-PMF_TI[AELMO] differences for 4 comparisons.

WRF-CMAQ before fix
WRF-CMAQ after fix
CMAQ before fix
CMAQ after fix

These plots indicate that the fix for WRF-CMAQ was successful and did not impact the CMAQ model output.

@kmfoley kmfoley merged commit 595a6e7 into USEPA:5.4+ Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants