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

Add counter for SatDiagnPedge collection; Prevent satellite diagnostic counters from being inadvertently reset #2544

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

yantosca
Copy link
Contributor

@yantosca yantosca commented Oct 31, 2024

Name and Institution (Required)

Name: Bob Yantosca
Institution: Harvard + GCST

Describe the update

This PR does the following:

  1. Adds a separate local time counter (State_Diag%SatDiagnEdgeCount) for the SatDiagnEdge collection

  2. Allocates the State_Diag%SatDiagnPEDGE field with State_Diag%NZ+1 vertical levels. (This formerly was allocated with State_Diag%NZ levels, which cut off the top-of-the atmosphere (L=73) level).

  3. Adds a new function SatDiagn_or_SatDiagnEdge in History/history_netcdf_mod.F90 to set logical flags to denote if the current container name is either SatDiagn or SatDiagnEdge

  4. Added code in History/history_netcdf_mod.F90 to compute time-averages of fields belonging to the SatDiagnEdge collection.

  5. Updated code in History/history_mod.F90 to:

    • Reset the State_Diag%SatDiagnCount counter array ONLY IF the current container name is SatDiagn.
    • Reset the State_Diag%SatDiagnEdgeCount counter array ONLY IF the current container name is SatDiagnEdge.

Expected changes

This PR will prevent the satellite diagnostic output from decreasing with time as described in #2466.

Related Github Issue

Tagging @eamarais @zpleo @msulprizio @hazel008

Headers/state_diag_mod.F90
- Added State_Diag%SatDiagnEdgeCount counter for SatDiagnEdge collection
- Added State_Diag%Archive_SatDiagnEdgeCount logical
- Added State_Diag%Archive_SatDiagnEdge logical
- Allocated State_Diag%SatDiagnPEDGE with vertical dimension
  State_Grid%NZ+1 instead of State_Grid%NZ

GeosCore/diagnostics_mod.F90
- Initialize the State_Diag%SatDiagnEdgeCount counter in the DO loop
  where local time is updated for satellite diagnostics
- Now use State_Grid%NZ+1 vertical levels when saving into the
  State_Diag%SatDiagnPedge field

History/history_util_mod.F90
- Added routine "SatDiagn_or_SatDiagnEdge" to set logical flags to
  determine if the current container is either SatDiagn or SatDiagnEdge

History/history_netcdf_mod.F90
- Call routine SatDiagn_or_SatDiagnEdge to set logical flags indicating
  if the current collection is SatDiagn or SatDiagnEdge
- Added an IF block to compute the average of fields belonging to
  the SatDiagnEdge collection

History/history_mod.F90
- Call routine SatDiagn_or_SatDiagnEdge to set logical flags indicating
  if the current collection is SatDiagn or SatDiagnEdge
- Only reset State_Diag%SatDiagnCount to zero if the current collection
  is "SatDiagn"
- Only reset the "State_Diag%SatDiagnEdgeCount" counter if the current
  collection is "SatDiagnEdge"

CHANGELOG.md
- Updated accordingly

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca added no-diff-to-benchmark This update will not change the results of fullchem benchmark simulations category: Bug Fix Fixes a previously-reported bug topic: Deposition Related to dry deposition or wet depostion proceses labels Oct 31, 2024
@yantosca yantosca added this to the 14.5.1 milestone Oct 31, 2024
@yantosca yantosca self-assigned this Oct 31, 2024
@yantosca yantosca added topic: Diagnostics Related to output diagnostic data and removed topic: Deposition Related to dry deposition or wet depostion proceses labels Oct 31, 2024
@yantosca yantosca requested a review from msulprizio October 31, 2024 17:44
@msulprizio msulprizio changed the base branch from main to dev/no-diff-to-benchmark November 4, 2024 20:06
Copy link
Contributor

@msulprizio msulprizio left a comment

Choose a reason for hiding this comment

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

Could you please update CHANGELOG.md? Otherwise looks good.

CHANGELOG.md
- Updated with info about the satellite diagnostic fixes

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca requested a review from msulprizio November 4, 2024 21:53
@yantosca
Copy link
Contributor Author

yantosca commented Nov 4, 2024

Could you please update CHANGELOG.md? Otherwise looks good.

Thanks @msulprizio for catching this! I had the update ready but forgot to push. Now fixed in d096b7d.

@yantosca
Copy link
Contributor Author

All GEOS-Chem Classic integration tests passed except tagCO:

==============================================================================
GEOS-Chem Classic: Execution Test Results

CodeDir   : e99538a GEOS-Chem update: Merge PR #2532 (Add allocate guards)
GEOS-Chem : cad65f085 Merge PR #2544 (Fixes for SatDiagn diagnostic counters)
HEMCO     : deaa192 HEMCO 3.10.0 release
Cloud-J   : f8a2b7f Update version number for 8.0.1 release
HETP      : 2a99b24 Merge pull request #2 from geoschem/bugfix/initialize_local_variables

Using 24 OpenMP threads
Number of execution tests: 30

Submitted as SLURM job: 58870261
==============================================================================

...

gc_4x5_merra2_tagCO.................................Execute Simulation....FAIL

...

Summary of test results:
------------------------------------------------------------------------------
Execution tests passed: 29
Execution tests failed: 1
Execution tests not yet completed: 0

The failure is attributed to the date of the restart file for the tagCO simulation having been changed to be consistent with the carbon simulation in PR #2510. This simulation is slated for removal anyway.

@yantosca
Copy link
Contributor Author

All GCHP integration tests passed:

==============================================================================
GCHP: Execution Test Results

CodeDir       : 8aa7021 GEOS-Chem update: Merge PR #2532 (Add allocate guards)
MAPL          : 9ad63ae Merge PR #37 containing update to vertically flip imports with dimensionless pressure proxy lev coordinates
GMAO_Shared   : 4ddb3ec Merge pull request #2 from geoschem/feature/mapl-upgrade
ESMA_cmake    : ad5deba Added ecbuild as a submodule of ESMA_cmake
gFTL-shared   : 4b82492 Merge branch 'upstream_v1.5.0' into feature/v1.5.0
FMS           : 259759d Merge pull request #3 from geoschem/feature/update_gmao_libs
FVdycoreCubed : af42462 Merge PR #8 (Add PLEadv diagnostic for offline advection in GCHP)
geos-chem     : cad65f085 Merge PR #2544 (Fixes for SatDiagn diagnostic counters)
HEMCO         : deaa192 HEMCO 3.10.0 release
yaFyaml       : 19afe50 Merge branch 'upstream_v1.0.4' into feature/v1.0.4
pFlogger      : 2c4b724 Merge branch 'upstream_v1.9.1' into feature/v1.9.1
Cloud-J       : f8a2b7f Update version number for 8.0.1 release
HETP          : 2a99b24 Merge pull request #2 from geoschem/bugfix/initialize_local_variables

Number of execution tests: 12

Submitted as SLURM job: 58871910
==============================================================================

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  All execution tests passed!  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

@yantosca yantosca merged commit cad65f0 into dev/no-diff-to-benchmark Nov 20, 2024
@yantosca yantosca deleted the bugfix/sat-diagn-pedge branch November 20, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Fix Fixes a previously-reported bug no-diff-to-benchmark This update will not change the results of fullchem benchmark simulations topic: Diagnostics Related to output diagnostic data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Satellite diagnostic simulations show a gradual decrease in pressure day by day
2 participants