Re: writing a newly created variable to a newly created netcdf file

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 15 2011 - 10:21:22 MST

[1]
system("/bin/rm -f tref_annmean.nc ","r") ; <== wrong
replace with
system("/bin/rm -f tref_annmean.nc")

[2]
ncdf->tref_annmean = tref_annmean

Good luck

On 2/15/11 10:15 AM, Madeleine Patterson wrote:
> Hi ncl-talkers,
>
> I'm trying to calculate an annual and seasonal means of a variable, then
> write this new variable to a new netcdf file, but my script is just not
> working. Anyone have any advice?
>
> Thanks, M
>
> all_files = systemfunc("ls /model-out.199*")
>
> fall = addfiles(all_files1,"r") ; all the files are read into the temp
> file 'fall'
>
> ListSetType(fall,"cat")
>
> tref_all = fall[:]->TREF
>
> tref_annmean = month_to_annual(tref_all,1)
>
>
> system("/bin/rm -f tref_annmean.nc <http://tref_annmean.nc>","r")
> ncdf = addfile("tref_annmean.nc <http://tref_annmean.nc>","c")
> ncdf->tref_annmean <-- how do I write this line?
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 15 10:21:29 2011

This archive was generated by hypermail 2.1.8 : Thu Feb 17 2011 - 22:00:17 MST