[MITgcm-support] "gluemnc grid.t*.nc" omits many variables

David Wang dwang at ldeo.columbia.edu
Mon Sep 27 11:59:49 EDT 2010


Hi,

If you have Matlab, try gluemnc.m (attached).

David

On 09/27/2010 11:32 AM, Ryan Abernathey wrote:
> I would say that you definitely identified the problem--old version of 
> nco.
>
> I think that the ncecat -u option is needed for glueing grid files 
> because they don't have a common record dimension by default. That's 
> probably why the script worked for the state files but not the grid 
> files. I think this was one of the hacks I had to do to get the grid 
> files to glue.
>
> You could either update your nco or try to rewrite the script to avoid 
> using that -u flag.
>
> Good luck,
> Ryan
>
> p.s. cc'd to the support list for posterity.
>
>
>
> On Sep 27, 2010, at 11:20 AM, Maarten Buijsman wrote:
>
>> Hi Ryan
>>
>> At GFDL we use
>> (ncecat -r) "NCO netCDF Operators version "3.1.4" last modified 
>> 2006/06/09 built Dec 11 2006 on hnv by hnv"
>> which is old and the cause of my trouble.
>> I am currently checking if they want/can update it..... (cannot mess 
>> with it myself)
>>
>> -u does:
>>
>> "A new record dimension is the glue which binds the input file data 
>> together. The new
>> record dimension name is, by default, “record”. Its name can be 
>> specified with the ‘-u
>> ulm_nm’ short option (or the ‘--ulm_nm’ or ‘rcd_nm’ long options)."
>>
>> This functionality is not present in the olde ncecat....:
>> ncecat [-4] [-A] [-C] [-c] [-D dbg_lvl] [-d ...] [-F] [-H] [-h] [-l 
>> path] [-n ...] [-O] [-o out.nc] [-p path] [-R] [-r] [-t thr_nbr] [-v 
>> ...] [-x] in.nc [...] [out.nc]
>>
>> -4, --4, --netcdf4 Output file in netCDF4 storage format (HDF5)
>> -A, --apn, --append Append to existing output file, if any
>> -c, --crd, --coords Coordinate variables will all be processed
>> -C, --nocoords Associated coordinate variables should not be processed
>> -D, --dbg_lvl, --debug-level dbg_lvl Debugging level
>> -d, --dmn, --dimension dim,[min][,[max]] Dimension's limits in hyperslab
>> -F, --ftn, --fortran Fortran indexing conventions (1-based) for I/O
>> -H, --fl_lst_in, --file_list Do not create "input_file_list" global 
>> attribute
>> -h, --hst, --history Do not append to "history" global attribute
>> -l, --lcl, --local path Local storage path for remotely-retrieved files
>> -n, --nintap nbr_files,[nbr_numeric_chars[,increment]] NINTAP-style 
>> abbreviation of file list
>> -o, --output, --fl_out fl_out Output file name (or use last 
>> positional argument)
>> -O, --ovr, --overwrite Overwrite existing output file, if any
>> -p, --pth, --path path Path prefix for all input filenames
>> -R, --rtn, --retain Retain remotely-retrieved files after use
>> -r, --revision, --vrs, --version Program version and copyright notice
>> -t, --thr_nbr, --threads, --omp_num_threads thr_nbr Thread number for 
>> OpenMP
>> -v, --variable var1[,var2[...]] Variable(s) to process (regular 
>> expressions supported)
>> -x, --xcl, --exclude Extract all variables EXCEPT those specified 
>> with -v
>> in.nc Input file name(s)
>> [out.nc] Output file name (or use -o switch)
>>
>> so I guess updating is the best ......
>> although there may be a workaround?
>>
>> thanks
>> Maarten
>>
>>
>> Ryan Abernathey wrote:
>>> Hi Maarten,
>>>
>>> On Sep 27, 2010, at 9:40 AM, Maarten Buijsman wrote:
>>>
>>>> ncecat: invalid option -- u
>>>
>>>
>>> This error is telling you that the script is attempting to use an 
>>> invalid option with the ncecat command. That is probably because you 
>>> are using a different version of nco from the one I used when I 
>>> modified the script. Just because it works with the state files 
>>> doesn't rule out this possibility. (The grid files are actually more 
>>> complicated because the variables have different sizes, rather than 
>>> the state files, where the variables are all the same size.)
>>>
>>> I will log on to my server this afternoon and tell you which version 
>>> of nco I used. In the meantime, check out the manual for ncecat and 
>>> try to figure out how it works.
>>>
>>> Cheers,
>>> Ryan
>>>
>>>
>>
>> -- 
>> ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~
>> Maarten Buisman (maarten.buijsman at noaa.gov)
>> Geophysical Fluid Dynamics Laboratory
>> 201 Forrestal Road
>> Princeton, NJ 08540-6649
>> Phone: (609) 452-5305
>> Fax: (609) 987-5063
>>
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support

-- 
Daiwei Wang
Department of Earth and Environmental Sciences and
Lamont-Doherty Earth Observatory
Columbia University

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gluemnc.m
Type: application/vnd.wolfram.mathematica.package
Size: 915 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20100927/5acee7b3/attachment-0001.bin>


More information about the MITgcm-support mailing list