[ncl-talk] fatal error: "Assignment not supported for left-hand type"

Wei Huang huangwei at ucar.edu
Thu Jul 24 11:20:55 MDT 2014


Franz,

Try change your code line: 17299 - 17301 from:
LeftStringC(imod) = "z("+ilev+")="+depth1dtC_surf(imod,ilev)+"m  range=["+ \
sprintf("%0.2f",min(tempC(imod,itime,ilev,0:ny(imod)-1,0:nx(imod)-1)))+","+
\
sprintf("%0.2f",max(tempC(imod,itime,ilev,0:ny(imod)-1,0:nx(imod)-1)))+"]"

to:

mintempCstring =
sprintf("%0.2f",min(tempC(imod,itime,ilev,0:ny(imod)-1,0:nx(imod)-1)))
maxtempCstring =
sprintf("%0.2f",max(tempC(imod,itime,ilev,0:ny(imod)-1,0:nx(imod)-1)))
LeftStringC(imod) = "z("+ilev+")="+depth1dtC_surf(imod,ilev)+"m  range=["+ \
                    mintempCstring+","+ \
                    maxtempCstring+"]"

and let us see if the error persist.

Wei

================================================
1850 Table Mesa Dr.
Boulder, CO 80307
Phone: 303-497-8924


On Thu, Jul 24, 2014 at 11:05 AM, franz <f.trotta at sincem.unibo.it> wrote:

> Dear ncl-team
>     I'm using the ncl 6.1.2 on imac Darwin 64bit
>     I got this fatal error: "Assignment not supported for left-hand type"
>     and I don't understand the source of this error.
>
>    Below there is part of my code (where I think NCL does not like)
>    (I putted printVarSummary(...) to shows the info of the suspected
> variables)
>
> |
> |
> 228    nmod = 2
> |
> |
> 1371    LeftStringC = new(2,string)
> |
> |
> |
> 1428    do imod=0,nmod-1
> 1429
> |
> |
> |
> 16321
> 16322    end do ;imod
>
> |
> |
> |
> 17276   if(lplot_outModSurfC) then
> 17277
> 17278       if (lplot_outModSurfC_temp) then
> 17279
> 17280          print("")
> 17281          print("     ### Plot SURF-TEMP")
> 17282          system("cd " + path_exp_figure_comp+"/outNemo/temp ; rm
> temp*.png")
> 17283
> 17284          tempC_diff(0:nt_max-1,0:nz_max-1,0:ny_max-1,0:nx_max-1) =
> \
> 17285
> tempC(1,0:nt_max-1,0:nz_max-1,0:ny_max-1,0:nx_max-1) - \
> 17286
> tempC(0,0:nt_max-1,0:nz_max-1,0:ny_max-1,0:nx_max-1)
> 17287
> 17288          colorsMap = "rainbow"
> 17289          namefile  = "tempC_xy"
> 17290          titleplot = "Temperature"
> 17291          label     = " "
> 17292          ilev      = 0
> 17293          itime     = 0
> 17294          printVarSummary(LeftStringC)
> 17295          printVarSummary(depth1dtC_surf)
> 17296          printVarSummary(tempC)
> 17297          do imod=0,1
> 17298              print("imod="+imod)
> 17299              LeftStringC(imod) =
> "z("+ilev+")="+depth1dtC_surf(imod,ilev)+"m  range=["+ \
> 17300
> sprintf("%0.2f",min(tempC(imod,itime,ilev,0:ny(imod)-1,0:nx(imod)-1)))+","+
> \
> 17301
> sprintf("%0.2f",max(tempC(imod,itime,ilev,0:ny(imod)-1,0:nx(imod)-1)))+"]"
> 17302          end do
> 17303          minLevelVal  = minTemp
> 17304          maxLevelVal  = maxTemp
> 17305          levelSpacing = dTemp
> 17306          diffLevVal(0) = minTemp_diff
> 17307          diffLevVal(1) = maxTemp_diff
> 17308          diffLevVal(2) = dTemp_diff
> 17309          if(ltext) then print("     ### "+titleplot+" "+label+"
> ilev="+sprinti("%0.3i", ilev)) end if
> 17310
> mplot_2Dfield_xy(namefile,typefile,inforun(0),colorsMap,titleplot,label,LeftStringC(0:1),
> \
> 17311                           nx(0:1),ny(0:1), \
> 17312                           lon2dtC_surf(0:1,0:ny_max-1,0:nx_max-1),
> \
> 17313                           lat2dtC_surf(0:1,0:ny_max-1,0:nx_max-1),
> \
> 17314
> tempC(0:1,itime,ilev,0:ny_max-1,0:nx_max-1), \
> 17315
> tempC_diff(itime,ilev,0:ny_max-1,0:nx_max-1), \
> 17316                           minLatF,maxLatF,minLonF,maxLonF, \
> 17317                           minLevelVal,maxLevelVal,levelSpacing, \
> 17318
> diffLevVal(0),diffLevVal(1),diffLevVal(2))
>
> |
> |
> |
>
>
>
> end the ERROR message is:
>
>
>
> (0)
> (0)          ### Plot SURF-TEMP
> rm: temp*.png: No such file or directory
>
> Variable: LeftStringC
> Type: string
> Total Size: 16 bytes
>              2 values
> Number of Dimensions: 1
> Dimensions and sizes:   [2]
> Coordinates:
> Number Of Attributes: 1
>    _FillValue : missing
>
> Variable: depth1dtC_surf
> Type: float
> Total Size: 800 bytes
>              200 values
> Number of Dimensions: 2
> Dimensions and sizes:   [2] x [deptht | 100]
> Coordinates:
>              deptht: [0.5031146..1787.05]
> Number Of Attributes: 8
>    axis :       Z
>    positive :   down
>    standard_name :      depth
>    long_name :  depth
>    units :      m
>    valid_min :  0.5031146
>    valid_max :  1787.05
>    _FillValue : 9.96921e+36
>
> Variable: tempC
> Type: float
> Total Size: 892800000 bytes
>              223200000 values
> Number of Dimensions: 5
> Dimensions and sizes:   [2] x [time_counter | 72] x [deptht | 100] x [y |
> 100] x [x | 155]
> Coordinates:
>              time_counter: [3600..259200]
>              deptht: [0.5031146..1787.05]
>              y: [41.5..43.5625]
>              x: [9.35..12.55833]
> Number Of Attributes: 8
>    missing_value :      1e+20
>    coordinates :        time depth lat lon
>    units :      degC
>    long_name :  temperature
>    standard_name :      sea_water_potential_temperature
>    valid_min :  8.159986
>    valid_max :  14.30364
>    _FillValue : 1e+20
> fatal:Assignment not supported for left-hand type
> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 17302
> in file main.ncl
>
>
> thanks
> Francesco Trotta
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140724/5eafc75d/attachment.html 


More information about the ncl-talk mailing list