2. GetEFDC¶
GetEFDC is a Fortran utility to read the binary output files produced by EFDC+. GetEFDC is a starting point for the user to create their own analysis of EFDC+ output. It is expected that a user utilizing this tool has knowledge of Fortran and can modify GetEFDC to meet their specific needs.
2.1. Source Code¶
The source code for GetEFDC is listed below. It written all in Fortran and is straightforward to compile with a modern compiler (e.g. gfortran or Intel).
Main program:
- getefdc.f90
and 8 Modules:
- infomod.f90
- efdcpromod.f90
- tecmod.f90
- geteeoutmod.f90
- xyijconv.f90
- gethfreqout.f90
- globalvars.f90
If IGRIDV > 0 then the output is based on the vertical layer defined in sgzlayer.inp.
2.2. Build GetEFDC¶
A makefile
is located under the /GetEFDC/src directory. This can be used to compile on a Linux machine. Alternatively, this program can be compiled on Windows using Visual Studio.
2.4. Input File¶
getefdc.inp
is the master file that stores all the information about the parameters of
interest which the user is trying to extract. This file must be edited for every change to input
parameters. A sample of the master file is included in the GetEFDC folder. The input
parameters in this file are as follows:
The full path of the folder containing
efdc.inp
fileLAYK The number of layer in the vertical to get data for 2DH display (>0)
- = 0 Extract the depth-averaged data
- >0 Extract the data at layer of k
- =-1 Extract High Frequency output
- =-2 Extract data for time series (TS) at a height above bed (m)
- =-3 Read TMP.DAT file and write an array data file for TECPLOT
ZOPT This parameter is used in case of LAYK=-2
- =1 Extract TS data at the depth under water surface
- =2 Extract TS data at the height above bottom
JULTIME Julian time point for a selected layer, if > MAXTIME then JULTIME=MAXTIME JULTIME = 0 Extract data for all snapshots
NLOC Number of locations (cells) to extract data. The location can be given as Index (I,J) or UTM coordinates (X,Y) via the parameter INDEX.
ROTA The option for rotation of velocity components (U,V)
- = 0 Extract (U,V) without rotation
- = 1 (U,V) components are rotated to the true east and true north directions
INDEX
- = 0 UTM (X,Y) of cells are used
- = 1 Indices (I,J) of cells are used
VPROF The option to extract data for vertical profile, 0 (No)/ 1(Yes)
TECPLOT The option to extract data for 2DH Tecplot, 0 (No)/ 1(Yes)
NDRIFTER: A successive set of number of particles to extract data for (X,Y,Z)
I/X I Indices or X abscissa of cells to extract data
J/Y J Indices or Y coordinates of cells to extract data
ZINT Height under water surface or above bed to extract data in case LAYK=-2
Please note that the lines which start with ** in the getefdc.inp
file are comments and
will be ignored.
2.5. Sample GetEFDC Input File¶
** COMMENT LINES START WITH "*"
** GETEFDC VER. 161128 IS USED TO:
** EXTRACT EFDC BINARY FILES *.OUT (EFDC 6.0 OR LATER) TO NETCDF AND ASCII FILES FOR:
** 1.TIME SERIES AT SOME LOCATIONS DETERMINED BY (I,J) OR (X,Y)
** 2.TECPLOT OF ONE LAYER (K>=0) AT OME SPECIFIC SNAPSHOT
** 3.ARRAYS OF DATA
**
** OBLIGATORY INPUT FILES:
** 0.GETEFDC.INP: THIS FILE
** 1.EFDC.INP
** 2.LXLY.INP
** 3.DXDY.INP
** 4.CELL.INP
** 5.CORNERS.INP
** 6.MAPPGNS.INP
** 7.MAPPGEW.INP
**
** THE FOLLOWING BINARY FILES WILL BE READ ACCORDING TO SELECTED ITEMS
** 1.EE_WS.OUT
** 2.EE_VEL.OUT
** 3.EE_WC.OUT
** 4.EE_WQ.OUT
** 5.EE_DRIFTER.OUT
** 6.EE_BC.OUT
** 7.EE_BED.OUT
** 8.EE_TUR.OUT
**
** OUPUT OF GETEFDC IS STORED IN RESULT FOLDER
**
*****************************************************************************
** THE FULL PATH OF INP FILES is determined by the file efdc.inp:
**
E:\Projects\EFDC_Testing\restart\caloo-autorun_1\efdc.inp
**
*****************************************************************************
** OPTIONS FOR OUTPUT:
** LAYK = K>0: DATA AT LAYER NUMBER K TO BE EXPORTED AT TIME=JULTIME
** 0: DEPTH-AVERAGED DATA IS EXPORTED
** -1: Get High Frequency output FOR CELLS
** -2: Extract data for Time series at a height above bed (m)
** -3: LOAD TMP.DAT AND EXPORT TECPLOT
**
** ZOPT = 1: FOR THE DEPTH UNDER WATER SURFACE IF LAYK=-2
** 2: FOR THE HEIGHT ABOVE BOTTOM IF LAYK=-2
** NDRIFTER : N1:N2 A SET OF DRIFTER TO GET (X,Y,Z)
**
**
** JULTIME : JULIAN TIME FOR SELECTED LAYER
** > MAXTIME THEN JULTIME=MAXTIME
** 0 DATA FOR ALL SNAPSHOT
** NLOC : NUMBER OF CELLS TO EXTRACT TIMESERIES
** ROTA = 1: (U,V) AT CELL CENTER ROTATED TO TRUE EAST AND TRUE NORTH
** 0: (U,V) AT CELL FACES WITHOUT ROTATION
** INDEX = 1: (I,J) OF CELLS ARE GIVEN
** 0: (X,Y) OF CELLS ARE GIVEN
** VPROF = 1: EXPORT VERTICAL PROFILE
** = 0: NO EXPORTATION FOR VERTICAL PROFILE
**
** TECPLOT = 1: EXPORT DATA FOR TECPLOT
** = 0: NO TECPLOT EXPORTATION
**
*****************************************************************************
** LAYK JULTIME NLOC ROTA INDEX VPROF TECPLOT ZOPT NDRIFTER
4 0 2 1 1 1 1 1 1:5
*****************************************************************************
** I/X : I Index or X of cell
**
** J/Y : J Index or Y of cell
**
** ZINT : THE DEPTH UNDER WS OR HEIGHT ABOVE BED (m)
** FOR TIME SERIES EXTRACTION IF LAYK=-2
**
*****************************************************************************
** I/X J/Y ZINT(m)
** 314782.0 3941547.0 0.5
3 44 0.5
3 45 0.7
Additional sample GetEFDC input files are available for each of the sample models provided. Each of these input files can be found under:
EFDCPlus/SampleModels/Lake_T_HYD_WQ/GetEFDC/
EFDCPlus/SampleModels/Lake_Washington/GetEFDC/
EFDCPlus/SampleModels/Ohio_River_4/GetEFDC/
2.6. Output Files¶
After running GetEFDC a sub-folder RESULT
is generated in the folder #output
of the
working model. The extracted files are ASCII with the following conventions for the file
names:
- First characters group shows the constituent, such as SAL for salinity
- Second character group is TSK_ which is the time series of the layer K, such as TSK_4 is time series for the layer K=4
- The last character group is _DOM for the domain or CEL for the selected cells
- The vertical profiles for the constituents at the selected cells use the group _PROF
in the file names, such as
SAL_PROF.DAT