OpenCDSS / cdss-app-statecu-fortran

Colorado's Decision Support Systems (CDSS) StateCU consumptive use model code, documentation, tests
GNU General Public License v3.0
1 stars 1 forks source link

tmp file extension assumed as temporary files and removed by system tools #14

Open smalers opened 4 years ago

smalers commented 4 years ago

From Travis Zielke:

I attended a talk recently where you mentioned you were looking for feedback on the CDSS software. I’ve run into an issue recently with StateCU that could use some attention. The issue is that the temperature data for a model run is saved in a xxx.tmp file. The IT department at our company runs a file sweep before creating a backup of our servers. As part of this sweep, they delete several types of temporary files. Among those types are windows temp files, which have the extension yyy.tmp.

As a result of this, all of our completed StateCU runs are now missing the temperature data and can’t be opened. We’ve corrected this procedure by IT, however it occurs to me that we’re likely not the only firm that does this as part of our backup procedure. It would be a good idea to change the extension used to save temperature data to some other name.

smalers commented 4 years ago

A simple solution would be to pick a different extension and in this case "tmp" does have a lot of meaning and may be a special case. Perhaps a different extension could be adopted to avoid general confusion of whether a file contains temperature data or is a temporary file. The use of 3-character extensions is no longer required so adopting something more verbose such as "temperature" or "tempts" (for time series) would not be horrible.

A work-around is for people to configure their system tools to not treat the files as temporary, and that will vary according to software that is cleaning computers.

This also brings up a larger issue, which is whether the file extension should indicate file contents or format. For example, StateMod and StateCU have many files, each with different extensions, and potential to conflict with other extensions on a computer. The extension is a clue to the operating system for which application to open the file, based on the file format. For example, "stm" might be used for StateMod time series files and double-clicking on such a file should ideally start an application that knows what to do with the file (StateMod GUI? TSTool?). Certain file extensions might also be disallowed as email attachment or in a zip file that goes through email, although this does not seem to have been a problem.

So, should a time series file like "ddh" really be "stm" always to indicate its format, and other part of the name indicate the content? And if so, should it be "xxxx.ddh.stm", "xxxx-ddh.stm", "xxxx.ddh.stmts", "xxxx.stmddh" or something else? I suspect that the historical modeling conventions will make it difficult to change. Perhaps just need to evaluate whether any common extensions are in conflict with other uses on the computer (such as "tmp") and change those file extensions. Another one that comes to mind is "tar" which is used for reservoir target time series. A "tar" file is commonly used on Linux systems to package a list of files for distribution.

kelleythompson commented 4 years ago

On February 14 2020, modified the StateCU GUI to specify a default file extension for the Monthly Temperature File of .tem rather than .tmp. The current, legacy, project file for the GUI in Visual Studio 2005 is maintained on an old laptop here at Division of Water Resources (we have not been able to transfer this without modification as VS2005 is no longer available). It was to this same file that edits were also recently made so that wizard functions point to the new DWR server location for web services. For the rebuild, the StateCU GUI version number was changed from 7.1 to 7.1.1. When edits were made to change web services the version number was not changed, but 7.1.1 can be considered to have these two modifications as was documented in the release notes. New setup file and release notes will be posted soon on CWCB CDSS / software page.

smalers commented 4 years ago

I neglected to include a comment from Erin Wilson (below). Given Erin's comment, this issue seems to be confined to StateCU GUI Wizard and not CDSS modeling conventions. So, Kelley's fix above seemed to have resolved. I'll email Travis to see if he is satisfied.


We always name our temperature files *.tem. All the StateCU model input files on the website use the *.tem extension. I forgot it was the “default” for the StateCU Wizard. Probably should be changed. Is this something you can do, or are you not able to re-compile the VBasic code?

macphersonbr commented 4 years ago

Thanks all for notifying us of the issue and to Kelley for fixing it. When Carolyn gets it posted and we get everything updated, I'll send out a notice to our news letter.

Brian Macpherson, P.E. Decision Support System Specialist

P 303-866-3441, ext. 3229 <303-866-3441> 1313 Sherman St., Room 718, Denver, CO 80203 brian.macpherson@state.co.us brian.macpherson@state.co.us | cwcb.state.co.us http://cwcb.state.co.us/ https://www.facebook.com/coloradowaterconservationboard/ https://twitter.com/CWCB_DNR https://www.instagram.com/cowaterconservationboard/ https://www.linkedin.com/company/colorado-water-conservation-board/

On Fri, Feb 14, 2020 at 1:30 PM Steve Malers notifications@github.com wrote:

I neglected to include a comment from Erin Wilson (below). Given Erin's comment, this issue seems to be confined to StateCU GUI Wizard and not CDSS modeling conventions. So, Kelley's fix above seemed to have resolved. I'll email Travis to see if he is satisfied.

We always name our temperature files .tem. All the StateCU model input files on the website use the .tem extension. I forgot it was the “default” for the StateCU Wizard. Probably should be changed. Is this something you can do, or are you not able to re-compile the VBasic code?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenCDSS/cdss-app-statecu-fortran/issues/14?email_source=notifications&email_token=AI45M2N7HSP2PUSMGIBUZG3RC35PZA5CNFSM4KTF5JE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL2K7DA#issuecomment-586461068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI45M2NNWNIBYZDHTHBVN3DRC35PZANCNFSM4KTF5JEQ .