[ncl-talk] Using ESMF_Regrid to Interpolate lat/lon to Unstructured MPAS
Hogrefe, Christian
Hogrefe.Christian at epa.gov
Sat Apr 8 19:35:05 MDT 2017
Using NCL version 6.2.1, I am trying to use ESMF_regrid to interpolate data from a regular lat/lon (0.1 x 0.1 degree) grid to an unstructured MPAS grid. I am working off of the ESMF_rect_to_unstruct.ncl template.
I am providing the DstGridLat and DstGridLon values from an existing MPAS input file. This MPAS mesh has nCells = 163842 cells and I am passing the double latCell(nCells) and double lonCell(nCells) variables to DstGridLat and DstGridLon.
Once the script starts processing the destination grid, the following screen output appears:
(0) get_dst_grid_info: destination lat dims = (163842)
(0) get_dst_grid_info: destination lon dims = (163842)
(0) unstructured_to_ESMF: triangulating the data ... this can be slow
(0) min/max ElementVertices = 0/163841
(0) unstructured_to_ESMF: total number of elements created: 327680
After that, the weights are being generated and the input data is interpolated . However, the dimension of that interpolated output is 327680 (i.e. the number of “elements”), not 163842 (i.e. the number of destination lat/lon points specified). When I write out the interpolated data, it has 327680 values. That number of “elements” matches the number of “Vertices” in my existing MPAS input file from which the DstGridLat and DstGridLon values were pulled.
I am sure I am missing something very basic, but I am stuck figuring out why the interpolated data has more elements than I am expecting.
I am attaching the script, screen output, header of the destination lat/lon grid description file provided to the script, and the headers of the SrcFileName, DstFileName, and ncf file containing the interpolated data that are created by the script.
I have also uploaded the files required to run the script (i.e. the edgar_HTAP_NOx_emi_TRANSPORT_2010.0.1x0.1.nc file containing the data to be interpolated and the existing MPAS input file static.90-25.usgs.nc containing the DstGridLat and DstGridLon values) to the anonymous ftp server.
Thank you very much for your help,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170409/395d2d5c/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: htap_emis_to_unstruct_post.ncl
Type: application/octet-stream
Size: 6619 bytes
Desc: htap_emis_to_unstruct_post.ncl
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170409/395d2d5c/attachment.obj
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: screen_output_htap_emis_to_unstruct_post.txt
Url: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170409/395d2d5c/attachment.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: static.90-25.usgs.txt
Url: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170409/395d2d5c/attachment-0001.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: source_grid_file_htap01.txt
Url: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170409/395d2d5c/attachment-0002.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: destination_grid_file_90-25.txt
Url: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170409/395d2d5c/attachment-0003.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nox_transport_regrid_output_90-25.txt
Url: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170409/395d2d5c/attachment-0004.txt
More information about the ncl-talk
mailing list