Re: problem with fileattdef

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 16 Jan 2008 22:20:04 -0700

Try deleting the file. Add
           system ("/usr/bin -f " +dirf+filo )
before
           fout = addfile(dirf+filo, "c")

Will Hobbs wrote:
> Hi
>
> I am creating a netcdf and using 'fileattdef' to assign global attributes
> - the relevant code snippet is below. When i run the script I get the
> message 'warning:FileAttDef: No attributes to assign', and indeed the new
> file is written without the required global attributes.
>
> Any ideas?
>
> Many thanks,
>
> Will
>
> ;*************************************
> fout = addfile(dirf+filo, "c")
>
> setfileoption(fout, "DefineMode", True)
>
> conv = delNam(0)
> do i = 1, ngrad-1
> conv = conv+"; "+delNam(i)
> end do
>
> ;global attributes
>
>
> fAtt = True
> fAtt_at_title = " meridional temperature gradient"
> fAtt_at_creation_date = systemfunc("date")
> fAtt_at_conventions = "gradient refs; "
> fAtt_at_data_source = datsrc
>
> fileattdef(fout, fAtt)
>
> ;***********************************
>
>
> ============================
> Will Hobbs
> PhD Candidate
> Room A113
> UCLA Department of Geography
> 1255 Bunche Hall
> Los Angeles CA 90095-1524
> Tel: 310 663 2631
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 16 2008 - 22:20:04 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 17 2008 - 12:33:19 MST