Skip to content

Commit 38b78fe

Browse files
Merge pull request #130 from jshaw35/nagcompiler_bugfix
Correct bug causing runtime error on NAG compilers
2 parents 5c76747 + ddbbe41 commit 38b78fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cosp_stats.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,9 @@ SUBROUTINE COSP_DIAG_WARMRAIN( Npoints, Ncolumns, Nlevels, & !! in
333333
real(wp), dimension(Npoints,Ncolumns,Nlevels) :: icod !! in-cloud optical depth (ICOD)
334334
logical :: octop, ocbtm, oslwc
335335
integer, dimension(Npoints,Ncolumns,Nlevels) :: fracout_int !! fracout (decimal to integer)
336-
fracout_int(:,:,:) = NINT( fracout(:,:,:) ) !! assign an integer subpixcel ID (0=clear-sky; 1=St; 2=Cu)
337-
336+
fracout_int(:,:,:) = 0
337+
where ((fracout(:,:,:) .ge. 0.5_wp) .and. (fracout(:,:,:) .lt. 1.5_wp )) fracout_int(:,:,:) = 1
338+
where ((fracout(:,:,:) .ge. 1.5_wp) .and. (fracout(:,:,:) .lt. 2.5_wp )) fracout_int(:,:,:) = 2
338339
!! initialize
339340
do i = 1, Npoints
340341
if ( lwp(i) .eq. R_UNDEF ) then ! for non-sunlit columns

0 commit comments

Comments
 (0)