[ncl-talk] splitting very large wrfout files

Dennis Shea shea at ucar.edu
Mon Nov 28 09:19:57 MST 2022


maybe the  netCDF operators (NCO)  or Climate Data Operators (CDO) would be
best

NCO  [***untested***]

*ncks  *-d Time,0,9 wrfout...nc  wrfout_..._0-9.nc
*ncks  *-d Time,10,19 wrfout...nc  wrfout_..._10-19.nc


CDO [?]




On Sun, Nov 27, 2022 at 10:44 PM Lyndz via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear NCL-experts,
>
> Has anyone tried splitting a large wrfout file using NCL and writing the
> output to the original wrfout format? I am encountering an nclMalloc issue
> when processing large wrfout files.
>
> Say I just to get specific time steps such as this:
>
>   load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
>   filename = "./wrfout_d01_2011-12-12_12_00_00"
>   a     = addfile(filename,"r")
>   times = wrf_user_getvar(a,"times",-1)
>   theta_a = wrf_user_getvar(a,"theta",-1)
>   pv_a    = wrf_user_getvar(a,"pvo",-1)                     ;potential
> vorticity
>
>   theta = theta_a(80:90,:,:,:)
>   pv = pv_a(80:90,:,:,:)
>
>
> How do I save this to the original wrfout format?
>
> I'll appreciate any help on this.
>
> -Lyndz
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20221128/2e2edaa2/attachment.htm>


More information about the ncl-talk mailing list