Top Banner
WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might need to do Shu-hua Chen NCAR/AFWA (UC Davis, Sep.)
32

WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Jan 02, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

WRF Model:

Physics Implementation

OUTLINE

Physics SchemesThree_level Structure

Rules for WRF physicsWRF Physics Features

WRF LanguageWhat you might need to do

Shu-hua ChenNCAR/AFWA

(UC Davis, Sep.)

Page 2: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Scheme Selection

Simple schemes for operation

Complicated schemes for research

Page 3: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Physics Schemes

Physical Process Available

Microphysics Kessler, Lin et al. , Ncloud3, Ncloud5

Cumulus KF, BMJ

Subgrid scale turbulence TKE, Smagrinsky,

Constant K

Radiation RRTM(L), Dudhia(S),

Goddard(S)

PBL MRF

Surface layer Similarity theory

Land-surface layer 5-layer soil temperature

Page 4: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Physics Interface Design

User friendly •• Simple

Different dynamics cores •Three-level structure =>

Page 5: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Solver

Physics_driverSELECT CASE (CHOICE) CASE ( NOPHY ) CASE ( SCHEME1 ) CALL XXX CASE ( SCHEME2 ) CALL YYY CASE DEFAULTEND SELECT

Individual physics scheme ( XXX )

Three-level Structure

Page 6: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

WRF … solve_rk ADV TENDENCIES

phy_init

ADVANCE VARS

INIT

.

.

.

microphysics_driver

Radiation_driver

Cumulus_driver

pbl_driver

phy_prep

moist_physics_prep

Page 7: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

phy_prep & moist_physics_prep

• Decouple variables

• Convert variables from C grid

to A grid

Page 8: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Solver

Physics_driverSELECT CASE (CHOICE) CASE ( NOPHY ) CASE ( SCHEME1 ) CALL XXX CASE ( SCHEME2 ) CALL YYY CASE DEFAULTEND SELECT

Individual physics scheme ( XXX )

Three-level Structure

Page 9: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Physics Standard Interface

SELECT CASE (CHOICE) CASE ( NOPHY ) CASE ( SCHEME1 ) CALL XXX(…) CASE ( SCHEME2 ) CALL YYY(…) CASE DEFAULTEND SELECT

Physics_driver

Page 10: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Solver

Physics_driverSELECT CASE (CHOICE) CASE ( NOPHY ) CASE ( SCHEME1 ) CALL XXX CASE ( SCHEME2 ) CALL YYY CASE DEFAULTEND SELECT

Individual physics scheme ( XXX )

Three-level Structure

Page 11: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Domain size: ids, ide, jds, jde, kds, kde

Memory size: ims, ime, jms, jme, kms, kme

Tile size: its, ite, jts, jte, kts, kte

Three Sets of Dimensions

Page 12: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

(ids,ide)

Logical Domain (ids,kds,jds)

Page 13: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

halo

halo

halo

hal

o

(ids,ide)

patchpatchpatch

patch

patch patch

patch patch

patch(ims,ime)

Memory size (ims,kms,jms)

Page 14: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Tile size (its,kts,jds)

halo

halo

haloh

alo

(ims,ime)

tile

tile

tile

tile

tile

tile

(its,ite)

Page 15: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

WRF … solve_rk ADV TENDENCIES

phy_init

ADVANCE VARS

INIT

.

.

.

microphysics_driver

Radiation_driver

Cumulus_driver

pbl_driver

phy_prep

moist_physics_prep

Page 16: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Coding rules

Rules for WRF Physics

Page 17: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Subroutine kessler(QV, T,& its,ite,jts,jte,kts,kte,& ims,ime,jms,jme,kms,kme,& ids,ide,jds,jde,kds,kde)

F77

Subroutine kessler(QV, T, . . . & its,ite,jts,jte,kts,kte,& ims,ime,jms,jme,kms,kme,& ids,ide,jds,jde,kds,kde )

F90

a) Replace continuation characters in the 6th column with f90 continuation `&‘ at end of previous line

1. F90

Coding Rules

Page 18: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

a) Replace continuation characters in the 6th column with f90 continuation `&‘ at end of previous line

1. F90

b)Replace the 1st column `C` for comment with `!`

c This is a test

F77

! This is a test

F90

Coding Rules

Page 19: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

a) Replace continuation characters in the 6th column with f90 continuation `&‘ at end of previous line

1. F90

b)Replace the 1st column `C` for comment with `!`

2. No common block

3. Use “ implicit none ”

5. Variable dimensions and do loops

Coding Rules

4. Use “ intent ”

Page 20: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Coding rules

Rules for WRF Physics

Naming rules

One scheme one module

Page 21: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

xxx = individual scheme

ex, module_cu_kf.F

Naming Rules

module_yy_xxx.F (module)

yy = ra is for radiation bl is for PBL cu is for cumulus mp is for microphysics.

Page 22: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

YY = ra is for radiation bl is for PBL cu is for cumulus

Naming Rules

RXXYYTEN (tendencies)

XX = variable (th, u, v, qv, qc, … )

ex, RTHBLTEN

Page 23: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Coding rules

Vectorized code preferred

( might depend on which physics component )

Rules for WRF Physics

Naming rules

One scheme one module

Page 24: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

• Unified global constatnts

(module_model_constants.F)

WRF Physics Features

REAL , PARAMETER :: r_d = 287. REAL , PARAMETER :: r_v = 461.6 REAL , PARAMETER :: cp = 7.*r_d/2. REAL , PARAMETER :: cv = cp-r_d . . .

Page 25: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

• Unified global constatnts

(module_model_constants.F)

WRF Physics Features

• Vertical index (kms is at the bottom)

• Unified common calculations

(saturation mixing ratio)

Page 26: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Solver

Physics_driverSELECT CASE (CHOICE) CASE ( NOPHY ) CASE ( SCHEME1 ) CALL XXX CASE ( SCHEME2 ) CALL YYY CASE DEFAULTEND SELECT

Individual physics scheme ( XXX )

Three-level Structure

Page 27: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

• Unified global constatnts

(module_model_constants.F)

WRF Physics Features

• Unified common calculations

(saturation mixing ratio)

• Vertical index (kms is at bottom)

• kme = kte + 1 (physics)

kme = kte (dynamics)

Page 28: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

WRF Language

• Patch, tile, ….

• Moisture field, moist(i,k,j,?), is 4D

• ? = P_QV, P_QC, P_QR, P_QI,P_QS,

P_QG (module_state_description.F)

• PARAM_FIRST_SCALAR IF ( P_QI .ge. PARAM_FIRST_SCALAR ) . . .

Page 29: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

P_QV, P_QC, P_QR, …

Registry

package kesslerscheme mp_physics==1 - moist:qv,qc,qr

package linscheme mp_physics==2 - moist:qv,qc,qr,qi,qs,qg

package ncepcloud3 mp_physics==3 - moist:qv,qc,qr

package ncepcloud5 mp_physics==4 - moist:qv,qc,

Page 30: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

What you might need to do ?

Run existing codes

(namelist.input)

Physics Buffet

mp_physics = 2, ra_lw_physics = 1, ra_sw_physics = 1, bl_sfclay_physics = 1, bl_surface_physics = 1, bl_pbl_physics = 1, cu_physics = 1,

Page 31: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

Run existing codes

Modify existing codes

Plug in your own codes

What you might need to do ?

Page 32: WRF Model: Physics Implementation OUTLINE Physics Schemes Three_level Structure Rules for WRF physics WRF Physics Features WRF Language What you might.

WRF Development Team

Numerics and Software

(J. Klemp)

Data Assimilation (T. Schlatter)

Analysis and Validation

(K. Droegemeier)

Community Involvement

(W. Kuo)

Operational Implementation

(G. DiMego)

Ensemble Forecasting

(D. Stensrud)

Data Handling and Archive (G. DiMego)

NCEP Requirements

(G. DiMego)

AFWA Requirements

(M. Farrar)

Wo

rkin

g G

rou

ps

Standard Initialization (J. McGinley)

3-D Var (J. Derber)

4-D Var (D. Barker)

Dynamic Model Numerics

(W. Skamarock)

Software Architecture,

Standards, and Implementation (J. Michalakes) Regional Climate

Modeling (proposed)

Workshops, Distribution, and Support

(J. Dudhia)

Model Physics (J. Brown)

Atmospheric Chemistry (P. Hess)

Analysis and Visualization (L. Wicker)

Model Testing and Verification

(C. Davis)Land Surface

Models (proposed)