Re: data extraction error in second time step

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 06 Jan 2009 17:16:27 -0700

NCL printed out the correct error message:

> fatal:Dimension sizes of left hand side and right hand side of
> assignment do not match
> ^Mfatal:Execute: Error occurred at or near line 29 in file

The 1st rule of data processing is "look at your data".

line 29
    names = getfilevarnames(grb_file)

So the first iteration (time step)

    The number of variables on the file is 145.

The 2nd iteration

    The number of variables on the file is 37

So the message tells you that the size of the right
hand side [37] does not match the size on the left
hand side which was 145 (from the first time step).

NCL does *not* automatically redefine array size.
NCL always requires that arrays "conform"
in shape and size.

The solution for any array that may change sizes
with a loop is to delete the array prior to the
next iteration. In your case:

    delete(names)
   end do
===================

Explicitly .....

On your 1st time step

ncl 0> f1 = addfile ("wrfprs_d02.00_mod.grb", "r")
ncl 1> names_1 = getfilevarnames(f1)
ncl 2> n1 = dimsizes(names_1)

on your 2nd ime step

ncl 3> f6 = addfile ("wrfprs_d02.06_mod.grb", "r")
ncl 5> names_6 = getfilevarnames(f6)
ncl 6> n6 = dimsizes(names_6)

ncl 7> print("n1="+n1+" n6="+n6)

(0) n1=145 n6=37

Jin-Young Kim wrote:
> I've used this program without any problem..
> But when i apply to new initialization run with same model configuration,
> it showing following error at the second time step
> even though when i check wgrib there are normal data.
>
> Type: string
> Total Size: 104 bytes
> 13 values
> Number of Dimensions: 1
> Dimensions and sizes: [13]
> Coordinates:
> (0) wrfprs_d02.00_mod
> (1) wrfprs_d02.06_mod
> (2) wrfprs_d02.12_mod
> (3) wrfprs_d02.18_mod
> (4) wrfprs_d02.24_mod
> (5) wrfprs_d02.30_mod
> (6) wrfprs_d02.36_mod
> (7) wrfprs_d02.42_mod
> (8) wrfprs_d02.48_mod
> (9) wrfprs_d02.54_mod
> (10) wrfprs_d02.60_mod
> (11) wrfprs_d02.66_mod
> (12) wrfprs_d02.72_mod
> fatal:Dimension sizes of left hand side and right hand side of
> assignment do not match
> ^Mfatal:Execute: Error occurred at or near line 29 in file Sfc-wind.ncl
>
> Do you anybody the problem and solution?
>
> Here are my first step and second step data.
> http://climate.pknu.ac.kr/~jin/wrfprs_d02.00_mod
> http://climate.pknu.ac.kr/~jin/wrfprs_d02.06_mod
>
> NCL scripts
> http://climate.pknu.ac.kr/~jin/Sfc-wind.ncl
>
> Best regards,
> Jin-Young Kim
> --
> Ph. D. Student
> Jin-Young Kim (jin_at_climate.pknu.ac.kr <mailto:jin_at_climate.pknu.ac.kr>)
> Integrated Climate System Modeling Lab.
> Department of Environmental Atmospheric Sciences
> Pukyong National University, Busan 608-737, South Korea
> Web : http:climate.pknu.ac.kr/~jin <http://climate.pknu.ac.kr/~jin>
>
> Visiting Scholar
> Jin-Young Kim (Jin-Young.Kim_at_noaa.gov <mailto:Jin-Young.Kim_at_noaa.gov>)
> Global Systems Division
> Earth System Research Laboratory
> R/GSD7
> 325 Broadway
> Boulder, CO80305-3328
>
> +1-303- 497-4422 (Office)
> +1-303- 497-7262 (FAX)
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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 Jan 06 2009 - 17:16:27 MST

This archive was generated by hypermail 2.2.0 : Mon Jan 12 2009 - 16:21:33 MST