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) "foo1.nc", if it does not
> find the file named "foo1.nc", 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("foo.nc", "r")
addfile("foo.nc", "w")

   but if I want to write foo and tell NCL to

addfile("foo.nc", "c")

   it will write ... foo.nc, 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:

http://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml
>>> 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 <Tom_Roche@pobox.com>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
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