[ncl-talk] suggestion for addfile(s) status flags

Dennis Shea shea at ucar.edu
Tue Jun 9 06:09:02 MDT 2015


Hi Cathy,

I have opened a JIRA ticket:  NCL-2230

THX
D



On Mon, Jun 8, 2015 at 2:31 PM, Cathy Smith (NOAA Affiliate) <
cathy.smith at noaa.gov> wrote:

> NCL staff
> I've run into an issue a bunch of times where I was running code that
> creates a new netCDF file. If I'm debugging or if I have updated data
> which goes into the file, when I open a file with status value "c", the
> code fails as the file already exists. If the file doesn't exist yet,
> then I can't use "w" as a new file needs to be created. I can write
> something where I test for the file and if it exists, I can decide to
> delete the old copy first or write to the old file but it seems kludgy.
> I can of course delete the old file first when using "c" before running
> the code but sometimes I forget and sometimes someone else runs the code
> and gets a permission error which they don't understand.
>
> I was wondering if it would be useful to have 2 new status flags to
> addfile(s). Maybe "cd" and "cw". The first would check for the file
> first and delete it if it already existed and then open the new file.
> The second would open the file with a "w" if it already existed. These
> would act more like C or Fortran flags. If a user was worried about
> accidentily deleting or writing to old files, they could still use "c".
>
> It's just a suggestion and there could be issues I am not considering,
> of course.
>
> Cathy
>
> --
> ----------------------------------------------
> NOAA/ESRL PSD and CU CIRES
> 303-497-6263
> http://www.esrl.noaa.gov/psd/people/cathy.smith/
>
> Emails about data/webpages may get quicker responses from emailing
> esrl.psd.data at noaa.gov
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150609/d64c2451/attachment.html 


More information about the ncl-talk mailing list