-
Notifications
You must be signed in to change notification settings - Fork 170
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
Fixes towards achieving bit-for-bit reproducibility in GC-Classic upon restart #2521
base: dev/14.6.0
Are you sure you want to change the base?
Fixes towards achieving bit-for-bit reproducibility in GC-Classic upon restart #2521
Conversation
@lizziel, I think I know what this may be. The N deposition code (I think You could get around that by declaring the variable to hold the level sum with |
…nfig Signed-off-by: Lizzie Lundgren <[email protected]>
For most cases this is double precision. Previously State_Met arrays were always saved out as single. Signed-off-by: Lizzie Lundgren <[email protected]>
Signed-off-by: Lizzie Lundgren <[email protected]>
This is FP for all cases except STATE_PSC which is real4 and DryDepVel which is always real8. Signed-off-by: Lizzie Lundgren <[email protected]>
Previously these were written as REAL4 despite being stored in the model as REAL8. Signed-off-by: Lizzie Lundgren <[email protected]>
Signed-off-by: Lizzie Lundgren <[email protected]>
This is a no diff update but now allows print of min, max, sum of restart variable Met_DELPDRY to be included with all of the other restart variables retrieved from HEMCO into GEOS-Chem. Signed-off-by: Lizzie Lundgren <[email protected]>
This module currently has one subroutine only, to print min, max, and mean of species concentrations to log. It currently only prints if root thread and does not convert units. Optional arguments allow printing one species or a consecutive sequence of species indexes. Signed-off-by: Lizzie Lundgren <[email protected]>
This update ensures error is not introduced due to unit conversions used for saving species to the restart file in mol/mol. Conversion to mol/mol must occur every timestep as part of updating diagnostics used for restart variables so that GEOS-Chem Classic can achieve bit-for-bit reproducibility upon breaking up runs. We still use kg/kg dry air throughout main.F90. Conversion from mol/mol to kg/kg occurs at the start of every timestep. This also means that mol/mol is not converted to kg/kg in the subroutine that retrieves restart variables from HEMCO during initialization since it will occur later. Signed-off-by: Lizzie Lundgren <[email protected]>
It is necessary to move where prescribed CH4 is set because it is dependent on PBL height and previously PBL height was not updated until after Set_CH4 was called. This introduces small differences in GC-Classic when breaking up runs. CH4 is now set using updated PBL height and is grouped with emissions where other prescribed surface VMRs are applied. It is still applied outside of emissions. Signed-off-by: Lizzie Lundgren <[email protected]>
Signed-off-by: Lizzie Lundgren <[email protected]>
Signed-off-by: Lizzie Lundgren <[email protected]>
This commit removes the level argument since it is not actually used in the subroutines. This update also uncomments a Soil NOx extension logical bracketed around a call to SOIL_WETDEP. The subroutine only changes arrays used in Soil NOx extension so calling it when the extension is off is not necessary. Signed-off-by: Lizzie Lundgren <[email protected]>
c0aa7f7
to
232ed41
Compare
Name and Institution (Required)
Name: Lizzie Lundgren
Institution: Harvard University
Describe the update
This PR applies changes in GC-Classic needed to achieve bit-for-bit reproducibility when breaking up a run in time. Please note that with these updates out-of-the-box GC-Classic will still not have reproducibility upon restart due to a limitation of HEMCO. HEMCO reads inputs, including GEOS-Chem restart file variables, as single precision when most of these fields in GEOS-Chem are double precision.
Separately I implemented an update that reads the GEOS-Chem restart file locally, preserving native precision found in the file. With this PR and that update on top of it I am able to achieve bit-for-bit reproducibility in GC-Classic full chemistry benchmark simulation when breaking up the run in time. We are not going to bring in the update to read the restart file locally because we need to use HEMCO for its flexgrid capability. However, I will make that update available as a dev branch should anyone want to use it (see here). An update to HEMCO to read native precision will come later.
Updates within GEOS-Chem that change benchmark output:
State_Chm%DryDepNitrogen
used in the HEMCO soil NOx extension and saved out to the GEOS-Chem restart file. I believe this was previously undetected because the differences are at the level of double precision numerical noise and thus were previously obscured by outputting to file as single precision. This update includes writing to the restart and diagnostic files using native precision which exposed the issue.Chem_ORVCsesq
restart file entry in GC-Classic fullchemHEMCO_Config.rc
.State_Met
andState_Chm
arrays in GC-Classic History using the native precision used in the model. Previously the precision was unspecified and outputs thus used the default of single precision.State_Diag%SpeciesRst
which is the species concentration array written to the restart file GC-Classic. Previously it was set to REAL4.This PR also contains several no-diff updates:
State_Chm
array allocationucx_mod
DELPDRY
to subroutineGC_Get_Restart
. This is a no diff update but now allows print of min, max, sum of restart variableMet_DELPDRY
to be included with all of the other restart variables retrieved from HEMCO into GEOS-Chem for use upon startup.GeosUtil/print_mod.F90
for specialized model print options. This module currently has one subroutine only, to print min, max, and mean of species concentrations to log. It currently only prints if root thread and does not convert units. Optional arguments allow printing one species or a consecutive sequence of species indexes. The current units are printed to the log.Get_GC_Restart
subroutine so that all species initial concentrations are printed to log, including if background values are used (with note about that), as well as initial concentrations of other arrays in the restart file that are read into the model.SOIL_WETDEP
andSOIL_DRYDEP
subroutines used to updateState_Chm%WetDepNitrogen
andState_Chm%DryDepNitrogen
used in the Soil NOx extension in HEMCO. Changes include removing the unused level argument and uncommenting a commented out Soil NOx extension logical used to determine whether to callSOIL_WETDEP
inDo_Washout_as_Sfc
.Expected changes
This update will cause small differences in all GEOS-Chem Classic simulations.
Reference(s)
None
Related Github Issue
geoschem/HEMCO#18
#111
#2014