mohid course lesson 2 how to create a mohid project 19 março 2013

29
MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Upload: letitia-clemence-parks

Post on 13-Jan-2016

243 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

MOHID Course

Lesson 2How To Create a MOHID Project

19 Março 2013

Page 2: 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

Page 3: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Types of files

• ASCII files• Plain text files• Platform independency assured

• HDF files• Hierarchical Data Format (http://hdf.ncsa.uiuc.edu/HDF5/)• High volume of data • Platform independent

• Others• netcdf files• binary unformatted files

t0t1

t2

Page 4: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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

Page 5: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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

Page 6: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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

Page 7: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Time and Date format

START   : 2013 03 19 17 0 0

Keyword Year Month Day Hour Minute Second

Time and dates in MOHID are set by a keyword with an array of integer numbers

Today’s date March 19th, 2008 at 17h00

Page 8: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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 “>”

• A block can also be defined inside another block

<beginproperty>

….

<endproperty>

Page 9: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Space and Time Variation of spatial input Data

– Constant Same value in Space and Time

– TimeSerie Changes with time but all cells have the same value

– HDF Changes in time and Space

t0t1

t2

t0t1

t2

t0t1

t2

Page 10: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Construct a timeserie (e.g. Discharge)

SERIE_INITIAL_DATA : 2013 3 18 0 0 0TIME_UNITS : DAYS

Days Flow(m3/s) <BeginTimeSerie>0 11 102 1003 104 1<EndTimeSerie>

Page 11: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Under the Hood

MOHID Studio Explorer

Output Files

Input Files

Page 12: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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

Mohid.exe

ryyy PGPmdt

dP.).(

mu - prey mortality

Run Adection/Diffusion and what methods (upwind, central differences)

River discharge, Tide, Meteorology

Initial Conditions

t

Q

Input Files

Reads Input

Writes Output

Page 13: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Bathymetry

Is the 2D depth and bottom boundary It defines the horizontal grid

Hydrographic zero

Page 14: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Geometry Data File

<begindomain> ID : 1 TYPE : SIGMA LAYERS : 1 LAYERTHICKNESS : 1.0 TOLERANCEDEPTH : 0.0500 DOMAINDEPTH : -99.00 MININITIALLAYERTHICKNESS : 0.05 <enddomain>

Horizontal Grid

Bathymetry

Vertical Geometry

Page 15: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Atmosphere Data File

<beginproperty> NAME : air temperature UNITS : ºC DESCRIPTION : Temperature FILE_IN_TIME : NONE

DEFAULTVALUE : 20. REMAIN_CONSTANT : 1 TIME_SERIE : 0 OUTPUT_HDF : 1 <endproperty>

<beginproperty> NAME : air temperature UNITS : ºC DESCRIPTION : Temperature FILE_IN_TIME : TIMESERIE FILENAME : ..\General Data\Atmosphere\AtmosphereData.dat DATA_COLUMN : 5 DEFAULTVALUE : 20. REMAIN_CONSTANT : 0 TIME_SERIE : 0 OUTPUT_HDF : 1 <endproperty>

CONSTANTTIMESERIEt0

t1t2

t0t1

t2

20

Boundary Conditions

Page 16: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Discharges Data File

<begindischarge> NAME : Tagus DESCRIPTION : Enter a short description I_CELL : 107 J_CELL : 149 K_CELL : 1 DEFAULT_FLOW_VALUE : 20.0

<enddischarge>

CONSTANTTIMESERIE <begindischarge> NAME : Tagus DESCRIPTION : Enter a short description I_CELL : 107 J_CELL : 149 K_CELL : 1 DEFAULT_FLOW_VALUE : 20.0 DATA_BASE_FILE : ..\General Data\Boundary

Conditions\DichargeExample.srd FLOW_COLUMN : 2 <enddischarge>

Boundary Conditions

Page 17: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Hydrodynamics Data File

CORIOLIS : 1 TIDE : 1 WATER_DISCHARGES : 1 WIND : 1

Other options compute advection diffusion, explicit, implicit. If not defined will have default values

!INITIAL_ELEVATION : 0 !INITIAL_ELEVATION_VALUE : 0

Initial Conditions

Page 18: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Model Data File

START : 2013 3 18 12 0 0 END : 2013 3 19 0 0 0 VARIABLEDT : 1 DT : 15. MAXDT : 60.

Page 19: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Water Properties File

<beginproperty> NAME : temperature UNITS : ºC DESCRIPTION : No description was given. INITIALIZATION_METHOD : CONSTANT DEFAULTVALUE : 20 ADVECTION_DIFFUSION : 1 SURFACE_FLUXES : 1 DISCHARGES : 1 OUTPUT_HDF : 1 TIME_SERIE : 1 <endproperty>

Initial Conditions

t0

20

Page 20: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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)

Page 21: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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

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)

– 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 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

Page 22: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Ex.1 Create Bathymetry

Page 23: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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 : X.

REMAIN_CONSTANT : 1

Page 24: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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

Page 25: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Ex 3. Initial Conditions

In the reference simulation (Run 1) check the initial conditions:– Hydrodynamics

INITIALIZATION_ELEVATION : 1– Define Level with INITIALIZATION_ELEVATION_VALUE

INITIALIZATION_ELEVATION : 0– Defined by the OpenBoundary - Tide

– Water Properties INITIALIZATION_METHOD : CONSTANT DEFAULTVALUE : X.

Page 26: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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.

Page 27: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

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

Page 28: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Next Lesson

Continue Unfinished examples Free time to testing and doubts

Page 29: MOHID Course Lesson 2 How To Create a MOHID Project 19 Março 2013

Links

Página principal do sistema MOHIDhttp://www.mohid.com/

MOHID Wikipédia: http://wiki.mohid.com/wiki

Fórum de discussão MOHIDhttp://www.mohid.com/forum/