[ncl-talk] ESMF_regrid

Laura Fowler laura at ucar.edu
Mon Jan 14 14:01:55 MST 2019


Hi Mary:
Adding opt at DstTriangularMesh completely solved my issue.
Thanks,
Laura


On Mon, Jan 14, 2019 at 1:09 PM Mary Haley <haley at ucar.edu> wrote:

> Hi Laura,
>
> Sorry about the confusion. This was an undocumented feature because it
> hasn't been well-tested.
>
> You did the right thing providing SrcTriangularMesh for the source MPAS
> grid.
>
> You need to do the same thing for the destination MPAS grid, however, by
> setting DstTriangularMesh. This should be different than the source one.
>
> Assuming "fDst" refers to the opened destination file, and assuming it
> also has a cellsOnVertex variable, it would look like this:
>
>    opt at DstTriangularMesh = fDst->cellsOnVertex-1
>
> --Mary
>
>
> On Mon, Jan 14, 2019 at 9:41 AM Laura Fowler <laura at ucar.edu> wrote:
>
>> Hello:
>>
>> I would like to use EMSF_regrid to regrid a MPAS unstructured mesh (with
>> 655362 cells) to another MPAS unstructured mesh (with 1622018 cells). Below
>> are the options I use to do so:
>>
>>    opt = True
>>
>>    opt at Debug = True
>>
>>    opt at ForceOverwrite = True
>>
>>    opt at SrcGridLon = lonCellSrc ; source grid longitude input.
>>
>>    opt at SrcGridLat = latCellSrc ; source grid latitude input.
>>
>>    opt at SrcTriangularMesh = fSrc->cellsOnVertex-1
>>
>>
>>    opt at DstGridLon = lonCellDst ; destination grid longitude input.
>>
>>    opt at DstGridLat = latCellDst ; destination grid latitutde input.
>>
>>    opt at DstGridType  = "unstructured"
>>
>>    opt at SrcFileName  = "source.grid_onCells.655362.to_1622018.nc"
>>
>>    opt at DstFileName  = "destination.grid_onCells.655362.to_1622018.nc"
>>
>>    opt at WgtFileName  = "weights.grid_onCells.655362.to_1622018.nc"
>>
>>
>>
>> When I run my script, I get the following message:
>>
>>
>> Number Of Attributes: 0
>>
>> (0) get_src_grid_info: source lat dims = (655362)
>>
>> (0) get_src_grid_info: source lon dims = (655362)
>>
>> (0) get_src_grid_info: source grid type is 'unstructured'
>>
>> (0) unstructured_to_ESMF: using triangular mesh provided by the user
>>
>> (0) min/max ElementVertices = 0/655361
>>
>> (0) unstructured_to_ESMF: total number of elements created: 1310720
>>
>> (0) unstructured_to_ESMF: Element Area: min:6.114026940950978e-06
>> max:9.902497945857291e-06
>>
>> (0) write_grid_description_file: writing unstructured 'Src' grid to an
>> ESMF description file
>>
>> (0) get_dst_grid_info: destination lat dims = (1622018)
>>
>> (0) get_dst_grid_info: destination lon dims = (1622018)
>>
>> (0) unstructured_to_ESMF: triangulating the data to create the edges for
>> your unstructured data.
>>
>> (0)                       This can be VERY slow if you have a large
>> array.
>>
>> (0)                       To speed up code, provide your own edge
>> vertices via the
>>
>> (0)                       'ElementVertices' option.
>>
>>
>>
>> How do I use the ElementVertices option to speed up the interpolation. Do
>> I use that option for the Source file or the Destination file. I did not
>> see any documentation related to that option?
>>
>> Thanks,
>> Laura
>>
>>
>>
>> --
>>
>> !-------------------------------------------------------------------------------------------------------------
>> Laura D. Fowler
>>
>> Mesoscale and Microscale Meteorology Division (MMM)
>> National Center for Atmospheric Research
>> P.O. Box 3000, Boulder CO 80307-3000
>>
>> e-mail: laura at ucar.edu
>> phone: 303-497-1628
>>
>>
>> !-------------------------------------------------------------------------------------------------------------
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>

-- 
!-------------------------------------------------------------------------------------------------------------
Laura D. Fowler

Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000

e-mail: laura at ucar.edu
phone: 303-497-1628

!-------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190114/354637a0/attachment.html>


More information about the ncl-talk mailing list