geoschem / HEMCO

The Harmonized Emissions Component (HEMCO), developed by the GEOS-Chem Support Team.
https://hemco.readthedocs.io
Other
15 stars 32 forks source link

[BUG/ISSUE]Bug when using GEOS-FP 4x5 Met with Standalone 3.5.0-rc.1 on AWS #162

Closed arianatribby closed 1 year ago

arianatribby commented 1 year ago

Report a HEMCO bug or technical issue

Describe the bug:

There appears to be a problem when reading the Volcano emissions. I do not experience this problem when using Merra2 met.

Expected behavior:

I've checked that the Volcano emissions are present and the file is not empty.

Actual behavior:

Here is the print to the terminal near the error:

HEMCO: Opening /home/ubuntu/ExtData/HEMCO/OFFLINE_LIGHTNING/v2020-03/GEOSFP/2019
/FLASH_CTH_GEOSFP_0.25x0.3125_2019_06.nc4                                       
HEMCO (VOLCANO): Opening /home/ubuntu/ExtData/HEMCO/VOLCANO/v2021-09/2019/06/so2
_volcanic_emissions_Carns.20190601.rc
At line 735 of file /home/ubuntu/HEMCO/rundirs/hemco_4x5_geosfp/CodeDir/src/Exte
nsions/hcox_lightnox_mod.F90
Fortran runtime error: Index '-18583' of dimension 1 of array 'inst%profile' bel
ow lower bound of 1

Steps to reproduce:g:

  1. Clone GCClassic and checkout a branch at release candidate 14.0.0-rc.12.
    git clone https://github.com/geoschem/GCClassic  
    cd GCClassic
    git checkout tags/14.0.0-rc.1
    git branch 14.0.0.rc-1
    git checkout 14.0.0-rc.1
    git submodule update --init --recursive
  2. Create a GCClassic run directory
    cd run
    ./createRunDir.sh  and follow prompts
    cd /path/to/GCClassic/rundir
  3. Compile and build GEOS-Chem Classic
    cd build
    cmake ../CodeDir -DRUNDIR=..
    make -j
    make -j install
    cd ..
  4. Run a GEOS-Chem Classic dry-run simulation to download data. I did not edit the default configuration files, except I changed the time period to 20190601-20190901.
    ./gcclassic --dryrun | tee log.dryrun
    conda activate geo
    ./download_data.py log.dryrun --amazon
    conda deactivate
  5. Create HEMCO Standalone Run directory
    cd CodeDir/src/HEMCO/run
    ./createRunDir.sh and follow the prompts
  6. Compile the Standalone
    cd /path/to/HEMCO/standalone/rundir   
    cd build
    cmake ../CodeDir -DRUNDIR=..
    make -j
    make install
    cd ..
  7. Run

    ./hemco_standalone -c HEMCO_sa_Config.rc 

    Your HEMCO version and runtime environment:

yantosca commented 1 year ago

HI @arianatribby. This looks like an out-of-bounds error in the lightning extension:

At line 735 of file /home/ubuntu/HEMCO/rundirs/hemco_4x5_geosfp/CodeDir/src/Exte
nsions/hcox_lightnox_mod.F90
Fortran runtime error: Index '-18583' of dimension 1 of array 'inst%profile' below lower bound of 1

This is occurring here:

    ! Compute the height [km] at the top of each vertical level.
    ! Look up the cumulative fraction of NOx for each vertical level
    DO L = 1, LTOP
       ZHEIGHT = ZHEIGHT + HcoState%Grid%BXHEIGHT_M%Val(I,J,L)
       FRAC(L) = Inst%PROFILE( NINT( ( ZHEIGHT/H0 )*3200. ), MTYPE ) *0.01
    ENDDO

which is probably happening because NINT( ( ZHEIGHT/H0 )*3200. ) is some weird value. You could try printing that value out to see what it is. Maybe we need to make sure it doesn't go below 1.

I tried building the HEMCO standalone with the debugging flags:

cd build
cmake ../CodeDir -DCMAKE_BUILD_TYPE=Debug
make -j
make -j install
cd ..

and I was able to run without it crashing. If you can try that too that might reveal some issue.

Also, could you attach the HEMCO_Config.rc file (the one from your GEOS-Chem run directory). Thanks.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days it will be closed. You can add the "never stale" tag to prevent the Stale bot from closing this issue.

stale[bot] commented 1 year ago

Closing due to inactivity