Upon user's request, here is place where you can show your work to the NWP community.
Post Reply
Posts: 17
Joined: Sun Jan 02, 2011 12:24 pm


Post by Boogie » Sat Nov 24, 2012 1:39 pm

WRF ARW (3D-VAR) with a nested 4 km resolution domain aimed at convective forecasts for Finland:

Posts: 16
Joined: Thu Sep 27, 2012 7:14 pm


Post by vonjack » Mon Jan 28, 2013 9:42 pm

Hi Boogie,

I see you are using 3dVAR to initialize your model.
Are you using WRFEMS? If so, do you know if there's a way to integrate it with 3DVAR?

Thank you!


Posts: 17
Joined: Sun Jan 02, 2011 12:24 pm


Post by Boogie » Thu Jan 31, 2013 6:34 pm


I do use WRF EMS to run the model itself but I additionally compiled the WRFDA (3DVAR) from scratch. So I didn't integrate it into WRF EMS, I just run them separately as one would do "normally".


Posts: 1602
Joined: Wed Aug 19, 2009 10:05 am


Post by meteoadriatic » Fri Feb 01, 2013 12:02 am

Hi Boogie,

Many of users would be very interested if you're ready to write small guide how to set up WRFDA for running with wrf. I'm the first one that would be grateful :)

Posts: 17
Joined: Sun Jan 02, 2011 12:24 pm


Post by Boogie » Mon Apr 01, 2013 10:35 am


Here's a quick guide to setting up the 3D-VAR data assimilation. Or this is at least the way I did it.

1) Install the free Intel C and fortran compilers on your computer.
2) Compile NETCDF with those intel compilers.
3) Install MPICH2 with those Intel compilers
4) Untar WRFDA (3.2.1)
5) Replace the buggy Thompson microphysics module with a correct one (just in case): ... 3.2.1.html
6) Do the BUFR-file corrections: ... adBufr.htm
7) Compile WRFDA
8) Download and compile a BUFR-file "reblocker": ... /reblock.c
9) In WRF EMS namelist.arw add the following to &time_control:
write_input = .true.
inputout_interval = 360, 360
inputout_begin_h = 6, 6
inputout_end_h = 6, 6
input_outname = "wrfout_d<domain>_3dvar"
10) Follow the insructions in the WRFDA guides to test your system (first installing and then running): ... ng_WRF-Var
This tells you to set up your "working" 3DVAR folder where you link different files and executables. I won't go into that here, you can read more on the website.

The observation file (ob.bufr) I use is from GFS:

You need to reblock this bufr file with the reblock executable we just compiled.

The way you actually run your operational system is the following:
1) Run the previous cycle so that you get a 6 hour forecast file (due to write_input in namelist.arw) to be used as the input file in the next run. This output file is your first guess file (fg). This is located in the wrfprd folder as the filename you gave in the namelist.arw.
2) Start your new run as you would normally with ems_prep. Then do ems_run --nowrf . This way you get the new lateral boundary file without actually running your forecast simulation yet. The file is called wrfbdy_d01.
3) Do necessary changes to file in your 3DVAR-working folder and run ./da_update_bc.exe to update the low boundary conditions between the two files (stuff like snow cover, sst etc).
4) Download the GFS prepbufr file and reblock it.
5) Update the WRFDA namelist.input to match your run times etc.
6) Do the main data assimilation with the first guess (fg), boundary condition (wrfbdy_d01) and observation (ob.bufr) files by running da_wrfvar.exe
7) Then you need to update the lateral boundary conditions so change the file and run da_update_bc.exe. In part 3 we updated just the low boundaries, now we update the lateral boundaries.
8) Now you have two files in your WRFDA-folder wrfvar_output (your new wrfinput_d01) and the updated wrfbdy_d01 file. Put these in your WRF EMS run folder.
9) Run ems_run --noreal
10) This gives you your new forecast and you can again pick out the next first guess file from the wrfprd/ folder.
11) And the loop continues...

So you have to do some shell-scripting to make this all run smoothly. You will most likely run into problems at some point, so just keep reading all the instructions carefully and make sure you compile everything to match your system with the same intel compilers. I'd strongly suggest following the general tutorial page to first check the system runs ok: ... _chap6.htm

I faced some problems when using the namelist.arw in the wrfda namelist.input. There was some lines that the WRFDA didn't like. I found the crashy line by removing parts of the namelist by trial and error.

In terms of the settings, google some ppt-presentations on the matter to know what kind of a file you need for stages 3 and 7.

One pretty good general overview of setting WRFDA is in this presentation: ... undiag.pdf

When using the WRFDA you need a background error statistics file. I use the global, already given file, but ideally you should make one yourself based on your domain. You'd need to run your system for lets say 30 days and from the forecasts you can then calculate the correct background error statistics for your domain.

The only major drawback with this whole setup is the fact that I use the ob.bufr (observations) that are made for the GFS model and I use the new GFS run to get the boundary conditions. So basically I can start my own run when GFS is almost complete. Ideally I'd like the prepbufr file to be available earlier so I could start my simulation a few hours earlier as well. To overcome this problem I'm testing with LAPS data at the moment but that's another topic.

Hopefully this helps you get going. It's been over a year since I did this so my own memory and notes are a little hazy. If you face big problems, I might be able to help...or not :)

Posts: 65
Joined: Sat Mar 02, 2013 1:16 am


Post by Gippox » Sun May 26, 2013 2:27 pm

Hi Boogie, i followed your guide and i managed to run WRFDA 3D-Var :)
But I have a doubt about the point 3)that I wanted to ask you.

When I do the update of the low-boundary I need two files according to file :

da_file = ‘./fg’- First guess (wrfout in wrfinput format) for WRFDA
wrf_input = ‘${DAT_DIR}/rc/2008020512/wrfinput_d01’ - IC from WPS and WRF real
debug = .true.
update_lateral_bdy = .false.
update_low_bdy = .true.
iswater = 16 - Should be 17 if using MODIS land-use

The first file is "first guess" i get it from the previous forecats cycle(wrfout_d<domain>_3dvar) , but I did not understand if the second file wrfinput_d01 is related to the previous cycle of forecasting , the actual cycle of forecasting (get from point 2 of your guide, with wrfbdy_d01), or if it is the same file "first guess" (file wrfout_d<domain>_3dvar renamed as wrfinput_d01) ?
I have a bit 'of confusion in this regard!

Thank you very much! :D

Post Reply