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
[WIP] [Pull Request] Remove non-zero diffs in GCHP introduced by splitting up simulations in time #1198
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
…istry Calls include Calc_Strat_Aer, Aerosol_Conc, RDAER, and RDust_Online. Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
…timers Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Note that this array is never actually used and will later be deleted during cleanup. Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
…iables Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
There are now ten internal state arrays beyond species concentrations and HEMCO restart variables that are on by default for GCHP. Nine of these were already present before this update. One additional one is now added to avoid differences in chemistry when splitting up a run. This new array is AeroH2O_SNA which corresponds to State_Chm%AeroH2O(:,:,:,NDUST+1) which is computed in isorropia and used in RDAER and full chemistry. The JNO2 and JOH arrays in the internal state are included for further testing. Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
# Conflicts: # GeosCore/chemistry_mod.F90 # Interfaces/GCHP/gchp_chunk_mod.F90 Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
lizziel
changed the title
[WIP] Bugfix/gchp time regression
[WIP] Remove non-zero diffs introduced by splitting up simulations in time
Mar 28, 2022
This internal state field is declared and set separately from GCHP due to a precision difference. GCHP explicitly sets internal state fields as REAL8 while GEOS should not. Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
GeosCore/chemistry_mod.F90 - There were leftover "goto 9999" and "9999 continue" statements that were used for debugging parallelization issues. While these had been removed in a prior commit, they snuck back into the code in a subsequent commit. Therefore we are removing them again. This had caused aerosol concentrations to be incorrect in GC benchmarks. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
Using these state_chm arrays introduces differences in the restart file. Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Using these fixes the multi vs single run differences in GCHP that occur in paranox. However, the restarts files show different values for the new arrays, State_Chm%JOH and State_Chm%JNO2. This needs to be looked at further. Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
yantosca
approved these changes
Apr 8, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These updates are OK to merge. Further modifications may be necessary, pending testing and validation.
lizziel
changed the title
[WIP] Remove non-zero diffs introduced by splitting up simulations in time
[WIP] Remove non-zero diffs in GCHP and GEOS introduced by splitting up simulations in time
Apr 22, 2022
lizziel
changed the title
[WIP] Remove non-zero diffs in GCHP and GEOS introduced by splitting up simulations in time
[WIP] [Pull Request] Remove non-zero diffs in GCHP introduced by splitting up simulations in time
Apr 22, 2022
This PR is superseded by #1229. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes the long-standing problem in GCHP of generating different output data depending on how simulations are split up in time. All fixes extend to GC-Classic as well, but the analogous problem in GC-Classic is not corrected with this pull request. Updates to correct the problem in GC-Classic will be submitted as a separate pull request, possibly for a later version.
Updates in this PR consist of several unrelated bug fixes that each introduce differences upon simulation restart. Changes include:
Reorder several calls in chemistry, specifically moving the calls to
Calc_Strat_Aer
,Aerosol_Conc
, andRDAER
to before the first call toChemSulfate
inDo_Chemistry
. More generally, the aerosol chemistry is now out ofDo_Fullchem
and is inDo_Chemistry
instead, including the call to compute dust online. This update allowsState_Chm%AeroArea
andState_Chm%AreaRadi
to be computed in the same timestep that they are used in ChemSulfate. Prior to this change they were used in ChemSulfate as zero in the first timestep. Including them in the restart file would also solve this issue, but that would be 28 additional 3D fields in the GCHP and GEOS internal state which is too costly at high resolution.Move Isorropia call to before the call to
do_fullchem
. Several Isorropia output arrays are used in KPP but previously Isorropia was called after KPP, resulting in zero values used in the first timestep. These arrays were previously added to the GCHP and GEOS restart files, but moving the call to Isorropia reduces the number of restart fields required to a single 3D array.Add new restart variable
AeroH2O_SNA
which is computed in Isorropia but used in subroutineRDAER
.Remove skipping wet settling when first timestep. This was done in both the stratosphere in
Calc_Strat_Aer
and the troposphere inGrav_Settling
.Add
State_Chm
arraysJOH
andJNO2
for surface J-values ofRXN_O3_1
andRXN_NO2
, and add them as new restart variables. These correspond to reactionsO3 + hv --> O2 + O
andNO2 + hv --> NO + O
respectively. The surface J-values are used in the HEMCO paranox extension which is called before J-values are calculated. This resulted in used zero values in the first timestep.Move
carbon_mod
module variableORVC_SESQ
toState_Chm
arrayORVCsesq
, and store the array as a restart variable for both GCHP and GC-Classic. This array was already carried in the restart file in GEOS. It is the sesquiterpenes mass per grid box and is used in SOA chemistry prior to it being set. This caused differences inASOA*
,ASOG*
,TSOA*
, andTSOG*
concentrations.Compute cos SZA before emissions are run. This is done in GEOS but previously was not done in GCHP. I did not isolate this difference to see if it was actually a bug.
Set the
TotalOC
diagnostic to zero before it is set every timestep. IfPOA
orOPOA
are true thenTotalOC
gets reset every timestep. If neither are true, andLSOA
is true, thenTotalOC
is increased from its current value. The problem with this is we do not setState_Diag%TotalOC
to zero prior this computation. This causesTotalOC
to be the cumulative value rather than the instantaneous value ifPOA
andOPOA
are false andLSOA
is true. This causes erroneous values, and also makes the values different depending on how you split up your run into multiple jobs.The fixes, combined with a couple fixes that went in 13.4.0 (geoschem/HEMCO#140 and #1178) make GCHP benchmark simulation output the same regardless of how the run is split up. Differences remain in GC-Classic indicating the problem in GC-Classic is likely from advection and/or I/O.
For more information on the impact of this problem and the fixes, see http://ftp.as.harvard.edu/gcgrid/geos-chem/validation/GC_time_regression_fixes/.