[Thread Prev][Thread Next][Index]

Re: [ferret_users] Create a pressure levels dimension and combine different files together



Hi,

Somebody may write with a simple solution using tools like the NCO operators.  To do this in Ferret, you'd follow the scheme in the Users Guide under "append a slab" to netcdf,

http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/index-1/index/

append
   slab to NetCDF, example
   time to NetCDF, example
   time steps to NetCDF file, notes about
   creating a time axis for variable having no time axis
   ...

In the example, the data is being read in from ascii files, so it's more elaborate than what you'll need.  The important thing to note is that on the first WRITE, you have a /KLIMITS qualifier to create the whole Z axis. 

The other thing you need to do is give your individual grids a Z dimension.  This kind of thing is done in Example 5 of the same documentation chapter on appending data.  The thing to do there, is to add a variable which is  0 at the z levels

   let new_var = var + 0*z[gz=plev]

(Also give these variables units, etc.)  Now when you

   save/append/file=outfile.nc/K=3  new_var

you will be taking the data in file 3, adding 0 to it and writing it into K=3 of the new file.

Ansley

On 5/13/2016 6:20 AM, Nicolas Freychet wrote:
Hi all,

I have a variable at different pressure levels, but each level is recorded in a different file, and without a "Z" dimension (it just has x,y,time). So I'd like to concatenate all the files together along a Z dimension to create a single 4D file, and I need to specify which at level goes each file.

So I create a new axis like that:
def axis/z/units="millibar" plev={100, 200, 250, 500, 600, 750, 850, 1000}
But then I dont know how to associate the variable from file1 to the level 1 of the axis (and so on) and save all the levels together.

Any idea?

Nicolas





[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement