Re: Edge issue in Regridding Daymet Joined Tiles with ESMF_Regridding on NCL 6.1.0

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Apr 26 2013 - 15:29:46 MDT

Hi folks,

The ESMF regridding functions will return a double if your input is double, and a float otherwise.

If you set Opt@ReturnDouble to True, you will get doubles no matter what.

I plan to update the ESMF pages to fix the SrcMask issue. I'm just trying to find a block of
time when I can work on it uninterrupted. :-) I'm also try to find an explanation from
Bob Oehmke of the ESMF software team where he better explained how the masking
works.

But, yes, it does seem in general that you want this to be set if you have missing
values, and perhaps I should make this the default behavior. I'm just trying to
figure out if there's any time where maybe you *wouldn't* want this to be the default
behavior.

--Mary

On Apr 25, 2013, at 3:12 PM, Dave Allured - NOAA Affiliate wrote:

> Ping,
>
> Not sure, not enough information, but I think you can debug this
> yourself. The error says "at or near line 118", which line is that?
> Try displaying printVarSummary's for both the left and right sides of
> the assignment, just before the statement itself.
>
> My guess is that ESMF_regrid function is returning a data type other
> than float, which was just a guess earlier. If so, then change the
> previous "new" statement to this:
>
> var_regrid = new (dims_3d, typeof (test_regrid), test_regrid@_FillValue)
>
> --Dave
>
> On Thu, Apr 25, 2013 at 3:00 PM, Ping Yang <pyang@ccny.cuny.edu> wrote:
>> Hi Dave,
>>
>> I got error maybe in the loop :
>>
>> do t = 0, ntimes-1
>> print ("t = " + t)
>> Opt@SrcMask2D = where(.not.ismissing(var(t,:,:)),1,0)
>> var_regrid(t,:,:) = ESMF_regrid(var(t,:,:),Opt)
>> end do
>>
>> I clipped the end part of the debug information:
>>
>> (0) ESMF_regrid_gen_weights: 'ESMF_RegridWeightGen' was successful.
>> (0) ESMF_regrid_with_weights: regridding using interpolation weights ...
>> (0) ESMF_regrid_with_weights: Source Grid:
>> (0) rank: 2
>> (0) dimensions: 2082 1551
>> (0) original source rank: 2
>> (0) latitude min/max: 30.961/53.7672
>> (0) longitude min/max:-87.5827/-60.8961
>> (0) ESMF_regrid_with_weights: Destination Grid:
>> (0) dimensions: 306 384
>> (0) latitude min/max: 34.875/50.125
>> (0) longitude min/max:-84.025/-64.875
>> (0) ESMF_regrid_with_weights: retrieving interpolation weights ...
>> (0) ESMF_regrid_with_weights: calling sparse_matrix_mult to apply weights...
>> (0) ESMF_regrid_with_weights: dividing results by frac_b...
>> (0) (for conserve interpolation only)
>> (0) ESMF_regrid_with_weights: dstData
>> (0) Dimensions: 306 384
>> (0) minSrcData: 0
>> (0) maxSrcData: 17
>> (0) minDstData: 0
>> (0) maxDstData: 13.4393
>> fatal:Assignment type mismatch, right hand side can't be coerced to type of
>> left hand side
>> fatal:["Execute.c":7556]:Execute: Error occurred at or near line 118 in file
>> daymet_1KM-3MIN.ncl
>>
>> Where is the problem?(the function is not working)?
>>
>> Thanks,
>>
>> Ping
>>
> _______________________________________________
> 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 Fri Apr 26 15:29:58 2013

This archive was generated by hypermail 2.1.8 : Fri Apr 26 2013 - 17:10:25 MDT