Re: triple2grid

From: IMRAN NADEEM <qphoton_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 13 2010 - 06:43:57 MDT

Dear Ashley, Mary, Dennis and Rick,

     Today I was playing with triple2grid function and trying to understand
the segmentation fault problem recently reported by Ashley. Infact I was
facing the similar problem. I used the input data and ncl script sent by
Ashley last month.The objective is to use nearest neighbor approach for
regridding temperature from model native grid (25km) to regular grid (0.25
deg). Here is how I overcome the problem:

First, I run the attached script on three different machines. On two
machines, I got the segmentation fault but on third machine, the script runs
fine and I got the output file but the output field was wrong. See the
attached image output_default.gif. I don't understand why this is so? On all
three machines NCL was installed from pre-compiled binaries and have the
same version 5.1.1.

Next instead of using default option, I set opt = True, opt@distmx = 50 and
every thing was perfect. On all three
machines, I got the same results. See the attached image
output_distmx_50km.gif

So, I conclude that default value of distmx is responsible for segmentation
problem. I suggest to mention in the documentation of triple2grid to use
reasonable values for distmx incase input data is gridded.

I hope it will help others.

Best Regards
PhD Student & Research Assistant
Imran Nadeem
BOKU, Vienna

On Tue, Mar 9, 2010 at 7:41 PM, Rick Brownrigg <brownrig@ucar.edu> wrote:
> Ashley,
> I'm not sure what to suggest regarding a workaround for area_hi2lores,
short
> of iteratively calling the function on smaller pieces of your input grids
> (if that even makes numerical sense). And unfortunately, the 2GB issue
> holds for the 64bit versions as well. The NCL team is working to lift
this
> constraint.
> Rick
>
> On Mar 9, 2010, at 2:23 AM, Ashley Watson wrote:
>
> Hi again,
> Thanks Rick, today I encountered the similar problem using
> area_hi2lores. Is there a workaround to overcome this
> memory limitation(segmentation fault). Also the NCL's 2GB data limit is
for
> 32bit version or its the same on 64bit version. I mean, if I install NCL
on
> 64bit machine with 32GB of memory can I oversome this problem.
> Ashley
>
> On Wed, Mar 3, 2010 at 5:56 PM, Rick Brownrigg <brownrig@ucar.edu> wrote:
>>
>> Hi Ashley,
>> It could be that you are running up against NCL's 2GB data limit(?). The
>> docs for triple2grid state that the return result will be:
>> "The return array will be K x N x M, where K represents the leftmost
>> dimensions of data. It will be of type double if any of the input is
double,
>> and float otherwise."
>> After ndtooned(orog), the left (and right!) dimension is 38400, rlon is
>> 181, rlat is 133, to yield:
>> 38400x181x133xsizeof(float) = 3.69GB
>> In any case, something other than a SEGV would be preferable.
>> Not sure that helps...
>> Rick
>> On Mar 3, 2010, at 7:39 AM, Ashley Watson wrote:
>>
>> Dear All,
>>
>> I am trying to use nearest neighbor approach for regridding temperature
>> from model native grid to regular grid. As rcm2rgrid doesn't employ
nearest
>> neighbor
>> method, I tried to use triple2grid but I am stuck with segmentation
>> fault. My script and sample input data is attached. The attached script
>> works fine
>> for rcm2rgrid but not for triple2grid. Why triple2grid is not working?
>>
>> Thanks in advance
>> Ashley
>>
>>
>>
>>
<Test_input.nc><Test_triple2grid.ncl>_______________________________________________
>> 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

InputData.gif output_default.gif output_distmx_50km.gif
Received on Tue Apr 13 06:44:20 2010

This archive was generated by hypermail 2.1.8 : Wed Apr 14 2010 - 09:15:22 MDT