to couple or not to couple

33
To Couple or Not To Couple John Warner, USGS

Upload: akando

Post on 04-Feb-2016

59 views

Category:

Documents


0 download

DESCRIPTION

To Couple or Not To Couple. John Warner, USGS. Outline. Overview of some recent advancements to ROMS sediment transport components wave/current interactions model coupling Focus on Model Coupling MCT, ROMS, SWAN How to develop a coupled ROMS-SWAN application (inlet test example) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: To Couple or Not To Couple

To Coupleor

Not To Couple

John Warner, USGS

Page 2: To Couple or Not To Couple

• Overview of some recent advancements to ROMS– sediment transport components– wave/current interactions– model coupling

• Focus on Model Coupling– MCT, ROMS, SWAN

• How to develop a coupled ROMS-SWAN application (inlet test example)

• Summary /where are we going?

Outline

Page 3: To Couple or Not To Couple

What is model coupling?

Model A running on M nodes.

78 processor cluster -WHOI shared

Model B running on N nodes.

Model C ………

………

(it also works here)

……

with communications between all models.

Page 4: To Couple or Not To Couple

Why Couple models?

• Your model doesn't have all the physics !– For example, waves are needed from a different

source, such as another model or data• Provide dynamic feedback

– nonlinear interactions between forcing (i.e. wave-currents-morphology).

http://www.cofc.edu

Page 5: To Couple or Not To Couple

Where / when is model coupling important ?

Surface winds Groundwater

Sea iceWaves

http://www.cofc.edu/CGOInquiry/tidalinlets.htm

Page 6: To Couple or Not To Couple

Model Coupling ToolkitMathematics and Computer Science Division Argonne National Laboratoryhttp://www-unix.mcs.anl.gov/mct/R. Jacob, J. Larson, E. Ong, “M×N Communication and Parallel Interpolation in CCSM Using the Model Coupling Toolkit”, (Preprint) ANL/MCSP1225-0205, Mathematics and Computer Science Division, Argonne National Laboratory, Feb 2005. Submitted to International Journal for High Performance Computing Applications.

J. Larson, R. Jacob, E. Ong, “The Model Coupling Toolkit: A New Fortran90 Toolkit for Building Multiphysics Parallel Coupled Models”, (Preprint) ANL/MCS-P1208-1204, Mathematics and Computer Science Division, Argonne National Laboratory, Dec 2004. Submitted to International Journal for High Performance Computing Applications.

How are we coupling models?

MCT is an open-source package that provides MPI based communications between all nodes of a distributed memory

modeling component system. Download and compile as libraries that are linked to. (like netcdf)

Model A "M" processors

Model B "N" processors

Page 7: To Couple or Not To Couple

Plan to change coupler to ESMF in the near future

Earth System Modeling Framework http://www.esmf.ucar.edu/Partners: NOAA Geophysical Fluid Dynamics Laboratory NOAA National Centers for Environmental Prediction

NSF National Center for Atmospheric Research NASA Goddard Global Modeling and Assimilation Office NASA Goddard Institute for Space Studies NASA Jet Propulsion LaboratoryNASA Goddard Land Information Systems project DOD Naval Research Laboratory DOD Air Force Weather Agency DOD Army Engineer Research and Development Center DOE Los Alamos National Laboratory DOE Argonne National Laboratory University of Michigan Princeton UniversityMassachusetts Institute of Technology UCLA Center for Ocean-Land-Atmosphere Studies Programme for Integrated Earth System Modeling (PRISM) Common Component Architecture (CCA)

Page 8: To Couple or Not To Couple

What do we need from SWAN, and what does SWAN want from ROMS?

u, v, , h

Dwave, Hwave, Lwave,Pwave_top, Pwave_bot,Ub_swan, Wave_dissip

Page 9: To Couple or Not To Couple

Recent advancements to ROMS

Roller Model

Page 10: To Couple or Not To Couple

3D momentum equations

0

' 'z z z z zz z

z

z xyz xx px

H u uH u vH u H u H p uf H v H g u w

t x y s x x s H s

H SH S S

x y s

0

' 'z z z z zz z

z

z xy z yy py

H v uH v vH v H v H p vf H u H g v w

t x y s y y s H s

H S H S S

x y s

0 0

10 z

p gH

s

0z z zH u H v H

t x y s

' 'z z z z

sourcez

H C uH C vH C H C Cc w C

t x y s s H s

(wave - current interaction adds new terms)

x:

y:

continuity:

scalar transport:

s:

Page 11: To Couple or Not To Couple

Radiation stress terms2

2

2

2

2

2

x x x xxx CS CC CS CC SS CS R z

x y x yxy yx CS CC R z

y y y yyy CS CC CS CC SS CS R z

k k k k cS k E F F F F F F A R

k Lk

k k k k cS S kE F F A R

k Lk

k k k k cS k E F F F F F F A R

k Lk

4

1 tanh2

z

sR

1 coth2

1 coth2

SSpx CC SS CS SS

SSpy CC SS CS SS

kD kDF ES F F F s E EF kD

x x x

kD kDF ES F F F s E EF kD

y y y

sinh 1 cosh 1

sinh sinh

sinh 1 cosh 1

cosh cosh

SS CS

SC CC

kD s kD sF F

kD kD

kD s kD sF F

kD kD

2 /16sE gH wave energy:

2cosh 2 1 cosh 2 12;

sinh 2 sinh 2

yx R Rs s

kkD s kD sk D g A D g Au E v E

c kD L c kD L

Mellor, G. L. (2003). The three-dimensional current and surface wave equations. Journal of Physical Oceanography 33, 1978-1989.

where

verticalshape

functions:

roller function:

stokes velocities:

horizontal radiation stresses:

vertical radiation stresses:

Roller model based on:Svendsen, I. A. (1984). Wave heights and set-up in a surf zone, Coastal Engineering, 8, 303-329.Svendsen, I, Haas, K and Zhao, Q (2002). Quasi-3D Nearshore Circulation Model SHORECIRC, CACR Report 2002-01.

Mellor, G. L. (2005). Some consequences of the three-dimensional current and surface wave equations. Journal of Physical Oceanography 35, 2291-2298.

Page 12: To Couple or Not To Couple

Depth-integrated equations

xyxxsx bx

Du uDu vDu SSpf Dv D

t x y x x y

xy yysy by

Dv vDu vDv S Spf Du D

t x y y x y

0

Du Dv

t x y

2

2 2

2

2 2

2

2 2

1

2

1

2

g gx x x x Rxx

g x y x y Rxy yx

g y y g y y Ryy

c ck k k k c AS E E

c c Lk k

c k k k k c AS S E

c Lk kc k k c k k c A

S E Ec c Lk k

2

12 sinh 2g

c kDc

k kD

; y yx x R Rs s

k E kk E k g A g Au v

ck D k c L ck D k c L

group speed:

x:

y:

continuity:

horizontaldepth-integrated radiation stresses:

where

stokes velocities:

Velocities are Lagrangian !! So we are recoding to make them all Eulerian.

Page 13: To Couple or Not To Couple

SWAN (the wave model)

yx wc Nc N c N c N SN

t x y

cx, cy = propagation velocities (x- and y- directions) = relative frequency = wave direction

S = source/sink term for: - wind-wave generation - wave breaking - bottom dissipation - nonlinear wave-wave interactions

SWAN accounts for shoaling, diffraction, partial transmission, and reflection.

N = wave action density (energy density / relative frequency)

Booij, N., R.C. Ris and L.H. Holthuijsen, 1999, A third-generation wave model for coastal regions, Part I, Model description and validation, J.Geoph.Research, 104, C4, 7649-7666.Booij, N., R.C. Ris and L.H. Holthuijsen, 1999, A third-generation wave model for coastal regions, Part II, Model description and validation, J.Geoph.Research, 104, C4, 7649-7666.Booij, N., Haagsma, IJ.G., Holthuijsen, L.H., Kieftenburg, A.T.M.M., Ris, R.C., van der Westhuysen, A.J., and Zijlema, M. (2004). SWAN Cycle III version 40.41 User Manual, Delft University of Technology.

pretty good user’s manual !!!

Page 14: To Couple or Not To Couple

Simple example of an uncoupled application

to demonstrate wave driven flows ….

Page 15: To Couple or Not To Couple

Shoreface test case

test case setup

1) use SWAN to predict wave heights, wave dissip, wave direction,wave length, wave period2) results from SWAN were used as forcing to ROMS and Shorecirc.

Thanks to Kevin Haas at Ga Tech Savannah

( )0 ( ) xx

bx

Shg h

x x

2 2 xyd

SC v u v

x

Page 16: To Couple or Not To Couple

How does the coupled modeling system work?

Page 17: To Couple or Not To Couple

Model organization

master.F

mpi_init

initrun

finalize

initrun

finalize

{{

SWAN

ROMS

init_file (# procs/model)

Page 18: To Couple or Not To Couple

init, run, and finalize

ROMS SWAN

init(grid decomp)

run(sync. point)

finalize

init_paraminit_parallelinit_scaclarsinit_couplingro

ms_

init

rom

s_ru

n

main3d .....

waves_coupling...

mpi_finalizeclose_io

rom

s_fi

nali

ze

MPI_INIT

SW

INIT

MP

IS

WM

AIN

SW

EX

ITM

PI

SWINITSWREAD (grid)

init_coupling

swanmain .....

ocean_coupling...

mpi_finalizeclose_io

Page 19: To Couple or Not To Couple

Grid decomposition (during initialization)

ROMS SWAN

-Each tile is on a separate processor.

-Each tile registerswith MCT.

Page 20: To Couple or Not To Couple

init_coupling

ROMS- init_coupling SWAN- init_coupling

1

1

22

3

3

processed by each ROMS tileprocessed by each SWAN tile

Page 21: To Couple or Not To Couple

Synchronization (run phase)

ROMS- cocean_oupling SWAN- waves_coupling

MCT

MCT

processed by each ROMS tile processed by each SWAN tile

Page 22: To Couple or Not To Couple

How to set up a Coupled ROMS / SWAN application

Use INLET_TEST as an example.This application is provided in ROMS 2.3

You need to compile and install MCT (only once).You need all the input files for a stand alone ROMS simulation.You need all the input files for a stand alone SWAN simulation.

We have some m files to make ROMS grids, SWAN grids from ROMS grids,SWAN wave forcing files, SWAN wind forcing files, etc.

Page 23: To Couple or Not To Couple

Step 1: cppdefs.h

INLET_TESTis already set up to

have model coupling

NEARSHORE_MELLOR activates radiation stress terms in momentum equations.

WAVES_OCEAN activates coupling to the wave model.

Page 24: To Couple or Not To Couple

Step 2: coupling input file

Set number of processors for each model.

coupling_inlet_test.in

Set synchronizationinterval.

File names.(SWAN = INPUT)

Page 25: To Couple or Not To Couple

Step 3: ROMS input file

Make sure number of tiles

= number of processorsspecified in

coupling input file

ocean_inlet_test.in

Page 26: To Couple or Not To Couple

Step 4: SWAN input file

Keep these 2 sets ofcommands for CURRENT and

WLEV. These activateinternal SWAN flags.

INPUT

MANY MORE commands further in this file. RTFSM.

Page 27: To Couple or Not To Couple

Step 5: makefile

SWAN_COUPLEactivates compiler

directives forMCT libraries.

Needs MPI

Page 28: To Couple or Not To Couple

Step 6: compile and run

make

mpirun –np M*N ./oceanM ROMS/External/coupling_inlet_test.in

Page 29: To Couple or Not To Couple

Inlet Test

ubar = 0.5 m/s depth (m)

2

16

Hs = 2.0 mT = 10 s

1200 m

1200 m

Use the inlet test case as an example. This test case will be distributed with ROMS 2.3

Page 30: To Couple or Not To Couple

Inlet test (preliminary look)

1) Two-way coupled simulation shows wave-current interaction: reduced magnitude of currents and increased wave height.2) Coupled simulation has lower velocity and less erosion offshore of inlet.3) Lateral BC effects of wave model.

SWAN ROMS

SWAN ROMS

Page 31: To Couple or Not To Couple

Where are we heading with this?

Page 32: To Couple or Not To Couple

New directory structure for ROMS 2.3

COAMPSWRF

Others …

(Natalie Perlin OSU, but not formalized into Rutgers version yet)

Page 33: To Couple or Not To Couple

Summary

• Model enhancements include :– sediment transport components– wave/current interaction– model coupling

• Developed a coupled ocean-wave modeling system.• New directory structure to allow coupling to other models.• ROMS 2.3 release – in a few weeks after finalize

Lagrangian to Eulerian issue.