<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">##############################<br class="">Alan Brammer,<div class="">Post-Doc Researcher</div><div class=""><br class=""></div><div class="">Department of Atmospheric and Environmental Sciences,<br class="">University at Albany, State University of New York, Albany, NY, 12222<div class=""><a href="mailto:abrammer@albany.edu" class="">abrammer@albany.edu</a><br class="">##############################</div></div></div></span></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 12 Mar 2017, at 23:00, dale zuri <<a href="mailto:dalezuri@gmail.com" class="">dalezuri@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi,<br class=""><br class="">Please find here a program and other informations as well.<br class=""><br class=""></div><div class="">Thanks in advance.<br class=""> <br class=""></div><div class="">C NCLFORTSTART<br class=""> subroutine ES (t,h,w,r,buio,ffmo,<br class=""> 1 xisio,fwio,dmco,dco)<br class="">C integer tlen<br class=""> dimension t(183),h(183)<br class=""> dimension w(183),r(183)<br class=""> dimension ffmo(183),xisio(183)<br class=""> dimension fwio(183),dmco(183)<br class=""> dimension buio(183),dco(183)<br class="">C integer indate,yr,mon,day,hr<br class="">C character*10 timez<br class="">C NCLEND<br class="">C write(timez,'(i10)') indate<br class="">C read(timez,'(i4,3i2)') yr,mon,day,hr<br class=""><br class=""><br class=""> call canada(t,h,w,r,buio,ffmo,xisio,<br class=""> 1 fwio,dmco,dco)<br class=""><br class=""> return<br class=""> end<br class=""><br class="">cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc<br class=""> subroutine canada(t,h,w,r,buio,ffmo,xisio,<br class=""> 1 fwio,dmco,dco)<br class=""><br class=""> dimension lmon(12), el(12), fl(12)<br class=""> dimension t(183),h(183),w(183),r(183)<br class=""> dimension tin(183),hin(183),win(183),rin(183)<br class=""> dimension ffmc(183),dmc(183),dc(183)<br class=""> 1 ,xisi(183),bui(183),fwi(183),dsr(183)<br class=""> dimension ffmo(183),dmco(183),dco(183),buio(183)<br class=""> dimension fwio(183),xisio(183)<br class="">c data statement<br class=""> data lmon / 31,28,21,30,31,30,31,31,30,31,30,31/<br class=""> data el /6.5,7.5,9.0,12.8,13.9,13.9,12.4,10.9,9.4,8.0,7.0,<br class=""> 1 6.0/<br class=""> data fl /-1.6,-1.6,-1.6,.9,3.8,5.8,6.4,5.0,2.4,.4,-1.6,<br class=""> 1 -1.6/<br class="">c<br class="">c&& enter in the inital values here<br class="">c 3 fuel moisture codes, initialize<br class=""> ffmo(1) =85.5<br class=""> dmco(1)=6.0<br class=""> dco(1)=15.0<br class=""><br class="">c keep track of julian day<br class=""> iday=90<br class="">c start on april 1 and go to september 30 <br class=""> do im=4,9<br class=""> do jday=1,lmon(im)<br class=""> iday = iday +1<br class="">c move the data from the array to the variable for the calculation on a given day<br class=""> t = tin(iday)<br class=""> h = hin(iday)<br class=""> w = win(iday)<br class=""> r = rin(iday)<br class="">c<br class="">c convert m/s to km/hr<br class="">c w(i,j) = w(i,j)*3.6<br class="">c<br class="">c FINE FUEL MOISTURE CODE<br class="">c<br class=""> wmo = 147.2*(101-ffmo(iday))/(59.5+ffmo(iday))<br class=""> if(r(iday)>0.5) then<br class=""> ra=r(iday)-0.5<br class=""> if (ra.lt.0.1) ra = 0.1<br class=""> if(wmo.gt.150) then<br class=""> wmo= wmo+ 42.5*ra*exp(-100.0/(251-wmo))*(1.0-exp(-6.93/ra))<br class=""> 1 +0.0015*(wmo-150)*(wmo-150)*sqrt(ra)<br class=""> else<br class=""> wmo=wmo+42.5*ra*exp(-100.0/(251-wmo))*(1.0-exp(-6.93/ra))<br class=""> endif<br class=""> endif<br class=""> if (wmo.gt.250.) wmo = 250.<br class=""> ed=0.942 * h(iday)**0.679 +<br class=""> 1 (11.0*exp((h(iday)-100.0)/10.0)) +<br class=""> 1 0.18 * (21.1-t(iday)) * (1.0-1.0/exp(h(iday)*0.115))<br class=""> ew=0.618 * h(iday)**0.753 +<br class=""> 1 (10.0*exp((h(iday)-100.0)/10.0)) +<br class=""> 1 0.18 * (21.1-t(iday)) * (1.0-1.0/exp(h(iday)*0.115))<br class=""> if(wmo.lt.ed.and.wmo.lt.ew) then<br class=""> z = 0.424 * ( 1.0 - ((100.0-h(iday))/100.0)**1.7 ) +<br class=""> 1 0.0694 * sqrt(w(iday)) * (1.0 -<br class=""> 1 ((100.0-h(iday))/100.0)**8.0 )<br class=""> x = z * 0.581 * exp(0.0365*t(iday))<br class=""> wm = ew-(ew-wmo) / (10.0**x)<br class=""> elseif (wmo.gt.ed) then<br class=""> z = 0.424 * ( 1.0 - (h(iday)/100.)**1.7 ) + 0.0694 *<br class=""> 1 sqrt(w(iday)) * ( 1 - (h(iday)/100)**8.0 )<br class=""> x = z * 0.581 * exp(0.0365*t(iday))<br class=""> wm = ed + ( wmo - ed) / (10.0**x)<br class=""> else<br class=""> wm = wmo<br class=""> endif<br class=""> if (wm.lt.0.) wm = 0.0<br class=""> ffmc(iday) = 59.5 * (250.0 - wm) / (147.2 + wm)<br class=""> if (ffmc(iday).gt.101.0) ffmc(iday) = 101.0<br class=""> if (ffmc(iday).lt.0.) ffmc(iday) = 0.<br class="">c<br class="">c DUFF MOISTURE CODE<br class="">c<br class=""> t1=t(iday)<br class=""> if (t(iday).lt.-1.1) t1 = -1.1<br class=""> rk = 1.894 * (t1 + 1.1) * (100.0 - h(iday)) * el(im) * 0.0001<br class=""> if(r(iday).le.1.5) then<br class=""> pr = dmco(iday)<br class=""> else<br class=""> ra = r(iday)<br class=""> rw = 0.92 * ra - 1.27<br class=""> wmi = 20.0 + 280.0 / exp(0.023 * dmco(iday))<br class=""> if(dmco(iday).le.33) then<br class=""> b = 100.0 / (0.5 + 0.3 * dmco(iday))<br class=""> elseif (dmco(iday).le.65) then<br class=""> b = 14.0 - 1.3 * log(dmco(iday))<br class=""> else<br class=""> b = 6.2 * log(dmco(iday)) - 17.2<br class=""> endif<br class=""> wmr = wmi + 1000.0 * rw / (48.77 + b * rw)<br class=""> pr = 43.43 * (5.6348 - log(wmr-20))<br class=""> endif<br class=""> if (pr.lt.0.) pr = 0.<br class=""> dmc(iday) = pr + rk<br class=""> if (dmc(iday).lt.0.) dmc(iday) = 0.<br class="">c<br class="">c DROUGHT CODE<br class=""><br class=""> t2 = t(iday)<br class=""> if (t(iday).lt.-2.8) t2 = -2.81<br class=""> pe = (.36 * (t2 + 2.8) + fl(mon)) / 2.0<br class=""> if (pe.lt.0.) pe = 0.0<br class="">c the fix for winter negative DC change<br class=""> if(r(iday).le.2.801) then<br class=""> dr = dco(iday)<br class=""> else<br class=""> ra = r(iday)<br class=""> rw = 0.83 * ra - 1.27<br class=""> smi = 800 * exp(-dco(iday) / 400)<br class=""> qr = smi + 3.937 * rw<br class=""> dr = 400 * log(800 / qr)<br class=""> if (dr.lt.0.) dr = 0.<br class=""> endif<br class=""> v = 0.36 * (t2 + 2.8) + fl(im)<br class=""> if (v.lt.0.) v = 0.<br class=""> dc(iday) = dr + v * 0.5<br class=""> if (dc(iday).lt.0.) dc(iday)=0.<br class="">c<br class="">c INITIAL SPREAD INDEX<br class="">c<br class=""> fm = 147.2 * (101.0 - ffmc(iday)) / (59.5 + ffmc(iday))<br class=""> sf = 19.115 * exp(-0.1386 * fm) * (1.0 + fm**5.31 / 4.93e07)<br class=""> xisi(iday) = sf * exp(0.05039 * w(iday))<br class="">c<br class="">c BUILD UP INDEX<br class="">c<br class=""> if(dmc(iday).eq.0.and.dc(iday).eq.0.) then<br class=""> bui(iday)=0<br class=""> elseif (dmc(iday).le.0.4*dc(iday)) then<br class=""> bui(iday) = 0.8 * dc(iday) * dmc(iday)<br class=""> 1 / (dmc(iday) + 0.4 * dc(iday))<br class=""> else<br class=""> bui(iday) = dmc(iday) - (1 - 0.8 * dc(iday)<br class=""> 1 / (dmc(iday) + 0.4 *<br class=""> 1 dc(iday))) * (0.92 + (0.0114 * dmc(iday))** 1.7)<br class=""> endif<br class=""> if (bui(iday).lt.0.) bui(iday) = 0.0<br class="">c<br class="">c FIRE WEATHER INDEX AND DSR<br class="">c<br class=""> if(bui(iday).gt.80.) then<br class=""> bb = 0.1 * xisi(iday) *<br class=""> 1 (1000.0 / (25.0 + 108.64 / exp(0.023*bui(iday))))<br class=""> else<br class=""> bb = 0.1 * xisi(iday) * (0.626 * bui(iday)**0.809 + 2.0)<br class=""> endif<br class=""> if (bb.le.1.) then<br class=""> fwi(iday) = bb<br class=""> else<br class=""> fwi(iday) = exp(2.72 * (0.434 * log(bb))**0.647 )<br class=""> endif<br class=""> dsr(iday) = 0.0272 * fwi(iday)**1.77<br class="">c<br class=""> ffmo(iday)=ffmc(iday)<br class=""> dmco(iday)=dmc(iday)<br class=""> dco(iday)=dc(iday)<br class=""> buio(iday)=bui(iday)<br class=""> fwio(iday)=fwi(iday)<br class=""> xisio(iday)=xisi(iday)<br class="">c<br class=""> enddo<br class=""><br class=""><br class="">uname -av<br class="">Darwin Dale.local 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64<br class=""></div>ncl -V<br class=""><div class=""><br class="">6.3.0<br class="">gxx --version<br class="">gxx: Command not found.<br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Mar 12, 2017 at 6:02 AM, Dennis Shea <span dir="ltr" class=""><<a href="mailto:shea@ucar.edu" target="_blank" class="">shea@ucar.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class="">Well, I think you would have to send the fortran code: newcffi_singlegrid.f<br class=""><br class=""></div>Also, the output from the following.<br class=""><br class=""></div>%> ncl -V<br class=""></div>%> gxx--version<br class=""></div>%> uname -a<br class=""><br class="">=====<br class=""></div>Further, based on a previous email, where you wrote "new to NCL", I suggest that you invest looking at NCL tutorial at:<br class=""> <a href="http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/" target="_blank" class="">http://www.ncl.ucar.edu/<wbr class="">Document/Manuals/NCL_User_<wbr class="">Guide/</a><br class=""><br class=""></div>Yes, it will take some time BUT you will learn NCL.<br class=""><br class=""></div>Good luck<br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote"><div class=""><div class="h5">On Sat, Mar 11, 2017 at 7:21 PM, dale zuri <span dir="ltr" class=""><<a href="mailto:dalezuri@gmail.com" target="_blank" class="">dalezuri@gmail.com</a>></span> wrote:<br class=""></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div class="h5"><div dir="ltr" class=""><div class=""><div class="">Hi,<br class=""></div>WRAPIT didn't give any error. But, when I run ncl code, I get below printed warning. And also printed the WRAPIT -d output. <br class=""><br class=""></div><div class="">Please, help me to fix this bug?<br class=""></div><div class="">Thank you,<br class=""></div><div class="">Dale<br class=""></div><div class=""><br class="">;;;;;;;;;;;;;;;;;;;;;;;;;;;<br class=""><br class="">warning:An error occurred loading the external file ./newcffi_singlegrid.so, file not loaded<br class="">dlopen(./newcffi_singlegrid.so<wbr class="">, 2): Symbol not found: _hin_<br class=""> Referenced from: ./newcffi_singlegrid.so<br class=""> Expected in: flat namespace<br class=""> in ./newcffi_singlegrid.so<br class="">warning:error at line 9 in file canadafire_FWItestZeikcomp.ncl<br class=""><br class="">fatal:syntax error: line 43 in file canadafire_FWItestZeikcomp.ncl before or near : <br class="">EX:<br class="">--^<br class=""><br class="">fatal:error in statement<br class="">fatal:Syntax Error in block, block not executed<br class=""><br class=""></div>Output of WRAPIT -d<br class="">COMPILING newcffi_singlegrid.f<br class="">gfortran -m64 -fPIC -v -c -fno-second-underscore newcffi_singlegrid.f<br class="">Using built-in specs.<br class="">COLLECT_GCC=gfortran<br class="">Target: x86_64-apple-darwin15.6.0<br class="">Configured with: ../gcc-6.2.0/configure --enable-languages=c++,fortran --with-gmp=/usr/local<br class="">Thread model: posix<br class="">gcc version 6.2.0 (GCC) <br class="">COLLECT_GCC_OPTIONS='-m64' '-fPIC' '-v' '-c' '-fno-second-underscore' '-mmacosx-version-min=10.12.3' '-mtune=core2'<br class=""> /usr/local/libexec/gcc/x86_64<wbr class="">-apple-darwin15.6.0/6.2.0/f951 newcffi_singlegrid.f -ffixed-form -fPIC -quiet -dumpbase newcffi_singlegrid.f -m64 -mmacosx-version-min=10.12.3 -mtune=core2 -auxbase newcffi_singlegrid -version -fPIC -fno-second-underscore -fintrinsic-modules-path /usr/local/lib/gcc/x86_64-appl<wbr class="">e-darwin15.6.0/6.2.0/finclude -o /var/folders/60/qx8g2gvj169741<wbr class="">yy29b3h0hm0000gn/T//ccLtfHN9.s<br class="">GNU Fortran (GCC) version 6.2.0 (x86_64-apple-darwin15.6.0)<br class=""> compiled by GNU C version 6.2.0, GMP version 6.0.0, MPFR version 3.1.2-p10, MPC version 1.0.2, isl version none<br class="">GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072<br class="">GNU Fortran2008 (GCC) version 6.2.0 (x86_64-apple-darwin15.6.0)<br class=""> compiled by GNU C version 6.2.0, GMP version 6.0.0, MPFR version 3.1.2-p10, MPC version 1.0.2, isl version none<br class="">GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072<br class="">COLLECT_GCC_OPTIONS='-m64' '-fPIC' '-v' '-c' '-fno-second-underscore' '-mmacosx-version-min=10.12.3' '-mtune=core2'<br class=""> as -arch x86_64 -force_cpusubtype_ALL -o newcffi_singlegrid.o /var/folders/60/qx8g2gvj169741<wbr class="">yy29b3h0hm0000gn/T//ccLtfHN9.s<br class="">COMPILER_PATH=/usr/local/libex<wbr class="">ec/gcc/x86_64-apple-darwin15.<wbr class="">6.0/6.2.0/:/usr/local/libexec/<wbr class="">gcc/x86_64-apple-darwin15.6.0/<wbr class="">6.2.0/:/usr/local/libexec/gcc/<wbr class="">x86_64-apple-darwin15.6.0/:/<wbr class="">usr/local/lib/gcc/x86_64-<wbr class="">apple-darwin15.6.0/6.2.0/:/<wbr class="">usr/local/lib/gcc/x86_64-<wbr class="">apple-darwin15.6.0/<br class="">LIBRARY_PATH=/usr/local/lib/gc<wbr class="">c/x86_64-apple-darwin15.6.0/6.<wbr class="">2.0/:/usr/local/lib/gcc/x86_64<wbr class="">-apple-darwin15.6.0/6.2.0/../.<wbr class="">./../<br class="">COLLECT_GCC_OPTIONS='-m64' '-fPIC' '-v' '-c' '-fno-second-underscore' '-mmacosx-version-min=10.12.3' '-mtune=core2'<br class="">SHARED OBJECT NAME (SharedObj): newcffi_singlegrid.so<br class="">LINKER SUFFIX (ld_suffix): WRAPIT.o newcffi_singlegrid.o -o newcffi_singlegrid.so<br class=""> <br class="">LINKING<br class="">gcc -m64 -bundle -flat_namespace -undefined suppress WRAPIT.o newcffi_singlegrid.o -o newcffi_singlegrid.so -lgfortran<br class="">END WRAPIT<br class=""><br class=""><br class=""><div class="">Thank you<br class=""></div><div class=""><br class=""><br class=""><br class=""></div></div>
<br class=""></div></div>______________________________<wbr class="">_________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/mailma<wbr class="">n/listinfo/ncl-talk</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</blockquote></div><br class=""></div>
_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></div></div></body></html>