Re: regridding from WRF to WRF (one grid to another?)

From: Schiffer, Nicole June <nschiff2_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 19 2012 - 13:10:37 MDT

Kelly-

I just did something similar using the new ESMF_regrid in version
6.1.0-beta. In my case, I regridded the topography from a 25km run to a
10km grid. I've attached my code for reference.

-Nicole

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Nicole Schiffer
* Science Writing Intern (NCSA)
* Graduate Research Fellow (Dept. of Energy)
* Department of Atmospheric Sciences
* University of Illinois, Urbana-Champaign
* Email: nschiff2 [at] illinois [dot] edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"Kelly Mahoney", 9/19/12 1:56 PM:

>Hi,
>
>I am trying to interpolate one curvilinear (WRF) grid to another
>curvilinear (WRF) grid (each with different grid spacing, dimensions,
>etc.), but just realized that all of the NCL functions listed for
>regridding curvilinear grids (e.g., rgrid2rcm, rcm2rgrid, rcm2points)
>are designed to go to/from another (one-dimensional) type of grid.
>
>Am I missing a more basic way to do this?
>
>I realize that I can also interpolate them both to a standard grid and
>compare them from there, but optimally I'd have one on the other.
>
>Thanks for any suggestions or info anyone might have!
>
>Kelly
>
>**************************************************************************
>*********
>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>
>; Open two files
> a = addfile("81km_wrfout_d01_2010-01-22_18:00:00.nc","r")
> b = addfile("27km_wrfout_d01_2010-01-22_18:00:00.nc","r")
>
>;km Read in rainc and rainnc, combine
> rainnc_a = a->RAINNC(:,:,:)
> rainnc_b = b->RAINNC(:,:,:)
>
> rainc_a = a->RAINC(:,:,:)
> rainc_b = b->RAINC(:,:,:)
>
> prec_a = rainc_a(:,:,:)+rainnc_a(:,:,:)
> prec_b = rainc_b(:,:,:)+rainnc_b(:,:,:)
>
>;km get lat of 81km grid
> lat_a = a->XLAT(0,:,:)
> lon_a = a->XLONG(0,:,:)
>
>;km get lat of 27km grid
> lat_b = b->XLAT(0,:,:)
> lon_b = b->XLONG(0,:,:)
>
> prec_b_interp = rcm2rgrid_Wrap(lat_b,lon_b,prec_b,lat_a,lon_a,0)
>;km 27km onto 81kmgrid
>
> prec_diff = prec_a - prec_b_interp
>
> printVarSummary(prec_diff)
>
>end
>_______________________________________________
>ncl-talk mailing list
>List instructions, subscriber options, unsubscribe:
>http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Wed Sep 19 13:10:47 2012

This archive was generated by hypermail 2.1.8 : Fri Sep 21 2012 - 16:22:30 MDT