<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=""><pre style="background-color: rgb(255, 255, 255);" class=""><i class="">Hi all,
</i><i class="">I want to call Fortran in NCL to read in data, but it shows errors on my Mac while
</i><i class="">run WRAPIT, would you please help me find out the reasons?</i></pre><pre style="background-color: rgb(255, 255, 255);" class=""><i class="">Thanks !</i></pre><pre style="background-color: rgb(255, 255, 255);" class=""><pre class=""><i class="">error 1,while WRAPTI </i><span style="font-family: Menlo; font-size: 11px;" class=""> sum_q_total</span><i class="">.stub </i><span style="font-family: Menlo; font-size: 11px;" class=""> sum_q_total</span><i class="">.f90,shows:</i></pre><pre class=""><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">WRAPIT.c:133:2: </b></span><span style="font-variant-ligatures: no-common-ligatures; color: #d53bd3" class=""><b class="">warning: </b></span><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">implicit declaration of function 'sum_q_total_' is</b></span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">&nbsp; &nbsp; &nbsp; invalid in C99 [-Wimplicit-function-declaration]</b></span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; NGCALLF(sum_q_total,SUM_Q_TOTAL)(nlev,sn,ew,t,q,sumforq);</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 189, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">&nbsp; &nbsp; &nbsp; &nbsp; ^</b></span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">/Users/yangrui/soft/ncl-6.2.1/include/ncarg/c.h:31:29: note: </b>expanded from macro</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; 'NGCALLF'</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">#define NGCALLF(reg,caps) &nbsp; reg##_</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 189, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</b></span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">&lt;scratch space&gt;:292:1: note: </b>expanded from here</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">sum_q_total_</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(52, 189, 38);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">^</b></span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">1 warning generated.</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">COMPILING sum_q_total.f90</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">LINKING</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">ld: library not found for -lgfortran</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">clang: error: linker command failed with exit code 1 (use -v to see invocation)</span></p>
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">END WRAPIT</span></p><div class=""><pre class=""><i class="">erro2, while run ncl sum_q_total.ncl
</i><i class="">
</i><i class="">       warning:Could not find Init() in external file ./getlatlon.so, file
</i><i class=""> not loaded</i></pre><pre class=""><i class="">***********fortran program**************</i></pre><pre class="">subroutine   sum_q_total(nlev,sn,ew,q,sumforq)
    implicit none
    integer,intent(in)  ::nlev,sn,ew
    real,   intent(in)  ::q(ew,sn,nlev)
    real,   intent(out) ::sumforq(ew,sn)
    integer             ::i,j,k
    sumforq=0.
    do k=1,nlev
        do j=1,sn
            do i=1,ew
                 sumforq(i,j)=sumforq(i,j)+q(i,j,k)
            enddo
        enddo
    enddo
    return
end subroutine sum_q_total</pre><pre class=""><i class=""> *************************stub file************************</i></pre><pre class="">C NCLFORTSTART
  subroutine   sum_q_total(nlev,sn,ew,t,q,sumforq)
  integer nlev,sn,ew
  dimension t(ew,sn,nlev),q(ew,sn,nlev),sumforq(ew,sn)
C NCLEND</pre></div></pre></pre></body></html>