Getting Started

Getting Started cindyhg Mon, 07/15/2019 - 14:19

Getting Started

Download and Build GSI System

Download and Build GSI System cindyhg Mon, 07/15/2019 - 14:20

BUILDING GSI FROM SCRATCH

Obtaining the source code & setting up the directory

This exercise is intended to give you practice building the GSI system. This version of GSI system includes a WRF I/O library. There are no need to build the WRF model for this version GSI building.

The community GSI resources, including source code, build system, utilities, and fix files, are available for download from the DTC community GSI users website: https://dtcenter.org/community-code/gridpoint-statistical-interpolation-gsi/download.

The code downloads will result in the following tar file:

comGSIv3.7_EnKFv1.3.tar.gz

GSI requires use of CRTM coefficients to analyze satellite radiance observations. Due to their large size, these are available as a separate tarfile available for download by selecting the link: CRTM 2.3.0 Big_Endian coefficients tarball

The tars file may be unpacked using the UNIX commands:

tar -zxvf comGSIv3.7_EnKFv1.3.tar.gz

 

This creates the top level GSI directory: comGSIv3.7_EnKFv1.3

 

Setting up the machine environment

Set the necessary paths for using your selected compiler, such as loading the appropriate modules or modifying your path variable.

Before configuring the GSI code to be built, at least one, and no more than two environment variables must be set.

  • NETCDF: the path to the NETCDF libraries
  • LAPACK_PATH: the path to the LAPACK math libraries

For more detail, see GSIv3.7 Users' Guide Chapter 2.

Configure and Compile the GSI code

This version GSI can ONLY be compiled with Cmake. 

First create a building directory (any name works) outside the GSI directory:

mkdir build

Then, get into this building directory

cd build

Now run cmake to configure makefile by typing:

cmake ${Path To GSI Home Directory}/comGSIv3.7_EnKFv1.3

 

Cmake will check your computer environment and generate the makefile. A successful cmake run should end with:

-- Configuring done 
-- Generating done 
-- Build files have been written to: (Path_of_this_directory)/build

The building directory includes many new file and directories generated from Cmake:

bin cmake_install.cmake include Makefile Testing 
CMakeCache.txt CTestTestfile.cmake lib regression_var.out util 
CMakeFiles DartConfiguration.tcl libsrc src 

Now, we can simply run make to compile the GSI and its untilities:

make

If the compilation is successful, the executable gsi.x, will be created in the ./bin directory. If the compilation is not successful, run make with make VERBOSE=1 to collect more information on errors.

After a successful compilation:

Once GSI compiled correctly, return to the online tutorial page to set up and run the case(s) of your choice.

Download Practice Data

Download Practice Data cindyhg Mon, 07/15/2019 - 14:24

DOWNLOAD DATA FOR PRACTICE

The links to download data for practice cases

Please see the following linkes to download the corresponding data for cases you want to practice:

Prepare Base Run Script

Prepare Base Run Script cindyhg Mon, 07/15/2019 - 14:25

PREPARE RUN SCRIPT FOR BASIC CASES

Setting up the Run Script

The GSI run script ush/comgsi_run_regional.ksh, which is provided with the source code, must be customized to the local environment. These changes include things such as the analysis time and date, the path to files, and MPI specific information, which are necessary for running all of tutorial cases.

For this tutorial, start by copying the original run script to a working copy
cd ${PATH of working directory}/run 
cp ${PATH}/comGSIv3.7_EnKFv1.3/ush/comgsi_run_regional.ksh run_gsi_regional.ksh_basic 
This will be used as the template for all the later scripts used in the regional practice.

Make the following modifications to the script run_gsi_regional.ksh_basic

#PBS -A PXXXXXXXX #PBS -l walltime=00:20:00 #PBS -N basic #PBS -l select=1:ncpus=4:mpiprocs=4 #PBS -q premium #PBS -o out.basic #PBS -j oe
  • On top of the scripts, add an appropriate batch script. For example on Cheyenne:
  • Set the variable GSIPROC to 4
  • Set the variable ARCH to LINUX_PBS, as an example value appropriate for Linux with PBS.
  • In the case set up section of the script, set the environment variables to values appropriate for your environment on your machine. For example:
ANAL_TIME=2018081212
JOB_DIR=/gpfs/fs1/p/ral/jntp/mhu/gsi/v37/run
RUN_NAME=basic
OBS_ROOT=/glade/p/ral/jntp/DAtask/case_data/2018081212/obs
BK_ROOT=/glade/p/ral/jntp/DAtask/case_data/2018081212/bkg
GSI_ROOT=/gpfs/fs1/p/ral/jntp/mhu/gsi/v37/comGSIv3.7_EnKFv1.3
CRTM_ROOT=/glade/p/ral/jntp/DAtask/case_data/CRTM_2.2.3
ENS_ROOT=/glade/p/ral/jntp/DAtask/case_data/2018081212/gfsens
HH=`echo $ANAL_TIME | cut -c9-10`
GSI_EXE=${JOB_DIR}/gsi.x #assume you have a copy of gsi.x here
WORK_ROOT=${JOB_DIR}/${RUN_NAME}
FIX_ROOT=${GSI_ROOT}/fix
GSI_NAMELIST=${GSI_ROOT}/ush/comgsi_namelist.sh
PREPBUFR=${OBS_ROOT}/rap.t${HH}z.prepbufr.tm00
BK_FILE=${BK_ROOT}/wrfout_d01_2018-08-12_12:00:00
  • This example is only for ARW core background files.
if_hybrid=No     # Yes, or, No -- case sensitive !
if_4DEnVar=No    # Yes, or, No -- case sensitive (set if_hybrid=Yes first)!
if_observer=No   # Yes, or, No -- case sensitive !
if_nemsio=No     # Yes, or, No -- case sensitive !
if_oneob=No      # Yes, or, No -- case sensitive !

bk_core=ARW
bkcv_option=NAM
if_clean=clean

  • Still in case set up setion, leave the following settings as default:
  • Search Section # Link to the radiance data, look for the list of observations and comment the links to the BUFR file under this section:
# ln -s ${srcobsfile[$ii]} ${gsiobsfile[$ii]}

PREPARE RUN SCRIPT AND ANAVINFO FILE FOR BASIC CASES

submit run script

The basic run script can be submitted by if use Cheyenne:

qsub run_gsi_regional.ksh_basic

An example of this basic run script is available from the link run_gsi_regional.ksh_basic

check the results

After job finished, a new directory ./basic will appear under current directory. The files in directory ./basic is listed here and the stdout from this basic run is available here