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

Bug fix: Allow mask files ending in ".$NC" not to be interpreted as a mask having no file #205

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

yantosca
Copy link
Contributor

Name and Institution (Required)

Name: Bob Yantosca
Institution: Harvard + GCST

Confirm you have reviewed the following documentation

Describe the update

This is the companion PR to #204. It prevents an error that halted TransportTracers simulations containing an ocean mask whose entry in HEMCO_Config.rc ending in .$NC.

Expected changes

Without this fix, we get this error:

At line 139 of file /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/HEMCO/src/Core/hco_chartools_mod.F90
Fortran runtime error: Bad real number in item 1 of list input

Error termination. Backtrace:
#0  0x2b3f00bc3c77 in read_real
        at /tmp/ryantosca/spack-stage/spack-stage-gcc-11.2.0-hbazyfn6aayq2jlpog7uck7w5xa5nmm4/spack-src/libgfortran/io/list_read.c:2026
#1  0x2b3f00bc4fec in list_formatted_read_scalar
        at /tmp/ryantosca/spack-stage/spack-stage-gcc-11.2.0-hbazyfn6aayq2jlpog7uck7w5xa5nmm4/spack-src/libgfortran/io/list_read.c:2180
#2  0x11f5ed8 in __hco_chartools_mod_MOD_hco_charsplit_r8
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/HEMCO/src/Core/hco_chartools_mod.F90:139
#3  0x12a8103 in __hcoio_util_mod_MOD_getdatavals
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/HEMCO/src/Core/hcoio_util_mod.F90:2779
#4  0x12acfab in __hcoio_util_mod_MOD_hcoio_readfromconfig
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/HEMCO/src/Core/hcoio_util_mod.F90:2489
#5  0x12b4d76 in __hcoio_util_mod_MOD_hcoio_readother
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/HEMCO/src/Core/hcoio_util_mod.F90:2188
#6  0x128bce5 in readlist_fill
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/HEMCO/src/Core/hco_readlist_mod.F90:491
#7  0x128c8ee in __hco_readlist_mod_MOD_readlist_read
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/HEMCO/src/Core/hco_readlist_mod.F90:288
#8  0x1234e8a in __hco_driver_mod_MOD_hco_run
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/HEMCO/src/Core/hco_driver_mod.F90:165
#9  0x59c290 in __hco_interface_gc_mod_MOD_hcoi_gc_run
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/GEOS-Chem/GeosCore/hco_interface_gc_mod.F90:999
#10  0x4e8795 in __emissions_mod_MOD_emissions_run
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/GEOS-Chem/GeosCore/emissions_mod.F90:204
#11  0x406472 in geos_chem
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/GEOS-Chem/Interfaces/GCClassic/main.F90:701
#12  0x40bde7 in main
        at /n/holylfs05/LABS/jacob_lab/ryantosca/tests/tt/test_tt/CodeDir/src/GEOS-Chem/Interfaces/GCClassic/main.F90:32

With this fix, we avoid the error.

Reference(s)

If this is a science update, please provide a literature citation.

Related Github Issue(s)

Closes #204

src/Core/hco_config_mod.F90
- Update the IF statement so that we allow mask files ending in
  the token ".$NC" to be read from disk (and not marked a mask
  specification of a rectangular region with no associated file).
  This prevents an error when reading the ocean mask for Transport
  Tracers simulations.

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca added category: Bug Something isn't working topic: Scaling or Masking Related to issues in applying scale factors or masks labels Apr 11, 2023
@yantosca yantosca self-assigned this Apr 11, 2023
@yantosca yantosca added this to the 3.7.0 milestone Apr 11, 2023
@yantosca yantosca linked an issue Apr 11, 2023 that may be closed by this pull request
4 tasks
@msulprizio msulprizio merged commit 673ef2a into dev/3.7.0 Apr 12, 2023
@msulprizio msulprizio deleted the bugfix/ocean-mask branch April 12, 2023 12:55
@yantosca yantosca added category: Bug Fix Fixes a bug that was previously reported and removed category: Bug Something isn't working labels Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Fix Fixes a bug that was previously reported topic: Scaling or Masking Related to issues in applying scale factors or masks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when reading OCEAN_MASK in TransportTracer simulation
2 participants