[Thread Prev][Thread Next][Index]

Re: [ferret_users] Appending time steps to netcdf file



yes, simple appending wouldn't work unless the data in each file already had the right start date defined. To append you'd need to do something to redefine the time axis for each input file to give it the right dates.  Descriptor files are often the best solution, not least because it doesn't involve duplicating the data in a big new dataset, but just making the descriptor file and leaving the original data alone.

Steve Guimond wrote:
Hi Ansley,
  My data were already on a 6hour time axis within each file.  The files
were originally GRIB and were created using a GrADS script.  So each file
has a time step starting at 0 and ends after x number of 6 hour time
steps.  I looked at the FAQ found here:

http://www.ferret.noaa.gov/Ferret/FAQ/data_management/multi_dataset.html

Option 1 did not work.  When I try to append time steps to the file, it
just seems to overwrite the file.  I tried the /rigid/tlimits=  qualifier
as well and this didn't work.  The descriptor works well.  I was unware
they even existed.  Learn something new everyday.

Steve

=======================================================
Stephen R. Guimond
Graduate Research Assistant
Center for Ocean-Atmospheric Prediction Studies (COAPS)
=======================================================

On Thu, 7 Sep 2006, Ansley Manke wrote:

  
Hi Stephen,
As Jimmy says, a descriptor file is a good way to form a time series
dataset from files with time series data. You can also append to netcdf
files in time, if the time axes can be reconciled.  Without more detail
on what the time axis is like in your input datasets, it's hard to know
what went wrong with what you tried.  Are the data already on a 6-hour
time axis at time steps 1:27 and 28:67?  If so you do not need to define
a new time axis and define the new variables uprs2 and vprs2.  The
example in the documentation is for reading ascii data and converting it
to netcdf.

Stephen R. Guimond wrote:
    
Hello,
 I have three netcdf files with different time steps that I want to
combine into one file.  I have looked at the documentation/mail
archives, but am still confused.  Here is what I did:
!################################
set memory/size=100

define axis/t="04-Aug-2000 06:00":"22-Aug-2000 12:00":6/units=hours time

define grid/t=time tgrid

use storm_3d_1.nc

let uprs2 = t[g=tgrid]*0 + uprs
let vprs2 = t[g=tgrid]*0 + vprs

save/file=storm_3d.nc/l=1:27 uprs2,vprs2

cancel var/all;cancel data/all

use storm_3d_2.nc

let uprs2 = t[g=tgrid]*0 + uprs
let vprs2 = t[g=tgrid]*0 + vprs

save/append/file=storm_3d.nc/l=28:67 uprs2,vprs2
!###############################################

I get this error:

**ERROR: inconsistent sizes of data regions: T axis
         UPRS has 13 points (L=28:40)
         expression has 40 points (L=28:67)
LIST/FORMAT=CDF/append/file=storm_3d.nc/l=28:67 uprs2,vprs2
Command file, command group, or REPEAT execution aborted

I don't know where the "13 points" are coming from.

Any suggestions?

Steve

=======================================================
Stephen R. Guimond
Graduate Research Assistant
Center for Ocean-Atmospheric Prediction Studies (COAPS)
Tallahassee, FL 32304
=======================================================

----------------------------------------------------------------


      
--
~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>
Ansley Manke, NOAA/PMEL   ansley.b.manke@noaa.gov
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246,  FAX 206-526-6744




    


  

-- 
~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~>   ~> 
Ansley Manke, NOAA/PMEL   ansley.b.manke@noaa.gov
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246,  FAX 206-526-6744


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement