Re: [feature request] user-declared data format

From: Tom Roche <Tom_Roche_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 06 2013 - 20:20:45 MST

Tom Roche Sun, Mar 3, 2013 at 4:58 PM
>> I assert that NCL should provide API that allows the user to declare
>> the format of a given data file. Since (IIUC) NCL lacks optional
>> arguments, I'd like to see API like

>> function addfile_format(
>> file_path [1] : string,
>> status [1] : string,
>> format [1] : string
>> )
>> return_val [1] : file

Dennis Shea Sun, 03 Mar 2013 15:15:06 -0700
> NCL will look for the file named (say) "", if it does not
> find the file named "", then it will look for the file "foo1"
> and treat it as a netCDF file.

With respect, and IMHO, that's a kludge pretending to be a solution:

1. IIUC, it fails 1/3 of the functionality. NCL will read or write
   *existing* file name=foo as netCDF if I tell NCL to

addfile("", "r")
addfile("", "w")

   but if I want to write foo and tell NCL to

addfile("", "c")

   it will write ..., no?

2. This syntax is obscure. If a user wants to "<verb/> foo as netCDF",
   why not just give her/him API that says that? Instead of relying on
   kludgey side effects that moreover aren't particularly well
   explained by the doc:
>>> The extension is required even though it need not be part of the
>>> actual filename.

   I'll grant you that I *could* have guessed how to do this from that
   sentence. But I'll bet you I'm not the first (or last) user that's
   tripped over this.

YMMV, Tom Roche <>
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Mar 6 20:21:13 2013

This archive was generated by hypermail 2.1.8 : Thu Mar 07 2013 - 08:55:58 MST