Re: Regrid vegetation's type data

From: MICHAEL NOTARO <mnotaro_at_nyahnyahspammersnyahnyah>
Date: Mon, 27 Apr 2009 22:27:25 -0500

Guangshan,

I've regridded vegetation category data before.
Please stop by my office tomorrow and I can help.
If you interpolate, you'll get the wrong answer like
Dennis says. For example, if desert is equal to 8
and grasslands equal to 4, interpolation of these 2 cells
will give a 6, which may be a rainforest (:

Mike

----- Original Message -----
From: Dennis Shea <shea_at_ucar.edu>
Date: Monday, April 27, 2009 5:16 pm
Subject: Re: Regrid vegetation's type data
To: guangshan chen <gchen9_at_gmail.com>
Cc: "ncl-talk_at_ucar.edu NCL" <ncl-talk_at_ucar.edu>

> f2gsh is not the appropriate function to use.
>
> Better would be linint2_Wrap because it is 'local'.
>
> However, in my opinion, you should *not* use
> standard interpolation software on "categorical" data.
> Vegetative type is categorical. It is not continuous.
> Depending on arbitrary categories, you could average
> tundra and desert and get coniferous forrest!!!
>
> Be careful!
>
>
>
>
>
>
> Mary Haley wrote:
> > Guangshan,
> >
> > There's no way to tell f2gsh to return integers.
> >
> > You can use one of our truncation functions, but you may lose
> > information.
> >
> > For example, you can call "floattointeger" on the output:
> >
> > X = floattointeger(f2gsh (x, (/jlat,ilon/), 42))
> >
> > There are also functions "round", "ceil" and "floor" which do
> > different kinds of truncation/rounding. "ceil" and "float" return
> > floats, but they are whole numbers.
> >
> > http://www.ncl.ucar.edu/Document/Functions/Built-in/floattointeger.shtml
> > http://www.ncl.ucar.edu/Document/Functions/Built-in/round.shtml
> > http://www.ncl.ucar.edu/Document/Functions/Built-in/ceil.shtml
> > http://www.ncl.ucar.edu/Document/Functions/Built-in/floor.shtml
> >
> > --Mary
> >
> > On Mon, 27 Apr 2009, guangshan chen wrote:
> >
> >> Hi all,
> >>
> >> I have a Matthew's vegetation data in NETCDF format and want to
> >> regrid it from 1x1 fixed grid to a gaussian grid.
> >> The data is integer. But when I used f2gsh function to interpolate
> >> the data, I found that the data type is changed to
> >> float. Is there any way to interpolate the data without changing the
> >> data type? This means that I also want the final
> >> data type is integer.
> >>
> >> Thank you very much.
> >>
> >> Guangshan
> >>
> >> _______________________________________________
> >> 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
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 27 2009 - 21:27:25 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 30 2009 - 15:56:01 MDT