[ncl-talk] fatal ERROR: Assignment not supported for left-hand type
Mary Haley
haley at ucar.edu
Tue Jun 21 09:12:43 MDT 2016
Francesco,
Your email contained one error message, but the subject contained a
different error message. I'm assuming that you got both error messages?
I'm not sure what causes this particular error, because I've never seen it
before. If I knew how to reproduce it, then I could probably tell you how
to fix it.
There's not enough information from the code you provided for us to be able
to help. You will need to examine some variables and provide us with the
output.
Please add the following printVarSummary calls to your code so we can see
what your variables look like:
printVarSummary(atmMeshmaskT_file->lon)
printVarSummary(lon1dt_subatm)
There may be another way around this problem. It looks like what you are
ultimately trying to do is convert a 1D array to a 2D array. We have two
functions for this very kind of thing, called "conform" and "conform_dims":
http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/conform_dims.shtml
I think you could replace this code:
lon1dt_subatm(0:nx_subatm-1) =
(/tofloat(atmMeshmaskT_file->lon(ix_range_atm(0):ix_range_atm(1))) /)
lon2dt_subatm = new((/ny_subatm,nx_subatm/),float)
do iy=0,ny_subatm-1
lon2dt_subatm(iy,0:nx_subatm-1) = lon1dt_subatm(0:nx_subatm-1)
end do
with this single line of code:
lon2dt_subatm =
tofloat(conform_dims((/ny_subatm,nx_subatm/),atmMeshmaskT_file->lon(ix_range_atm(0):ix_range_atm(1)),1))
--Mary
On Mon, Jun 20, 2016 at 9:27 AM, franz <f.trotta at sincem.unibo.it> wrote:
> Dear ncl-team
> Im using the nil 6.3.0
> I got an error and I don't understand the source of this error:
>
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line
> 16351 in file main.ncl
>
> This error message appear when I lunch my scripts after few steps. It
> execute the code up to line 2777.
>
> The line 16351 is where I close a do-loop:
>
> 3143 do inest=0,nnest-11355
> 3144
> |
> |
> |
> 16350
> 16351 end do ;inest
>
>
> It gives me this error when a add this few line:
>
> lon1dt_subatm(0:nx_subatm-1) = (/
> tofloat(atmMeshmaskT_file->lon(ix_range_atm(0):ix_range_atm(1))) /)
> lon2dt_subatm = new((/ny_subatm,nx_subatm/),float)
> do iy=0,ny_subatm-1 lon2dt_subatm(iy,0:nx_subatm-1) =
> lon1dt_subatm(0:nx_subatm-1) end do
>
> I'm pretty shire that this 3 line are correct and I don't understand
> this fatal error
>
> Is there some limitation in ncl with the number of the object we
> define?
>
> thanks in advance
> Francesco T.
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20160621/e792164c/attachment.html
More information about the ncl-talk
mailing list