[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #GEL-528490]: Conversion of multiple .cdl files to multiple .nc files using ncgen


ncgen does not accept multiple files; it takes one file in, and generates one 
file at a time.  You might be able to create a shell script that will take all 
the .cdl files in a directory, parse the filename from the input file, and pass 
it to ncgen to create a binary netcdf file.  Beyond that, I'm afraid the only 
solution I can think of is to invoke ncgen manually for each file.

Thanks, have a great day!


> Full Name: Marian Osei
> Email Address: address@hidden
> Organization: Kwame Nkrumah University of Science and TEchnology
> Package Version:
> Operating System: Ubuntu
> Hardware:
> Description of problem: Hello all,
> I would be grateful to know how to convert multiple cdl files into multiple 
> nc files using ncgen. I have tried syntax such as ncgen -o *.nc *.cdl, which 
> does not work. On the other hand, the ncgen syntax is able to convert only 
> single files at a time. Is there a way out?
> Thanks

Ticket Details
Ticket ID: GEL-528490
Department: Support netCDF
Priority: Normal
Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.