<div dir="ltr">Hi Dennis,<div><br></div><div>The output for uname -a is: Darwin <a href="http://soil201051006.cfans.umn.edu">soil201051006.cfans.umn.edu</a> 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64</div><div><br></div><div>The output for gcc --version is: Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1</div>
<p class=""><span class="">Apple LLVM version 7.3.0 (clang-703.0.29)</span></p>
<p class=""><span class="">Target: x86_64-apple-darwin15.4.0</span></p>
<p class=""><span class="">Thread model: posix</span></p>
<p class=""><span class="">InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin</span></p><p class=""><br></p><p class="">I am able to obtain the same output and the rotation works fine from the modified script you sent me of the annually averaged data. However, now I am trying to produce REOFs of monthly and seasonally averaged data. I noticed the main thing you modified in my original script for the annual REOFs is the incorporation of the 'month_to_annual_weighted' function as opposed to the 'month_to_annual' function that I was using to average my monthly data into annual data. So I thought maybe that was the reason why the 'eofunc_varimax_Wrap' function was not finishing, my data was not a weighted average. So now to compute seasonal REOFs I am doing the following to have a weighted seasonally averaged dataset (showing just Dec, Jan, Feb as an example): </p><p class="">wgt = (/0.08493151, 0.08493151, 0.076712325/)<br><br>djf = new((/3,114,180,360/),float)<br><br>djf(0,:,:,:) = SST(11::12,:,:) ;December<br><br>djf(1,:,:,:) = SST(0::12,:,:) ;January<br><br>djf(2,:,:,:) = SST(1::12,:,:) ;February<br><br><br>djf_wgt_avg = dim_avg_wgt_n(djf,wgt,0,0)<br><br>copy_VarMeta(SST(11::12,:,:),djf_wgt_avg)</p><p class="">I then area weight my dfj_wgt_avg data, calculate the EOFs, and the REOFs (using the 'eofunc_varimax_Wrap' function), however, the rotation will not complete and stalls just like my original problem. </p><p class="">On another note, I also would like to create monthly REOFs and when I use the raw data (which is monthly average values) the rotation stalls as well. </p><p class="">If you'd like I can send my scripts (one for the seasonal average, and one for the monthly) securely to you. </p><p class="">Let me know if you have any suggestions. I appreciate your help. </p><p class="">Thank you,</p><p class="">Allison </p><p class=""><br></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 2, 2016 at 4:20 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></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><div><div>Hi Allison<br><br></div>I have run (see below) the script on my old MAC using NCL 6.3.0 and the beta 6.4.0 with no problems.<br><br></div><div>---------------------------<br><br>%> ncl ncl-talk_reof.ncl<br><br></div>Specifically:<span class=""><br><br>neval = 6<br>optEOF = True<br><br></span>ev = eofunc_Wrap(av,neval,optEOF)<br>printVarSummary(ev)<br>printMinMax(ev,0)<br>print("===")<br><br>;***** VARIMAX ROTATION *****<br><br>ev_rot = eofunc_varimax_Wrap(ev,-1)<br>printVarSummary(ev_rot)<br>printMinMax(ev_rot,0)<br><br></div>============ OUTPUT ===========<br><br><br>Variable: ev<br>Type: float<br>Total Size: 1555200 bytes<br> 388800 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [evn | 6] x [latitude | 180] x [longitude | 360]<br>Coordinates: <br> evn: [1..6]<br> latitude: [89.5..-89.5]<br> longitude: [-179.5..179.5]<br>Number Of Attributes: 7<br> eval_transpose : ( 4.416919, 2.388321, 0.7132505, 0.5452091, 0.4846498, 0.388064 )<br> eval : ( 1492.919, 807.2526, 241.0787, 184.2807, 163.8116, 131.1656 )<br> pcvar : ( 34.8554, 18.84705, 5.6285, 4.302428, 3.824535, 3.062344 )<br> matrix : covariance<br> method : transpose<br> _FillValue : -1000<br> long_name : EOF: sst<br>(0) EOF: sst : min=-0.0294479 max=0.0344466<br>(0) ===<br> <br><div><div><br>Variable: ev_rot<br>Type: float<br>Total Size: 1555200 bytes<br> 388800 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [evn | 6] x [latitude | 180] x [longitude | 360]<br>Coordinates: <br> evn: [1..6]<br> latitude: [89.5..-89.5]<br> longitude: [-179.5..179.5]<br>Number Of Attributes: 4<br> pcvar_varimax : ( 20.40459, 19.06581, 13.1998, 9.32391, 4.929915, 3.596234 )<br> variance_varimax : ( 873.9649, 816.6224, 565.3708, 399.3596, 211.157, 154.0331 )<br> _FillValue : -1000<br> op : Kaiser Varimax Rotation: opt=-1<br>(0) min=-0.527019 max=0.743203<br>(0) ===<br><br>==============<br></div><div>What do the following return?<br><br></div><div>%> uname -a<br></div><div>%> gcc --version<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>D<br></div><div><br></div></font></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 1, 2016 at 12:48 PM, Allison Serakos <span dir="ltr"><<a href="mailto:sera0021@umn.edu" target="_blank">sera0021@umn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Dennis,<div><br></div><div>Neither 'eofunc_varimax' or 'eofunc_varimax_Wrap' will work. </div><div><br></div><div>Let me know if you are able to take another look. </div><div><br></div><div>Thanks for your help,</div><div>Allison</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 27, 2016 at 11:55 AM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></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>I'm am not sure why 'eofunc_varimax' would work and 'eofunc_varimax_Wrap' would not. The *_Wrap invokes the function and, where appropriate, adds attributes and coordinates. Here is the code used: <br><br>undef ("eofunc_varimax_Wrap")<br>function eofunc_varimax_Wrap (eof:numeric, optEVX:integer)<br>local eofEVX<br>begin<br> eofEVX = eofunc_varimax(eof, optEVX) ; invoke built-in function<br> eofEVX@op = "Kaiser Varimax Rotation: opt="+optEVX<br> copy_VarCoords(eof, eofEVX)<br><br> return (eofEVX) ; return<br>end<br><br>===<br><br></div>I am busy and will look later.<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 5:04 PM, Allison Serakos <span dir="ltr"><<a href="mailto:sera0021@umn.edu" target="_blank">sera0021@umn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Dennis,<div><br></div><div>Thank you again for your assistance with my issue of the eofunc_varimax_Wrap function stalling. I was able to produce REOF plots of the annually averaged data. However, I am running into the same issue of the eofunc_varimax_Wrap function stalling when I use the original monthly data as well as using a weighted seasonal average instead of a weighted annual average. </div><div><br></div><div>I am wondering if you could explain your modifications to the script I sent you. I am also wondering if you have an idea as to why now the original monthly dataset and the weighted seasonally averaged dataset stall with the eofunc_varimax_Wrap function.</div><div><br></div><div>Thanks again for all your help.</div><div><br></div><div>Kind regards,</div><div>Allison</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 30, 2016 at 8:09 AM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">offline from ncl-talk<br><br>re my comment: <br><span><br><div>I am not sure why you want to rotate.<br></div></span><div><span>The 1st two modes look very distinct.<br><br></span>===<br><br></div><div>Deriving a "global" eof is rather unusual for ocean grids. The atmosphere is 'continuous'. The oceans are 'discontinuous' due to the continents. The EOFs may be though of as orthogonal structures that result from covariances. Deriving a 'global' EOF is implicitly 'saying' that SST variations in the Kuroshio may be related to the Gulf Stream.<br><br></div><div>An Example of using an EOF analysis over the ocean is:<br><br><a href="http://www.ncl.ucar.edu/Applications/eof.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/eof.shtml</a><br></div><div>Example 3<br><br></div><div>Good Luck<br></div><div><br></div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 29, 2016 at 4:17 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></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><div><div>Hi Allison,<br><br></div>Can you please try the attached? <br><br></div><div>I am not sure why you want to rotate.<br></div><div>The 1st two modes look very distinct.<br></div><div><br></div><div>I did not plot anything. I'll let that to you<br><br></div><div><br></div>THX<span><font color="#888888"><br></font></span></div><span><font color="#888888">D<br></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Jun 28, 2016 at 8:07 AM, Allison Serakos <span dir="ltr"><<a href="mailto:sera0021@umn.edu" target="_blank">sera0021@umn.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">script name: ncl-talk_reof.ncl<div>data file name: HadISST_sst.nc.gz</div><div><br></div><div>Thank you,</div><div>Allison</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 27, 2016 at 1:49 PM, Allison Serakos <span dir="ltr"><<a href="mailto:sera0021@umn.edu" target="_blank">sera0021@umn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<p class="MsoNormal">Hello,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I am using the eofunc_varimax_Wrap function to analyze global
rotated EOFs produced from the eofunc_Wrap function. However, when I run my script,
it hangs when it reaches the eofunc_varimax_Wrap function. The script does not
finish and I get no error message. </p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">The dataset that I am using is the </span>HadISST
1.1 monthly average sea surface temperature<span style="color:black"> dataset.
It is a 3-dimensional (time, latitude, longitude) global 1</span><span style="font-family:Symbol;color:black">°</span><span style="color:black"> x 1</span><span style="font-family:Symbol;color:black">°</span><span style="color:black"> grid dataset with
1755 time values, 180 latitude, and 360 longitude. I produce annually averaged values
and spatially weighted it prior to the EOF analysis. </span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal">I have been using a Mac machine with NCL version 6.3.0 and a
Linux machine with NCL version 6.2.1 and the program hangs when conducting the
rotation. </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I tried running the script with global data for different
time periods (all between 113 and 102 years of global data) on both the Mac and
Linux machines <span style="background-image:initial;background-repeat:initial">and found that the function works only for some time periods and crashes
with others. These periods differ between the two Mac and Linux machines that I
used.</span><span style="font-size:10pt;font-family:Times"> </span>I also
tried reshaping the data from a 3D matrix to a 2D matrix using the reshape
function and combining the spatial components. In this situation, the rotation
output was still the same as above for the respective time periods and
machines. Additionally, I tried reducing the spatial domain and found that when
I reduce the latitude range (anything smaller than 69S<a name="m_1760501546228490898_m_-5171419734284062145_m_28888678091562822_m_-5225625536249271144_m_1986898072973781198_m_-3064842492227950264_m_2278485676934046223_m_-7288369395758337668__GoBack"></a>-90N)
for any time period the script runs on both machines and the function does not
crash. <span style="font-size:10pt;font-family:Times"></span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I used ‘ncl –x’ to see if there is an error in my script,
but the script only crashes before the eofunc_varimax_Warp function with no
messages. When I run the script, NCL uses about 592.5MB of the 12GB of memory
on the Mac machine, so I do not believe this an issue of lack of memory space. </p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">I am wondering if there is a known problem with
the eofunc_varimax_Wrap function? I am also wondering if you have any thoughts
as to why the function may be crashing under certain situations and not others?</span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">Here is a copy of my EOF and Varimax Rotation
script:</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">;----------------------------------------------------------------
</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">;***** EOF *****</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">neval = 6</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">optEOF = True</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">optEOF@method =
"transpose"</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">optEOF@jopt = 0</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black"> </span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">eof =
eofunc_Wrap(av,neval,optEOF)</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black"> </span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">;***** VARIMAX ROTATION *****</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">eof_rot =
eofunc_varimax_Wrap(eof,-1)</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">eof_varimax_reorder(eof_rot)</span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Menlo Regular";color:black">;----------------------------------------------------------------</span><span style="color:black"></span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">Thanks for your help in advance. </span></p>
<p class="MsoNormal"><span style="color:black"> </span></p>
<p class="MsoNormal"><span style="color:black">Kind regards,</span></p>
<p class="MsoNormal"><span style="color:black">Allison</span></p><span><font color="#888888">
<p class="MsoNormal"> </p>-- <br><div data-smartmail="gmail_signature"><div dir="ltr">Allison Serakos<div>Graduate Research Assistant</div><div>Department of Soil, Water, and Climate</div><div>University of Minnesota</div><div>1991 Upper Buford Circle, Rm S535</div><div>St. Paul, MN 55108</div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr">Allison Serakos<div>Graduate Research Assistant</div><div>Department of Soil, Water, and Climate</div><div>University of Minnesota</div><div>1991 Upper Buford Circle, Rm S535</div><div>St. Paul, MN 55108</div></div></div>
</div>
</div></div><br></div></div><span>_______________________________________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr">Allison Serakos<div>Graduate Research Assistant</div><div>Department of Soil, Water, and Climate</div><div>University of Minnesota</div><div>1991 Upper Buford Circle, Rm S535</div><div>St. Paul, MN 55108</div></div></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature"><div dir="ltr">Allison Serakos<div>Graduate Research Assistant</div><div>Department of Soil, Water, and Climate</div><div>University of Minnesota</div><div>1991 Upper Buford Circle, Rm S535</div><div>St. Paul, MN 55108</div></div></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Allison Serakos<div>Graduate Research Assistant</div><div>Department of Soil, Water, and Climate</div><div>University of Minnesota</div><div>1991 Upper Buford Circle, Rm S535</div><div>St. Paul, MN 55108</div></div></div>
</div>