wrf-var namelists, diagnostics, and tools wrf-var namelist wrf-var tools and verification

36
WRF-Var Namelists, Diagnostics, and Tools http://www.mmm.ucar.edu/wrf/users/tutorial/tutorial_presentation.htm WRF-Var Namelist WRF-Var Tools and Verification http://www.mmm.ucar.edu/wrf/users/tutorial/200807/VAR/WRF-Var2008JulyTutorial_wrfvarnamelist-HuiShao.pdf http://www.mmm.ucar.edu/wrf/users/tutorial/200807/VAR/wrfvar_tools.pdf see other related detailed tutorial presentations available at

Upload: dale-jonah-jefferson

Post on 15-Jan-2016

368 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

WRF-Var Namelists,

Diagnostics, and Tools

http://www.mmm.ucar.edu/wrf/users/tutorial/tutorial_presentation.htm

WRF-Var Namelist

WRF-Var Tools and Verification

http://www.mmm.ucar.edu/wrf/users/tutorial/200807/VAR/WRF-Var2008JulyTutorial_wrfvarnamelist-HuiShao.pdf

http://www.mmm.ucar.edu/wrf/users/tutorial/200807/VAR/wrfvar_tools.pdf

Please see other related detailed tutorial presentations available at

Page 2: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

namelist.input

&wrfvar1

write_increments=true,

var4d=false,

multi_inc=0,

global=false,

/

&wrfvar2

/

&wrfvar3

ob_format=2,

num_fgat_time=1,

/

&wrfvar4

use_profilerobs=false,

use_satemobs=false,

use_gpspwobs=false,

use_gpsrefobs=false,

use_ssmiretrievalobs=true,

use_qscatobs=false,

/

namelist.output

&WRFVAR1WRITE_INCREMENTS=T, WRFVAR_MEM_MODEL=0, VAR4D=F, MULTI_INC=0, VAR4D_COUPLING=2, GLOBAL=F, PRINT_DETAIL_AIREP=F, PRINT_DETAIL_RADAR=F, PRINT_DETAIL_RAD=F, PRINT_DETAIL_XA=F, PRINT_DETAIL_XB=F, PRINT_DETAIL_OBS=F, PRINT_DETAIL_F_OBS=F, PRINT_DETAIL_MAP=F, PRINT_DETAIL_GRAD=F, PRINT_DETAIL_REGRESSION=F, PRINT_DETAIL_SPECTRAL=F, PRINT_DETAIL_TESTING=F, PRINT_DETAIL_PARALLEL=F, PRINT_DETAIL_BE=F, PRINT_DETAIL_TIMING=F, CHECK_MAX_IV_PRINT=T / &WRFVAR2 ANALYSIS_ACCU=900, CALC_W_INCREMENT=F, DT_CLOUD_MODEL=F, WRITE_QCW=F, WRITE_QRN=F, WRITE_QCI=F, WRITE_QSN=F, WRITE_QGR=F, WRITE_FILTERED_OBS=F / &WRFVAR3 FG_FORMAT=1, OB_FORMAT=2, NUM_FGAT_TIME=1 / &WRFVAR4 USE_SYNOPOBS=T, USE_SHIPSOBS=T, USE_METAROBS=T, USE_SOUNDOBS=T, USE_MTGIRSOBS=T, USE_PILOTOBS=T, USE_AIREPOBS=T, USE_GEOAMVOBS=T, USE_POLARAMVOBS=T, USE_BOGUSOBS=F, USE_BUOYOBS=T, USE_PROFILEROBS=F, USE_SATEMOBS=F, USE_GPSPWOBS=F, USE_GPSREFOBS=F, USE_SSMIRETRIEVALOBS=T, USE_SSMITBOBS=F, USE_SSMT1OBS=F, USE_SSMT2OBS=F, USE_QSCATOBS=F,

Page 3: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Namelist - WRFVAR1

• Write_increments– .false. : Default– .true. : Output analysis increment file

“analysis_increments” (analysis-background). The file is a binary file, generated every time you run WRF-Var by using a FORTRAN code given in WRFVAR/da/da_setup_structures/da_write_increments.inc .

You could still produce your own analysis increment file by extracting first guess from analysis files (both in netcdf format). The advantage of using this “analysis_increment” is to avoid spurious increments (because it is generated directly from the code without including the first guess).

-rw-r--r-- 1 huishao ncar 43271476 Jul 7 16:27 analysis_increments lrwxrwxrwx 1 huishao ncar 32 Jul 7 16:27 be.dat -> /ptmp/huishao/tutorial/be/be.dat -rw-r--r-- 1 huishao ncar 1600 Jul 7 16:27 check_max_iv -rw-r--r-- 1 huishao ncar 313 Jul 7 16:27 cost_fn

Page 4: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

• Print_detail_*– .false. : Default– .true. : Output extra diagnostics

Namelist - WRFVAR1

jo_geoamv 0.118917669698E+03

jo%geoamv_u 0.371704152820E+02

jo%geoamv_v 0.817472544158E+02

jo%total 0.120493680229E+03

…Calculate grad_v(jo) iter= 0 cv_jb.cv_jb = 0.00000000000000E+00 cv_je.cv_je = 0.00000000000000E+00 xhat.xhat = 0.00000000000000E+00 j_grad.j_grad = 0.93533513206338E+02Calculate grad_v(j) iter= 0 cv_jb.cv_jb = 0.00000000000000E+00 cv_je.cv_je = 0.00000000000000E+00 xhat_jb.xhat_jb = 0.00000000000000E+00 xhat_je.xhat_je = 0.00000000000000E+00 cv_xhat_jp.cv_xhat_jp = 0.00000000000000E+00 j_grad.j_grad = 0.93533513206338E+02

Inner iteration stopped after 19 iterations jo_geoamv 0.985110326458E+02 jo%geoamv_u 0.292654551874E+02 jo%geoamv_v 0.692455774585E+02 jo%total 0.100697022398E+03…

Calculate grad_v(jo) iter= 19 cv_jb.cv_jb = 0.00000000000000E+00 cv_je.cv_je = 0.00000000000000E+00 xhat.xhat = 0.11886920460937E+02 j_grad.j_grad = 0.12125274158977E+02Calculate grad_v(j) iter= 19 cv_jb.cv_jb = 0.00000000000000E+00 cv_je.cv_je = 0.00000000000000E+00 xhat_jb.xhat_jb = 0.11886920460937E+02 xhat_je.xhat_je = 0.00000000000000E+00 cv_xhat_jp.cv_xhat_jp = 0.00000000000000E+00 j_grad.j_grad = 0.66566955863646E-02

Iteration 0

Iteration 19Example: print_detail_grad=.true.

Page 5: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

• Analysis_accu– 900 (Sec): Default.

If |analysis time - first guess time| > Analysis_accu, WRF-Var will give a warning like “Wrong xb time found???”.

Namelist - WRFVAR2

if ( num_fgat_time == 1 ) then write(unit=xb_date,fmt='(i4.4,2("-",i2.2),"_",i2.2,2(":",i2.2),".0000")') & grid%start_year, grid%start_month, grid%start_day, & grid%start_hour, grid%start_minute,grid%start_second

len = len_trim(ANALYSIS_DATE)

write(unit=an_date(1:len), fmt='(a)') trim(ANALYSIS_DATE)

seconds = int(da_diff_seconds(an_date, xb_date))

if (seconds > ANALYSIS_ACCU) then write(unit=message(1),fmt='(A,A,A,A)') & "xb_date=",xb_date," an_date=", an_date write(unit=message(2),fmt='(A,I6,A,I6)') & "diff=",seconds," ANALYSIS_ACCU=",ANALYSIS_ACCU message(3)="=======> Wrong xb time found???" call da_warning(__FILE__,__LINE__,message(1:3)) end if end if

WRFDA/var/da/da_setup_structures/da_setup_firstguess_wrf.inc

Page 6: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

• Fg_format: The format of the first guess of WRF-Var.

– 1 = WRF-ARW: Default (recommended).

• Ob_format: The format of the conventional and satellite retrieval observation data going into WRF-Var.

– 1 = BUFR (Please use this option with caution).

– 2 = ASCII (ob.ascii): Default. Both formats are supported by OBSPROC.

• Num_fgat_time: number of data time window (slot) used in WRF-Var.

– 1 = 3DVAR: Default.

– >1 apply to FGAT and 4D-Var.

Namelist - WRFVAR3

First-Guess at Appropriate Time (FGAT): An option in WRF-3DVar that allows the observations to be applied at the correct time, rather than at the middle of the time window.

09Z 10Z 11Z 12Z 13Z 14Z 15Z

obs

FG

09Z 10Z 11Z 12Z 13Z 14Z 15Z

obsobs obs obs obs obs obs

FG FG FG FG FG FGFG

Analysis timeTime window=3hrNum_fgat_time=1

Time window=3hrNum_fgat_time=7

Page 7: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Namelist - WRFVAR4

• Use_obstype: Set to true to use particular observation types.– E.g, use_gpsrefobs=.true.: Assimilate GPS refractivity

observations if any available in the data file.

• Use_obs_errfac: Option for using tuned observation error.– .false. : Default. At this moment, please use this option.– .true. : Use tuned observation error statistics (need to

produce errfac.dat beforehand created by da_tune_obs_desrozier.f).

Page 8: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Namelist - WRFVAR5

• Check_max_iv: Option for WRF-Var internal QC procedure, which is basically a maximum observation error check based on the innovations (Obs-Background).– .true. : default

– .false: Use this option only if the observation data have been cleaned before going into WRF-Var.

• Put_rand_seed:• Omb_set_rand: • Omb_add_noise:

For observation error tuning.

Page 9: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

• Obs_qc_pointer: – 0 : Default, Good data. For ASCII observation files generated by OBSPROC, QC flag value ranges

from -88 to 88 (please refer to the latest QC flags from OBSPROC).– qc = -88 : Missing data qc = 0 : Good data qc = -77 : Outside of horizontal domain qc = -15 : Wind direction <0 or > 360 degrees qc = -14 : Negative wind speed vector norm qc = -13 : Null wind speed vector norm qc = -12 : Spike in the wind profile qc = -11 : Null temperature or dew point qc = -10 : Superadiabatic temperature qc = -9 : Spike in Temperature profile qc = -8 : Height higher than model lid's height qc = -5 : h,p or T from standard atmosphere qc = -4 : h,p or T from background qc = 1 : convective adjustement correction qc = 2 : surface_correction qc = 3 : Height recovery from hydrostaic + OBS qc = 4 : Height recovery from reference + OBS qc = 88 : Any other check

For PREBUFR observation files generated by OBSPROC, qc = 0 indicates the best quality (please refer to the latest QC flags from OBSPROC).

Namelist - WRFVAR5 (Cont.)

if (qc .le. 128 .and. qc .ge. -5 ) then qz = 0else qz = 4 ! >= 4 is rejectendif

Page 10: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Namelist - WRFVAR6

The following namelist variables are for minimization options:

• Max_ext_its: Number of outer loops.– 1: Default. Only one outer loop.– Currently, maximum outer loop number is 10.

• Ntmax: Maximum number of iterations in an inner loop for the minimization in WRF-Var.

– 200: Default. The minimization in the inner loop can not exceed 200.

• Eps: Value for minimization convergence criterion. It is an array with the dimension=max_ext_its.

– 0.01(max_ext_its): The minimization is considered to converge when the norm of the cost function gradient is reduced at least 2 orders.

Minimization

i≥ntmaxor

|Jnew|< eps• |J|

Update first guess

j ≥ max_ext_its

No

Yes

i=i+1

j=j+1

No

Yes

Outer

Inner

Page 11: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Namelist - WRFVAR7• Rf_passes: number of passes of

recursive filter used in WRF-Var to define the horizontal correlation shape of background errors.

• Var_scaling1(2,…5): The tuning factor of background error covariance for control variables. Control variables:

1: stream function 2: unbalanced potential velocity 3: unbalanced temperature 4: pseudo relative humidity 5: Unbalanced surface pressure

• Len_scaling1(2,…5): The tuning factor of scale-length for control variables.

An example of pseudo single observation test (PSOT)

T

u

Page 12: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

• Test_transforms: – .false. (default): Run data assimilation.

– .true.: Perform adjoint check for the code debugging.

Namelist - WRFVAR10

• Cv_options_hum: – 1 (default): Please do not change.

• Check_rh: 0 : No supersaturation check after minimization.1: With the supersaturation (rh> 100%) and minimum rh (rh<10%) check, and make the local adjustment of q.2 (default): With the supersaturation (rh> 95%) and minimum rh (rh<11%) check, and make the multi-level q adjustment under the constraint of integrated water vapor in column conserved.

Namelist - WRFVAR11

Page 13: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Namelist - WRFVAR11 (Cont.)

• Set_omb_rand_fac• Seed_array1• Seed_array2• Sfc_assi_options:

– 1 (default): The surface observations will be assimilated based on the lowest model level first guess.

– 2: The surface observations will be assimilated based on surface similarity theory in PBL. Innovations are computed based on 10-m wind and 2-m temperature & moisture.

For ensemble perturbation purpose.

Please use this option with caution, since the results could be very sensitive.

Page 14: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

• Lat_stats_option: .False. (default). Only set it true when be.dat is computed with i-dependence (approximately latitude-dependence) .

Namelist - WRFVAR11

The following namelist variables are related to Background Error (BE) computation and should be consistent to those in BE file (be.dat) computed from GEN_BE (July 22: BE talk).

Namelist - WRFVAR13

• Vert_corr: 2 (default). Please do not change it at this moment.• Vertical_ip: 0 (default). Not used.• Vert_evalue: 1 (default). Please do not change it at this moment.• Max_vert_var1(2,…5): Maximum truncation value (percentage) used in the

vertical eigenvector decomposition in BE calculation.

• Balance_type: 1 (default). Not used.

Namelist - WRFVAR12

Page 15: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

• num_pseudo     = 0 (default),   Set the number of pseudo observations. Currently only the value of 1   is allowed, i.e. num_pseudo = 1 --- the SINGLE-OBS test.• pseudo_x       = 1.0 (default),   Set the x-position (J) of the OBS in unit of grid-point.• pseudo_y       = 1.0 (default),   Set the y-position (I) of the OBS in unit of grid-point.• pseudo_z       = 1.0 (default),   Set the z-position (ZK) of OBS with the vertical level index.   In MM5, the top level has z=1, and bottom level, z=kx.• pseudo_val     = 1.0 (default),   Set the innovation of the OBS variable: u/v at m/s, p at Pa, t at degree,   and q at kg/kg.• pseudo_err     = 1.0 (default),   Set the OBS error of the OBS variable.

Namelist - WRFVAR15

• pseudo_var     = 't' (default)   Set the name of the OBS variable:   'u' = X-direction component of wind,   'v' = Y-direction component of wind,   't' = Temperature,   'p' = Pressure,   'q' = Specific humidity,   'pw' = Total precipitable water,      'ztd' = Zenith tropospheric delay,   'ref' = Refractivity

Namelist - WRFVAR19

The namelist variables here are for pseudo single-observation test (PSOT) (July 22: Single ob experiment talk).

u v

T q

Page 16: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

• Analysis_type: Indicate job type of WRF-Var.– 3D-VAR (default): Run 3D-Var data assimilation.– VERIFY: Run WRF-Var verification mode ( then Check_max_iv=.false.

and ntmax=0 by default). July 22: WRF-Var tools Talk.– QC-OBS: Run WRF-Var QC procedure. By combined with Check_max_iv=.true. and ntmax=0, you can produce

a WRF-Var filtered (QCed) observation data set (filtered_obs) without running the data assimilation.

Namelist - WRFVAR17

In AMPS, 60% SYNOP obs were rejected.

1st screen/QC procedure performed by observation preprocessor (OBSPROC).

2nd screen/QC procedure performed in WRF-Var.

Main impact of 2nd screen/QC is on surface observations*.

Rejection rates will reduce with higher resolution, higher-order interpolation.

* Surface observation rejection here is mostly due to surface elevation check with sfc_assi_options=1. Such a rejection may be bypassed by using sfc_assi_options=2.

Page 17: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

check_max_ivcost_fnfiltered_obs (analysis_type=“QC-OBS”)grad_fngts_omb_omajostatisticsunpert_obspert_obs (omb_add_noise=true)runtime.log or rsl.out.0000

WRF-Var diagnostics

ASCII output files in the WRF-Var working directory

Page 18: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

For outer iteration 1, Total Rejections for Synop follows:

Number of failed u-wind observations: 25 on 230Number of failed v-wind observations: 30 on 230Number of failed pressure observations: 5 on 230Number of failed temperature observations: 0 on 230Number of failed mixing ratio observations: 1 on 230Finally Total Synop rejections 61 on 1150

Err_max failed:ID=47843FM-12 SYNOP Ix= 204 Ixf= 30 Err_max ratio = 1.3 for V inv, error: 0.708141E+01 0.110000E+01Err_max < 0 ==> 0.0 -4444440.0 5.0 for V OBS ID: 98752FM-12 SYNOP LA/LON/ELV: 9.93 125.51 46.00

check_max_iv

&wrfvar1 CHECK_MAX_IV_PRINT=true (default)

&wrfvar5 CHECK_MAX_IV=true (default)

Check for observations with innovations (O-B) larger than [ factor observation error ]

factors are hard-wired in var/da/da_control/da_control.f90

! Maximum error check factors: inV > (Obs_error*factor) --> fails_error_max real, parameter :: max_error_t = 5.0, & max_error_uv = 5.0, & max_error_pw = 5.0, & max_error_ref = 5.0, & max_error_rh = 5.0, & max_error_q = 5.0, & max_error_p = 5.0, & max_error_tb = 5.0, & max_error_thickness = 5.0, & max_error_rv = 5.0, & max_error_rf = 5.0, & max_error_buv = 500.0, & max_error_bt = 500.0, & max_error_bq = 500.0, & max_error_slp = 500.0

check_max_iv is written out in var/da/da_tools/da_max_error_qc.inc

Information of observations that fail check_max_iv check

Page 19: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

cost_fn and grad_fn

Outer EPS Inner J Jb Jo Jc Je JpIter Iter 1 0.100E-01 0 37293.267 0.000 37293.267 0.000 0.000 0.000 1 0.100E-01 1 36140.373 1.014 36139.360 0.000 0.000 0.000 1 0.100E-01 2 35693.377 2.264 35691.114 0.000 0.000 0.000 1 0.100E-01 3 34953.968 6.881 34947.087 0.000 0.000 0.000 1 0.100E-01 4 34516.190 11.563 34504.627 0.000 0.000 0.000 . . . 1 0.100E-01 59 29976.227 1088.245 28887.982 0.000 0.000 0.000 1 0.100E-01 60 29975.699 1089.784 28885.915 0.000 0.000 0.000 1 0.100E-01 61 29974.427 1093.616 28880.811 0.000 0.000 0.000

&wrfvar11 CALCULATE_CG_COST_FN=false (default)

Outer EPS Inner J Jb Jo Jc Je JpIter Iter 1 0.100E-01 0 37293.267 0.000 37293.267 0.000 0.000 0.000 1 0.100E-01 61 29974.427 1093.616 28880.811 0.000 0.000 0.000

Outer EPS Inner G Gb Go Ge GpIter Iter 1 0.100E-01 0 1619.534 0.000 1619.534 0.000 0.000 1 0.100E-01 61 12.931 46.768 48.511 0.000 0.000

&wrfvar11 CALCULATE_CG_COST_FN=true

cost_fn and grad_fn are used in var/graphics/ncl/plot_cost_grad_fn.ncl

cost_fn and grad_fn are written out in var/da/da_minimisation/da_calculate_j.inc

b: background termo: observation termc: JcDFI terme: alpha termp: radiance variational bias correction term

Page 20: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

gts_omb_oma

gts_omb_oma is written out in var/da/da_obs_io/da_write_obs.inc

synop 995 1 1 176556 21.51 -104.90 89973.8836463 3.3147587 1.2193668 2 1.1000000 0.1849281 -1.5412909 -1.4225501 2 1.1000000 -1.6862257 295.5511624 2.5999150 2 2.0000000 1.3689324 89973.8836463 -273.5464584 2 100.0000000 -236.6028635 0.0134689 0.0048657 0 0.0036749 0.0050584

sound 121 49 1 4978897 16.26 -61.51 5000.0000000 3.1528830 0.0000000 -888888 2.7000000 0.0000000 -1.7396925 0.0000000 -888888 2.7000000 0.0000000 204.6500000 0.0000000 -888888 1.0000000 0.0000000 -888888.0000000 0.0000000 -888888 -888888.0000000 0.0000000 55 2 104220 68.70 -52.75 99500.0000000 -7.5305439 0.0000000 -888888 1.1000000 0.0000000 1.6861190 0.0000000 -888888 1.1000000 0.0000000 -888888.0000000 0.0000000 -888888 1.0000000 0.0000000 -888888.0000000 0.0000000 -888888 -888888.0000000 0.0000000

obstype number of obsnumber of levelsobs index, level index, station id, lat, lon, pressure,

(O, O-B, qcflag, Oerr, O-A)u,(O, O-B, qcflag, Oerr, O-A)v,(O, O-B, qcflag, Oerr, O-A)t,(O, O-B, qcflag, Oerr, O-A)p,(O, O-B, qcflag, Oerr, O-A)q

Synop: u, v, t, p, qMetar: u, v, t, p, qShip: u, v, t, p, qGeoamv: u, vPolaramv: u, vGpspw: tpwSound: u, v, t, qSonde_sfc: u, v, t, p, qAirep: u, v, tPilot: u, vSatem: thicknessQscat: u, vProfiler: u, vBuoy: u, v, t, p, qAirsr: t, qGpsref: ref

listed variables of each observation type vary:

gts_omb_oma is used invar/graphics/ncl/plotobs.nclvar/da/da_verif_obs/da_verif_obs.f90

complete point-by-point, detailed observation information

• SATOB are separated as geoamv and polaramv in WRF-Var

• AMDAR and AIREP are grouped as airep in WRF-Var

Page 21: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

statistics

Diagnostics of OI for synop

var u (m/s) n k v (m/s) n k t (K) n k p (Pa) n k q (kg/kg) n k

Number: 331 332 355 330 361 Minimum(n,k): -5.4017 363 0 -5.4086 878 0 -9.7206 592 0 -390.7893 931 0 -0.4461E-02 719 0 Maximum(n,k): 5.0466 886 0 5.2878 630 0 7.7302 421 0 471.9343 944 0 0.5408E-02 787 0 Average : -0.8471 -0.1995 -1.1171 20.4177 -0.2525E-03 RMSE : 2.3023 2.1150 3.1978 116.1518 0.8045E-03

Diagnostics of AO for synop

var u (m/s) n k v (m/s) n k t (K) n k p (Pa) n k q (kg/kg) n k

Number: 331 332 355 330 361 Minimum(n,k): -4.2496 172 0 -5.0463 683 0 -8.9005 583 0 -472.9290 931 0 -0.4152E-02 719 0 Maximum(n,k): 5.5540 886 0 5.7990 630 0 8.8192 421 0 392.4096 944 0 0.5058E-02 1 0 Average : -0.0847 -0.0376 -0.4283 1.1709 0.1625E-04 RMSE : 1.8650 1.8093 2.1990 101.3816 0.5958E-03

Minimum of gridded analysis increments

Lvl u i j v i j t i j p i j q i j

1 -1.8915 17 32 -1.9965 36 24 -5.2526 20 35 -314.7470 44 1 -0.1451E-02 18 32 2 -1.9476 16 32 -2.0070 36 24 -3.0142 21 36 -311.2885 44 1 -0.1438E-02 18 33 Maximum of gridded analysis increments

Lvl u i j v i j t i j p i j q i j

1 1.3750 41 8 1.5739 28 12 3.2994 24 20 197.8351 28 2 0.1401E-02 39 8 2 1.4844 40 8 1.6180 28 13 1.7471 7 20 195.5165 28 2 0.1591E-02 39 8

Mean of gridded analysis increments

Lvl u v t p q

1 -0.0327 0.0632 -0.1477 17.4414 -0.1047E-03 2 -0.0031 0.0736 0.0116 17.2543 -0.8066E-04

RMSE of gridded analysis increments

Lvl u v t p q

1 0.7546 0.6040 1.3120 72.0441 0.4258E-03 2 0.7995 0.6483 0.9169 71.2614 0.4476E-03

statistics is written out separately by each observation type with non-zero observation numberFor example, var/da/da_sound/da_print_stats_sound.inc

da_oi_stats_sound.inc da_ao_stats_sound.inc

var/da/da_synop/da_print_stats_synop.inc da_oi_stats_synop.inc da_ao_stats_synop.inc

domain-wise O-B and O-A information

Page 22: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

jo

jo is written out in var/da/da_minimisation/da_get_var_diagnostics.inc

Sum of individual Jo (numbers in red boxes)equals the printout value in rsl.out.0000 Final value of Jo = 28880.81069

cost function of each observation type

Blue boxes are observation error factor used in WRF-Var.

To apply observation error tuning factors:prepare an ASCII errfac.dat (or an output from da_util/da_tune_obs_desroziers.f90 )and run WRF-Var with&wrfvar4 use_obs_errfac=true

errfac.dat is read in var/da/da_obs_io/da_read_errfac.inc

assigned in obsproc

observation error = observation error factor

factor = 1.0 when&wrfvar4 use_obs_errfac=false (default)

Page 23: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

obstype obs numberlevel numerobs index, level index,

unpert_obs (y=H(x’(yo)))synop 990 1 1 1 -0.4190450E+00 0.2579359E-01 0.2115635E+00 0.1756130E+02 -0.4622692E-04 -0.9999999E+06 -0.9999999E+06

sound 160 46 1 1 -0.5809316E+00 -0.3796593E+00 0.6811523E+00 -0.3070524E-03 -0.9999999E+06 -0.9999999E+06 -0.9999999E+06 1 2 -0.7361224E+00 -0.3743801E+00 -0.8888880E+06 -0.8888880E+06 -0.9999999E+06 -0.9999999E+06 -0.9999999E+06

unpert_obs is written out in var/da/da_obs_io/da_write_y.incpert_obs (y=H(x’(yo+noise)))

Synop: u, v, t, p, qMetar: u, v, t, p, qShip: u, v, t, p, qGeoamv: u, vPolaramv: u, vGpspw: tpwSound: u, v, t, qSonde_sfc: u, v, t, p, qAirep: u, v, tPilot: u, vSatem: thicknessQscat: u, vProfiler: u, vBuoy: u, v, t, p, qAirsr: t, qGpsref: ref

listed variables of each observation type vary:

unpert_obs and pert_obs, together with other files, are used in var/da/da_util/da_tune_obs_desroziers.f90Reference: Desroziers, G. and S. Ivanov, 2001: Diagnosis and adaptive tuning of observation-error parameters in a variational assimilation. Q. J. R. Meteorol. Soc., 127, 1433-1452.

Page 24: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Observation error tuning

Data used in calculating tuning factors:

a collection of unpert_obs, jo and rsl.out.0000 from regular WRF-Var runsa collection of rand_obs_error and pert_obs from perturbed WRF-Var runs

Steps:

(1) a series of WRF-Var regular runs to collect unpert_obs [y = H(x'(yo)) of each obs type], jo [Jo of each obs type], and rsl.out.0000 which contains the final total cost function (J, Jo, Jb) information

(2) a series of WRF-Var perturbed runs (&wrfvar5 omb_add_noise = .true.) to collect rand_obs_error [noise of each obs type] and pert_obs [yp = H(x'(yo+noise)) of each obs type]

(3) run da_tune_obs_desroziers.exe to generated errfac.dat

var/scripts/da_tune_obs_desroziers.kshvar/da/da_util/da_tune_obs_desroziers.f90

Page 25: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Observation errors and tuning factors

Page 26: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

How to do verification using WRF-Var?

Collecting O-B (observations minus background) information

gts_omb_omastatistics

Same numbers of observations should be used for verifying analyses/forecasts from different experiments

Verifying against observations (all types that can be assimilated in WRF-Var)

Page 27: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

EXP1

gfs/2008070100/wrfinput_d01gfs/2008070112/wrfinput_d01gfs/2008070200/wrfinput_d01gfs/2008070212/wrfinput_d01

obs/obs_gts.2008-07-01_00:00:00.3DVARobs/obs_gts.2008-07-01_12:00:00.3DVARobs/obs_gts.2008-07-02_00:00:00.3DVARobs/obs_gts.2008-07-02_12:00:00.3DVAR

WRF-Var Use_soundobs=true Use_synopobs=false

wrfvar_output(wrfinput_d01)

Exp1/wrfout_d01_ 2008-07-01_00:00:00Exp1/wrfout_d01_ 2008-07-01_12:00:00Exp1/wrfout_d01_ 2008-07-02_00:00:00Exp1/wrfout_d01_ 2008-07-02_12:00:00

EXP2 WRF-Var Use_soundobs=true Use_synopobs=true

wrfvar_output(wrfinput_d01)

Sample experiment scenario

Exp2/wrfout_d01_ 2008-07-01_00:00:00Exp2/wrfout_d01_ 2008-07-01_12:00:00Exp2/wrfout_d01_ 2008-07-02_00:00:00Exp2/wrfout_d01_ 2008-07-02_12:00:00

GFS data

Observations

WPS/real

OBSPROC

wrf forecasts from 4 different initial times, each wrfout contains, for example, 00h, 12h, 24h forecasts

EXP1 and EXP2 have different types of observations assimilated - testing impact of synop

Page 28: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Step 1: generate one set of observations to be used for verifying wrf forecasts

Step 2: run WRF-Var with the observations from step 1 and with each forecast you want to verify as a first-guess to collect O-F (observation minus forecast) values, i.e. gts_omb_oma and statistics.

Step 3: graphics/visualization

Pre-Step 2: split wrf output so that each file contains data from only one time.

wrfout_d01_2008-07-01_00:00:00 contains the following forecast timesTimes = "2008-07-01_00:00:00", "2008-07-01_12:00:00", "2008-07-02_00:00:00", mkdir 2008070100ncks -d Time,0,0 wrfout_d01_2008-07-01_00:00:00 2008070100/wrfout_d01_2008-07-01_00:00:00ncks -d Time,1,1 wrfout_d01_2008-07-01_00:00:00 2008070100/wrfout_d01_2008-07-01_12:00:00ncks -d Time,2,2 wrfout_d01_2008-07-01_00:00:00 2008070100/wrfout_d01_2008-07-02_00:00:00

How to do verification using WRF-Var?

Page 29: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Step 1: generate one set of observations to be used for verifying wrf forecasts

Run WRF-Var with the settings:

&wrfvar5 check_max_iv=true

&wrfvar6 ntmax=0

&wrfvar11 sfc_assi_options=2

&wrfvar17 analysis_type="QC-OBS"

2008070100/filtered_obs2008070112/filtered_obs2008070200/filtered_obs2008070212/filtered_obs2008070300/filtered_obs2008070312/filtered_obs

How to do verification using WRF-Var?

gfs/2008070100/wrfinput_d01gfs/2008070112/wrfinput_d01gfs/2008070200/wrfinput_d01gfs/2008070212/wrfinput_d01gfs/2008070300/wrfinput_d01gfs/2008070312/wrfinput_d01

obs/obs_gts.2008-07-01_00:00:00.3DVARobs/obs_gts.2008-07-01_12:00:00.3DVARobs/obs_gts.2008-07-02_00:00:00.3DVARobs/obs_gts.2008-07-02_12:00:00.3DVARobs/obs_gts.2008-07-03_00:00:00.3DVARobs/obs_gts.2008-07-03_12:00:00.3DVAR

GFS data

Observations

WPS/real

OBSPROC

WRF-Var does not actually do QC except for (1) rejecting observations that fail check_max_iv

check when check_max_iv = true(2) rejecting surface observations with larger than

100m height difference between model and observation when sfc_assi_options = 1

(3) Rejecting observations below the lowest model level and above the highest model level

filtered_obs (in the same format as obs_gts*.3DVAR) will be used in Step 2.

Purpose: to write out goodgood observationswith respect to the background used

Page 30: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Step 2: run WRF-Var with the filtered observations from step 1 and with each forecast or analysis you want to verify as a first-guess to collect O-F (observation minus forecast) values, i.e. gts_omb_oma and statistics.

Run WRF-Var with the settings:

&wrfvar5 check_max_iv=false

&wrfvar6 ntmax=0

(only O-B information is needed, no need to go through minimization)

&wrfvar17 analysis_type=”VERIFY"

2008070100/filtered_obs2008070112/filtered_obs2008070200/filtered_obs2008070212/filtered_obs

Exp1/2008070100/wrfout_d01_ 2008-07-01_00:00:00Exp1/2008070100/wrfout_d01_ 2008-07-01_12:00:00Exp1/2008070100/wrfout_d01_ 2008-07-02_00:00:00Exp1/2008070112/wrfout_d01_ 2008-07-01_12:00:00Exp1/2008070112/wrfout_d01_ 2008-07-02_00:00:00Exp1/2008070112/wrfout_d01_ 2008-07-02_12:00:00

Exp2/2008070100/wrfout_d01_ 2008-07-01_00:00:00Exp2/2008070100/wrfout_d01_ 2008-07-01_12:00:00Exp2/2008070100/wrfout_d01_ 2008-07-02_00:00:00Exp2/2008070112/wrfout_d01_ 2008-07-01_12:00:00Exp2/2008070112/wrfout_d01_ 2008-07-02_00:00:00Exp2/2008070112/wrfout_d01_ 2008-07-02_12:00:00

How to do verification using WRF-Var?

Initial time Forecast valid time

Lots of gts_omb_omaand/orstatisticsfiles to play with!

analysis_type=“VERIFY” keeps observations below the lowest model level and above highest model level

to ensure same observations are used for different experiments.

Page 31: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Step 3: graphics/visualization

Presentation and manipulation of the large amount of gts_omb_oma and/or statistics files collected in Step 2

statistics files might be easier to handle than gts_omb_oma files,but no information in vertical if using statistics

Page 32: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

32

AIRS Retrievals Decoderconvertor/decode_l2_airs

Misc. plotting var/graphics/ncl/WRF-Var_plot.ncl

WRF_contributed.ncl.test(procedure WRF_map_c for setting map resources)

plot_cost_grad_fn.nclplotobs.ncl

Background Error Statistics plottingvar/graphics/ncl/gen_be/gen_be_corr_ps.ncl

gen_be_corr_yz.ncl gen_be_corr_z.ncl gen_be_global_evals.ncl gen_be_global_evecs.ncl gen_be_lengthscales.ncl

Verification plottingvar/scripts/da_verif_anal_plot.kshvar/graphics/ncl/verif_anal_time_series.nclvar/graphics/ncl/verif_anal_time_average.nclvar/graphics/ncl/verif_anal_vert_profile.nclvar/scripts/da_verif_obs_plot.kshvar/graphics/ncl/verif_obs_time_series.nclvar/graphics/ncl/verif_obs_vert_profile.nclvar/graphics/ncl/verif_obs_time_average.nclvar/graphics/ncl/verif_obs_vert_profile_gpsref.ncl

WRF-Var Tools

for verification against grid analysis

for verification against observations

Pseudo single obs test plottingvar/scripts/da_plot_psot.kshvar/graphics/ncl/psot_xy_auto.nclvar/graphics/ncl/psot_xz_auto.nclvar/graphics/ncl/psot_yz_auto.ncl

Page 33: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

var/graphics/ncl/WRF-Var_plot.nclWRF_contributed.ncl.test (procedure WRF_map_c for setting map resources)

var/graphics/ncl/plot_cost_grad_fn.ncl

kl = 18fg = first_guess->T ;Theta-T0an = analysis->T ;Theta-T0plot_data = an - fg

kl = 18fg = first_guess->Uan = analysis->Uplot_data = an

Alternative tools WRF tutorial: Post-processing Tools (1): NCL by Cindy Bruyere WRF tutorial: Post-processing Tools (3): RIP by Cindy Bruyere

Reads in WRF-Var ASCII output: cost_fn and grad_fn

Run WRF-Var with&wrfvar11 CALCULATE_CG_COST_FN=trueto get cost function value of each iteration

However, CALCULATE_CG_COST_FN=true increases run-time significantly.Default setting in Registry.wrfvar is CALCULATE_CG_COST_FN=false

Eta-level plots only

Reads in WRF netCDF files: wrfinput_d01 and wrfvar_output

Page 34: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

var/graphics/ncl/plotobs.ncl

; method 1: set a 2-D array of bounded pressure levels in hPaplevs = (/ (/1005.,995./),(/930.,920./),(/855.,845/),(/705.,695./) /); plevs = (/ (/1050.,0./),(/-999.,-999./) /)

; method 2: set a 1-D array of fixed pressure levels in hPa; plevs = (/ 1000., 850., 500., 300., 250., 200., 150., 100. /)

mapinfo_from_file = Truefname=“wrfinput_d01”; subdomain = Truesubdomain = Falseif ( subdomain ) then ; subdomain needs to be a lat-lon box maxlat = 35. minlat = 25. maxlon = -75. minlon = -90.end if

Reads in WRF-Var ASCII output: gts_omb_oma

I guess the 'QC' term used in the plots is somewhat misleading. Please refer to p.17 of this presentation about the meaning of “QC”.

The information stored in gts_omb_oma is obs, omb, oma. Background value is calculated using obs - omb.Analysis value is calculated using obs - oma.In the case of a rejected obs, its ombis 0, which leads to obs = bak.All rejected observations show up on the scatter plots on the diagonal line.The shape of 'before QC' and 'after QC' scatter plots are the same, with 'before QC' having lower mean and rms values because of those obs=bak points.

Page 35: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

The information stored in gts_omb_oma is obs, omb, oma.

Background value is calculated usingobs - omb.

Analysis value is calculated using obs - oma.

In the case of a rejected obs, its omb is set to be 0, which leads to obs = bak.

All rejected observations show up on the scatter plots on the diagonal line.The shape of 'before QC' and 'after QC' scatter plots are the same, with 'before QC' having lower mean and rms values because of those obs=bak points.

actually used stationsprocessed stations

Page 36: WRF-Var Namelists, Diagnostics, and Tools  WRF-Var Namelist WRF-Var Tools and Verification

Var/scripts/da_verif_obs_plot.kshVar/graphics/ncl/verif_obs_time_series.nclVar/graphics/ncl/verif_obs_vert_profile.nclVar/graphics/ncl/verif_obs_time_average.nclVar/graphics/ncl/verif_obs_vert_profile_gpsref.ncl

Var/scripts/da_verif_anal_plot.kshVar/graphics/ncl/verif_anal_time_series.nclVar/graphics/ncl/verif_anal_time_average.nclVar/graphics/ncl/verif_anal_vert_profile.ncl

U, V T, Q RMSE/BIAS/ABIAS on user-specified levels

U, V T, Q, P RMSE/BIAS/ABIAS on surface level