[ncl-talk] Argument type mismatch between NCL and fortran
xiaoming Hu
yuanfangcan at hotmail.com
Tue Apr 19 14:30:26 MDT 2016
In my NCL I have
printVarSummary(mpr) print(dimlc(0)) print(dimlc(1)) printVarSummary(Time_mpr) EX:: get_maxind(mpr,Time_mpr, dimlc(0),dimlc(1))
When I run it, I got "fatal:Argument type mismatch on argument (0) of (get_maxind) can not coercefatal:Execute: Error occurred at or near line 59 in file plot_stageIV_precip.HourlyMean_peakTime_Fortran.ncl"The type of mpr is float.
In my Fortran code SUBROUTINE get_maxind (mpr,Time_mpr,JM, IM) implicit none integer,intent(in) :: JM, IM real,intent(in) :: mpr(IM,JM,24) integer :: Time_mpr(IM,JM) integer :: J, I! do J = 1, JM! do I=1,IM! Time_mpr(j,i) = MAXLOC(mpr, 1) Time_mpr = MAXLOC(mpr, 1)! enddo! enddo RETURN END SUBROUTINE get_maxind
In my stubC NCLFORTSTART SUBROUTINE get_maxind (mpr,Time_mpr,JM, IM) implicit none integer JM, IM dimension mpr(IM,JM, 24) dimension Time_mpr(IM,JM)C NCLEND
Could anybody tell what is wrong?
ThanksXiaoming
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160419/09dc69aa/attachment.html
More information about the ncl-talk
mailing list