/
GCHP  adjoint  tasks Model design GCHP  adjoint  tasks Model design

GCHP adjoint tasks Model design - PowerPoint Presentation

sherrill-nordquist
sherrill-nordquist . @sherrill-nordquist
Follow
351 views
Uploaded On 2018-12-15

GCHP adjoint tasks Model design - PPT Presentation

inverse model components structure data flow building process code versioningsync Model development develop based on v1102 get GCHP to run backwards could be trivial ID: 741434

adjoint model stt code model adjoint code stt file calc inverse chem geos files ems build gchp process obs

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "GCHP adjoint tasks Model design" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

GCHP adjoint tasks

Model design

- inverse model

components (structure

/ data flow

)

- building process (code versioning/sync

.)

Model development

- develop based on v11-02

- get GCHP to run

backwards (could be trivial)

- use HEMCO for definition of control vector (

x

)

- additional

adjoint

code for

- MERRA2 convection

- FLEXCHEM

- others…

- checkpoint optimization

- TLM

Proceeding as a group

- GCHP tutorial

-

adjoint

tutorial

- code dev. / merge workshop Slide2

Inverse Model

Forward Model

t

0

t

f

Inverse Modeling

using 4D-Var method - current

Parameter Estimate

Predictions,

Optimization

(L-BFGS)

Improved

Estimate

y

= observations,

B

,

R

= uncertainties

Adjoint

Forcing,

Gradients

(sensitivities)

Adjoint

Model

t

f

t

0Slide3

inverse.f

DO_GEOS_CHEM()

DO_GEOS_CHEM_ADJ()

t

0

t

f

t

f

t

0

APPLY_IC_SCALING()

STT = STT *

ICS_SF

advance

STT

LOAD_CHECKPT_DATA()

CALC_ADJ_FORCE()

READ_OBS_FILE()

COST_FUNC += 0.5 *

W

* (CHK_STT - OBS_STT)

2

ADJ_STT +=

W

* (CHK_STT - OBS_STT

)

geos_chem_mod.f

geos_chem_adj_mod.f

SETULB( X,

F, GRADNT)

MAKE_GDT_FILE()

MAKE_SF_FILE

()

MAKE_CFN_FILE()

(*.

gdt

.*,

*.sf.*,

cfn

.*

in

OPT_DATA_DIR

)

GET_SF_FROM_X

()

F = COST_FUNC

GET_GRADNT_FROM_ADJ()

Inverse

Model - current

DO_EMISSIONS()

EMS

=

EMS

*

EMS_SF

DO_EMISSIONS_ADJ(): EMS_SF_ADJ

from

STT_ADJ

RESCALE_ADJOINT

()

ICS_SF_ADJ

from

STT_ADJ

DO_OUTPUT()

CHK_STT = STT

MAKE_CHECKPT_FILE()

(*.

chk

.* in

ADJ_DIR

)

or

MAKE_OBS_FILE()

(*.obs.* in

ADJ_DIR

)

advance

STT_ADJ

CALC_APRIORI()

update *SF_ADJ and CFSlide4

inverse.f

run

IF ( N_CALC == N_CALC_STOP )

DO_GEOS_CHEM()

DO_GEOS_CHEM_ADJ()

MAKE_GDT_FILE()

MAKE_SF_FILE

()

MAKE_CFN_FILE() GET_GRADNT_FROM_ADJ()

F = COST_FUNC

ITERATE = .FALSE.

WHILE( ITERATE )

SETULB( X, F, GRADNT, …)

N_CALC = N_CALC + 1

IF ( N_CALC < N_CALC_STOP

) GET_SF_FROM_X()

READ_GDT_FILE() READ_CFN_FILE() GET_GRADNT_FROM_ADJ() F = COST_FUNC

ITERATE = .TRUE.

N_CALC = 0

IF

(

N_CALC_STOP ==

0 )

SET_SF()

DO_GEOS_CHEM()

if (LADJ) make *.obs.*

EXIT

SET_SF:

IF

(

N_CALC_STOP == 0 )

STT_SF =

1d0 EMS_SF

= 1d0 ELSE

STT_SF = STT_SF_DEFAULT

EMS_SF = EMS_SF_DEFAULT

while [ $X -le $XSTOP]

set

N_CALC_STOP = $X in inverse.f

SET_SF()

GET_X_FROM_SF()

inverse_mod.f

Inverse

Model - currentSlide5

Inverse

Model Components

- ideal

Forward nonlinear

model

M

Tangent

Linear model

M

Solver

Observations

y

Observation operators

H

Observation operator

adjionts

H

T

Adjoint

model

M

Covariance

matrices

B,

R, B

1/2

Control

parameters

x

DA

GCHP+data

ADJ/TLM

Key desired (new) features:

TLM

Handle

x using HEMCONot all one .exe- Object oriented, look to port to OOPS?Slide6

Inverse

Model Components

- ideal

Forward nonlinear

model

M

Tangent

Linear model

M

Solver

Observations

y

Observation operators

H

Observation operator

adjionts

H

T

Covariance

matrices

B,

R, B

1/2

Control

parameters

x

DA

GCHP+data

ADJ/TLM

Essential features to retain:

Stand-alone gradient calculations (sensitivity analysis)

Finite difference testing mode

Pseudo inversion mode

Adjoint

model

MSlide7

Code build process How to allow for the forward model and

adjoint

model to both advance and yet stay synchronized with minimal overhead?

Current

:gcadj_std uses stand-alone code repository

code (unmodified fwd filescode/modified

code/adjointcode/new (when adj dev. leap frogs fwd

dev)forward model benchmarking is un-encumbered by adjoint model requirements

adjoint model is not broken by updates to the forward model some updates from forward model are manually pulled into

gcadj_std/code bug fixes for portions of forward model code used by adjoint (

GCadj support team)components needed for new research (user community)some files in gcadj_std/code become outdatedSlide8

Code build process How to allow for the forward model and

adjoint

model to both advance and yet stay synchronized with minimal overhead?

Alternative method (to be refined/tested):

single code repository contains files for:

forward model Changes/additions to forward model needed by the

adjoint included via #defined (ADJOINT)Forward model benchmarks with !#defined (ADJOINT)adjoint model

adjoint build scriptchecks out versions of files from repo thathave

passed adjoint benchmarksmay not be the most recent

fwd versionadjoint benchmarks process updates build script to

checkout most recent version of forward file verified to not break the adjoint eventually: checkout different files for M, M, MTSlide9

Code build process How to allow for the forward model and

adjoint

model to both advance and yet stay synchronized with minimal overhead?

Alternative method (to be refined/tested):

single code repository contains files for:

forward model Changes/additions to forward model needed by the

adjoint included via #defined (ADJOINT)Forward model benchmarks with !#defined (ADJOINT)adjoint model

adjoint build scriptchecks out versions of files from repo thathave

passed adjoint benchmarksmay not be the most recent

fwd versionadjoint benchmarks process updates build script to

checkout most recent version of forward file verified to not break the adjoint eventually: checkout different files for M, M, MT

This is just an idea. It needs to be refined, tested….

Right now we just want to know who can help with which aspects.Slide10

Model development tasks- develop based on v11-02

- get GCHP to run backwards

- use HEMCO for definition of control vector (

x

)- additional adjoint code for - MERRA2 convection

- FLEXCHEM - others…- checkpoint optimization - TLMSlide11

Group OrganizationTransparent Organization

GCHP tutorial

follow-up on IGC8 tutorial

adjoint

tutorial

Theory / fundamentalsExercises with manual and auto-diff tools (TAPENADE)Devel

priorities full chem? Offline (CO2, CH4, etc.)? Code dev. / merge workshop

Timing is critical