Closed nawendt closed 7 years ago
This was a misunderstanding on my part. The latitude and longitude values are geographical coordinates. To make them look "pretty" on a map you have to convert them back to the correct projected coordinates. The ESMF library assumes that the coordinate system for the source and destination grids are the same (see ESMF Requirements Document in source distribution). In our case, we have latitude and longitude values which are a type of spherical coordinates. If we were to do this using the projected, Cartesian coordinates from the NAM and RUC grids, this would also work as the projections are exactly the same (see the PROJ.4 strings). However, projections are typically not the same between grids and care must be taken to get both source and destination on the same projection in those cases. The ability of ESMF to be projection agnostic is both useful and potentially confusing.
The take home message here is: always make sure both source and destination grids are in the same coordinate system/projection space.
The NAM and RUC grids used in the tutorial have LCC projection coordinates. What is confusing is that the coordinates that are extracted from the grids are latitude and longitude, which typically means you are working with geographic coordinates; however, the latitude and longitude values are simply converted from projection space. In order for the regridding to be done correctly, the latitude and longitude must be converted back to projection space andESMF.CoordSys.CART
must be used instead ofESMF.CoordSys.SPH_DEG
.