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

Runtime failure in GEOSachem with GNU #138

Open
mathomp4 opened this issue Aug 9, 2021 · 0 comments
Open

Runtime failure in GEOSachem with GNU #138

mathomp4 opened this issue Aug 9, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mathomp4
Copy link
Member

mathomp4 commented Aug 9, 2021

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.

@mathomp4 mathomp4 added the bug Something isn't working label Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants