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

[PULL REQUEST] Bug fixes for GEOS-Chem Classic dry-run simulations #661

Merged
merged 5 commits into from Mar 22, 2021

Conversation

yantosca
Copy link
Contributor

Overview

This PR fixes several issues in the GEOS-Chem "Classic" dry-run simulation, namely:

  1. Routine INIT_UCX in (GeosCore/ucx_mod.F90), was printing incorrect dry-run output to the log file, which caused dry-run simulations to hang. This has now been corrected.

  2. The run/GCClassic/createRunDir.sh script has the following updates:
    a. Aerosol simulations now use the fullchem restart file
    b. POPs simulation now looks for an initial restart file w/ the extra option (BaP, PYR, PHE) in ExtData/GEOSCHEM_RESTARTS/v2020-02.
    c. All other specialty simulations use restart files in GEOSCHEM_RESTARTS/v2020-02 on the remote server
    d. Send error output from aws s3 cp to dev/null

  3. The run/shared/download_data.py script has the following updates:
    a. Look for NK15 and NK40 in input.geos to decide if we need to download data files for TOMAS15 and TOMAS40 simulations
    b. Use the fullchem restart file (Jan 2019) for the aerosol simulation
    c. Look for specialty simulation restart files in GEOSCHEM_RESTARTS/v2020-02
    d. When downloading data from ComputeCanada, first download it to the local GEOSCHEM_RESTARTS directory tree, then copy it to the run directory.
    e. AWS restart files should now be placed in the run directory by createRunDir.sh. But if a restart file is missing, running
    download_data.py with -aws will restore it.

  4. In state_chm_mod.F90, we now nullify the State_Chm%HetInfo and State_Chm%Map_SpeciesBC fields in routine Init_State_Chm. Explicitly setting these fields to NULL() will make them be recognized as unallocated by the compiler, which can prevent seg faults during finalization, at least with the later GNU Fortran compilers.

  5. Also note: 2 x 2.5 specialty simulation restart files have been copied to ExtData/GEOSCHEM_RESTARTS/v2020-02. The reference time of these restart files has been edited to either 2019-01-01 or 2019-07-01.

Testing

The dry-run capability was tested on the AWS cloud. The proper restart files are now being placed into the run directories.

CAVEAT: There may be still some issues with the POPS simulation, since there are 3 separate restart files. But since the POPs simulation is basically unused, I think we can address any user-reported issues that come up on a case-by-case basis.

The State_Chm%HetInfo and State_Diag%SpeciesBC fields were never set
to NULL during initialization.  While this is OK for most simulations,
when doing a dry-run simulation, this will cause deallocation to fail,
at least when using GNU Fortran.  This would cause a segmentation fault
at the end of dry-run simulations (but the dry-run simulations would
finish otherwise OK).

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
File reads have been moved out of the INIT_UCX routine, but there were
still some print statements left over.  These print statements would
write that a non-existent file was missing, thus causing dry-runs to
fail.  We have now removed these extraneous print statements.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
Here we are stashing some modifications to download_data.py for
downloading restart files for GEOS-Chem 13.0.0.

Will need to work on this further...

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
The NOON_FILE_ROOT variable was a module variable that was removed in
the prior commit 991ca72.  However, this variable is needed to read
in the UCX boundary conditions in routine NOXCOEFF_INIT.

We have now restored NOON_FILE_ROOT as a local variable to NOXCOEFF_INIT.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
(1) run/GCClassic/createRunDir.sh:
 - Aerosol simulations now use the fullchem restart file
 - POPs simulation now looks for an initial restart file w/ the extra
   option (BaP, PYR, PHE) in ExtData/GEOSCHEM_RESTARTS/v2020-02
 - All other specialty simulations use restart files in
   GEOSCHEM_RESTARTS/v2020-02 on the remote server
 - Send error output from aws s3 cp to dev/null

(2) run/shared/download_data.py
 - Look for NK15 and NK40 in input.geos to decide if we are
   need to download data files for TOMAS15 and TOMAS40 simulations
 - Use the fullchem restart file (Jan 2019) for the aerosol simulation
 - Look for specialty simulation restart files in GEOSCHEM_RESTARTS/v2020-02
 - When downloading data from ComputeCanada, first download it to
   the local GEOSCHEM_RESTARTS directory tree, then copy it to the
   run directory.
 - AWS restart files should now be placed in the run directory by
   createRunDir.sh.  But if a restart file is missing, running
   download_data.py with -aws will restore it.

NOTE: There may still be an issue with the POPs restart files on AWS,
but since POPs is not used by many people I am not sure if we want
to end up fixing this.

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
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.

I have reviewed this PR and everything looks good to me.

@msulprizio msulprizio merged commit f7a07ff into dev Mar 22, 2021
@msulprizio msulprizio deleted the bugfix/bmy/dry-run branch March 22, 2021 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: Dry-Run Simulation Related to GEOS-Chem dry-run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants