23
Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Mesh refinement methods in ROMS

Laurent Debreu

INRIA, Grenoble, France

In collaboration with

Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Page 2: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Outline

Principles of mesh refinement Computational aspects Integration in the ROMS kernel Applications

Page 3: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Outline

Principles of mesh refinement Computational aspects Integration in the ROMS kernel Applications

Page 4: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

4

Principles of mesh refinement

• Improve a global solution

two way (fixed or adaptive) mesh refinement

for a given computation cost

Will a multiresolution model performs better than a uniform grid model ?

• Improve a local solution

one or two way (fixed or adaptive mesh refinement)

Is it necessary to use two way nesting ?

• Improve the tracking of a particular structure

Adaptive mesh refinement

Page 5: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

5

Principles of mesh refinement

Run the same model on grids with different space/time resolutions

Required for the embedding:

• A time integration algorithm

• Grid’s interactions

Required for the adaptivity:

• A refinement criterion

• An efficient grid’s initialization procedure

Page 6: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

6

Principles of mesh refinement

G0

G1

G2

interpolation

1

6

543

2

11

10

987 1312

update

Time integration algorithm

Page 7: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Outline

Principles of mesh refinement Computational aspects Integration in the ROMS kernel Applications

Page 8: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Computational Aspects: the AGRIF software

AGRIF: Adaptive Grid Refinement In Fortran

Goal: « easy » integration of (fixed or adaptive) mesh refinement features in an existing numerical model

• automatic changes of data structures at compile time

• provides interpolation and update operators

• Fortran 77/90, 1D/2D/3D refinement, Staggered grids, Masked fields, parallelization(MPI)

• fixed and/or adaptive grids, clustering algorithm, restoring algorithm

Some features:

Page 9: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Computational aspects: ROMS_AGRIF

http://www.brest.ird.fr/Roms_tools

AGRIF in ROMS:

• each grid has it own input file and outputs

• grid’s locations specified in AGRIF_FixedGrids.In

• works in OPENMP/MPI

• forcings, initial conditions made through the « nesting gui »

2

20 45 34 59 3 3 3

30 55 70 89 3 3 2

0

1

10 30 20 40 5 3 5

0

Page 10: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

10

Computational aspects: AGRIF in other ocean models

AGRIF in the OPA model

Page 11: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Outline

Principles of mesh refinement Computational aspects Integration in the ROMS kernel Applications

Page 12: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Integration in the ROMS numerical kernel: Roms: Time step, Boundary conditions

adjust to

• pre_step3D 1/ 2 1/ 2,n nu T BC on 1/ 2 1/ 2,n nu T

• step2D 1/ 2 1 1, ,n n nU U

• step3D_uv1

adjust to 1/ 2nu

1 1/ 2n n nu u t rhs

• step3D_uv2

• set_HUV2

1nu BC on 1nu

* 11

2n nu u u

adjust to *u

1 * 1/ 2( , )n n nT T t DIV u t BC on 1nT

• step3D_t

1/ 2nU

1nU

1/ 2nU

UP 1/ 2 1 1, ,n n nU U

UP 1 *,nu u

UP1nT

Page 13: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

13

Integration in the ROMS numerical kernel: barotropic mode, boundary conditions

Characteristic variables :

0 0f f c c

g gU U

H H

0

gU

H

On a western boundary :

0

gU

H

0

gU

H

is the incoming characteristic

is the outgoing characteristic

0 0f f upwind upwind

g gU U

H H

0

1

2f c upwind c upwind

gU U U

H

(at speed )0 0U gH

Page 14: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

14

Integration in the ROMS numerical kernel: barotropic mode

• One way

Enforces volume conservation :*

U Uc f

f f c fU U U U

• Two – way : , (no free surface update) Uf

c fU U

(including boundary points)

Update area

Page 15: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

15

Integration in the ROMS numerical kernel: 3D velocities

3D :

0

1ˆ ˆ ˆ( ) ( )

2f f c c upwind upwind c upwindH u H u H u gH H H

• Two – way :uf

c fu u

(including boundary points)

ˆf f fu u u

Page 16: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

16

Integration in the ROMS numerical kernel: conservation

• Let be a conserved quantity:

Define by

• At initial time :

• conservation of flux equality at fine/coarse grid interfaces

• (in one way interaction) two solutions

• correct or

• correct such that then correct

• (in two way interaction) two other solutions:

• correct

• correct (in ) such that

K

( ) 0K

uKt

K

\H hK K K

0 \ 0 0 0( ) ( ) ( ) ( ( )!)H h HK t t K t t K t t K t t

hK

K

0 0H

H h

t T t T

H h ht t t tu K u K

hu

huh H

h Hu u

hK

Hu

HK 1 1

h H

n n n n n nH H h h H HK K t u K u K

\

Page 17: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

17

Integration in the ROMS numerical kernel: 3D tracers

1 1 1, , ,( ) /n n n

c W c W f c c WT T t Flux Flux H

fc f

c

HT T

H

• Two-way:

*Uf

f f f fFlux H u T

W

At (first two) interior grid points

Page 18: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

18

Integration in the ROMS numerical kernel: topography construction

Topography and initial (tracers) fields

(1 ) Ifine HR coarseK K K

IcoarseK satisfying

,

, ,1 1

2 2

Icoarse coarse

i j

I W I E W Ecoarse coarse coarse coarse

j

K K

K K K K

Page 19: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

19

Integration in the ROMS numerical kernel: summary

• Boundary conditions

• 2D velocities : Characteristics variables method

• 3D velocities : boundary conditions consistents with 2D BC

• 3D tracers : clamped

• Update (two way)

• conservative updates (two first cells only)

• flux correction for tracers

• topography definition

• identical volume and faces area in first two cells

Page 20: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

Outline

Principles of mesh refinement Computational aspects Integration in the ROMS kernel Applications

Page 21: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

21

Applications: (One/Two way comparison)

Peru application: Coarse grid domain results

Coarse grid Run Nested Run

Surface temperature and velocites

Page 22: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

22

Applications: (One/Two way comparison)

Peru application: Fine grid domain results

Page 23: Mesh refinement methods in ROMS Laurent Debreu INRIA, Grenoble, France In collaboration with Patrick Marchesiello and Pierrick Penven (IRD, Brest, France)

23

Mesh refinement methods in Roms: conclusions and perspectives

• Different applications have been done in one way nesting

• Two-way nesting shoud now be extensively tested

• « fully » two way scheme

• differents topographies on coase and fine grids

• exact conservation of volume and tracers

• Future two way developments

• Time refinement

• sponge layer on instead of

• treatment of momentum fluxes

( )f cu ufu