Re: Regrid vegetation's type data

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 27 Apr 2009 16:17:49 -0600

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
Received on Mon Apr 27 2009 - 16:17:49 MDT

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