[ncl-talk] creating daily files from hourly outputs
Noelia otero
noeli1680 at gmail.com
Fri Jan 19 05:15:59 MST 2018
Hi all,
I have hourly files from WRF and I wanted to create daily files (with the
hourly outputs, Time=24). I was using addfile(, "c")....I know the error I
got it is caused by "c", once the first file is created I can´t opened
again..(If I am not wrong, right?) Is there any way to do it?
print(file_in)
; wrfout_d01_2010-01-01_00:00:00.nc
wrfin = addfile(file_in,"r")
; I want the output: file_out=met_wrfout_d01_2010-01-01.nc
wrfpost = addfile(file_out,"c") ;create new netCDF file
pres_pa = wrf_user_getvar(wrfin,"pres",-1)
t_k = wrf_user_getvar(wrfin,"tk",-1)
wrfpost->t_k= t_k
wrfpost->pres_pa= pres_pa
Time = wrf_user_getvar(wrfin,"Times",-1)
lat = wrf_user_getvar(wrfin,"lat",-1)
lon = wrf_user_getvar(wrfin,"lon",-1)
wrfpost->time = Time
wrfpost->lat= lat
wrfpost->lon= lon
Thanks in advance,
Best
Noelia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180119/efeeaa1c/attachment.html>
More information about the ncl-talk
mailing list