From 190fab3e49c1c94a4173204489b46fa04177c0ef Mon Sep 17 00:00:00 2001 From: Niki Zadeh Date: Mon, 25 Jan 2016 16:37:37 -0500 Subject: [PATCH] Print the correct array element for diagnosis - This fixes a bug that would print an incorrect array element when an error is caught when that array element beocmes negative. --- src/parameterizations/vertical/MOM_opacity.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parameterizations/vertical/MOM_opacity.F90 b/src/parameterizations/vertical/MOM_opacity.F90 index 4b99c5e939..002ff5d09c 100644 --- a/src/parameterizations/vertical/MOM_opacity.F90 +++ b/src/parameterizations/vertical/MOM_opacity.F90 @@ -280,7 +280,7 @@ subroutine opacity_from_chl(optics, fluxes, G, CS, chl_in) if ((G%mask2dT(i,j) > 0.5) .and. (chl_in(i,j,k) < 0.0)) then write(mesg,'(" Negative chl_in of ",(1pe12.4)," found at i,j,k = ", & & 3(1x,i3), " lon/lat = ",(1pe12.4)," E ", (1pe12.4), " N.")') & - chl_data(i,j), i, j, k, G%geoLonT(i,j), G%geoLatT(i,j) + chl_in(i,j,k), i, j, k, G%geoLonT(i,j), G%geoLatT(i,j) call MOM_error(FATAL,"MOM_opacity opacity_from_chl: "//trim(mesg)) endif enddo; enddo; enddo