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

Carl Schreck cjschrec at ncsu.edu
Mon Jun 15 10:01:23 MDT 2015


I'll second this one. Something I've been thinking about asking for for a
while. Only reason I can think of against it is that adding a second line
to call system( "rm file") makes it a little harder to accidentally delete
a file. So my thinking was to make Cathy's "cw" the default for "c". That
way it will add to the file if it exists and is the same size, but it'll
give you an error if you try to write something that doesn't fit in that
file.

   Carl

On Tue, Jun 9, 2015 at 8:09 AM, Dennis Shea <shea at ucar.edu> wrote:

> 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
>>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


-- 

<http://www.cicsnc.org/>
<http://www.researcherid.com/rid/B-8711-2011>
* Cyclone <http://www.cyclonecenter.org/>*Center.org
<http://www.cyclonecenter.org/>  *Carl J. Schreck III, PhD*
*Research Associate*
Cooperative Institute for Climate and Satellites NC (CICS-NC)
<http://www.cicsnc.org/> /
North Carolina Institute for Climate Studies (NCICS)
<http://www.cicsnc.org/>
North Carolina State University <http://ncsu.edu/>
NOAA National Centers for Environmental Information (NCEI)
<http://ncei.noaa.gov/>
151 Patton Ave, Asheville, NC 28801
e: cjschrec at ncsu.edu
o: +1 828 257 3140
Publications
<http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate>
monitor.cicsnc.org/mjo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150615/c036f4ed/attachment.html 


More information about the ncl-talk mailing list