[ncl-talk] wrfout coordinate

Bill Ladwig ladwig at ucar.edu
Wed Jun 7 14:25:46 MDT 2017


Hi Vanucia,

So by NetCDF, you really mean NetCDF CF (Climate and Forecast) format.  The
original WRF files are in NetCDF format, but they aren't NetCDF CF
compliant.  You are correct, there is nothing in NCL that will convert WRF
output to NetCDF CF for you, but all of the tools that you would need to do
it are in NCL.  However, I would try wrfout_to_cf.ncl first and see if the
result is good enough.  If not, you can always modify that script to do
what you need.  It's not a particularly complicated script, but it is
lengthy.

Best of luck,

Bill


On Wed, Jun 7, 2017 at 12:46 PM, Vanúcia Schumacher <
vanucia-schumacher at hotmail.com> wrote:

> So, I understand that WRF coordinates are two dimensional, but I would
> like to translate the original WRF files into the format compatible with
> netCDF. I saw that there is an NCL script (wrfout_to_cf.ncl
> <http://www2.mmm.ucar.edu/wrf/src/utils/wrfout_to_cf.ncl>), but like this script
> is not supported by the NCL team I am in doubt if I can do something
> similar using NCL.
> ------------------------------
> *De:* Bill Ladwig <ladwig at ucar.edu>
> *Enviado:* quarta-feira, 7 de junho de 2017 14:19:58
> *Para:* Vanúcia Schumacher
> *Cc:* ncl-talk at ucar.edu
> *Assunto:* Re: [ncl-talk] wrfout coordinate
>
> Hi Vanucia,
>
> I'm not sure I understand what you are wanting to do.  In WRF, the
> latitude and longitude coordinates are two-dimensional, since WRF uses
> curvilinear coordinates.  Unless you are using a staggered variable, the
> coordinates are stored in the XLAT and XLONG variables in the WRF output
> file.  (For plotting in NCL, you can set the special lat2d and lon2d
> coordinate variables to point to XLAT and XLONG, and NCL will know what to
> do).
>
> As for creating the lat/lon coordinates, are you wanting to create the
> coordinate variables from scratch, rather than just writing out the XLAT
> and XLONG variables?  The NCL WRF routines have a wrf_ij_to_ll (
> https://www.ncl.ucar.edu/Document/Functions/Built-in/wrf_ij_to_ll.shtml)
> that you could use to generate the lat/lon arrays if you supply the WRF map
> projection parameters.  Another way to create the lat/lon arrays is to use
> geogrid from WRF itself.  You would need to set the map projection that you
> want, run geogrid, and grab the latitude and longitude arrays from the
> geo_em.d01.nc file.
>
> If this doesn't answer your question, can you clarify what you want to do,
> and I'll try again.
>
> Hope this helps,
>
> Bill
>
>
>
> On Wed, Jun 7, 2017 at 9:05 AM, Vanúcia Schumacher <
> vanucia-schumacher at hotmail.com> wrote:
>
>> Hi users,
>>
>>
>> I would like to know if there is a way to create lat and lon coordinates
>> like netCDF file with the wrfout.nc data in NCL? I need to input into
>> other model with time level lat and lon informations.
>>
>>
>>
>> Thanks for any hep on this question
>>
>>
>> _______________________________________________
>> 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/20170607/36530574/attachment.html 


More information about the ncl-talk mailing list