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

[WIP] Remove non-zero diffs caused by splitting up simulations in time -- Supersedes #1198 #1212

Closed
wants to merge 23 commits into from

Conversation

yantosca
Copy link
Contributor

@yantosca yantosca commented Apr 8, 2022

Overview

This bug fix takes @lizziel's PR #1198 and merges it up to the state of 13.4.0-rc.3, in order to take advantage of subsequent bug fixes and updates.

References:

lizziel and others added 16 commits March 11, 2022 18:26
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>
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>
@msulprizio
Copy link
Contributor

This branch should be merged up to 13.4.0-alpha.27 to ensure we include the fix to chemistry_mod.F90.

@yantosca
Copy link
Contributor Author

yantosca commented Apr 8, 2022

This branch should be merged up to 13.4.0-alpha.27 to ensure we include the fix to chemistry_mod.F90.

Now done with commit f0b71c6

GeosCore/fullchem_mod.F90
- In routine DO_FULLCHEM, we removed the first call to Timer_Start
  for the "FlexChem" timer.  The timer is actually started in the
  calling routine (DO_CHEMISTRY), so this caused a lot of warnings.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
GeosCore/chemistry_mod.F90
- Use keyword arguments in calls to Calc_Strat_Aer, Aerosol_Conc,
  RdAer, and RDust_Online (to match the rest of chemistry_mod.F90)
- Updated comments

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.fullchem
run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.aerosol
- Add entry for AEROH2O_SNA, which reads the Chem_AeroH2OSNA field
  from the GEOS-Chem Classic "Restart" History collection.

run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem
run/GCClassic/HISTORY.rc.templates/HISTORY.rc.aerosol
- Add Chem_AeroH2ONA to the "Restart" collection

Headers/state_chm_mod.F90
- Rename the metadata name for State_Chm%AeroH2O(:,:,:,NDUST+1) from
  'AEROH2OSULF' to 'AEROH2OSNA'

GeosCore/hco_utilities_gc_mod.F90
- Get data from the HEMCO "AEROH2O_SNA" container in the GEOS_Chem restart
  file and save it to State_Chm%AeroH2O(:,:,:,NDUST+1)

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem
- Add Chem_JOH and Chem_JNO2 to the "Restart" collection
- Replaced all TAB characters with spaces

run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.fullchem
- Added entries for JOH and JNO2 to the GC_RESTART block

Headers/state_chm_mod.F90
- Place the Init_and_Register calls for Chem_JOH and Chem_JNO2
  inside an IF ( Input_Opt%ITS_A_FULLCHEM_SIM ) block.

GeosCore/hco_utilities_mod.F90
- Add code to read JOH into State_Chm%JOH and JNO2 into State_Chm%JNO2
- Streamlined WRITE statements for readability and consistency
  with the output of GEOS-Chem species
- Updated comments
- Trimmed trailing whitespace
@yantosca
Copy link
Contributor Author

yantosca commented Apr 8, 2022

Added updates to read restart fields:

  • AeroH2O_SNA (points to variable Chem_AeroH2OSNA in restart file)
  • JOH (points to variable Chem_JOH in restart file)
  • JNO2 (points to variable Chem_JNO2 in restart file)

Also streamlined the code in GeosCore/hco_utilities_gc_mod.F90 to reduce clutter and improve readability of the log file output. Integration tests are running.

@lizziel lizziel self-assigned this Apr 12, 2022
@lizziel
Copy link
Contributor

lizziel commented Apr 12, 2022

fyi, I am still working on this as well.

@lizziel lizziel removed their request for review April 12, 2022 17:47
… a run

If POA or OPOA are true then TotalOC gets reset every timestep. If neither
are true, and LSOA is true, then TotalOC is increased from its current
value. The problem with this is we do not set State_Diag%TotalOC to zero
prior this computation. This causes TotalOC to be the cumulative value
rather than the instantaneous value if POA and OPOA are false and LSOA is
true. This causes erroneous values, and also makes the values different
depending on how you split up your run into multiple jobs.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Values of ORVC_SESQ are carried over across timesteps for use in SOA
chemistry. Differences will be introduced in ASOA*, ASOG*, TSOA*, and
TSOG* species concentrations upon simulation restart unless the ORVC_SESQ
values are saved to the restart file. This commit includes changes for
GC-Classic, GCHP, and GEOS.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel
Copy link
Contributor

lizziel commented Apr 26, 2022

This PR is superseded by #1229.

@lizziel lizziel closed this Apr 26, 2022
@msulprizio msulprizio deleted the bugfix/time-regression branch May 20, 2022 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants