Re: Question about wkSpaceTime

From: Charlotte DeMott <demott_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 14 2013 - 12:08:33 MST

If it's of any help, I use the following NCO script to change the time dimension from fixed to unlimited. There may be a faster way to do it, but this has served me well.

Cheers,
Charlotte

#!/bin/csh

foreach i (*.nc)
echo $i
ncecat -O $i $i # add degenerate record dimension
ncpdq -O -a time,record $i $i # switch "record" and "time"
ncwa -O -a record $i $i # remove (degenerate) "record"
endif

end

> Message: 7
> Date: Thu, 14 Nov 2013 11:53:43 -0700
> From: Dennis Shea <shea@ucar.edu>
> Subject: Re: Question about wkSpaceTime
> To: "Winston C. Chao" <winston.c.chao@nasa.gov>
> Cc: ncl-talk@ucar.edu
> Message-ID: <52851C37.8000601@ucar.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Winston,
>
> FYI: I tried to download the files but I ran out of space
> on my download partition. Subsequently, the ftp 'timed out'
>
> I was going to suggest that you use the netCDF operator 'ncrcat'
> to extract the variables you want and create a single file
> or a small set of files to hold the data. It would look like
>
> %> ncrcat -v var1,var2,.. g30e017.geosgcm_surf*nc4
> G30E017.GEOSGCM_SURF.198406-??????.nc4
>
> Unfortunately, 'ncrcat' requires that the 'time'
> dimension be classified as "UNLIMITED" and the 'time'
> on your files is not classified as such.
>
> ncdump -v time
>
> etcdf g30e017.geosgcm_surf.19850211_0730z {
> dimensions:
> lon = 288 ;
> lat = 181 ;
> time = 1 ;
> variables:
> int time(time) ;
> time:long_name = "time" ;
> time:units = "minutes since 1985-02-11 07:30:00" ;
> time:time_increment = 30000 ;
> time:begin_date = 19850211 ;
> time:begin_time = 73000 ;
>
> In NCL, you can use 'addfiles' but it would likely be more efficient
> if a separate file was created.
> ===
> Note: I ran successfully ran the code for ndaywin=96,120,196
> on a data set that spanned 1979-2011
>
> Cheers

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 14 12:15:12 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 22 2013 - 09:36:32 MST