[ncl-talk] Interpolating CCSM grid to RAP/HRRR grid

Wilson, Malcolm Tyree mtw5270 at psu.edu
Tue May 11 19:50:53 MDT 2021


Hello Everyone,

I've been trying to interpolate humidity and temperature data from CCSM to the RAP/HRRR grid using NCL (specifically using the function linint2_points and linint2_points_Wrap). I created a script that should interpolate the data from CCSM to the HRRR grid, but the script returned an array that contains nothing but filled values (9.96921e+36) and no data of the variable field I'm interpolating. I don't understand this happened, and I used both the linint2_points and linint2_points_Wrap functions. Is this supposed to happen, or and I'm missing something? Below is the code I used. Any advice would be appreciated. Thanks!

-Malcolm W.

  f = addfile ("~/small_hus_may_pert_2010-2050.nc","r")
  g = addfile ("~/hrrr.t00z.wrfprsf00.nc","r")

  lat = f->lat      ;(length=36)
  lon = f->lon    ;(length=61)

  lat2d = g->gridlat_0              ; (shape: (1059,1799))
  lon2d = g->gridlon_0            ; (shape: (1059,1799))

  LAT1D = ndtooned(lat2d)
  LON1D = ndtooned(lon2d)

  fi = f->hus_pert ;(humidity data I'm interpolating)

  fo = linint2_points_Wrap(lon,lat,fi, False, LON1D,LAT1D, 0)

  hrrr_data = onedtond( ndtooned(fo), (/1,26,1059,1799/) ) ;(conatins nothing but filled values)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210512/a157a782/attachment.html>


More information about the ncl-talk mailing list