Re: read multiple WRF files

From: Marston Johnston <shejo284_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 25 2014 - 02:09:39 MST

Hi,

Wouldn't the easiest thing be renaming your files and add the ".nc" suffix?
This is easily done in bash:

for i in *.*; do mv $i $i.nc; done

Hope this helps,
/M

On Tue, Feb 25, 2014 at 9:27 AM, zhangbinrc <zhangbinrc@163.com> wrote:

> Hi,
>
> I’m reading multiple WRF files, for example wrfout_d01_2013-04-01_00:00:00
> and wrfout_d01_2013-04-02_00:00:00 using the following codes:
>
> * fils = systemfunc ("ls /net/17/zb/wrfout2/haze_2013/ctrl/07/*")*
> * f = addfiles (all_files, "r") *
> * T = addfiles_GetVar (f, fils, "T2")*
>
> The problem is that the WRF files are in netcdf format, however they do
> not have a suffix of “.nc”. So that the script could not read in the files.
> Is there any way I can fix this?
>
> Thanks!
>
> 张斌 博士生/Bin Zhang Ph.D. Candidate
> 清华大学地球系统科学研究中心/ Center for Earth System Science, Tsinghua
> Email:zhangbin06@mails.tsinghua.edu.cn
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
Only the fruitful thing is true!

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 25 02:09:55 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 03 2014 - 14:26:18 MST