Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Remove the example rows (if any) such that the row 37 is the first one containing the actual data
  2. Populate column L (OSreference) based on the NGR-coordinate of the discharge or abstraction point (column N and O).
  3. Define concatenate functions for cell B14, B15, B16, B17, B19, B20. The actual contents depends on data availability.
  4. Verify that the column(s) as used for the concatenate functions are properly populated with appropriate information (i.e. preferably no empty cells, 'unknowns, 'na' etc.). If necessary apply an 'IF-construction on the concatenate function. This verification is especially critical for columns being used in location names. Image Modified

Anchor
Step 5.8. Branches
Step 5.8. Branches

...

If everything is ready, you can run the macros.

  • To run the macro, conduct the following steps:*
  1. Create a backup-file with name XXX_LocationsProcessed_originals_versionnumber.xls.
  2. Open the spreadsheet NGMS-locations_Generator.xls.
  3. Activate the data-spreadsheet and run the macro 'SortLocationsAddParents' held in the NGMS_Locations_generator-spreadsheet.
    1. The macro asks what to items to process. Normally you would like to process all. Dependent on the model size it can take up to 2 hours (e.g. YNN).
  4. Check the results
    1. Are the newly generated worksheets properly filled ?
    2. Did the concatenate functions give proper results (especially for parents) ?
    3. Is the IDMapping OK ?
  5. If anything is incorrect:
    1. Fix the error in the _org worksheet
    2. Remove the associated worksheets generated by the macro.
    3. Save again under the same name (possibly with a version number)
    4. Run the macro 'SortLocationsAddParents' again and pick only the relevant location types.
    5. Check again.

If everything seems OK one can continue with the generation of the XML-files.

To generate the XML-files, conduct the following steps:

  1. Create a backup with name XXX_LocationsResults_versionnumber.xls
  2. Run macro 'create_XMLfiles'.
    1. The macro creates XML-files in the directory of the data-spreadsheet.
    2. The macro overwrites existing files
    3. You can skip location types to be generated (e.g. if you want to update a branches file), but be aware:
      If you skip any of the location types listed, your Locations.xml file might not be complete.
  3. Check the contents of the files. It might be wise to validate with an XML-validation tool.
  4. Copy the files which are OK to your configuration:
    1. Locations.XML, LocationSets.xml, Branches.xml, Polygons.xml --> region-root\Config\RegionConfigFiles
    2. IdMap files --> \Config\IdMapfiles
  5. Leave the Grids.xml file to be updated in the next step

...

Step 5.12 Update Grids.XML file

the The Grids.xml file needs to be update with some data from step 4.

The Grids-file, generated in the previous step is not complete yet. if properly setup in step 5.2 it contains all regular grid definitions as well as the irregular grid-definition (placeholder) for the StreamCells_sparse_grid, i.e. the vector of streamcells. To be valid, such irregular grid needs cell centre coordinates for each grid cell. These coordinates have been generated by the ModuleAdapter in step 4.8 as file XXX_StreamCell_Locations_Grid.xml.

To complete the Grids.xml file, conduct the following steps (assuming that all scenario-types share the same streamcells):

  1. Go to the XML-files as generated in step 4.8
  2. Copy the individual locations in XML-structure (cell center) as listed in XXX_Stream_Cell_Locations_Grid.xml
  3. Paste into the associated irregular grids section of the Grids.xml file.
  4. Update the number of rows to 1
  5. Update the number of columns to the total number of streamcells
  6. Save the file and copy to \Config\RegionConfigFiles