geoschem / geos-chem

GEOS-Chem "Science Codebase" repository. Contains GEOS-Chem science routines, run directory generation scripts, and interface code. This repository is used as a submodule within the GCClassic and GCHP wrappers, as well as in other modeling contexts (external ESMs).
http://geos-chem.org
Other
171 stars 166 forks source link

[FEATURE REQUEST] Removal of binary punch diagnostics #82

Closed yantosca closed 8 months ago

yantosca commented 5 years ago

Overview

We are removing the legacy binary punch (aka bpch) diagnostics, because they cannot be used by GCHP, as well as GEOS-Chem connected to other ESMs (GEOS, WRF, CESM, etc).

Validation

Prior to removing the bpch diagnostics, we performed several validations:

Comparison of bpch and netCDF diagnostic output

Please see our Validation of netCDF diagnostics section on the GEOS-Chem wiki.

Difference tests

Ref = bpch code present
Dev = bpch code removed (feature/RemoveBpch branch)

Compiled with BPCH_DIAG=n (this will be the new default)
---------------------------------------------------------
DiffTest_geosfp_2x25_CO2            PASS
DiffTest_geosfp_4x5_aerosol/            PASS    
DiffTest_geosfp_4x5_benchmark/          PASS
DiffTest_geosfp_4x5_CH4/                PASS    
DiffTest_geosfp_4x5_complexSOA/         PASS
DiffTest_geosfp_4x5_standard/           PASS
DiffTest_geosfp_4x5_tagCO/              PASS
DiffTest_geosfp_4x5_tagO3/              PASS            
DiffTest_geosfp_4x5_TransportTracers/   PASS
DiffTest_geosfp_4x5_tropchem/           PASS

Compiled with BPCH_DIAG=y
---------------------------------------------------------
DiffTest_geosfp_2x25_CO2/               PASS
DiffTest_geosfp_4x5_aerosol/        PASS
DiffTest_geosfp_4x5_benchmark/          PASS**
DiffTest_geosfp_4x5_CH4/                PASS
DiffTest_geosfp_4x5_Hg/                 PASS          
DiffTest_geosfp_4x5_standard/           PASS*
DiffTest_geosfp_4x5_tagCO/              PASS
DiffTest_geosfp_4x5_tagO3/          PASS            
DiffTest_geosfp_4x5_TransportTracers/   PASS
DiffTest_geosfp_4x5_tropchem/           PASS**

*: The perl script validate.pl, which is used to check for differences, 
   notes that certain diagnostic outputs are different.
   But when examined in Python, we get identical results.  
   This might denote some very small differences caused by optimization.   
   For all intents and purposes this denotes dentical results.

**: Differences are within the limits of numerical noise.

The Mean OH value for Dev in geosfp_4x5_standard is identical with bpch turned off or on:

Bpch off : Mean OH =    11.551113072639739       [1e5 molec/cm3]
Bpch on  : Mean OH =    11.551113072639739       [1e5 molec/cm3]

as is the mean OH value for Dev in geosfp_4x5_tropchem:

Bpch off : Mean OH =    12.979569056826467       [1e5 molec/cm3]
Bpch on  : Mean OH =    12.979569056826467       [1e5 molec/cm3]

and as is the mean OH value for Dev in geosfp_4x5_benchmark:

Bpch off : Mean OH =    11.544115278980730       [1e5 molec/cm3]
Bpch on  : Mean OH =    11.544115278980730       [1e5 molec/cm3]

Unit Tests

ut

Remaining bpch diagnostics

Due to legacy code in certain "specialty" simulations, we are unable to remove every single bpch diagnostic. For the time being we will preserve the following bpch diagnostics:

  1. ND03 (for Hg simulations)
  2. ND06 (for TOMAS simulations)
  3. ND44 (for TOMAS simulations)
  4. ND51 and ND51b (Satellite timeseries)
  5. ND53 (for POPs simulations)
  6. ND59 (for TOMAS simulations)
  7. ND60 (for TOMAS simulations)
  8. ND61 (for TOMAS simulations)
  9. ND72 (for RRTMG simulations)
yantosca commented 5 years ago

We have also added a bug fix to the feature/RemoveBpch diag branch that was causing chemistry to have slightly different values if the ND65 bpch P/L diagnostics were turned on or off. See https://github.com/geoschem/geos-chem/issues/84 for more information. This will be added to 12.7.0 along with the removal of most bpch diagnostics.

yantosca commented 5 years ago

It is now doubly-verified that we get identical results in the feature/RemoveBpch branch when using BPCH_DIAG=n as we do with BPCH_DIAG=y. We have now merged this into the dev/12.7.0 branch. This will become GEOS-Chem 12.7.0, pending benchmarking and validation.

lizziel commented 3 years ago

I am reopening this issue since removal of remaining binary diagnostics is not complete. RRTMG binary diagnostics will be removed as part of 13.1.0. Remaining binary diagnostics are as follows:

ND03 (for Hg simulations) ND06 (for TOMAS simulations) ND44 (for TOMAS simulations) ND51 and ND51b (Satellite timeseries) ND53 (for POPs simulations) ND59 (for TOMAS simulations) ND60 (for TOMAS simulations) ND61 (for TOMAS simulations)

Keeping the binary diagnostic code around will get in the way of restructuring GeosCore and generally hamper refactoring needed for interfacing with other models. This will be particularly problematic if non-GC-Classic GEOS-Chem users restructure the code themselves, such as what will be happening at GMAO for use in GMI, since the changes will likely break binary diagnostics.

yantosca commented 3 years ago

The RRTMG bpch diagnostics have now been removed in PR #651. This will go into GEOS-Chem 13.1.0.

yantosca commented 2 years ago

I have also removed bpch diagnostics for the Hg and POPs simulations...this will go into 14.0.0.

yantosca commented 1 year ago

The ND50 and ND51 diagnostics are removed in GEOS-Chem 14.1.0 (see PR #1478).

The remaining bpch diagnostics will be removed with the TOMAS/GCHP updates (currently in progress)

yantosca commented 11 months ago

This will be done following the TOMAS updates.

yantosca commented 8 months ago

We can finally close out this issue, as bpch diagnostics have now been removed from GEOS-Chem 14.4.0!