[ncl-talk] ESMF_regrid in 3D
Marston Johnston
shejo284 at gmail.com
Sat Apr 1 14:29:40 MDT 2017
Hi Mary,
Thanks for the clarification. I was not aware of the example you mentioned.
Still doing the regridding level by level is a good idea.
/M
Marston S. Johnston, PhD
Department of Earth Sciences
University of Gothenburg, Sweden
Email: marston.johnston at gu.se
SkypeID: marston.johnston
Phone: +46-31-7864901
Only the fruitful thing is true!
On 31 Mar 2017, 21:53 +0200, Mary Haley <haley at ucar.edu>, wrote:
> Amanda and Marston,
>
> If you are simply talking about regridding each level independently, then you can actually pass a 3D variable to ESMF_regrid, and it will do the looping under the hood. What this function does is creates the weights for one level, and applies them to the rest of the levels. It assumes that the lat/lon grid is the same for each level.
>
> If the lat/lon grid changes for each level, or you have different locations for missing values for each level, then yes, you need to loop and do the regridding separately for each level.
>
> Examples ESMF_regrid_5.ncl does this, although it's not very well advertised. You just pass in the 3D variable instead of a 2D variable, and it should work.
>
> --Mary
>
> > On Fri, Mar 31, 2017 at 5:07 AM, Marston Johnston <shejo284 at gmail.com> wrote:
> > > You have to loop over the depth yourself. Even if ESMF would do this for you - and it doesn’t, it would still just do a 2D regrid inside a loop over the depth.
> > >
> > > On 31 Mar 2017, 12:55 +0200, Amanda Frigola <afrigola at marum.de>, wrote:
> > > > Hi there!
> > > >
> > > > I am trying to regrid a 3D variable with coordinates (depth, lat_1, lon_1) to coordinates (depth, lat_2, lon_2).
> > > > I wanted to use the function ESMF_regrid for that, but I can only find examples for 2D variables online.
> > > > My version of ncl is 6.3.0.
> > > > Any clue about how to get there?
> > > >
> > > > Amanda
> > > > _______________________________________________
> > > > ncl-talk mailing list
> > > > ncl-talk at ucar.edu
> > > > List instructions, subscriber options, unsubscribe:
> > > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> > >
> > > _______________________________________________
> > > ncl-talk mailing list
> > > ncl-talk at ucar.edu
> > > List instructions, subscriber options, unsubscribe:
> > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170401/3376eb0d/attachment.html
More information about the ncl-talk
mailing list