<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div id="yiv1840507268"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"><div id="yiv1840507268yui_3_16_0_5_1407868603433_4"><span></span></div> <div class="yiv1840507268qtdSeparateBR" id="yiv1840507268yui_3_16_0_1_1407868603433_4569">Hi All,<br><br>I haven't personally tried this before, but another option for calculating geostrophic wind from WRF output may be use the Unified Post Processor to calculate the Geostrophic streamfunction (Psi). From there, it should be possible to derive the geostrophic wind, i.e. ug = -d(Psi)/dy , vg = +d(Psi)/dx ; where dy and dx are your grid spacing in meters. The result (I presume), would be grid relative; so geostrophic winds may need to be rotated to
earth coordinates.<br><br>Dave. <br clear="none"><br clear="none"></div><div class="yiv1840507268yqt8413730283" id="yiv1840507268yqt57782"><div class="yiv1840507268yahoo_quoted" id="yiv1840507268yui_3_16_0_5_1407868603433_7" style="display: block;"> <div class="yiv1840507268yui_3_16_0_1_1407868603433_4295" id="yiv1840507268yui_3_16_0_1_1407868603433_4564" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"> <div class="yiv1840507268yui_3_16_0_1_1407868603433_4296" id="yiv1840507268yui_3_16_0_1_1407868603433_4563" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"> <div dir="ltr" id="yiv1840507268yui_3_16_0_1_1407868603433_4568"> <font id="yiv1840507268yui_3_16_0_1_1407868603433_4567" face="Arial" size="2"> On Tuesday, August 12, 2014 8:00:11 PM, "ncl-talk-request@ucar.edu"
<ncl-talk-request@ucar.edu> wrote:<br clear="none"> </font> </div> <br clear="none"><div class="yiv1840507268y_msg_container" id="yiv1840507268yui_3_16_0_1_1407868603433_4562">----------------------------------------------------------------------<br clear="none"><br clear="none">Message: 1<br clear="none">Date: Tue, 12 Aug 2014 08:40:21 -0600<br clear="none">From: Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>><br clear="none">Subject: Re: [ncl-talk] Calculating Geostrophic Winds in the WRF using<br clear="none"> NCL<br clear="none">To: "brianjs @iastate.edu" <<a rel="nofollow" shape="rect" id="yiv1840507268yui_3_16_0_1_1407868603433_4582" ymailto="mailto:brianjs@iastate.edu" target="_blank" href="mailto:brianjs@iastate.edu">brianjs@iastate.edu</a>><br clear="none">Cc: "<a rel="nofollow" shape="rect"
ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>" <<a rel="nofollow" shape="rect" id="yiv1840507268yui_3_16_0_1_1407868603433_4574" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>>, "<a rel="nofollow" shape="rect" id="yiv1840507268yui_3_16_0_1_1407868603433_4581" ymailto="mailto:wrfhelp@ucar.edu" target="_blank" href="mailto:wrfhelp@ucar.edu">wrfhelp@ucar.edu</a>"<br clear="none"> <<a rel="nofollow" shape="rect" ymailto="mailto:wrfhelp@ucar.edu" target="_blank" href="mailto:wrfhelp@ucar.edu">wrfhelp@ucar.edu</a>><br clear="none">Message-ID:<br clear="none"> <CAOF1d_6qe3mMyK=<a rel="nofollow" shape="rect" ymailto="mailto:p_62sMYgmvnmqmCBS7hGXX9nZwLWGAhR7OQ@mail.gmail.com" target="_blank"
href="mailto:p_62sMYgmvnmqmCBS7hGXX9nZwLWGAhR7OQ@mail.gmail.com">p_62sMYgmvnmqmCBS7hGXX9nZwLWGAhR7OQ@mail.gmail.com</a>><br clear="none">Content-Type: text/plain; charset="utf-8"<br clear="none"><br clear="none">Brian,<br clear="none"><br clear="none">wrfhelp is being cc'd. They are the WRF experts and may know how to compute<br clear="none">geostrophic winds.<br clear="none"><br clear="none">===<br clear="none"><br clear="none">You have obviously put a lot of work into trying to derive
geostrophic<br clear="none">winds from WRF variables. Unfortunately, the steps you have used will not<br clear="none">return the results you wish. A few comments:<br clear="none"><br clear="none">[0]<br clear="none">The ftp area was 100% full. Thus, your files could not be accommodated. The<br clear="none">IT people have cleaned up the ftp file system. That said, transmitting 9GB<br clear="none">file(s) is not commonly done for ncl-talk related questions. You should use<br clear="none">tools (say, netCDF operators or NCL) to subset the data. For example, only<br clear="none">one time step.<br clear="none"> ncks -O -d Time,0 WrfBigFile.nc WrfLittleFile.nc<br clear="none"><br clear="none">[1]<br clear="none">z2geos works *only* for rectilinear grids with variables on isobaric<br clear="none">levels. The documentation has been changed to make this more explicit.<br clear="none"><br
clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Document/Functions/Built-in/z2geouv.shtml">http://www.ncl.ucar.edu/Document/Functions/Built-in/z2geouv.shtml</a><br clear="none"><br clear="none">**Generally,** WRF grids are
curvilinear. The following operation does<br clear="none">*not* make make a curvilinear grid and rectilinear grid<br clear="none"><br clear="none"> lat = f->XLAT(0,:,0) ; lat(south_north)<br clear="none"> lon = f->XLONG(0,0,:) ; lon(west_east)<br clear="none"><br clear="none">Yes, lat and lon are one-dimensional BUT they do not represent a<br clear="none">rectilinear grid orientation.<br clear="none">Use of the above lat & lon would be erroneous. You will get numbers but<br clear="none">they are not the correct numbers.<br clear="none"><br clear="none">[2]<br clear="none">Using, say, the ESMF regridding to interpolate the WRF curvilinear gridded<br clear="none">data to a rectilinear grid is a possibility *if* working with data on a<br clear="none">rectilinear grid is
adequate for the problem you wish to address.<br clear="none"><br clear="none">[a] Attached is a simple (*untested*) function that will interpolate a WRF<br clear="none">(mass) variable on eta levels to user specified
isobaric levels;.<br clear="none"><br clear="none"> function eta2isop_wrf(fwrf, varName[1]:string, prs_iso[*]:numeric \<br clear="none"> ,itime:integer, linlog[1]:integer,<br clear="none">opt[1]:logical)<br clear="none"> Usage:<br clear="none"> f = addfile(...) , or, f = addfiles(...)<br clear="none"><br clear="none"> plev = (/ 1000,925,850,700,600,500,400,300,250 \ ; integer,<br clear="none">float, double<br clear="none"> , 200,150,100,70,50/)<br clear="none"> plev!0 = "plev"<br clear="none"> <a rel="nofollow" shape="rect" ymailto="mailto:plev@units" target="_blank"
href="mailto:plev@units">plev@units</a> = "hPa"<br clear="none"><br clear="none"> linlog = 0<br clear="none"> itime = -1<br clear="none"> z_iso = eta2isop_wrf(f, "geopotential",
plev, itime, linlog, False)<br clear="none"><br clear="none">[b] You could now use z2geouv to calculate the geostrophic components<br clear="none"><br clear="none">[c] Unfortunately, reinterpolating the components [b] back to the WRF grid<br clear="none">will not yield geostrophic winds.<br clear="none"><br clear="none">===<br clear="none">Hopefully, wrfhelp can provide some information or talk with your advisor.<br clear="none"><br clear="none">Good Luck<br clear="none"><br clear="none"><br clear="none"><br clear="none"><br clear="none"><br clear="none"><br clear="none">On Mon, Aug 11, 2014 at 8:55 PM, brianjs @iastate.edu <<a rel="nofollow" shape="rect" ymailto="mailto:brianjs@iastate.edu" target="_blank" href="mailto:brianjs@iastate.edu">brianjs@iastate.edu</a>><br clear="none">wrote:<br clear="none"><br clear="none">> Good Evening,<br clear="none">><br clear="none">> I am attempting to calculate both the u and v components of the<br
clear="none">> geostrophic winds in the WRF.<br clear="none">><br clear="none">> The function z2geouv (which calculates both components using the<br clear="none">> geopotential height, as well as the latitude and longitude of gridded data)<br clear="none">> must utilize the geopotential height on a constant pressure surface. WRF<br clear="none">> data however, is on constant eta
levels/terrain following coordinates, and<br clear="none">> as such, this function applied to WRF data could only work if data is<br clear="none">> converted to a constant pressure surface from its original eta coordinate<br clear="none">> system.<br clear="none">><br clear="none">> Attached is the WRF code with issues. I have attempted to calculate the<br clear="none">> geostrophic wind components (ug and vg) by using the z2geouv with a height<br clear="none">> variable that has been interpolated on to a constant pressure coordinate<br clear="none">> (z_const_p). I first attempted to interpolate z_const_p with a geopotential<br clear="none">> height variable that was not terrain following (z_model). When I do this, I<br clear="none">> get realistic values for the geostrophic wind components, but I obviously<br clear="none">> would not get the lower levels (below 1000 generally) to be interpolated. I<br clear="none">>
also interpolated z_const_p with an original terrain following geostrophic<br clear="none">> height or geostrophic height above ground level (AGLheight_model), but
then<br clear="none">> unrealistic answers followed.<br clear="none">><br clear="none">> I have also taken a similar approach by calculating the ug and vg<br clear="none">> components separately without using z2geouv, but I am still getting<br clear="none">> unrealistic answers.<br clear="none">><br clear="none">> I wish to implement this routine in order to plot the geostrophic winds on<br clear="none">> maps of constant height (above ground level) hence the ug/vg interpolations<br clear="none">> thereafter to constant height levels<br clear="none">><br clear="none">> For reference, I sent the used RUC and WRF output to the ncl-talk FTP<br clear="none">> account given their large size. I did get the message "451 Failure writing<br clear="none">> to local file" so I am not sure if they made it over there successfully.<br clear="none">> The wrf file is rather large (approximately 9 GB) so maybe the account<br
clear="none">> could not hold it?<br clear="none">><br clear="none">> I was wondering if someone could guide me to improve this code to get<br clear="none">> geostrophic winds interpolated on constant height fields from an
original<br clear="none">> terrain following (eta) coordinate system (i.e. 200-2000 m at 100 m<br clear="none">> intervals), or if someone could assist by making a recommendation for an<br clear="none">> alternate approach? I have also attached my RUC code for plotting RUC<br clear="none">> Analysis geostrophic winds along with some sample images of what I believe<br clear="none">> the WRF profile should look generally like (as the RUC data is already on<br clear="none">> constant pressure surface).<br clear="none">><br clear="none">> Any suggestions would be greatly appreciated!<br clear="none">><br clear="none">> Brian Squitieri<br clear="none">> Graduate Research Assistant<br clear="none">> Iowa State University<br clear="none">><br clear="none">> _______________________________________________<br clear="none">> ncl-talk mailing list<br clear="none">> List instructions, subscriber options,
unsubscribe:<br clear="none">> <a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none">><br clear="none">><br clear="none">-------------- next part --------------<br clear="none">An
HTML attachment was scrubbed...<br clear="none">URL: <a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140812/55e862dc/attachment-0001.html">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140812/55e862dc/attachment-0001.html </a><br clear="none">-------------- next part --------------<br clear="none">A non-text attachment was scrubbed...<br clear="none">Name: eta2iso_wrf.ncl<br clear="none">Type: application/octet-stream<br clear="none">Size: 1638 bytes<br clear="none">Desc: not available<br clear="none">Url : <a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140812/55e862dc/attachment-0001.obj">http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140812/55e862dc/attachment-0001.obj </a><br clear="none"><br clear="none"></div> </div> </div> </div></div> </div></div></div></div></body></html>