Skip to content

Commit 6615030

Browse files
Addressing NCO's bugzilla: run-time warning/failures with debug built executables:
INITPOST_NETCDF.f:- floating overflow/float invalid
1 parent 5b24c88 commit 6615030

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

sorc/ncep_post.fd/INITPOST_NETCDF.f

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,8 +2074,10 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d)
20742074
!$omp parallel do private(i,j,tlmh)
20752075
Do j=jsta,jend
20762076
Do i=ista,iend
2077-
TLMH = T(I,J,LM) * T(I,J,LM)
2078-
Sigt4(i,j) = 5.67E-8 * TLMH * TLMH
2077+
if ( T(I,J,LM) < spval ) then
2078+
TLMH = T(I,J,LM) * T(I,J,LM)
2079+
Sigt4(i,j) = 5.67E-8 * TLMH * TLMH
2080+
endif
20792081
End do
20802082
End do
20812083

@@ -2624,7 +2626,9 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d)
26242626
if(ext550(i,j,l)<spval)then
26252627
taod5503d ( i, j, l) = ext550 ( i, j, l )
26262628
dz = ZINT( i, j, l ) - ZINT( i, j, l+1 )
2627-
aextc55 ( i, j, l ) = taod5503d ( i, j, l ) / dz
2629+
if ( dz /= 0.0) then
2630+
aextc55 ( i, j, l ) = taod5503d ( i, j, l ) / dz
2631+
endif
26282632
endif
26292633
if(debugprint.and.i==im/2.and.j==(jsta+jend)/2)print*,'sample taod5503d= ', &
26302634
i,j,l,taod5503d ( i, j, l )

0 commit comments

Comments
 (0)