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

Fix array out of bounds in ectrans-benchmark #84

Merged
merged 4 commits into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/programs/ectrans-benchmark.F90
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@ program transform_test

call specnorm(pspec=zspvor(1:nflevl,:), pnorm=znormvor1, kvset=ivset(1:nflevg))
call specnorm(pspec=zspdiv(1:nflevl,:), pnorm=znormdiv1, kvset=ivset(1:nflevg))
call specnorm(pspec=zspsc3a(1:nflevl,:,1), pnorm=znormt1, kvset=ivset(1:nflevg))
if (nfld > 0) then
call specnorm(pspec=zspsc3a(1:nflevl,:,1), pnorm=znormt1, kvset=ivset(1:nflevg))
endif
call specnorm(pspec=zspsc2(1:1,:), pnorm=znormsp1, kvset=ivsetsc)

if (verbosity >= 1) then
Expand Down Expand Up @@ -708,7 +710,9 @@ program transform_test
call specnorm(pspec=zspsc2(1:1,:), pnorm=znormsp, kvset=ivsetsc(1:1))
call specnorm(pspec=zspvor(1:nflevl,:), pnorm=znormvor, kvset=ivset(1:nflevg))
call specnorm(pspec=zspdiv(1:nflevl,:), pnorm=znormdiv, kvset=ivset(1:nflevg))
call specnorm(pspec=zspsc3a(1:nflevl,:,1), pnorm=znormt, kvset=ivset(1:nflevg))
if (nfld > 0) then
call specnorm(pspec=zspsc3a(1:nflevl,:,1), pnorm=znormt, kvset=ivset(1:nflevg))
endif

! Surface pressure
if (myproc == 1) then
Expand Down Expand Up @@ -756,7 +760,9 @@ program transform_test
if (lprint_norms .or. ncheck > 0) then
call specnorm(pspec=zspvor(1:nflevl,:), pnorm=znormvor, kvset=ivset)
call specnorm(pspec=zspdiv(1:nflevl,:), pnorm=znormdiv, kvset=ivset)
call specnorm(pspec=zspsc3a(1:nflevl,:,1), pnorm=znormt, kvset=ivset)
if (nfld > 0) then
call specnorm(pspec=zspsc3a(1:nflevl,:,1), pnorm=znormt, kvset=ivset)
endif
call specnorm(pspec=zspsc2(1:1,:), pnorm=znormsp, kvset=ivsetsc)

if (myproc == 1) then
Expand Down
Loading