page header
 

Forecast Sensitivity to Observations

 

References:

  • This year's presentation
  • A more comprehensive presentation from 2014
  • FSO documentation (a bit dated, but contains a lot of extra, useful information)
  • Source code

    WRFDA and WRFPLUS are needed for this practice.

    Get the pre-compiled code from /home/ec2-user/compiled_code/. This is the only exercise where WRFPLUS is directly needed, so make sure you copy that pre-compiled code to your working directory as well.

    The FSO data, including the main script, can be found in /home/ec2-user/test_data/FSO

    wrapper_run_fso.ksh is the main script that will be used in this practice.

    The wrapper_run_fso.ksh calls several other scripts that are in the /home/ec2-user/WRFDA_TOOLS_FSO/scripts/ and /home/ec2-user/WRFDA_TOOLS_FSO/graphics/ directories. This scripts are part of the WRFDA TOOLS package, which is not part of the main WRFDA source code; if you are working from home, you will have to download the TOOLS package separately.

    For example,
      scripts/da_run_sensitivity.ksh
      scripts/da_run_wrf.ksh
      scripts/da_run_wrfvar.ksh
      graphics/ncl/adj_forcing.ncl
      graphics/ncl/adj_diagnostic.ncl
    are some of the scripts involved in the FSO procedures.

    The whole scripting suite is quite complicated and might take some time for first users to get familiar with and to be able to apply to their own applications.

    Steps

    Create a working directory for this practice.

    mkdir /home/ec2-user/workdir/fso
    cd /home/ec2-user/workdir/fso

    cp /home/ec2-user/test_data/FSO/wrapper_run_fso.ksh .

    cp -r /home/ec2-user/test_data/FSO/plot .

    There are three steps to run the FSO. For the first step, edit wrapper_run_fso.ksh to set up the options for a regular WRFDA run.

    ......
    export RUN_WRFVAR=true
    export RUN_UPDATE_BC=true

    And ensure the following lines are commented (with a "#" at the beginning of the line):

    #export RUN_ADJ_SENS=true
    #export RUN_OBS_IMPACT=true
    #export NL_USE_LANCZOS=true
    #export NL_WRITE_LANCZOS=true
    #export NL_EPS=1E-5

    ......
    export NUM_PROCS=1

    ......
    export INITIAL_DATE=2007010100
    export FINAL_DATE=2007010112

    ......
    export REL_DIR=/home/ec2-user/compiled_code
    export WRFPLUS_DIR=$REL_DIR/WRFPLUS-v4.1.2
    export WRFVAR_DIR=$REL_DIR/WRFDA-v3.8
    export WRFNL_DIR=$REL_DIR/WRF-v4.1.2
    export BUILD_DIR=$WRFVAR_DIR/var/build

    export TOOLS_DIR=/home/ec2-user/WRFDA_TOOLS_FSO
    export SCRIPTS_DIR=$TOOLS_DIR/scripts
    export GRAPHICS_DIR=$TOOLS_DIR/graphics/ncl

    export WDIR=/home/ec2-user/workdir/fso
    export REG_DIR=$WDIR
    export RUN_DIR=$WDIR/run
    export EXP_DIR=${RUN_DIR}

    export DAT_DIR=/home/ec2-user/test_data/FSO
    export FC_DIR=${RUN_DIR}/fc

    Note: The following variables should be set in the "domain" section for the tutorial case, but not for data from WRF V3.5 or later.

    export NL_I_PARENT_START=0
    export NL_J_PARENT_START=0

    Execute the script. This part should take less than a minute.

    ./wrapper_run_fso.ksh

    After the script finishes, a file in your working directory (/home/ec2-user/workdir/fso/run) will indicate whether the run was successful or not (a blank file will exist, either named "FAIL" or "SUCCESS"). If the run was successful, edit wrapper_run_fso.ksh again, and change the following settings to do sensitivity and observation impact runs:

    ......

    For the second step, conduct the sensitivity run by uncomment the following lines and change the settings as below:
    export RUN_ADJ_SENS=true

    ......

    export NUM_PROCS=8
    And ensure the following lines are commented (with a "#" at the beginning of the line):
    #export RUN_WRFVAR=true
    #export RUN_UPDATE_BC=true
    #export RUN_OBS_IMPACT=true
    #export NL_USE_LANCZOS=true
    #export NL_WRITE_LANCZOS=true
    #export NL_EPS=1E-5

    .....

    Execute the script again. This part will take a bit longer; about 5-10 minutes.

    ./wrapper_run_fso.ksh

    For the third step, conduct the observation impact run by uncomment the following lines and change the settings as below:
    export RUN_OBS_IMPACT=true
    export NL_USE_LANCZOS=true
    export NL_WRITE_LANCZOS=true
    export NL_EPS=1E-5

    ......

    export NUM_PROCS=1
    And ensure the following lines are commented (with a "#" at the beginning of the line):
    #export RUN_WRFVAR=true
    #export RUN_UPDATE_BC=true
    #export RUN_ADJ_SENS=true

    .....

    Execute the script again.

    ./wrapper_run_fso.ksh


    Check Output

    NOTE: The error trapping in FSO is not perfect, so for certain problems the system may still report "SUCCESS". Make sure all the files below were created, or else you may have set some variables incorrectly.

    /home/ec2-user/workdir/fso/run/2007010100/sensitivity/ad_d01_2007010100 is the gradient of the forecast error norm to the initial conditions. You can quickly view this file using ncview to ensure there is nothing strange going on (the TL/A variables should look like this, while the NL variables should look like this).

    /home/ec2-user/workdir/fso/run/2007010100/sensitivity/index.html contains the text output from running var/graphics/ncl/adj_diagnostics.ncl to get the diagnostics of error reduction in the forecasts from Xb (background) to Xa (analysis).

    /home/ec2-user/workdir/fso/run/2007010100/obsimpact/rsl.out.0000 contains the cumulated impact of each observation type on the forecast errors.

    There are some ncl scripts provided in fso/plot. Try modifying the initial values to get the plots to work for yourself:

  • plot_gts_omb_oma.ncl will output plots of the observations used for the experiment by type and pressure level.
  • plot_impact_by_obsnum_time_average.ncl will create the file "impact_by_obs2007010100-2007010112.pdf". Use "display" to view this file, which will show the observation impact on the forecast by observation type. If all has gone well, your plot should look like the one at right:
  • plot_levs_impact.ncl will create the file "multi_levs_sound_2007010100.pdf". Use "display" to view this file, which will show the observation impact on the forecast by observation type at each vertical level.

  • back to top
     
    practice_page_header