Re: Bug in NCL 6.0.0?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 12 2011 - 08:44:35 MDT

Hi Christian,

Dave has been trying to reproduce this problem using dummy data. Is there any chance you can provide the actual data files to help us debug this?
Or, if you are able to trim the problem down to something smaller that doesn't require so much data, that would be good too.

If you can provide the data but don't have anywhere to put it, please see our ftp instructions at:

http://www.ncl.ucar.edu/report_bug.shtml

Thanks,

--Mary

On Jul 7, 2011, at 10:01 AM, Christian Pagé wrote:

> Hi Dennis,
>
> Thanks for your answer. It is not urgent, as I can easily fix the issue by deleting the variable at the end of the loop.
>
> fileintt = addfiles(infilett, "r")
>
> In the above, 'fileintt' is a variable of type list.
>
> Perhaps,
>
> filein = fileintt
>
> which on the 1st iteration copies the fileintt list to a new
> variable filein may not work when overwriting.
>
> I know that overwriting a list variable may not work correctly, but the big problem is that it "kills" the content of the fileintt variable which should be only read in that assignment. This is what I find quite surprising...!
>
> Regards,
>
> Christian
>
>
> D
>
>
>
> On 7/7/11 3:05 AM, Christian Pagé wrote:
> Hi all,
>
> I have encountered a weird behavior of NCL 6.0.0, which cannot be
> reproduced in NCL 5.2.0 in the tests I have done.
>
> I have the following NCL script, which reads input NetCDF files to
> perform some post-processing (I have only kept what is essential to
> experience the bug) :
> =====
> begin
>
> model_list = (/"arpege1", "arpege2", "arpege3", "arpege4",
> "cccma_cgcm3_1_t63", "csiro_mk3_0", "gfdl_cm2_1", "giss_model_e_r",
> "ingv_echam4", "miroc3_2_medres", "mpi_echam5", "ncar_ccsm3_0",
> "cnrm_cm3", "gfdl_cm2_0", "giss_aom", "ipsl_cm4", "miub_echo_g",
> "mri_cgcm2_3_2a", "arpege_a2", "arpege_a1b", "arpege_b1"/)
> nm = dimsizes(model_list)
>
> indir="~/downscaling_v2/data/results/scratch2010/all"
>
> do model=0,nm-1
>
> curmodel = model_list(model)
>
> print("Processing: model " + curmodel)
>
> infilett = systemfunc("ls " + indir + "/" + curmodel +
> "/annual/tas_1d_????_annual.nc <http://annual.nc>")
>
> printVarSummary(infilett) ; infilett is always ok
>
> fileintt = addfiles(infilett, "r")
> printVarSummary(fileintt) ; fileintt is always ok here with the
> correct number of elements
>
> filein = fileintt ; fileintt gets emptied here from the 2nd
> iteration. Problem doesn't occur if I don't do this assignment.
> printVarSummary(filein)
> printVarSummary(fileintt)
>
> time = fileintt[:]->time ; bug occurs here since fileintt gets
> emptied from the 2nd iteration, since there are no longer any element in
> the list
>
> delete(time)
> delete(fileintt)
> ; delete(filein) ; The problem only occurs if I don't delete this
> variable
> delete(infilett)
>
> end do
>
> end
> =====
>
> The problem occurs if I don't delete the filein variable in the do loop,
> as shown.
> This is the line where the problem occurs :
> filein = fileintt
> At the second iteration in the do loop, the variable fileintt gets
> emptied, it goes from 150 elements to 0 when the assignment is performed
> (in my case I have 150 NetCDF files).
> The assignment should not modify the fileintt variable...
>
> If I uncomment the delete(filein) line it works ok.
> If I comment the filein = fileintt assignment it also works ok.
>
> It is not possible to reproduce this behavior in NCL 5.2.0.
>
>
> Thanks for any input and comment on this,
>
> Christian Page
> CERFACS, Toulouse, France
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 12 08:44:42 2011

This archive was generated by hypermail 2.1.8 : Tue Jul 12 2011 - 15:03:53 MDT