@@ -19,6 +19,7 @@ module mapl3g_GridGet
1919 interface GridGetCoordinates
2020 procedure :: grid_get_coordinates_r4
2121 procedure :: grid_get_coordinates_r8
22+ procedure :: grid_get_coordinates_r8 ptr
2223 end interface GridGetCoordinates
2324
2425contains
@@ -116,4 +117,18 @@ subroutine grid_get_coordinates_r8(grid, longitudes, latitudes, rc)
116117 _RETURN(_SUCCESS)
117118 end subroutine grid_get_coordinates_r8
118119
120+ subroutine grid_get_coordinates_r8ptr (grid , longitudes , latitudes , rc )
121+ type (esmf_Grid), intent (in ) :: grid
122+ real (ESMF_KIND_R8 ), pointer , intent (out ) :: longitudes(:,:)
123+ real (ESMF_KIND_R8 ), pointer , intent (out ) :: latitudes(:,:)
124+ integer , optional , intent (out ) :: rc
125+
126+ integer :: status
127+
128+ call esmf_GridGetCoord(grid, coordDim= 1 , farrayPtr= longitudes, _RC)
129+ call esmf_GridGetCoord(grid, coordDim= 2 , farrayPtr= latitudes, _RC)
130+
131+ _RETURN(_SUCCESS)
132+ end subroutine grid_get_coordinates_r8ptr
133+
119134end module mapl3g_GridGet
0 commit comments