Re: getting ranges correct in concatenated files

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sat, 16 Feb 2008 13:08:10 -0700

Hi Mary Jo

This is a netCDF Operator question ... not NCL related.
It might be best to post to the NCO help forum.
    http://sourceforge.net/forum/forum.php?forum_id=9830
-------
That said .... there are two "_range" variables. The actual range
of the data on the *current* file [eg]
                tmp:actual_range = -108.65, 43.24

and the largest *possible* range of the variable
                tmp:valid_range = -200., 300.f;

Perhaps, someone knowledgable in NCO can help.
There is the NCO attribute editor: ncatted

======
Since this is an NCL help forum .... Maybe the following would work.
This assume you have a 'valid_range' or 'actual_range' attribute

    f = addfile("foo,nc", "w") ; NOTE the 'w"

    x = f->X

    x_at_valid_range = (/min(x),max(x)/)

    f->x_at_valid_range = x_at_valid_range

good luck
D

Mary Jo Brodzik wrote:
> I'm trying to create a netCDF file with a year of data, using ncrcat on a
> set of individual files for the 8-day periods in that year. ncrcat
> behaves just as I expect, resulting in variables that are concatenated
> along the record dimension. I'm using no switches to ncrcat:
>
> % ncrcat -O outfile_name infile_list
>
> However, I have a requirement to include the attribute @valid_range for
> each of the variables in my file, and I can tell from experimentation and
> from the ncrcat documentation that the output @valid_range for each
> variable is just set to whatever was in the first file input to ncrcat.
> So it doesn't really reflect the full range of values in the concatenated
> file.
>
> Can anyone suggest how I could make the output @valid_range on the
> variables actually reflect the range of values of the concatenated
> variable contents?
>
> Thank you,
> Mary Jo Brodzik
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Mary Jo Brodzik, Lead Scientific Programmer, 303-492-8263
> NSIDC/CIRES, Univ. of Colo. at Boulder, 449 UCB, Boulder, CO 80309-0449
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Feb 16 2008 - 13:08:10 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 20 2008 - 13:04:58 MST