Skip to content

Commit

Permalink
Undo consistency check in INV_TRANS
Browse files Browse the repository at this point in the history
This check was failing when "--vordiv --uvders" was enabled. There may
be a case in the IFS when we pass a PGPUV array with more wind elements
than required to INV_TRANS. This is certainly the case in the benchmark
program, although I think that's just because the code is wrong. The
--vordiv option doesn't enable grid point vorticity and divergence, as
one would expect from the way the PGPUV array is sized. It just enables
transforming of vorticity and divergence to U and V.
  • Loading branch information
samhatfield committed Mar 4, 2025
1 parent 81e4651 commit 85b67b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/trans/cpu/external/inv_trans.F90
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ SUBROUTINE INV_TRANS(PSPVOR,PSPDIV,PSPSCALAR,PSPSC3A,PSPSC3B,PSPSC2,&
WRITE(NOUT,*)'INV_TRANS:SECOND DIMENSION OF PGPUV /= IF_UV_G ',IUBOUND(2),IF_UV_G
CALL ABORT_TRANS('INV_TRANS:SECOND DIMENSION OF PGPUV /= IF_UV_G ')
ENDIF
IF(IUBOUND(3) /= IF_UV_PAR) THEN
WRITE(NOUT,*)'INV_TRANS:THIRD DIMENSION OF PGPUV /= IF_UV_PAR',IUBOUND(3),IF_UV_PAR
CALL ABORT_TRANS('INV_TRANS:THIRD DIMENSION OF PGPUV /= IF_UV_PAR')
IF(IUBOUND(3) < IF_UV_PAR) THEN
WRITE(NOUT,*)'INV_TRANS:THIRD DIMENSION OF PGPUV TOO SMALL',IUBOUND(3),IF_UV_PAR
CALL ABORT_TRANS('INV_TRANS:THIRD DIMENSION OF PGPUV TOO SMALL')
ENDIF
IF(IUBOUND(4) /= NGPBLKS) THEN
WRITE(NOUT,*)'INV_TRANS:FOURTH DIMENSION OF PGPUV /= NGPBLKS',IUBOUND(4),NGPBLKS
Expand Down
6 changes: 3 additions & 3 deletions src/trans/gpu/external/inv_trans.F90
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ SUBROUTINE INV_TRANS(PSPVOR,PSPDIV,PSPSCALAR,PSPSC3A,PSPSC3B,PSPSC2,&
WRITE(NOUT,*)'INV_TRANS:SECOND DIMENSION OF PGPUV /= IF_UV_G ',IUBOUND(2),IF_UV_G
CALL ABORT_TRANS('INV_TRANS:SECOND DIMENSION OF PGPUV /= IF_UV_G ')
ENDIF
IF(IUBOUND(3) /= IF_UV_PAR) THEN
WRITE(NOUT,*)'INV_TRANS:THIRD DIMENSION OF PGPUV /= IF_UV_PAR',IUBOUND(3),IF_UV_PAR
CALL ABORT_TRANS('INV_TRANS:THIRD DIMENSION OF PGPUV /= IF_UV_PAR')
IF(IUBOUND(3) < IF_UV_PAR) THEN
WRITE(NOUT,*)'INV_TRANS:THIRD DIMENSION OF PGPUV TOO SMALL',IUBOUND(3),IF_UV_PAR
CALL ABORT_TRANS('INV_TRANS:THIRD DIMENSION OF PGPUV TOO SMALL')
ENDIF
IF(IUBOUND(4) /= NGPBLKS) THEN
WRITE(NOUT,*)'INV_TRANS:FOURTH DIMENSION OF PGPUV /= NGPBLKS',IUBOUND(4),NGPBLKS
Expand Down

0 comments on commit 85b67b3

Please sign in to comment.