Part of the work in the steps as described on the right side of this page can now be done with a 'merge models' tool. The 'merge models' tool merges the following configuration files of two separate NGMS models for the same region into one new file for that region: - Griddisplay.xml
- Grids.xml
- ScenarioEditor.xml
- TimeSeriesDisplay.xml
- Branches.xml
- Filters.xml
- IdMapDescriptors.xml
- ModuleInstanceSets.xml
- Explorer.xml
- Locations.xml
- LocationSets.xml
- ModuleInstanceDescriptors.xml
- WorkflowDescriptors.xmlThis xml
This means that this merge tool performs steps 1 to 9 (apart from the DisplayGroups) from the list on the wiki page. The DisplayGroups xml file can be updated using the original Displays generation spreadsheet as provided as part of the configuration (in the ModuleDataSetfiles folder). The last two steps to complete the merge activity are: - copy the IdMapFiles, MapLayerFiles, ModuleConfigFiles, ModuleDataSetFiles, ModuleParFiles, WorkFlowFiles and ColdStates of one of the two NGMS model configurations into the folder structure of the other NGMS model configuration
- copy the model data (folder with model abbreviation) from the Modules folder into the Modules folder of the other model configuration.
Figure 1 shows the result when 4 models have been merged correctly into one Modules folder and Figure 2 shows the folder structure for 1 model only, before merging. Change the input file (mergemodels.inp) to reflect the structure of the two configuration directories of the models to be merged. In this file, the first line must be the location of the configuration files of the first model to merge (referencing the Config folder). The second line in this file is the location of the configuration files of the model you want to add to the first model (referencing the Config folder). Example of mergemodels.inp: D:\temp\NGMS\Southern_SA\config D:\temp\NGMS\Southern_NK\config Run the merge program by double-clicking on the file mergemodels.bat. This batch file starts the fortran program with the input file as an argument. Contents of mergemodels.bat: rem lf90 mergemodels mergemodels <mergemodels.inp This tool produces a Config folder with merged configuration files. The first line in the input file refers to the directory where the merged files are produced. Source: Fortran code is available in the Mergemodels.f90 file and is compiled with Lahey. What is next?The next step is to check the merged configuration in a Stand Alone system of the region in question. Check if the NGMS Stand Alone application starts without errors and then run through the tests as described in the document 'UK Memo 080919 NGMS test scripts for testing new model.pdf'. |