[ncl-talk] wkSpaceTime works for one grid, but not another grid - unstructured grids

Adam Herrington adam.herrington at stonybrook.edu
Mon Jul 9 10:09:38 MDT 2018


Thank you Dennis. I prefer the odd nlon grid. Can you see an easy way to
hack it, to make it work when nlon is odd? If not, no worries.

Also, I see references to the underlying fortran code as "JET." Possible
you can spill the acronym so I have a little more luck trying to find the
original fortran code?

Adam

On Mon, Jul 9, 2018 at 8:09 AM, Dennis Shea <shea at ucar.edu> wrote:

> The underlying fortran code implicitly assumes the 'nlon' is even; hence,
> the NCL wrapper code does also.
>
> Regards
>
> On Sun, Jul 8, 2018 at 2:38 PM, Adam Herrington <
> adam.herrington at stonybrook.edu> wrote:
>
>> I have a run on an unstructured grid. I map to lat-lon grids using ESMF
>> regridding, with an offline weights file. wkSpaceTime runs fine when I use
>> the weight file mapping to a grid with nlon = 512, but it gives an error
>> when I use the weights file for a grid of nlon = 513. I've used both of
>> these wgt files for many months and I have no reason to believe they are
>> corrupt. The error occurs for the grid with nlon = 513:
>>
>> fatal:Dimension size mismatch, dimension (1) of left hand side reference
>> does not have the same size as the right hand side reference after
>> subscripting.
>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 240 in
>> file $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl
>>
>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 738 in
>> file $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl
>>
>> line 738 of cam_diagnostics calls the function "resolveWavesHayashi." It
>> has a problem with this block of code:
>>
>> varspacetime = new((/2,mlon+1,N+1/),typeof(varfft),1e20)
>>
>> varspacetime(:,:mlon/2-1,:N/2-1) = varfft(:,mlon/2:1,N/2:N-1)
>> varspacetime(:,:mlon/2-1,N/2:)   = varfft(:,mlon/2:1,:N/2)
>> varspacetime(:, mlon/2: ,:N/2)   = varfft(:,:mlon/2,N/2:0) <---fatal
>> error here
>> varspacetime(:, mlon/2: ,N/2+1:) = varfft(:,:mlon/2,N-1:N/2)
>>
>> So from the error, I gather that the sizes of subscripted dimension 1
>> don't agree during the array assignment, i.e., " mlon/2: " is not equal to
>> " :mlon/2". But it should be. The next line uses the same dimension 1
>> assignment so I think that would probably cause an error too.
>>
>> I'm not sure if this is a user error or not. My script is attached. It is
>> a slightly modified version of http://www.ncl.ucar.edu/Applic
>> ations/Scripts/wkSpaceTime_1.ncl.
>>
>> Adam
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180709/b2f2b729/attachment.html>


More information about the ncl-talk mailing list