<div dir="ltr"><div>Your code<br>        f= addfile(&quot;./Cangrd/<a href="http://tasmax_cangrd_1900_1950.nc">tasmax_cangrd_1900_1950.nc</a>&quot;, &quot;r&quot;)<br>        tasmax = f-&gt;tasmax                 ; tasmax(time,lat,lon)<br>        tasmax@units = &quot;degC&quot;          <br>        printVarSummary(tasmax)       <br>        time = f-&gt;time       <br></div><div>        jday = time   ; &lt;******* I would be **stunned** if this were correct   <br>        radext   = radext_fao56(jday, lat, 1)    ; (time,lat)<br><br>---<br>Please read:<br>  <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml">http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml</a><br>  <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml">http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml</a><br>  <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/day_of_year.shtml">http://www.ncl.ucar.edu/Document/Functions/Built-in/day_of_year.shtml</a><br><br>        f= addfile(&quot;./Cangrd/<a href="http://tasmax_cangrd_1900_1950.nc">tasmax_cangrd_1900_1950.nc</a>&quot;, &quot;r&quot;)<br>        tasmax = f-&gt;tasmax                 ; tasmax(time,lat,lon)       <br>        printVarSummary(tasmax)       <br><br>        time   = f-&gt;time       <br>        date  = <strong>cd_calendar</strong>(time, -5)<br>        jday  = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/day_of_year.shtml"><strong>day_of_year</strong></a>(date(:,0),date(:,1),date(:,2)<br><pre>    radext   = radext_fao56(jday, tasmax&amp;lat, 1)    ; (time,lat)<br><br>    RADEXT   = conform(tas, radext, (/0,1/) )   ; time;lat,lon<br>    copy_VarAtts(radext, RADEXT)<br>    copy_VarCoords(tas,  RADEXT)<br>    printVarSummary(RADEXT)<br><br>---<br></pre><pre>I also suggest you read the FAO-56 document. <br>In particular, the section on external radiation. <br><br></pre><pre>Good luck<br></pre><pre><br><br></pre><br>        <br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 12:14 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">In the future, please respond back to ncl-talk so other users can benefit from the answers.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Dennis will have to answer your question about the function, as he wrote the suite of crop routines. He&#39;s on ncl-talk.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 11:45 AM, Tam, Benita (EC) <span dir="ltr">&lt;<a href="mailto:benita.tam@canada.ca" target="_blank">benita.tam@canada.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Thanks, Mary.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">I have one more question: I am trying to produce extraterrestrial radiation (radext) with three dimensions, but currently, my output is only 2D. Is there a
 way to ensure that NCL keeps my longitude dimension?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">(script attached)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">Benita<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Mary Haley [mailto:<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>]
<br>
<b>Sent:</b> July 26, 2016 1:10 PM<br>
<b>To:</b> Tam, Benita (EC)<br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
<b>Subject:</b> Re: [ncl-talk] Testing out new function (ncl 6.4.0): radext_fao56 doesn&#39;t work<u></u><u></u></span></p><div><div class="h5"><div><div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">You need to load the &quot;crop.ncl&quot; library:</span><u></u><u></u></p>
</div>
<div>
<pre><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/<a href="http://www.ncl.ucar.edu/Document/Functions/Crop/crop.shtml" target="_blank">crop.ncl</a>&quot;</span><span style="font-size:12.0pt"><u></u><u></u></span></pre>
<pre><span style="font-size:12.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">The documentation for this function has this information in the &quot;Prototype&quot; section:</span><span style="font-size:12.0pt"><u></u><u></u></span></pre>
<pre><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;"><a href="http://www.ncl.ucar.edu/Document/Functions/Crop/radext_fao56.shtml" target="_blank">http://www.ncl.ucar.edu/Document/Functions/Crop/radext_fao56.shtml</a></span><u></u><u></u></pre>
<pre><u></u> <u></u></pre>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Tue, Jul 26, 2016 at 10:48 AM, Tam, Benita (EC) &lt;<a href="mailto:benita.tam@canada.ca" target="_blank">benita.tam@canada.ca</a>&gt; wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA">Hi,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA">I am testing out the latest version of NCL (6.4.0). The function, radext_fao56, doesn’t seem to work.
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA">Error:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA">fatal:Undefined identifier: (radext_fao56) is undefined, can&#39;t continue</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA">fatal:[&quot;Execute.c&quot;:8575]:Execute: Error occurred at or near line 30 in file cangrd_ra.ncl</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA">(NCL script attached)</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA">Thanks,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;" lang="EN-CA">Benita</span><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div></div></div>
</div>

</blockquote></div><br></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>