Skip to content

Runtime failure in GEOSachem with GNU #138

@mathomp4

Description

@mathomp4

With the advent of GOCART2G it was found that while you can compile GEOS-GOCART2G with GNU, you cannot run it. The first error (outside of an issue in MAPL), is in GEOSachem_GridComp:

At line 1562 of file /discover/swdev/mathomp4/Models/GEOSgcm-feature-geos-v10.17.6-gocart2g-v2.0.0-GNU/GEOSgcm/src/Components/@GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/@GEOSch
em_GridComp/GEOSachem_GridComp/GEOS_AChemGridCompMod.F90
Fortran runtime error: Array bound mismatch for dimension 1 of array 'f_day_time' (6/0)

This is:

! scale OH
do k = 1, km
q_OH_(:,:,k) = q_OH_(:,:,k) * f_day_time(:,:)
end do
where(q_OH_ < 0.0) q_OH_ = 0.0

Now, while @pcolarco did change Achem (and @adarmenov as the comment is "Updated to latest physics from Anton and Pete") the code around here seems pretty stable with current develop. So my guess is AChem has never run with GNU!

@tclune and I took a look and we didn't see anything super obvious. It did look like this:

! Impose diurnal cycle to the offline OH and NO3 monthly mean fields
! ------------------------------------------------------------------
if (self%gas_phase_chem .or. self%voc_chem) then
allocate(q_OH_(i1:i2,j1:j2,km), __STAT__)
q_OH_ = q_OH
end if
if (self%gas_phase_chem) then
allocate(q_NO3_(i1:i2,j1:j2,km), __STAT__)
q_NO3_ = q_NO3
end if
if (self%apply_diurnal_cycle .and. (self%mam_chem .or. self%voc_chem)) then

was a difference from develop:

! Impose diurnal cycle to the offline OH and NO3 monthly mean fields
! ------------------------------------------------------------------
allocate(q_OH_(i1:i2,j1:j2,km), __STAT__)
allocate(q_NO3_(i1:i2,j1:j2,km), __STAT__)
if (.not. self%oxidants_quirk) then
q_OH_ = q_OH
q_NO3_ = q_NO3
else
q_OH_(:,:,1:km) = q_OH(:,:,km:1:-1)
q_NO3_(:,:,1:km) = q_NO3(:,:,km:1:-1)
end if
if (self%apply_diurnal_cycle) then

Not sure.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions