hec-ras v.5.0.3 model in chpsv.5.0... · imulation computes for generating the mo del input files...

24
June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS HECRAS v5.0.3 in CHPS 1 Prepared for: National Weather Service HEC-RAS v.5.0.3 model in CHPS Configuration Manual June 2018

Upload: tranhanh

Post on 01-Nov-2018

234 views

Category:

Documents


0 download

TRANSCRIPT

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 1

Prepared for: National Weather Service

HEC-RAS v.5.0.3 model in CHPS Configuration Manual

June 2018

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 2

Revisions Date

Resource Management Associate April 2017 Richard Rachiele

Office of Water Prediction, NWS September 2017 Juzer Dhondia

Office of Water Prediction, NWS June 2018 Juzer Dhondia

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 3

Table of Contents

1 INTRODUCTION ...................................................................................................................................................4

1.1 VERSIONING FOR HEC-RAS ADAPTER ....................................................................................................................... 4

2 HEC-RAS ENVIRONMENT .....................................................................................................................................5

2.1 INTERFACE BETWEEN FEWS AND HEC-RAS ............................................................................................................... 5 2.2 LOCAL DEPENDENT LINUX LIBRARIES .......................................................................................................................... 5 2.3 ENVIRONMENT VARIABLE JAVA_HOME ................................................................................................................... 5 2.4 DIRECTORY STRUCTURE ........................................................................................................................................... 6

3 UPDATE OF THE HEC-RAS MODEL FILES FOR V.5.0.3 OF THE HEC-RAS .................................................................9

3.1 UPDATE THE OLD HEC-RAS MODEL FILES IN THE V.5.0 HEC-RAS GUI ........................................................................... 9 3.1.1 Open HEC-RAS project in Windows GUI ................................................................................................... 9 3.1.2 Generate HEC-RAS model files for v.5.0.3, Overview ............................................................................. 10 3.1.3 Open the Unsteady Flow Analysis dialog and run computes. ................................................................ 11 3.1.4 Update versions for the HEC-RAS GUI model input files......................................................................... 14 3.1.5 HEC-RAS restart file considerations ........................................................................................................ 16

3.2 COPY THE HEC-RAS DATA TO THE CHPS ENVIRONMENT ............................................................................................ 18 3.3 GENERAL ADAPTER FILE IN THE /CONFIG/MODULECONFIGFILES .................................................................................. 19 3.4 RUN PROPERTIES ................................................................................................................................................. 20 3.5 PARAMETER FILE ................................................................................................................................................. 20 3.6 ADD GLOBAL PROPERTIES FOR HECRAS MODEL AND BINARIES ........................................................................................ 21

APPENDIX A: UPDATE OF THE GENERAL ADAPTER FOR THE NEW “3 STEP” PROCESS ........................................... 22

Table of Figures FIGURE 1 DATA FLOWS INVOLVED DURING RUN OF HEC-RAS V.4.1 MODEL FEWS ADAPTER (FROM DELTARES, 2011). ............................ 6 FIGURE 2 DIRECTORY STRUCTURE FOR THE HEC-RAS IN FEWS. THE DIRECTORIES REQUIRING UPDATES FOR THE HEC-RAS V.5.0 ARE

INDICATED. ................................................................................................................................................................... 7 FIGURE 3 CLASSIFICATION OF FILES IN MODELS/HEC-RAS/BIN DIRECTORY ....................................................................................... 8 FIGURE 4 HEC-RAS GUI OPEN PROJECT DIALOG (TOP) AND MAIN DIALOG (BOTTOM). ...................................................................... 10 FIGURE 5 HEC-RAS GUI UNSTEADY FLOW ANALYSIS DIALOG FOR PERFORMING THE GEOMETRY PREPROCESSOR AND UNSTEADY FLOW

SIMULATION COMPUTES FOR GENERATING THE MODEL INPUT FILES FOR THE HEC-RAS IN CHPS. THE UNSTEADY FLOW ANALYSIS

DIALOG IS ACCESSED FROM THE HEC-RAS MAIN DIALOG (NOTE CURSOR IN TOP FIGURE). .......................................................... 12 FIGURE 6 COMPARISON OF THE CONTENTS FOR THE *.P01.TMP.HDF (LEFT) AND THE *.P01.HDF (RIGHT) HDF5 FILES. ............................ 13 FIGURE 7 THE UPDATED HEC-RAS VERSION LINES IN THE *.B01 AND *.X01 MODEL INPUT FILES. ........................................................ 14 FIGURE 8 UPDATE HEC-RAS PLAN FILE, BY SAVE BUTTON ON MAIN DIALOG AFTER COMPUTE (TOP LEFT), BY “SAVE PLAN” MENU ITEM ON THE

UNSTEADY FLOW ANALYSIS DIALOG. THE UPDATED VERSION LINE IN THE PLAN FILE IS SHOWN IN THE BOTTOM FIGURE. ................... 15 FIGURE 9 UPDATE OF THE UNSTEADY FLOW DATA (LEFT) AND GEOMETRY DATA (RIGHT) TEXT FILES THROUGH THE HEC-RAS DATA EDITORS.

................................................................................................................................................................................ 15 FIGURE 10 ERROR GENERATED IN THE HEC-RAS GUI UNSTEADY FLOW SIMULATION WHEN USING A RESTART FILE FROM AN EARLIER VERSION

OF HEC-RAS. ............................................................................................................................................................. 17 FIGURE 11 WRITE RESTART FILE .............................................................................................................................................. 17

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 4

1 Introduction The version 4.1 of the HEC-RAS hydraulic model had been previously implemented in the CHPS (Deltares, 2011). In 2016, the US Army Corps of Engineers Hydrologic Engineering Center (HEC) released version 5.0 of the HEC-RAS program. Whereas v.4.1 of the HEC-RAS model computed one-dimensional river systems, the new v.5.0 computes flow for 1-D, 2-D and combined 1-D and 2-D systems. This manual describes the setup of the CHPS for the new version 5.0 of the HEC-RAS. To accomplish the CHPS update to the new HEC-RAS v.5.0 model, a new Java-based HEC-RAS model adapter was developed to read and output the model input files for a CHPS forecast. Secondly, the Fortran-based computational engines and utility programs of the HEC-RAS v.5.0 were compiled for the Linux OS. With the version 4.1 HEC-RAS/CHPS model adapter, the HEC-RAS run activity occurred in a single step. The version 5.0 of the HEC-RAS in CHPS breaks the single process into a three steps, 1) a HEC-RAS Preprocessor Run Activity; 2) a HEC-RAS model(s) Compute Activity; 3) a HEC-RAS Postprocessor Run Activity. To update the HEC-RAS in CHPS, three steps are required:

1) Generate/update new model input files from the HEC-RAS Windows GUI – the HEC-RAS/CHPS v.5.0 is not backwards compatible.

2) Install the HEC-RAS model adapter java jar files and other required jar files, and the new Linux HEC-RAS compute executables and associated Linux library files in the HEC-RAS model bin directory.

3) Modify the HEC-RAS General Adapter file for the new three step process.

The focus of this manual is the update of the existing HEC-RAS v.4.1 model river systems in CHPS to the HEC-RAS v.5.0. The Deltares 2011 document, “How to add HECRAS models to CHPS, Configuration Manual”, provides the general detailed setup of a HEC-RAS model river system in the CHPS NOTE! The HEC-RAS GUI, the new Fortran-based compute programs for the Linux OS, and the java-based HEC-RAS/CHPS model adapter are for the v.5.0.3 of the HEC-RAS. This represents the available version of the HEC-RAS model as of April 2017. The HEC-RAS v.5.0.3 Windows based program and supporting documentation may be downloaded from the HEC website: http://www.hec.usace.army.mil/software/hec-ras/

1.1 Versioning for HEC-RAS Adapter The new adapter runs for Delft-FEWS 16.02 and 64-bit Java 1.8.0_102. The HEC-RAS Linux compute programs are for HEC-RAS v.5.0.3 of the source code. The compute

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 5

programs and the HEC-RAS model adapter in FEWS have been tested for RHEL 6.5 and Centos 7.2.

2 HEC-RAS environment

The HEC-RAS model provides the compute engine for running a hydraulic model schematization for a section of a river or a part of a river system. Two adapters, the FEWS General Adapter and the HEC-RAS Model Adapter form the interface between the FEWS Forecasting Shell and the HEC-RAS model. The HEC-RAS compute engine is, as its name suggests, the component that actually performs the HEC-RAS simulation. This simulation is controlled from the adapters, and all run time data such as initial and boundary conditions, and parameter settings are passed through the adapters from and to the FEWS Forecasting Shell.

2.1 Interface between FEWS and HEC-RAS The Adapters for HEC-RAS form the interface between the FEWS Forecasting Shell and the HEC-RAS model. The FEWS General Adapter of the Forecasting Shell provides the required run-time data to run HEC-RAS, and calls the HEC-RAS Module Adapter. The data is provided in a standardized XML interface format, the FEWS Published Interface. The HEC-RAS Model Adapter transfers the XML-data into the native HEC-RAS file formats. Once a HEC-RAS run has been completed, relevant results are passed back by the HECRAS Module Adapter to the Forecasting Shell (FEWS General Adapter) in the form of the standardized XML interface format. A schematic representation of the communication between the Forecasting Shell and the HEC-RAS model via the FEWS Adapter is shown in the Figure 1.

2.2 Local dependent Linux libraries The following libraries are required when running on Linux: libgfortran.so.3 libstdc++.so.6 These are required to support the current libjavaHeclib.so and its required libgfortran.so

2.3 Environment variable JAVA_HOME The HEC-RAS adapter uses the environment variable $JAVA_HOME. For Operator Client and Stand Alone this is set when starting FEWS. For the Forecasting Shell Server please ensure this is set in the environment and that refers to the correct Java version.

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 6

Figure 1 Data flows involved during run of HEC-RAS v.4.1 model FEWS adapter (from Deltares, 2011).

The FEWS Adapter allows running of HEC-RAS by FEWS. The FEWS Adapter should be considered as a thin communication (software) layer on top the existing HEC-RAS engine. The adapter is tightly connected to the model engine.

2.4 Directory structure The directory structure of HEC-RAS in CHPS is shown in Figure 2: The figure indicates the directories which the content need to be updated:

ColdStateFiles – need to regenerate the model *.rst file for HEC-RAS v.5 by running the HEC-RAS GUI.

ModuleConfigFiles – modify the general adapter xml file for the new 3 step process ModuleDataSetFiles – update HEC-RAS model input files by running the HEC-RAS

GUI Models/HEC-RAS/bin – replace the HEC-RAS model adapter files and HEC-RAS

executables to the v.5. The example contents of the Models/HEC-RAS/bin directory is shown in Figure 3.

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 7

Figure 2 Directory structure for the HEC-RAS in FEWS. The directories requiring updates for the HEC-RAS v.5.0 are indicated.

HEC-RAS restart file

HEC-RAS General Adapter fileHEC-RAS model input files

HEC-RAS model adapter files and program executables

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 8

Figure 3 Classification of files in Models/HEC-RAS/bin directory

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 9

3 Update of the HEC-RAS model files for v.5.0.3 of the HEC-RAS

The procedures outlined below assume the update of an existing HEC-RAS v.4.1 system. The initial development of the General Adapter file, RegionConfigFiles and such are detailed in the 2011 Deltares document. The procedures and file descriptions are current for the v.5.0.3 of the HEC-RAS In short, the approach to add a HEC-RAS model in CHPS is as follows. 1 Run HEC-RAS model in its GUI to update the model input files. 2 Copy the HEC-RAS generated files from the HEC-RAS work directory to the CHPS

environment 3 Add (or modify existing) global properties for HEC-RAS model and binaries

3.1 Update the old HEC-RAS model files in the v.5.0 HEC-RAS GUI The HEC-RAS model river system will need to be run from the HEC-RAS GUI (Windows OS) to update the model files for the new version of the HEC-RAS/CHPS. The HEC-RAS v.5.0 in the CHPS is not backwards compatible with the v.4.1 model files. The target model files for the HEC-RAS/CHPS are those produced by the HEC-RAS GUI v.5.0.3. To generate the new model files, use the HEC-RAS GUI v.5.0.3 to import the existing v.4.1 HEC-RAS river system project. If a new HEC-RAS river system (not already in the CHPS) has been developed with the HEC-RAS GUI v.5.0.3, the required model files are the same and the subsequent discuss still applies. The procedures below assume the presence of an existing HEC-RAS project on the Windows OS. If the model files are only available from the Linux CHPS, the required HEC-RAS GUI input files are: *.prj - HEC-RAS project file *.p01 - model input plan file *.g01 - model input geometry *.u01 - model input unsteady flow file

If the model input files are from the Linux environment, they first need to be converted to the Window OS text file convention, that is the Linux end-of-line LF converted to Windows end-of-line CRLF. Utility programs such as “unix2dos” are available for accomplishing this conversion.

3.1.1 Open HEC-RAS project in Windows GUI The RAS “Levee Breach” example project is used for illustration. This project is available in the older v.4.1 and newer v.5.0.3 example unsteady data sets downloaded from the HEC-RAS website. The example here uses the v.4.1 project files. The demonstration assumes the user has a working knowledge of the HEC-RAS GUI.

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 10

Open the project file in the work directory (Figure 4).

Figure 4 HEC-RAS GUI open project dialog (top) and main dialog (bottom).

3.1.2 Generate HEC-RAS model files for v.5.0.3, Overview The HEC-RAS GUI v.5.0.3 generates several text based model files that will be transferred to the HEC-RAS/CHPS “ModuleDataSetFiles” directory as previously done for v.4.1 of the HEC-RAS/CHPS adapter. However, there are two new HDF5 format files generated that are required for the new HEC-RAS model adapter v.5.0 setup. Presently the new HDF5 format files specifically store data pertinent to the HEC-RAS 2-D regions. Over the longer term, the HDF5 format files are intended to replace the text based input files in future versions of the HEC-RAS. The text based files required by the HEC-RAS in CHPS are divided into two groups. For the example “LeveeBreach” project these are: 1) The model files input to the HEC-RAS GUI

LeveeBreach.prj LeveeBreach.p01

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 11

LeveeBreach.g01 LeveeBreach.u01

2) The text based input files generated by the HEC-RAS GUI for a Geometry

Preprocessor and Unsteady flow run

LeveeBreach.x01 LeveeBreach.b01

The HDF5 format files required by the HEC-RAS v.5.0 model adapter:

LeveeBreach.g01.hdf LeveeBreach.p01.tmp.hdf

The text files in (2) and the *.hdf files are generated by running the Geometry Preprocessor and Unsteady Flow Simulation from the “Unsteady Flow Analysis” dialog (Figure 5).

3.1.3 Open the Unsteady Flow Analysis dialog and run computes. Figure 5 shows the Unsteady Flow Analysis dialog. The Geometry Preprocessor and Unsteady Flow Simulation computes will need to be run to create the updated model input files for the HEC-RAS model in the CHPS – the *.x01, *.b01, *.g01.hdf and *p01.tmp.hdf files discussed above. The generation of a HEC-RAS restart file will also be needed for the HEC-RAS setup in the CHPS – See 3.1.5 for restart file considerations. The compute process needs to be performed in two step First compute with both the “Geometry Preprocessor” and “Unsteady Flow Simulation” boxes both checked:

Then compute with only the “Geometry Preprocessor” box checked:

The “Unsteady Flow Simulation” compute produces the HDF5 format file, “LeveeBreach.p01.hdf”. The “Geometry Preprocessor” generates the file,

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 12

“LeveeBreach.p01.tmp.hdf” (and g01.hdf). The *.p01.hdf file contains results of the unsteady flow compute, plus input run information. The “p01.tmp.hdf” contains only the input run information and can be a much smaller file, especially for 2-D models. The contents of the two plan hdf files are compared in Figure 6. The HEC-RAS in CHPS is designed to use the more compact “p01.tmp.hdf” file. Performing the “Unsteady Flow Simulation” compute will remove the “p01.tmp.hdf” file.

Figure 5 HEC-RAS GUI Unsteady Flow Analysis dialog for performing the Geometry Preprocessor and Unsteady Flow Simulation computes for generating the model input files for the HEC-RAS in CHPS. The Unsteady Flow Analysis dialog is accessed from the HEC-RAS main dialog (note cursor in top figure).

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 13

Figure 6 Comparison of the contents for the *.p01.tmp.hdf (left) and the *.p01.hdf (right) HDF5 files.

The desired updated model files generated by the above computes are:

LeveeBreach.x01 LeveeBreach.b01 LeveeBreach.g01.hdf LeveeBreach.p01.tmp.hdf

Figure 7 illustrates the updated version lines in the *.b01 and *.x01 files.

*.p01.tmp.hdf *.p01.hdf

Simulation Results

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 14

Figure 7 The updated HEC-RAS version lines in the *.b01 and *.x01 model input files.

3.1.4 Update versions for the HEC-RAS GUI model input files. The model files directly used by the HEC-RAS GUI may not necessarily be updated to the v.5.0.3 format with the computes. The files are of interest are:

LeveeBreach.prj LeveeBreach.p01 LeveeBreach.g01 LeveeBreach.u01

The *.p01 (Plan file) can be updated to v.5.0.3 from the Unsteady Flow Analysis dialog as shown in Figure 8.

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 15

Figure 8 Update HEC-RAS Plan file, by save button on main dialog after compute (top left), by “Save Plan” menu item on the Unsteady Flow Analysis dialog. The updated version line in the plan file is shown in the bottom figure.

The update process will also need to be performed for the geometry and unsteady flow files through their respective editors (Figure 9). The *.prj file does not contain a version line and the information on the file may not be changed with the above process.

Figure 9 Update of the Unsteady Flow Data (left) and Geometry Data (right) text files through the HEC-RAS data editors.

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 16

3.1.5 HEC-RAS restart file considerations

If the HEC-RAS GUI unsteady flow compute utilizes a restart file from an earlier version of HEC-RAS, a compute error will likely occur (Figure 10). A new restart file will need to be generated starting from initial conditions set on the Unsteady Flow Data dialog. With HEC-RAS v.5.0.3, initial flows left blank in the Initial Conditions tab of the Unsteady Flow Data dialog result in the initial flow being set to the first value of the input hydrograph. For the HEC-RAS setup in the CHPS, a restart file will need to be generated for the later copy to the ColdStateFiles directory in the HEC-RAS/CHPS. Figure 11 presents the HEC-RAS – Set Output Control Options dialog, where the output restart file option will be set. The dialog is accessed from the “Options->Output Options …” menu on the Unsteady Flow Analysis dialog. Make sure the “Write Initial Conditions file at the end of the simulation” box is checked. The CHPS needs this .rst file for state handling. It needs to be copied to the ColdStateFiles directory (see Sec. 3.4). FEWS will not use additional initial condition files written during the simulation, so there is no need to choose the option “Write Initial Condition file(s) during simulation.”

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 17

Figure 10 Error generated in the HEC-RAS GUI Unsteady Flow Simulation when using a restart file from an earlier version of HEC-RAS.

Figure 11 Write restart file

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 18

3.2 Copy the HEC-RAS data to the CHPS environment The HEC-RAS model files discussed in Sec. 3.1 must be copied from the local work directory to the CHPS environment. These file are: • .prj • .p01 • .g01 • .u01 • .b01 • .x01 • .p01.tmp.hdf • .g01.hdf The numbering can be different. Since the HEC-RAS GUI is Windows based, these files are Windows based as well. After the procedures below the files will be copied to the “Config/ModuleDataSetFiles” directory. The text based files must first be converted from the DOS to the Linux text file format. This entails conversion of the end-of-line character from DOS “CRLF” to Linux “LF”. Please note: Do use dos2unix on any binary files such as *.hdf , for this step will make those files unreadable by HEC-RAS Model. Transfer these files to Linux, convert the files from DOS to UNIX file format (applies to ASCII files only), and create a new zip file in the CHPS/Linux environment /Config/ModuleDataSetFiles, eg. HECRAS_KENNEBEC_UpdateStates.zip. One method for DOS to UNIX conversion is using the ‘dos2unix <filename>’ command. To use the command, simply type the command followed by the name of the file you wish to convert, and the name of a file which will contain the converted results. Thus, to convert a Windows file to a Unix file, at the Unix prompt, enter: dos2unix winfile.txt unixfile.txt. To convert all files in a directory, use dos2unix *. The command ‘hexdump –cb <filename>,” can be used to check if the file is UNIX or PC. If Windows, you see many /n and /r characters in the file. If the file is UNIX, you see only /n. IMPORTANT NOTE: If you generate these files using HEC 4.1, you will need to be sure that the *.b01 and *.u01 files reference the same restart file name used in the General Adapter file/ModuleConfigFiles directory (see section 3.12 for discussion of restart file names). It is recommended to edit the restart file names in *.b01 and *.u01

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 19

produced by Windows HECRAS to eliminate the data time stamp after transferring the files to Linux. For example, ‘ctdamlevee.p29.01FEB2008 0100.rst’ would be changed to ‘ctdamlevee.p29.’ RECOMMENDATION: HEC-RAS Model files which are to be copied to CHPS Environment are the ones which are used by adapter. However it is advised to archive the model which is copied to CHPS Environment. This will help later stage if the model needs revision or an update. Otherwise in many cases it will not be possible to port the model from CHPS back to HEC-RAS GUI without supporting files such as spatial projection files. TERRAIN DATA: If one using terrain data for HEC-RAS 5.03 2D Model, it is needed to include those files under work folder (such as ./work/terrain) or in the ModuleDataSet zipped file. Not having the terrain data will lead to the failure of Geometry Preprocessor run.

3.3 General Adapter file in the /Config/ModuleConfigFiles The 2011 Deltares Configuration Manual covers the development of the General Adapter module in detail for the HEC-RAS in CHPS. This section will present the change in the General Adapter file for the new 3 Step execution of the HEC-RAS model adapter. The model adapter execution launched in the executeActivities segment. The HEC-RAS model adapter performed three functions: 1) PreProcess: Process the base HEC-RAS model input files and create new model

input files for the compute programs. The step loads in the forecast flow and stage hydrographs, forecast changes for model parameters (e.g. compute time step) and produced new HEC-RAS model inputs for the computes.

2) Compute: Run the HEC-RAS Linux Fortran executables, the GeomPreprocessor, Unsteady Flow model, and the DSSWriter which exports the binary unstready model results to DSS file format

3) PostProcess: Extract the computed flows and stages from the DSS result file and write out times series hydrographs and longitudinal profiles to PI.XML format.

In version v.4.1 HEC-RAS model adapter these three steps were performed all in a single call to the HEC-RAS model adapter. The form of the executeActivities for the old v.4.1 model adapter is shown below. <executeActivities> <executeActivity> <command> <className>nl.wldelft.fews.adapter.hec.HecRasAdapter</className> <binDir>$HECRASBINDIR$</binDir> </command> <arguments> <argument>%ROOT_DIR%/run_info.xml</argument> </arguments> <timeOut>600000</timeOut> </executeActivity> </executeActivities>

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 20

The executeActivities for v.5 of the HEC-RAS model adapter is broken into separate PreProcess, Compute and Post Process activities. The new form of the executeActivites in the new General Adapter are listed in the Appendix A. Further, it is recommended that in General Adapter Configuration <exportTimeSeriesActivity> not to use option <omitMissingValues>true</omitMissingValues>. The reason is that HECRAS preprocessor might not be able to trap missing values in input data to HECRAS model.

3.4 Run Properties

The HEC-RAS adapter run properties file, as generated by the General Adapter file of FEWS, includes the new property in the “run_info.xml” file for switching on the HEC-RAS steady flow compute: <exportRunFileActivity> <exportFile>%ROOT_DIR%/run_info.xml</exportFile> <properties> <!- HECRAS Project File *.prj file full path name -- > <string key="hecRasProjectFile" value="%ROOT_DIR%/<hecras>.prj"/> <!- HECRAS Project Bin Folder as defined in global.properties file -- > <string key="hecRasBinDirectory" value="$HECRASBINDIR$"/> <!- HECRAS outputTimeSeriesParameters Filter – options STAGE / FLOW , please note each parameters should precide with ^ and end with $$ -- > <string key="outputTimeSeriesParametersFilter" value="^STAGE$$|^FLOW$$"/> <!- HECRAS diagnostics file log levels - options DEBUG / INFO/ WARNING / ERROR -- > <string key="logLevel" value="DEBUG"/> <!- to allow console output from HEC-RAS executables to FEWS logfile - set first the logLevel to DEBUG and secondly set showRasWindows to true -- > <string key="showRasWindows" value="false"/> <!- skipBinaryOuput = false to output stage and flow as in unsteady flow

computation, while skipBinaryOuput = true is equivalent to selecting Post-Processor option in Windows version or the additional plots and table produced during steady flow computation -- >

<string key="skipBinaryOutput" value="false"/> <!- hecRasEnvironment $HECRASBINDIR$ set to LD_LIBRARY_PATH environmental variable -- > <string key="hecRasEnvironment"

value="LD_LIBRARY_PATH=$HECRASBINDIR$:$LD_LIBRARY_PATH"/> <!- outputLongtitudionalProfileParametersFilter to control output of longitudinal Profile -- > <string key="outputLongtitudionalProfileParametersFilter" value="^LOCATION-FLOW$|LOCATION-ELEV"/> </properties> </exportRunFileActivity>

The HEC-RAS adapter run properties file, as generated by the General Adapter file of FEWS, includes the new property in the “run_info.xml” file for switching on the HEC-RAS steady flow compute. An useful debug option is available to look into the detailed logs of HEC-RAS Model. This feature comes in handy when HECRAS Adapter issues an error but not clear what is causing the issue. The option “showRasWindows” along with “logLevel” controls the detailed logs from HEC-RAS to diagnostics xml file. However please note that detailed

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 21

HEC-RAS Model output will only be written to diagnostics xml file only and only if when the logLevel is set to DEBUG and showRasWindows is true in run_info.xml file. <string key="showRasWindows" value="true"/> <string key="logLevel" value="DEBUG"/> if "showRasWindows" is true but "logLevel" is INFO, then no console output to the logfile. if "logLevel" is DEBUG but "showRasWindows" is false or not provided, then no console output to the logfile.

3.5 Parameter File

The HEC-RAS requires parameter file as described in the Deltares 2011 document, “How to add HECRAS models to CHPS, Configuration Manual”. The minimum required section under group “default” and name “hec-ras run parameters” is parameter id = “ComputationInterval” as shown in params.xml in export / output folder where exported TimeSeries from FEWS is written. Computation time should match with that of HECRAS Model. <?xml version="1.0" encoding="UTF-8"?> <parameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews/PI" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_modelparameters.xsd" version="1.5"> <modifierType>HECRAS</modifierType> <!—Group id should be "default" and name should be “hec-ras run parameters" --> <group id="default" name="hec-ras run parameters"> <!- parameter id defined to ComputationInterval -- > <parameter id="ComputationInterval"> <description>Computation interval in minutes. Does not change interval of output data.</description> <!- your model computation Interval -- > <intValue>60</intValue> <!-- enter your model computational; interval --> </parameter> </group> </parameters>

3.6 Add global properties for hecras model and binaries The $HECRASBINDIR$ property is defined in the global.properties at the same level of the Config and Models directory: HECRASMODELDIR=%REGION_HOME%/Models/hec/hecras HECRASBINDIR=$HECRASMODELDIR$/bin The General Adapter offers flexibility on where HEC-RAS working files are written (the HECRASMODELDIR). User’s may not wish to not to place the executables under the HECRASMODELDIR location as described above for performance reasons (see next Section).

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 22

Appendix A: Update of the General Adapter for the new “3 step” process

In version v.4.1 HEC-RAS model adapter performed the PreProcess, Compute and Post Process steps in a single call to the HEC-RAS model adapter. The form of the executeActivities for the old v.4.1 model adapter is shown below. <executeActivities> <executeActivity> <command> <className>nl.wldelft.fews.adapter.hec.HecRasAdapter</className> <binDir>$HECRASBINDIR$</binDir> </command> <arguments> <argument>%ROOT_DIR%/run_info.xml</argument> </arguments> <timeOut>600000</timeOut> </executeActivity> </executeActivities>

The v.5 HEC-RAS model adapter perform the PreProcess and Post Process with calls to the same model adapter class (hec.HecRasAdapter). A second argument is added to the command to inform the model adapter of the process

preProcess for the PreProcess step postProcess for the PostProcess step

The executeActivites structure is shown below: Preprocessor Step: <executeActivities> <executeActivity> <command> <className>nl.wldelft.fews.adapter.hec.HecRasAdapter</className> <binDir>$HECRASBINDIR$</binDir> </command> <arguments> <argument>%ROOT_DIR%/run_info.xml</argument> <argument>preProcess</argument> </arguments> <timeOut>600000</timeOut> </executeActivity>

Compute Step: <executeActivity> <command> <className>nl.wldelft.fews.adapter.hec.HecRasAdapter</className> <binDir>$HECRASBINDIR$</binDir> </command> <arguments> <argument>%ROOT_DIR%/run_info.xml</argument> <argument>compute</argument> </arguments> <timeOut>600000</timeOut> </executeActivity>

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 23

Postprocessor Step: <executeActivity> <command> <className>nl.wldelft.fews.adapter.hec.HecRasAdapter</className> <binDir>$HECRASBINDIR$</binDir> </command> <arguments> <argument>%ROOT_DIR%/run_info.xml</argument> <argument>postProcess</argument> </arguments> <timeOut>600000</timeOut> </executeActivity> </executeActivities>

Alternative for Compute Step: The direct command line calls for file copy and HEC-RAS program execution is given as follows, which replaces the single Compute Step as given above Copy the *.g01.hdf to *.g01.tmp.hdf <executeActivity> <command> <executable>/bin/cp</executable> </command> <arguments> <argument>%ROOT_DIR%/work/model.g01.hdf</argument> <argument>%ROOT_DIR%/work/model.g01.tmp.hdf</argument> </arguments> <timeOut>1500000</timeOut> </executeActivity>

Run the rasGeomPreprocess64 <executeActivity> <command> <executable>%ROOT_DIR%/bin/rasGeomPreprocess64</executable> </command> <arguments> <argument>%ROOT_DIR%/work/model.x01</argument> </arguments> <timeOut>1500000</timeOut> </executeActivity>

rename the *.g01.tmp.hdf to *.g01.hdf <executeActivity> <command> <executable>/bin/mv</executable> </command> <arguments> <argument>%ROOT_DIR%/work/model.g01.tmp.hdf</argument> <argument>%ROOT_DIR%/work/model.g01.hdf</argument> </arguments> <timeOut>1500000</timeOut> </executeActivity>

June 2018 Configuration Manual v.5 HECRAS Adapter in CHPS

HECRAS v5.0.3 in CHPS 24

rename the *.c01.tmp to *. c01 <executeActivity> <command> <executable>/bin/mv</executable> </command> <arguments> <argument>%ROOT_DIR%/work/model.c01.tmp</argument> <argument>%ROOT_DIR%/work/model.c01 </argument> </arguments> <timeOut>1500000</timeOut> </executeActivity>

Run the rasUnsteady64 <executeActivity> <command> <executable>%ROOT_DIR%/bin/rasUnsteady64</executable> </command> <arguments> <argument>%ROOT_DIR%/work/model.c01</argument> <argument>b01</argument> </arguments> <timeOut>1500000</timeOut> </executeActivity>

rename the *.p01.tmp.hdf to *.p01.hdf <executeActivity> <command> <executable>/bin/mv</executable> </command> <arguments> <argument>%ROOT_DIR%/work/model.p01.tmp.hdf</argument> <argument>%ROOT_DIR%/work/model.p01</argument> </arguments> <timeOut>1500000</timeOut> </executeActivity>

Run the rasDssWriter64 <executeActivity> <command> <executable>%ROOT_DIR%/bin/rasDssWriter64</executable> </command> <arguments> <argument>%ROOT_DIR%/work/model.c01</argument> <argument>p01</argument> </arguments> <timeOut>1500000</timeOut> </executeActivity>