Types of files

advertisement
MOHID Course
Lesson 2
How To Create a MOHID
Project
19 Março 2013
Content

MOHID Standards
–

Data files, keywords, How to build a timeserie
How to build a simulation?
–
–
Bathymetry
Boundary conditions



–
Tide
River Inputs
Meteorology
Initial Conditions


Hydrodynamics
Properties
Types of files
• ASCII files
• Plain text files
• Platform independency assured
• HDF files
• Hierarchical Data Format (http://hdf.ncsa.uiuc.edu/HDF5/)
t0
• High volume of data
t1
• Platform independent
t2
• Others
• netcdf files
• binary unformatted files
ASCII files syntax
• Options and values are given by Keywords
• Advanced options can be organized in Blocks of
information containing a group of keywords
•Each line contains only one instruction
• Files can have blank lines and keywords don’t have to
follow any specific order
• All the reading (keywords, keyword values, blocks
definition tags) is case sensitive
ASCII files organization - Keywords
• Options and values are given by Keywords
• A keyword is always defined on the left of a delimiter :
• Between the keyword and the delimiter and between the
delimiter and the value, blank spaces are allowed
• Keep your data files aligned for easy reading
ASCII files organization - Keywords
Keywords can define:
Type
Example of
keyword
Value
Description
Real numbers
DT
30
Model time step
(seconds)
Integer numbers
DENSITY_METHOD
2
Method to compute water
density
Boolean values
TIDE
1
Activate/Deactivate tide
Character string
NAME
temperature
Name of a water property
Real/Integer array
BOXES_VALUES
3.4 4.5 2.1 5.3
Values atributed to each
box
Dates
START
2006 9 26 15 0 0
Mohid Time Format
Time and Date format
Time and dates in MOHID are set by a keyword with an
array of integer numbers
Keyword
Year
START
: 2013
Month
03
Day Hour Minute Second
19
17
0
0
Today’s date March 19th, 2008 at 17h00
ASCII files organization - Blocks
• Files are organized in Blocks of information
• Blocks define advanced options through the combination
of groups of keywords
• Each block is delimited by a “begin block tag” and an “end
block tag” using “<“ and “>”
<beginproperty>
….
<endproperty>
• A block can also be defined inside another block
Space and Time Variation of spatial
input Data
t0
t1
–

–
t2
Constant
Same value in Space and Time
TimeSerie

Changes with time but all cells have the same value t0
t1
–
t2
HDF

Changes in time and Space
t0
t1
t2
Construct a timeserie (e.g. Discharge)
SERIE_INITIAL_DATA
TIME_UNITS
Days Flow(m3/s)
<BeginTimeSerie>
01
1 10
2 100
3 10
41
<EndTimeSerie>
: 2013 3 18 0 0 0
: DAYS
Under the Hood
MOHID Studio
Explorer
Input Files
Output Files
Q
Under the Hood





Input files do not have/solve equations
Input files have equations parameters
Input files have options to run
Input files have the forcing that change with time
Input files have the conditions at the sart
Reads Input
dPy
dt
t
mu - prey mortality
Run Adection/Diffusion and what methods
(upwind, central differences)
 (   m y ).Py  G.Pr
Writes Output
River discharge, Tide, Meteorology
Initial Conditions
Mohid.exe
Input Files
Bathymetry


Is the 2D depth and bottom boundary
It defines the horizontal grid
Hydrogra
phic zero
Geometry Data File









<begindomain>
ID
:1
TYPE
: SIGMA
LAYERS
:1
LAYERTHICKNESS
: 1.0
TOLERANCEDEPTH
: 0.0500
DOMAINDEPTH
: -99.00
MININITIALLAYERTHICKNESS : 0.05
<enddomain>
Vertical
Geometry
Horizontal Grid
Bathymetry
Atmosphere Data File
Boundary
Conditions
TIMESERIE
CONSTANT












t0
<beginproperty>
t1
NAME
: air temperature
t2
UNITS
: ºC
DESCRIPTION
: Temperature
FILE_IN_TIME
::TIMESERIE
NONE
FILENAME
: ..\General Data\Atmosphere\AtmosphereData.dat
DATA_COLUMN
:5
DEFAULTVALUE
: 20.
t0
t1
REMAIN_CONSTANT : 0
1
t2
TIME_SERIE
:0
OUTPUT_HDF
:1
<endproperty>
20
Discharges Data File
Boundary
Conditions
CONSTANT
TIMESERIE
 <begindischarge>















NAME
: Tagus
DESCRIPTION
: Enter a short description
I_CELL
107
I_CELL
:: 107
J_CELL
149
J_CELL
:: 149
K_CELL
:1
K_CELL
:1
DEFAULT_FLOW_VALUE
: 20.0
DEFAULT_FLOW_VALUE
: 20.0
DATA_BASE_FILE
: ..\General Data\Boundary
Conditions\DichargeExample.srd
FLOW_COLUMN
:2
<enddischarge>
<enddischarge>
Hydrodynamics Data File




CORIOLIS
TIDE
WATER_DISCHARGES
WIND
:1
:1
:1
:1

Other options compute advection diffusion, explicit,
implicit. If not defined will have default values

!INITIAL_ELEVATION
:0
!INITIAL_ELEVATION_VALUE : 0

Initial Conditions
Model Data File





START
END
VARIABLEDT
DT
MAXDT
: 2013 3 18 12 0 0
: 2013 3 19 0 0 0
:1
: 15.
: 60.
Water Properties File












<beginproperty>
NAME
UNITS
DESCRIPTION
INITIALIZATION_METHOD
DEFAULTVALUE
ADVECTION_DIFFUSION
SURFACE_FLUXES
DISCHARGES
OUTPUT_HDF
TIME_SERIE
<endproperty>
: temperature
: ºC
: No description was given.
: CONSTANT
: 20
:1
Initial Conditions
:1
:1
:1
:1
20
t0
How to Build a MOHID Run


Bathymetry (Ex. 1)
Boundary Conditions (Ex. 2)
–
–
–

Meteorology
Discharge
Tide (automatic since it can be predicted
astronomically)
Initial Conditions (Ex. 3)
Ex.1 Create Bathymetry

Bathymetry
–
–
Map -> Ascii -> XYZ points - Open the bathymetric data in Digital
Terrain\BathymetryData
Create the model Horizontal Grid in Tools -> Grids-> Constant






–
–
Map -> Ascii -> Polygon - Open the polygon Coast line in Digital
Terrain\CoastLine. This is the land and no compute points!
Create the Bathymetry – Tools -> Grid Data Tools -> From Points






–
–
Pick a origin – select origin close to data origin
Click Auto-Update
Leave number of cells 100x100
Define the dx (x spacing) as 0.008º (~800m)
Define the dy (y spacing) as 0.006º (~600m)
Save the grid in Digital Terrain\Grids\ and give name (e.g. TagusGrid)
Verify the grid selected is the one created
Select Coast line as non compute points
Verify if Point data is selected
Interpolate: Average
Save the bathymetry in Digital Terrain and pick a name (e.g. Tagus_Average)
Click Process
Do the same as previous but now with Interpolate: Triangulation and save
with different name (e.g. Tagus_Triang)
See where bathymetry is refered to the model
Ex.1 Create Bathymetry
Ex 2. Define Boundary Conditions

Constant
–
In the reference simulation (Run 1) check where
constant discharge and meteorology properties
are defined


Dicharge - DEFAULT_FLOW_VALUE and no file used
Meteorology - FILE_IN_TIME
: NONE
DEFAULTVALUE
REMAIN_CONSTANT
: X.
:1
Ex 2. Define Boundary Conditions

Time Serie
–
–
–
–
–
Select the project, create a new run (Project -> New
Simulation) and name it (e.g.
Tide_TagusTimeSerie_MeteoTimeSerie)
Copy the data files from the run 1 (Project -> Copy Simulation)
Edit the discharge and uncomment the DATA_BASE_FILE and
FLOW_COLUMN. Check the file that will be used and open it.
Create a meteorology timeseries in Boundary
Conditions\Meteorology and edit the Meteorology file to read it
Run the simulation. The model will use now timeseries for flow
and for meteotology as real data
Ex 3. Initial Conditions

In the reference simulation (Run 1) check the
initial conditions:
–
Hydrodynamics

INITIALIZATION_ELEVATION : 1
–

INITIALIZATION_ELEVATION : 0
–
–
Define Level with INITIALIZATION_ELEVATION_VALUE
Defined by the OpenBoundary - Tide
Water Properties


INITIALIZATION_METHOD
DEFAULTVALUE
: CONSTANT
: X.
Ex 3. Initial Conditions





Create a new simulation similar as Run1 and create
a continuation that will continue after it – Select Run
and Project -> New Run and name it
Check that CONTINUOUS : 1 is present in
Hydrodynamics
Add OLD : 1 in every property of Water Properties
and change it to 1 in Langragian Origin
Change End Date. Verify that Start Date is same and
end Date of the previous.
This run will have the initial conditions as the last
instant of the previous.
Recall






MOHID formats and keywords
Space Inputs may be constant, time-variant
(Timeseries) and time and space variant (HDF)
Discharges may be defined by constant or timeserie
Created Bathymetry from point data
Checked Boundary conditions and changed forcing
to timeserie (more realistic) in discharge and
meteorology
Checked Initial conditions and created continuous
simulation reading initial conditions from previous
Next Lesson


Continue Unfinished examples
Free time to testing and doubts
Links

Página principal do sistema MOHID
http://www.mohid.com/

MOHID Wikipédia:
http://wiki.mohid.com/wiki

Fórum de discussão MOHID
http://www.mohid.com/forum/
Download