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

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 19 2012 - 14:28:42 MDT

Hi Kelly,

I'd like to add here that if you use the "conservative" method, then this
requires that grid corner locations are provided (the assumption is that
your data is at grid centers).

NCL will try to calculate the grid corners if you don't provide them, but if
you have a really strange grid, this calculation may not be ideal.

I think in the case of going from WRF to WRF, you should be okay.

I see that Dennis has asked for your data files. You might also
want to look at example ESMF_regrid_16.ncl, which goes from
a WRF to MM5 grid. Since the MM5 grid is also curvilinear,
you shouldn't have to change the script much.

Nicole's example should also work! (Thanks Nicole.)

--Mary

On Sep 19, 2012, at 1:25 PM, Dennis Shea wrote:

> Hi Kelly,
>
> As suggested by Nicole, I'd suggest that you use the new
> ESMF regrid functions. These are very high quality. Further,
> the ESMF regrid offer 3 different methods for interpolation.
>
> Most commonly, the bilinear or conservative methods are used.
> You are going from a 'coarse' resolution (81km) to a fine
> resolution (27km), In this case the bilinear method is adequate.
> If you were interpolating from fine-to-coarse, I'd suggest
> using the conservative method for variable like RAIN* due to
> the 'fractal' nature of precipitation.
>
> --
> See the Climate Data Guide:
> http://climatedataguide.ucar.edu/
>
> for general comments about interpolation.
> Click: Processing and, then, click Regridding
>
>
>
> Good luck
>
> On 09/19/2012 01:10 PM, Schiffer, Nicole June wrote:
>> 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
>>
>
> _______________________________________________
> 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 14:30:18 2012

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