Presentation is loading. Please wait.

Presentation is loading. Please wait.

November 21 st 2002 Summer 2009 WRFDA Tutorial WRF-Var System Overview Xin Zhang, Yong-Run Guo, Syed R-H Rizvi, and Michael Duda.

Similar presentations


Presentation on theme: "November 21 st 2002 Summer 2009 WRFDA Tutorial WRF-Var System Overview Xin Zhang, Yong-Run Guo, Syed R-H Rizvi, and Michael Duda."— Presentation transcript:

1 November 21 st 2002 Summer 2009 WRFDA Tutorial WRF-Var System Overview Xin Zhang, Yong-Run Guo, Syed R-H Rizvi, and Michael Duda

2 November 21 st 2002 Summer 2009 WRFDA Tutorial1 Outline 1. WRF-Var in the WRF Modeling System 2. WRF-Var Software 3. WRF-Var Implementation

3 November 21 st 2002 Summer 2009 WRFDA Tutorial2 WRF-Var in the WRF Modeling System

4 November 21 st 2002 Summer 2009 WRFDA Tutorial3 WRF-Var in the WRF Modeling System Blue --> Supported by WRF-Var Team WRF-Var

5 November 21 st 2002 Summer 2009 WRFDA Tutorial4 Blue --> Supported by WRF-Var Team 1. Prepare BE data WRF-Var in the WRF Modeling System Background Error (gen_be) B0B0 WRF-Var

6 November 21 st 2002 Summer 2009 WRFDA Tutorial5 Prepare BE statistics J(x) = (x - x b ) T B -1 (x - x b ) + (y o - Hx) T R -1 (y o - Hx)  For initial testing, default background error statistics may be used  be.dat file (CV option 5) from test case tar file can only be used with the domain from online tutorial  be.dat.cv3 (CV option 3) from source code tar file can be used for general test domains  Ultimately, these should be specific to the particular model domain (and season)

7 November 21 st 2002 Summer 2009 WRFDA Tutorial6 2. Prepare background (WPS and real) WRF-Var in the WRF Modeling System Background Error (gen_be) xbxb Background Preprocessing (WPS, real) x lbc B0B0 Cold-Start Background WRF-Var

8 November 21 st 2002 Summer 2009 WRFDA Tutorial7 Prepare background J(x) = (x - x b ) T B -1 (x - x b ) + (y o - Hx) T R -1 (y o - Hx)  In “cold-start” mode: accomplished by running the WPS and real programs  The background is essentially the wrfinput_d01 file  In “cycling” mode: the output of the WRF model  WRF can output wrfinput-formatted files used for cycling

9 November 21 st 2002 Summer 2009 WRFDA Tutorial8 Blue --> Supported by WRF-Var Team 3. Prepare observations (run OBSPROC) WRF-Var in the WRF Modeling System Background Error (gen_be) xbxb Background Preprocessing (WPS, real) x lbc B0B0 y o, R Cold-Start Background Radar in ASCII Radiance in BUFR Observation Preprocessing (OBSPROC) WRF-Var Note: Radar and radiance data do not pass through the OBSPROC program!

10 November 21 st 2002 Summer 2009 WRFDA Tutorial9  Observation input for WRF-Var is supplied through observation preprocessor, OBSPROC  Except radar and satellite radiances  Observation error covariance also provided by OBSPROC (R is a diagonal matrix)  Separate input file (ASCII) for radar, both reflectivity and radial velocity.  Separate input file for satellite radiances Prepare observations (y 0 ) J(x) = (x - x b ) T B -1 (x - x b ) + ( y o - Hx) T R -1 ( y o - Hx)

11 November 21 st 2002 Summer 2009 WRFDA Tutorial10 Blue --> Supported by WRF-Var Team 4. Run WRF-Var WRF-Var in the WRF Modeling System Background Error (gen_be) xbxb xaxa Background Preprocessing (WPS, real) x lbc B0B0 y o, R Cold-Start Background Radar in ASCII Radiance in BUFR Observation Preprocessing (OBSPROC) WRF-Var

12 November 21 st 2002 Summer 2009 WRFDA Tutorial11 Blue --> Supported by WRF-Var Team 5. Update boundary conditions (UPDATE_BC) WRF-Var in the WRF Modeling System Background Error (gen_be) xbxb xaxa Update Lateral & Lower BCs (UPDATE_BC) Background Preprocessing (WPS, real) x lbc B0B0 y o, R Cold-Start Background Radar in ASCII Radiance in BUFR Observation Preprocessing (OBSPROC) WRF-Var

13 November 21 st 2002 Summer 2009 WRFDA Tutorial12 Update boundary conditions  After creating an analysis, x a, we have changed the initial conditions for the model  However, tendencies in wrfbdy_d01 (and possibly wrflbdy ) file are valid for background, x b  The update_bc program adjusts these tendencies based on the difference x a - x b  Of course, if x a was produced for reasons other than running WRF, there is probably not a need to update boundary conditions

14 November 21 st 2002 Summer 2009 WRFDA Tutorial13 Blue --> Supported by WRF-Var Team 6a. Run forecast (cold-start mode) WRF-Var in the WRF Modeling System Background Error (gen_be) Forecast (WRF) xbxb xaxa Update Lateral & Lower BCs (UPDATE_BC) Background Preprocessing (WPS, real) x lbc B0B0 y o, R Cold-Start Background Radar in ASCII Radiance in BUFR Observation Preprocessing (OBSPROC) WRF-Var

15 November 21 st 2002 Summer 2009 WRFDA Tutorial14 WRF-Var in the WRF Modeling System Note the arrow from ARW MODEL to WRF-Var!

16 November 21 st 2002 Summer 2009 WRFDA Tutorial15 Blue --> Supported by WRF-Var Team 6b. Run forecast (cycling mode) WRF-Var in the WRF Modeling System Background Error (gen_be) Forecast (WRF) xbxb xaxa Update Lateral & Lower BCs (UPDATE_BC) Background Preprocessing (WPS, real) x lbc Cycled Background B0B0 y o, R Radar in ASCII Radiance in BUFR xfxf Observation Preprocessing (OBSPROC) WRF-Var

17 November 21 st 2002 Summer 2009 WRFDA Tutorial16 Background Error (BE) for WRF-Var One important question from WRF-Var users is “What background errors are best for my application?” Create your own once you have run your system for a few weeks to a month Implement, tune, and iterate The utility gen_be has been developed at NCAR for use in calculating these BEs

18 November 21 st 2002 Summer 2009 WRFDA Tutorial17 Blue --> Supported by WRF-Var Team 7. WRF-Var/WRF Ultimate Configuration WRF-Var in the WRF Modeling System Background Error (gen_be) Forecast (WRF) xbxb xaxa Update Lateral & Lower BCs (UPDATE_BC) Background Preprocessing (WPS, real) x lbc Cycled Background B0B0 y o, R Cold-Start Background Radar in ASCII Radiance in BUFR xfxf Observation Preprocessing (OBSPROC) WRF-Var

19 November 21 st 2002 Summer 2009 WRFDA Tutorial18 WRF-Var Software

20 November 21 st 2002 Summer 2009 WRFDA Tutorial19 Use of the WRF Software Framework WRF-Var relies on the WRF Software framework for – Distributed memory parallelism (halo exchanges, etc.) – Input/Output of first guess and analysis files – Parallel transposes WRF-Var also uses – The WRF Registry mechanism to handle definitions of fields, halos, and transposes – The WRF build system (clean, configure, compile)

21 November 21 st 2002 Summer 2009 WRFDA Tutorial20 WRF-Var Code Organization Besides the directories for WRF, the WRFDA tar file contains a “var” directory, which holds all of the WRF-Var code

22 November 21 st 2002 Summer 2009 WRFDA Tutorial21 WRF-Var Code Organization Generally, each subdirectory of “da” contains a Fortran module with the same name

23 November 21 st 2002 Summer 2009 WRFDA Tutorial22 WRF-Var Code Organization da_metar.f90 contains a Fortran module Each.inc file corresponds to a subroutine within the module

24 November 21 st 2002 Summer 2009 WRFDA Tutorial23 WRF-Var Implementation

25 November 21 st 2002 Summer 2009 WRFDA Tutorial24 WRF-Var Formulation  WRF-Var actually uses an incremental formulation of the 3DVAR problem  Define the increment x’ = x - x b  Also, if x’ is small, H(x) = H(x b + x’) ≈ H(x b ) + Hx’ where H is the linearization of H  Then, the problem becomes with y o’ = y o - H(x b ) J(x) = (x - x b ) T B -1 (x - x b ) + (y o - H(x)) T R -1 (y o - H(x)) J(x’) = (x’) T B -1 (x’) + (y o ’ - Hx’) T R -1 (y o ’ - Hx’)

26 November 21 st 2002 Summer 2009 WRFDA Tutorial25 WRF-Var Formulation  Next, define the control variable transform U such that x’ = Uv.  v is the analysis increment in control variable space  B is approximated by UU T  WRF-Var actually minimizes  After minimization, the analysis, x a, is given by J(v) = v T v + (y o ’ - HUv) T R -1 (y o ’ - HUv) x a = x b + Uv

27 November 21 st 2002 Summer 2009 WRFDA Tutorial26 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

28 November 21 st 2002 Summer 2009 WRFDA Tutorial27 Reads grid dimensions from “namelist.input” file. Use WRF framework’s distributed memory capability to initialize tile, memory, patch dimensions, etc. Setup Frame

29 November 21 st 2002 Summer 2009 WRFDA Tutorial28 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

30 November 21 st 2002 Summer 2009 WRFDA Tutorial29 Reads WRF-Var data assimilation options from “namelist.input” file. Performs consistency checks between namelist options. Read Namelist

31 November 21 st 2002 Summer 2009 WRFDA Tutorial30 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

32 November 21 st 2002 Summer 2009 WRFDA Tutorial31 Reads in the first-guess field. Format depends on namelist option : “fg_format” ; 1= WRF, etc. Extracts necessary fields. Creates background FORTRAN 90 derived data type “xb” e.g. xb % mix, xb % u(:,:,:), …. Setup Background (First-guess)

33 November 21 st 2002 Summer 2009 WRFDA Tutorial32 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

34 November 21 st 2002 Summer 2009 WRFDA Tutorial33 Reads in background error statistics. Extracts necessary quantities – eigenvectors, eigenvalues, lengthscales, regression coefficients, etc (see “WRF-Var Background Error Estimation”). Creates background error FORTRAN 90 derived data type “be” – e.g. be % v1 % evec(:,:), be % v2 % eval(:), etc, …. Setup Background Errors (BE)

35 November 21 st 2002 Summer 2009 WRFDA Tutorial34 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

36 November 21 st 2002 Summer 2009 WRFDA Tutorial35 Reads in observations. Format depends on namelist variable “ob_format” 1 = BUFR, 2 = ASCII “WRF-Var” format. Creates observation FORTRAN 90 derived data type “ob” – e.g. ob % metar(:), ob % sound(:) % u(:), etc, …. Identifies Obs outside/inside the domain Setup Observations

37 November 21 st 2002 Summer 2009 WRFDA Tutorial36 Obs. on one processor’s halo Obs. on neighboring processor * Observations in Distributed Memory Halo Region Observation For global option obs. on East and West boundaries are duplicated

38 November 21 st 2002 Summer 2009 WRFDA Tutorial37 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

39 November 21 st 2002 Summer 2009 WRFDA Tutorial38 Calculates “model equivalent” B of observation O through interpolation and change of variable. Computes observation minus first guess (O-B) value. Creates innovation vector FORTRAN 90 derived data type “iv” – e.g. iv % metar(:), iv % qscat(:) % u, iv % sound(:) % u(:), etc …. Calculate Innovation Vector (O-B)

40 November 21 st 2002 Summer 2009 WRFDA Tutorial39 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

41 November 21 st 2002 Summer 2009 WRFDA Tutorial40 Use conjugate gradient method (a) Initializes analysis increments to zero. (b) Computes cost function (if desired). (c) Computes gradient of cost function. (d) Uses cost function and gradient to calculate new value of analysis control variable, v Iterate (b) to (d) Minimize Cost Function

42 November 21 st 2002 Summer 2009 WRFDA Tutorial41 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

43 November 21 st 2002 Summer 2009 WRFDA Tutorial42 Once WRF-Var has found a converged control variable, convert control variable to model space analysis increments Calculate: analysis = first-guess + analysis increment Performs consistency checks, e.g., remove negative humidity etc. Compute Analysis

44 November 21 st 2002 Summer 2009 WRFDA Tutorial43 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

45 November 21 st 2002 Summer 2009 WRFDA Tutorial44 Compute O-B, O-A statistics for all observation types and variables. Compute A-B (analysis increment) statistics for all model variables and levels. Statistics include minimum, maximum (and their locations), mean and standard deviation. Compute Diagnostics

46 November 21 st 2002 Summer 2009 WRFDA Tutorial45 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

47 November 21 st 2002 Summer 2009 WRFDA Tutorial46 Outputs analysis in native model format. Choice is made through namelist option “fg_format” 1 = WRF, etc. Also output analysis increments (for diagnostic purposes) in native model format. Switch off by setting WRITE_INCREMENTS =.FALSE. in namelist.input. Output Analysis

48 November 21 st 2002 Summer 2009 WRFDA Tutorial47 Read Namelist xbxb xaxa yoyo Compute Analysis Calculate O-B Setup Frame Setup Background Setup Background Errors Minimize Cost Function Setup Observations Calculate Diagnostics Output Analysis Diagnostics File Namelist File Tidy Up WRF-Var START WRF-Var END “Outer Loop” B0B0 WRF-Var

49 November 21 st 2002 Summer 2009 WRFDA Tutorial48 Deallocate dynamically-allocated arrays, structures, etc. Timing information. Clean end to WRF-Var. Tidy Up

50 November 21 st 2002 Summer 2009 WRFDA Tutorial49 WRFDA has a dedicated page, similar to the ARW Users’ page: http://www.mmm.ucar.edu/wrf/users/wrfda/ Online WRFDA Resources

51 November 21 st 2002 Summer 2009 WRFDA Tutorial50 From the WRFDA page, one can access: Online WRFDA Resources

52 November 21 st 2002 Summer 2009 WRFDA Tutorial51 Online WRF-Var Tutorial – http://www.mmm.ucar.edu/wrf/users/wrfda/tutorial.html WRF-Var chapter of Users’ Guide – http://www.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_g uide_chap6.htm If further help is needed, try the WRF Users’ Forum http://forum.wrfforum.com/ or ask questions via wrfhelp@ucar.edu Other WRFDA Resources

53 November 21 st 2002 Summer 2009 WRFDA Tutorial52 Questions?


Download ppt "November 21 st 2002 Summer 2009 WRFDA Tutorial WRF-Var System Overview Xin Zhang, Yong-Run Guo, Syed R-H Rizvi, and Michael Duda."

Similar presentations


Ads by Google