<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'> In my NCL I have <style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style><div><br></div><div><div> printVarSummary(mpr)</div><div> print(dimlc(0))</div><div> print(dimlc(1))</div><div> printVarSummary(Time_mpr)</div><div> EX:: get_maxind(mpr,Time_mpr, dimlc(0),dimlc(1))</div></div><div><br></div><div><br></div><div>When I run it, I got </div><div>"fatal:Argument type mismatch on argument (0) of (get_maxind) can not coerce</div><div>fatal:Execute: Error occurred at or near line 59 in file plot_stageIV_precip.HourlyMean_peakTime_Fortran.ncl</div><div>"</div><div>The type of mpr is float. </div><div><br></div><div>In my Fortran code </div><div><div> SUBROUTINE get_maxind (mpr,Time_mpr,JM, IM)</div><div> implicit none</div><div> integer,intent(in) :: JM, IM</div><div> real,intent(in) :: mpr(IM,JM,24)</div><div> integer :: Time_mpr(IM,JM)</div><div> integer :: J, I</div><div>! do J = 1, JM</div><div>! do I=1,IM</div><div>! Time_mpr(j,i) = MAXLOC(mpr, 1) </div><div> Time_mpr = MAXLOC(mpr, 1)</div><div>! enddo</div><div>! enddo </div><div> RETURN</div><div> END SUBROUTINE get_maxind</div></div><div><br></div><div>In my stub</div><div><div>C NCLFORTSTART</div><div> SUBROUTINE get_maxind (mpr,Time_mpr,JM, IM)</div><div> implicit none</div><div> integer JM, IM</div><div> dimension mpr(IM,JM, 24)</div><div> dimension Time_mpr(IM,JM)</div><div>C NCLEND</div></div><div><br></div><div>Could anybody tell what is wrong? </div><div><br></div><div>Thanks</div><div>Xiaoming </div><div><br></div>                                            </div></body>
</html>