Getting project specific paths
This method was originally constructed to allow for the export of data for different projects to be grouped together in one common spot. For example in caness there is an export directory /models/caness/exportData and under that there are sub-directories, one for each project and appended to the project name is the model family name from which the data was exported and finally that directory is subdivided by subject area of the files like commercial, industrial etc. One particular example:
/space/models/caness/exportData/YourEnergyStory_CANESS_Ver5/elecProd
root: /space/models/caness/exportData/
project chosen from the list: YourEnergyStory
model base name of model family: CANESS_Ver5
subject area: elecProd
Under that there would be files named to include the scenario name and number
This method of path naming has now been overloaded to also handle when a view may want to read and write parameter type data for it's running which is specific to a particular project. Which unfortunately means some confusion in the naming of the parts of the path. Please keep in mind the above structure as you read on.
Background
How To
For exporting files as results for a project
There is a sub routine called getProjectExportPath_v2.t (potentially updated version number over time). That subroutine takes the following as inputs/outputs:
buildstring ($exportDataDirRoot, $modelHome, "/", "/exportData/")
subjectArea - this is actually the last part of the path and set it to the subject area for the files you are exporting (eg commercial, residential, elecProd etc)
projectAppendText - $modelName - this is an environment variable which is the model base name of the model family
exportDirSet[] - this is where the string containing the constructed path will be. You will have to then make this into an informant and extract the string from this set to use it
outProjectParams[projParms] - This contains all the other info you may want for exporting data related to your project range of dates and export style (see background info about projects)
For saving view data
There is a sub routine called getProjectExportPath_v2.t (potentially updated version number over time). That subroutine takes the following as inputs/outputs:
buildstring ($viewInputsStorePath, $modelHome, "/", $modelVersion, "/viewData/IndividualViews/")
subjectArea - this is actually the last part of the path and is best set to the view name
projectAppendText - Just set to the string “Proj” for projection. Recall in the case of exports you want this to be the model base name of the model family but NOT in this case because you do not want the output files to be model family specific.
exportDirSet[] - this is where the string containing the constructed path will be. You will have to then make this into an informant and extract the string from this set to use it
outProjectParams[projParms] - This contains all the other info you may want for exporting data related to your project (see background info about projects) HOWEVER in the case of view data we don't need this information