Re: time unlimited

From: Michael Notaro <mnotaro_at_nyahnyahspammersnyahnyah>
Date: Mon, 29 Oct 2007 13:18:28 -0500

Check out "Make time unlimited in a series of netCDF files" on
http://ccr.aos.wisc.edu/model/processing/ncl/index.php

As shown in that example, the following line will make the time
unlimited when you create a new file:
filedimdef(outfile,"time",-1,True)

Mike

On Oct 29, 2007, at 1:15 PM, Nan Rosenbloom wrote:

> Hello -
>
> I am using a script to read variables from one file to another
> using example 3 from
> the NCL addfile documentation.
>
> The process reads in all the variables from one file (in my case
> from a netcdf file; the example reads from
> a .ccm file to an .nc file), and then writes them to a new nc file.
>
> Unfortunately, when it does the transfer, it move 'time' from being
> UNLIMITED to having a fixed dimension.
> I think this is causing problems farther down the line when I read
> the file back in to a coupled ccsm run.
> Does anyone know how to force ncl to retain the UNLIMITED status?
>
> Thanks for any ideas!
> nanr
>
> Here is my script, copied nearly verbatim from the NCL
> documentation under addfile, Example 3.
>
>
> cami = addfile(tfile,"r")
> att_names = getvaratts(cami) ; get CCM file's global
> attributes
> if(.not.all(ismissing(att_names))) then
> do i = 0,dimsizes(att_names)-1
> print("copy_fileatts: global attributes->" + att_names(i))
> ncout@$att_names(i)$ = cami@$att_names(i)$ ; copy file's
> global attributes
> end do
> end if
>
> names = getfilevarnames(cami) ; get CCM file's variable
> names and print them
>
> do i=0, dimsizes(names)-1
> print("writing ncdf: i,name="+ i+ " "+ names(i))
> ncout->$names(i)$ = cami->$names(i)$
> end do
>
> _______________________________________________
> 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 Mon Oct 29 2007 - 12:18:28 MDT

This archive was generated by hypermail 2.2.0 : Mon Oct 29 2007 - 15:38:45 MDT