[ncl-talk] Problems about output netCDF
Mary Haley
haley at ucar.edu
Sun Aug 24 21:39:50 MDT 2014
You need to be more specific about what the problem is.
Are you getting an error/warning, or a bad NetCDF file, or something else?
If you are getting an error/warning, please include the exact message.
--Mary
On Sat, Aug 23, 2014 at 7:21 PM, Li Qi <liqi123sh at qq.com> wrote:
> Dear all,
>
> I'd like to create a netCDF file with the selected variables read off WRF
> output data, but I can't make it.
>
> Here's my code:
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>
> begin
> in = addfile("wrfout_d03_2011-06-13_18_00_00.nc","r")
> out = addfile("eth850_1.nc","c")
>
> ; First get the variables we will need
>
> it = 1
> lat = wrf_user_getvar(in,"lat",it) ; Equivalent PotentialTtemperature
> [K]
> lon = wrf_user_getvar(in, "lon",it) ; total pressure
>
>
> eth = wrf_user_getvar(in,"eth",it) ; Equivalent PotentialTtemperature
> [K]
> p = wrf_user_getvar(in, "pressure",it) ; total pressure
>
> ; Horizontally interpolate to pressure coordinates ("p")
> pressure = 850. ; 850 hPa
> eth_plane = wrf_user_intrp3d(eth,p,"h",pressure,0.,False)
>
>
>
> out->lon = lon
> out->lat = lat
> out->eth850 = eth_plane
> end
>
>
>
> _______________________________________________
> ncl-talk mailing list
> 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/20140824/5017e5db/attachment.html
More information about the ncl-talk
mailing list