<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Franz,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">

Can print the value of: <span style="font-size:12.800000190734863px;font-family:arial,sans-serif">depth1dtC_surf(</span><u style="font-size:12.800000190734863px;font-family:arial,sans-serif"></u><span style="font-size:12.800000190734863px;font-family:arial,sans-serif">imod,ilev)</span></div>

<div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-size:12.800000190734863px;font-family:arial,sans-serif">before 17306?</span></div><div class="gmail_default" style="font-family:verdana,sans-serif">

<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div class="gmail_default"><font color="#500050" face="arial, sans-serif">Wei</font></div><div class="gmail_default">

<font color="#500050" face="arial, sans-serif"><br></font></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><font face="tahoma, sans-serif">================================================</font><div>

<font face="tahoma, sans-serif">1850 Table Mesa Dr.</font></div><div><font face="tahoma, sans-serif">Boulder, CO 80307</font></div><div><font face="tahoma, sans-serif">Phone: 303-497-8924</font></div></div></div>
<br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 3:51 PM, franz <span dir="ltr">&lt;<a href="mailto:f.trotta@sincem.unibo.it" target="_blank">f.trotta@sincem.unibo.it</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

As you said, I have used &#39;mintempCstring&#39; and &#39;mintempCstring&#39; as local variable in the loop removing the line  17274 and  17275.<br>
Now the code look like:<br>
<br>
17274<br>
17275    if(lplot_outModSurfC) then<br>
17276<br>
17277       if (lplot_outModSurfC_temp) then<br>
17278<br>
17279          print(&quot;&quot;)<br>
17280          print(&quot;     ### Plot SURF-TEMP&quot;)<br>
17281          system(&quot;cd &quot; + path_exp_figure_comp+&quot;/<u></u>outNemo/temp ; rm temp*.png&quot;)<br>
17282<br>
17283          tempC_diff(0:nt_max-1,0:nz_<u></u>max-1,0:ny_max-1,0:nx_max-1) = \<br>
17284                     tempC(1,0:nt_max-1,0:nz_max-1,<u></u>0:ny_max-1,0:nx_max-1) - \<br>
17285                     tempC(0,0:nt_max-1,0:nz_max-1,<u></u>0:ny_max-1,0:nx_max-1)<br>
17286<br>
17287          colorsMap = &quot;rainbow&quot;<br>
17288          namefile  = &quot;tempC_xy&quot;<br>
17289          titleplot = &quot;Temperature&quot;<br>
17290          label     = &quot; &quot;<br>
17291          ilev      = 0<br>
17292          itime     = 0<br>
17293          printVarSummary(LeftStringC)<br>
17294          ;print(minmaxtempCstring)<br>
17295          do imod=0,1<br>
17296              print(&quot;imod=&quot;+imod)<br>
17297              ;LeftStringC(imod) = &quot;z(&quot;+ilev+&quot;)=&quot;+depth1dtC_surf(<u></u>imod,ilev)+&quot;m  range=[&quot;+ \<br>
17298              ;                    sprintf(&quot;%0.2f&quot;,min(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))+&quot;,&quot;+ \<br>
17299              ;                    sprintf(&quot;%0.2f&quot;,max(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))+&quot;]&quot;<br>
17300              mintempC = min(tempC(imod,itime,ilev,0:<u></u>ny(imod)-1,0:nx(imod)-1))<br>
17301              maxtempC = max(tempC(imod,itime,ilev,0:<u></u>ny(imod)-1,0:nx(imod)-1))<br>
17302              mintempCstring = sprintf(&quot;%0.2f&quot;,mintempC)<br>
17303              maxtempCstring = sprintf(&quot;%0.2f&quot;,maxtempC)<br>
17304              print(mintempCstring)<br>
17305              print(maxtempCstring)<br>
17306              LeftStringC(imod) = &quot;z(&quot;+ilev+&quot;)=&quot;+depth1dtC_surf(<u></u>imod,ilev)+&quot;m  range=[&quot;+ \<br>
17307                                  mintempCstring+&quot;,&quot;+<u></u>maxtempCstring+&quot;]&quot;<br>
17308          end do<br>
<br>
<br>
<br>
<br>
<br>
but there is still the error &quot;Assignment not supported for left-hand type&quot; :<br>
at the end of the loop:<div class=""><br>
<br>
<br>
Variable: LeftStringC<br>
Type: string<br>
Total Size: 16 bytes<br>
            2 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes:   [2]<br>
Coordinates:<br>
Number Of Attributes: 1<br>
  _FillValue :  missing<br></div><div class="">
fatal:Assignment not supported for left-hand type<br></div>
fatal:[&quot;Execute.c&quot;:8128]:<u></u>Execute: Error occurred at or near line 17308 in file main.ncl<br>
<br>
<br>
<br>
<br>
other suggestion?<br>
<br>
thanks<br>
Francesco<div><div class="h5"><br>
<br>
<br>
On <a href="tel:24-07-2014%2022" value="+12407201422" target="_blank">24-07-2014 22</a>:12, Wei Huang wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Franz,<br>
<br>
 Change:<br>
<br>
17274    mintempCstring = new(nmod,string,&quot;&quot;)<br>
 17275    maxtempCstring = new(nmod,string,&quot;&quot;)<br>
<br>
to:<br>
<br>
17274    mintempCstring = new((/nmod/),string,&quot;&quot;)<br>
 17275    maxtempCstring = new((/nmod/),string,&quot;&quot;)<br>
<br>
 Or just remove these two lines.<br>
Then remove (imod) from mintempCstring and maxtempCstring.<br>
So these two will be just local variable.<br>
<br>
Wei <br>
<br>
 ==============================<u></u>==================<br>
1850 Table Mesa Dr.<br>
Boulder, CO 80307<br>
Phone: <a href="tel:303-497-8924" value="+13034978924" target="_blank">303-497-8924</a><br>
<br>
On Thu, Jul 24, 2014 at 1:53 PM, franz &lt;<a href="mailto:f.trotta@sincem.unibo.it" target="_blank">f.trotta@sincem.unibo.it</a>&gt;<br>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I tried to change the code how you said, now this part of the code<br>
look like:<br>
<br>
17271<br>
17272<br>
17273    print(nmod)<br>
17274    mintempCstring = new(nmod,string,&quot;&quot;)<br>
17275    maxtempCstring = new(nmod,string,&quot;&quot;)<br>
17276<br>
17277    if(lplot_outModSurfC) then<br>
17278<br>
17279       if (lplot_outModSurfC_temp) then<br>
17280<br>
17281          print(&quot;&quot;)<br>
17282          print(&quot;     ### Plot SURF-TEMP&quot;)<br>
17283          system(&quot;cd &quot; +<br>
path_exp_figure_comp+&quot;/<u></u>outNemo/temp ; rm temp*.png&quot;)<br>
17284<br>
17285        <br>
 tempC_diff(0:nt_max-1,0:nz_<u></u>max-1,0:ny_max-1,0:nx_max-1) =<br>
17286                    <br>
tempC(1,0:nt_max-1,0:nz_max-1,<u></u>0:ny_max-1,0:nx_max-1) -<br>
17287                    <br>
tempC(0,0:nt_max-1,0:nz_max-1,<u></u>0:ny_max-1,0:nx_max-1)<br>
17288<br>
17289          colorsMap = &quot;rainbow&quot;<br>
17290          namefile  = &quot;tempC_xy&quot;<br>
17291          titleplot = &quot;Temperature&quot;<br>
17292          label     = &quot; &quot;<br>
17293          ilev      = 0<br>
17294          itime     = 0<br>
17295          printVarSummary(LeftStringC)<br>
17296          print(mintempCstring)<br>
17297          print(maxtempCstring)<br>
17298          do imod=0,1<br>
17299              print(&quot;imod=&quot;+imod)<br>
17300              ;LeftStringC(imod) =<br>
&quot;z(&quot;+ilev+&quot;)=&quot;+depth1dtC_surf(<u></u>imod,ilev)+&quot;m  range=[&quot;+<br>
17301              ;                  <br>
<br>
</blockquote>
 sprintf(&quot;%0.2f&quot;,min(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))+&quot;,&quot;+<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
17302              ;                  <br>
<br>
</blockquote>
 sprintf(&quot;%0.2f&quot;,max(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))+&quot;]&quot;<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
17303              mintempCstring(imod) =<br>
<br>
</blockquote>
sprintf(&quot;%0.2f&quot;,min(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
17304              maxtempCstring(imod) =<br>
<br>
</blockquote>
sprintf(&quot;%0.2f&quot;,max(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
17305              LeftStringC(imod) =<br>
&quot;z(&quot;+ilev+&quot;)=&quot;+depth1dtC_surf(<u></u>imod,ilev)+&quot;m  range=[&quot;+<br>
17306                                <br>
 mintempCstring(imod)+&quot;,&quot;+<u></u>maxtempCstring(imod)+&quot;]&quot;<br>
17307          end do<br>
<br>
but there is still the ERROR &quot;Assignment not supported for<br>
left-hand type&quot;<br>
this time al line 17274:<br>
<br>
Variable: nmod<br>
Type: integer<br>
Total Size: 4 bytes<br>
<br>
            1 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes:   [1]<br>
Coordinates:<br>
(0)     2<br>
<br>
fatal:Assignment not supported for left-hand type<br>
fatal:[&quot;Execute.c&quot;:8128]:<u></u>Execute: Error occurred at or near line<br>
17274 in file main.ncl<br>
<br>
./run_surf.sh: line 65: 78002 Segmentation fault: 11  ncl<br>
&#39;CONFIG=&#39;&quot;${CONFIG}&quot; &#39;EXPERIM=&#39;&quot;${EXPERIM}&quot; &#39;DATE00=&#39;&quot;${DATE00}&quot;<br>
&#39;path_base=&#39;&quot;${BASE_DIR}&quot; main.ncl<br>
sincem29:experiments franz$<br>
<br>
How can it be? Now I&#39;m confuse.<br>
<br>
If I remove the code line: 17298 - 17307 the program is ok.<br>
<br>
thanks<br>
Francesco<br>
<br></div></div><div class="">
On 24-07-2014 19 [1]:20, Wei Huang wrote:<br>
<br>
Franz,<br>
<br>
 Try change your code line: 17299 - 17301 from:<br>
<br>
LeftStringC(imod) = &quot;z(&quot;+ilev+&quot;)=&quot;+depth1dtC_surf(<u></u>imod,ilev)+&quot;m<br>
 range=[&quot;+<br>
<br>
</div></blockquote><div class="">
sprintf(&quot;%0.2f&quot;,min(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))+&quot;,&quot;+<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
</blockquote>
sprintf(&quot;%0.2f&quot;,max(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))+&quot;]&quot;<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
to:<br>
<br>
mintempCstring =<br>
<br>
</blockquote>
sprintf(&quot;%0.2f&quot;,min(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 maxtempCstring =<br>
<br>
</blockquote>
sprintf(&quot;%0.2f&quot;,max(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
LeftStringC(imod) = &quot;z(&quot;+ilev+&quot;)=&quot;+depth1dtC_surf(<u></u>imod,ilev)+&quot;m<br>
 range=[&quot;+<br>
                    mintempCstring+&quot;,&quot;+<br>
                    maxtempCstring+&quot;]&quot;<br>
<br>
and let us see if the error persist.<br>
<br>
 Wei<br>
<br>
==============================<u></u>==================<br>
1850 Table Mesa Dr.<br>
Boulder, CO 80307<br></div>
Phone: <a href="tel:303-497-8924" value="+13034978924" target="_blank">303-497-8924</a> [2]<div><div class="h5"><br>
<br>
On Thu, Jul 24, 2014 at 11:05 AM, franz &lt;<a href="mailto:f.trotta@sincem.unibo.it" target="_blank">f.trotta@sincem.unibo.it</a>&gt;<br>
wrote:<br>
<br>
Dear ncl-team<br>
    I&#39;m using the ncl 6.1.2 on imac Darwin 64bit<br>
    I got this fatal error: &quot;Assignment not supported for<br>
left-hand type&quot;<br>
    and I don&#39;t understand the source of this error.<br>
<br>
   Below there is part of my code (where I think NCL does not<br>
like)<br>
   (I putted printVarSummary(...) to shows the info of the<br>
suspected<br>
variables)<br>
<br>
|<br>
|<br>
228    nmod = 2<br>
|<br>
|<br>
1371    LeftStringC = new(2,string)<br>
|<br>
|<br>
|<br>
1428    do imod=0,nmod-1<br>
1429<br>
|<br>
|<br>
|<br>
16321<br>
16322    end do ;imod<br>
<br>
|<br>
|<br>
|<br>
17276   if(lplot_outModSurfC) then<br>
17277<br>
17278       if (lplot_outModSurfC_temp) then<br>
17279<br>
17280          print(&quot;&quot;)<br>
17281          print(&quot;     ### Plot SURF-TEMP&quot;)<br>
17282          system(&quot;cd &quot; +<br>
path_exp_figure_comp+&quot;/<u></u>outNemo/temp ; rm<br>
temp*.png&quot;)<br>
17283<br>
17284        <br>
 tempC_diff(0:nt_max-1,0:nz_<u></u>max-1,0:ny_max-1,0:nx_max-1) =<br>
<br>
17285<br>
tempC(1,0:nt_max-1,0:nz_max-1,<u></u>0:ny_max-1,0:nx_max-1) -<br>
17286<br>
tempC(0,0:nt_max-1,0:nz_max-1,<u></u>0:ny_max-1,0:nx_max-1)<br>
17287<br>
17288          colorsMap = &quot;rainbow&quot;<br>
17289          namefile  = &quot;tempC_xy&quot;<br>
17290          titleplot = &quot;Temperature&quot;<br>
17291          label     = &quot; &quot;<br>
17292          ilev      = 0<br>
17293          itime     = 0<br>
17294          printVarSummary(LeftStringC)<br>
17295          printVarSummary(depth1dtC_<u></u>surf)<br>
17296          printVarSummary(tempC)<br>
17297          do imod=0,1<br>
17298              print(&quot;imod=&quot;+imod)<br>
17299              LeftStringC(imod) =<br>
&quot;z(&quot;+ilev+&quot;)=&quot;+depth1dtC_surf(<u></u>imod,ilev)+&quot;m  range=[&quot;+<br>
17300<br>
<br>
<br>
</div></div></blockquote><div><div class="h5">
sprintf(&quot;%0.2f&quot;,min(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))+&quot;,&quot;+<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
17301<br>
<br>
<br>
</blockquote>
sprintf(&quot;%0.2f&quot;,max(tempC(<u></u>imod,itime,ilev,0:ny(imod)-1,<u></u>0:nx(imod)-1)))+&quot;]&quot;<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
17302          end do<br>
17303          minLevelVal  = minTemp<br>
17304          maxLevelVal  = maxTemp<br>
17305          levelSpacing = dTemp<br>
17306          diffLevVal(0) = minTemp_diff<br>
17307          diffLevVal(1) = maxTemp_diff<br>
17308          diffLevVal(2) = dTemp_diff<br>
17309          if(ltext) then print(&quot;     ### &quot;+titleplot+&quot;<br>
&quot;+label+&quot;<br>
ilev=&quot;+sprinti(&quot;%0.3i&quot;, ilev)) end if<br>
17310<br>
<br>
<br>
</blockquote>
mplot_2Dfield_xy(namefile,<u></u>typefile,inforun(0),colorsMap,<u></u>titleplot,label,LeftStringC(0:<u></u>1),<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<br>
17311                           nx(0:1),ny(0:1),<br>
17312                          <br>
lon2dtC_surf(0:1,0:ny_max-1,0:<u></u>nx_max-1),<br>
<br>
17313                          <br>
lat2dtC_surf(0:1,0:ny_max-1,0:<u></u>nx_max-1),<br>
<br>
17314<br>
tempC(0:1,itime,ilev,0:ny_max-<u></u>1,0:nx_max-1),<br>
17315<br>
tempC_diff(itime,ilev,0:ny_<u></u>max-1,0:nx_max-1),<br>
17316                          <br>
minLatF,maxLatF,minLonF,<u></u>maxLonF,<br>
17317                          <br>
minLevelVal,maxLevelVal,<u></u>levelSpacing,<br>
17318<br>
diffLevVal(0),diffLevVal(1),<u></u>diffLevVal(2))<br>
<br>
|<br>
|<br>
|<br>
<br>
end the ERROR message is:<br>
<br>
(0)<br>
(0)          ### Plot SURF-TEMP<br>
rm: temp*.png: No such file or directory<br>
<br>
Variable: LeftStringC<br>
Type: string<br>
Total Size: 16 bytes<br>
             2 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes:   [2]<br>
Coordinates:<br>
Number Of Attributes: 1<br>
   _FillValue : missing<br>
<br>
Variable: depth1dtC_surf<br>
Type: float<br>
Total Size: 800 bytes<br>
             200 values<br>
Number of Dimensions: 2<br>
Dimensions and sizes:   [2] x [deptht | 100]<br>
Coordinates:<br>
             deptht: [0.5031146..1787.05]<br>
Number Of Attributes: 8<br>
   axis :       Z<br>
   positive :   down<br>
   standard_name :      depth<br>
   long_name :  depth<br>
   units :      m<br>
   valid_min :  0.5031146<br>
   valid_max :  1787.05<br>
   _FillValue : 9.96921e+36<br>
<br>
Variable: tempC<br>
Type: float<br>
Total Size: 892800000 bytes<br>
             223200000 values<br>
Number of Dimensions: 5<br>
Dimensions and sizes:   [2] x [time_counter | 72] x [deptht | 100]<br>
x [y |<br>
100] x [x | 155]<br>
Coordinates:<br>
             time_counter: [3600..259200]<br>
             deptht: [0.5031146..1787.05]<br>
             y: [41.5..43.5625]<br>
             x: [9.35..12.55833]<br>
Number Of Attributes: 8<br>
   missing_value :      1e+20<br>
   coordinates :        time depth lat lon<br>
   units :      degC<br>
   long_name :  temperature<br>
   standard_name :      sea_water_potential_<u></u>temperature<br>
   valid_min :  8.159986<br>
   valid_max :  14.30364<br>
   _FillValue : 1e+20<br>
fatal:Assignment not supported for left-hand type<br>
fatal:[&quot;Execute.c&quot;:8128]:<u></u>Execute: Error occurred at or near line<br>
17302<br>
in file main.ncl<br>
<br>
thanks<br>
Francesco Trotta<br>
<br>
______________________________<u></u>_________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
</div></div><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<u></u>mailman/listinfo/ncl-talk</a> [3] [1]<br>
<br>
Links:<br>
------<br>
[1] <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<u></u>mailman/listinfo/ncl-talk</a> [3]<br>
</blockquote>
<br>
<br>
<br>
Links:<br>
------<br>
[1] tel:24-07-2014%2019<br>
[2] tel:<a href="tel:303-497-8924" value="+13034978924" target="_blank">303-497-8924</a><br>
[3] <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<u></u>mailman/listinfo/ncl-talk</a><br>
</blockquote>
</blockquote></div><br></div>