430 likes | 708 Views
GSI Setup, Run and Namelist. Hui Shao. GSI Community Tutorial, June 28-30, 2010, Boulder, CO. Observation processing and assimilation PrepBUFR and BUFR processing: 06/29, Tue Community Tools (1): PrebBUFR Converter : 06/29, Tue Satellite Radiance Assimilation: 06/29, Tue
E N D
GSI Setup, Run and Namelist HuiShao GSI Community Tutorial, June 28-30, 2010, Boulder, CO
Observation processing and assimilation • PrepBUFR and BUFR processing: 06/29, Tue • Community Tools (1): PrebBUFR Converter: 06/29, Tue • Satellite Radiance Assimilation: 06/29, Tue • Radar Observation Assimilation: 06/30, Wed • GPS RO Data Assimilation: 06/30, Wed Observation Error Advanced GSI 4D-Var: 06/30, Wed Output GSI Diagnostics: 06/29, Tue Observation Analysis and diagnostics GSI Background • Overall • Overview of GSI: 06/28, Mon • GSI Code (SE Aspect): 06/28, Mon • GSI Setup, Run and Namelist: 06/28, Mon Background Error Background Error and Observation Background and Observation Error Estimation and Tuning: 06/29, Tue Community Tools (2): GEN_BE: 06/29, Tue
Outline • Installing GSI • Running GSI • Cycling, partly cycling, cold-start • Basic runtime options (namelist) This talk is tailored based on GSI Community Release V2.0.
Installing GSI (Community Release only) For people who are using the NCEP version of GSI, please be aware the installation procedure and portability of the GSI code might be different from the community release.
Source Codes • Download GSI source code (comGSI_v2.tar.gz) from • http://www.dtcenter.org/com-GSI/users/downloads/index.php • Unpack the tarball, you may use the command • “tar –zxvf comGSI_v2.tar.gz” or • “gunzip comGSI_v2.tar.gz” and “tar –xvf comGSI_v2.tar”
GSI Core and Extra Features makefile clean configure compile GSI Community Release until/ arch/ NCEP GSI Repository run/ fix/ libs/ src/ main/ makefile
Fortran Compiler • Supported and Tested Platforms • IBM: xlf • LINUX: pgi 7.0,8.0,9.0 • LINUX: Intel 10.0 and 11.0 • MAC OSX: PGI 8.0 • Supported and Tested by a 3rd party • SGI Altix: Intel 10.0 • Use “which” (e.g., which xlf) command to find the compiler path. • To check version number, use “xlf –qversion”, “pgf90 –V” and “ifort –v” for xlf, pgi and Intel Fortran compilers. Please share with us your experience on the various platforms and compilers.
External Libraries Required by GSI • To set up environment variable. • csh/tcsh users: use “setenv” (e.g., setenv NETCDF $netcdfpath) • bash/ksh users: use “export” (e.g., export NETCDF $netcdfpath) • netCDF (network Common Data Form) v3.6+ (not v4.0 yet): • http://www.unidata.ucar.edu/software/netcdf/ • WRF I/O API (WRF I/O and Model Coupling Application Program Interface) v3.2: WRF-ARW or NMM provided in the same tar file • http://www.mmm.ucar.edu/wrf/users/downloads.html or • http://www.dtcenter.org/wrf-nmm/users/downloads/index.php • ESSL (IBM) or LAPACK and BLAS (LINUX and MAC OSX) • ESSL (Engineering and Scientific Subroutine Library): http://www-03.ibm.com/systems/software/essl/index.html • Usually, the IBM compiler automatically set up the ESSL. No manual set up required. • LAPACK (Linear Algebra PACKage): http://www.netlib.org/lapack/ BLAS (Basic Linear Algebra Subprograms): http://www.netlib.org/blas/ • LINUX: usually, the PGI compiler automatically set up the lib. • LINUX: Intel compiler, please set up the lib manually. • MAC OSX: PGI compile, please set up the lib manually.
Internal Libraries Required by GSI(included in the GSI tarball) makefile clean configure compile GSI Community Release until/ arch/ NCEP GSI Repository run/ fix/ libs/ src/ main/ makefile No manual setup/compilation required if you use configure/compile utility provided by the GSI tarball.
Configure and Compile GSI makefile clean configure compile GSI Community Release until/ arch/ • Functions: • Checks the system hardware and software (netCDF,WRF, and math libraries). • Offers the user choices for configuring GSI. • Creates configure.gsi, which contains compilation options, paths, rules, etc. specific to your computer and compiler choice, and can be edited to change compilation options, if desired. • Compiles both internal libraries and GSI source code and create gsi.exe. NCEP GSI Repository run/ fix/ libs/ src/ main/ makefile
Configure GSI • Example 1: NETCDF path was set up but not WRF directory Will use NETCDF in dir: /usr/local/netcdf ** WARNING: No path to WRF_DIR and environment variable WRF_DIR not set. ** would you like to try to fix? [y] • Example 2: Compilation options on IBM Will use NETCDF in dir: /usr/local/netcdf Will use WRF in dir: /ptmp/huishao/tutorial/comGSI_v2/../WRFV3 ------------------------------------------------------------------------ Please select from among the following supported platforms. 1. AIX 64-bit (dmpar) 2. AIX 32-bit (dmpar) Enter selection [1-2] : dmpar: distributed-memory parallel For unsupported platforms, you may start from ~/comGSI_v2/arch/configure.defaults. Change the settings for your platform then rerun configure. • cd $your_sourcecode_dir/comGSI_v2 • ./configure ./configure.gsiwill be created if succeed.
Compile GSI • cd $your_sourcecode_dir/comGSI_v2 • ./compile (or ./compile >& $your_log_filename) ~/comGSI_v2/run/gsi.exe will be created if succeed. • Get help on the compilation: • ./compile –h • Clean the GSI directory before making your next compilation: > ./clean -a
Running GSI The following is tailored for 3D-Var and regional applications.
Example: GSI in a WRF System xlbc Background Preprocessing (WPS , real) xb xf Cycled Background Cold-Start Background GSI yo , R xa Update Lateral & Lower BCs (UPDATE_BC) Forecast (WRF) Background Error (gen_be) B0 Blue --> Supported by GSI Team
GSI Input and Output Namelist Observation Analysis and diagnostics GSI Background Statistical and control files (“fixed”) Background Error Observation Error
Before You Run… • Check GSI executable has been created approximately • ~/comGSI_v2/run/gsi.exe • Obtain background files • Depending in which mode (cycling or cold start) the GSI is run, the background files for the GSI can either come from the forecast from the previous cycle or from any other model simulations or forecasts. • WRF NMM input field in binary format • WRF NMM input field in netCDFformat • WRF ARW input field in binary format • WRF ARW input field in netCDFformat • GFS input field in binary format • GMAO global model input field in binary format
Before You Run… GSI can run pseudo single observation test (PSOT) without real observations. • Obtain observation files. • The NCAR CISL Research Data Archive (RDA): http://dss.ucar.edu/ • NCEP public server: http://www.emc.ncep.noaa.gov/data/ • NCAR Mass Storage System (MSS): authorized access • GSD Mass Storage System: authorized access • Or any places you may obtain • PREPBUFR formatted data: conventional (including satellite derived data) • BUFR formatted data: satellite radiance, radar reflectivity, GPS radio occultation(RO) refractivity/bending angle
Check statistic and control files under ~/comGSI_v2/fix Background errors (BE) nam_nmmstat_na (nam_glb_berror.f77_Little_Endian): computed from NCEP NAM statistics nam_glb_berror.f77 (nam_glb_berror.f77_Little_Endian): computed from NCEP GFS statistics Or you may produce your own BE using the community tool GEN_BE (talk on 06/29) Observation errors nam_errtable.r3dv Observation data control file (info files) Global_convinfo.txt: Conventional obs. Information file Global_pcpnfo.txt: Satellite channel information file global_satinfo.txt: precipitation rate observation information file Bias correction used by radiance analysis Global_satangbias.txt: Satellite scan angle dependent bais correction file ndas.t06z.satbias.tm03: satellite variational bias correction coefficient file Radiance coefficient used by CRTM (~/comGSI_v2/fix/crtm_gfsgsi) Before You Run…
Set up GSI • Create a working directory ($WORK_ROOT in run_gsi.ksh), for example, “your_choice_of_ working_dir”. • >mkdiryour_choice_of_working_dir • Go into the working directory: • > cdyour_choice_of_working_dir • We do provide a sample run script for you to start from • ~/comGSI_v2/run/run_gsi.ksh The following slides will describe the basic steps for running GSI, assuming conventional data are assimilated.
Working Directory - Input The background file will be replaced after running GSI therefore please make sure it is copied to the working directory (instead of using link command).
Observation File Names Used in GSI(GSI Users’ Manual-Chapter 3)
“Fixed” File Names Used in GSI • (GSI Users’ Manual-Chapter 3)
Running GSI • >gsi.exe >&!stdout(or your own log file name) • If running in distributed-memory mode, you need to set up the computer resources (e.g., processor numbers, memory, wallclock…) based on the platform you are using. GSI finished but not necessarily succeed!
Working Directory - Output Please refer to the talk “GSI diagnostics” for more information. In your_choice_of_working_dir, you may have the following files after running GSI successfully:
Working Directory - Output Some intermediate files:
Ask for computer resources to run GSI Set environment variables for the machine Set experiments variables (experiment name, analysis time, background and observation) Check the definition of required variables Generate a run directory for GSI (working or temp directory) Copy GSI executable to run directory Copy background file to run directory Copy or link observations to run directory Copy fixed files to run directory Generate namelist for GSI Run the GSI executable Save the GSI analysis results Run_gsi.ksh: Structure
# Machine dependent configuration GSIPROC=1 ARCH=‘LINUX_PGI’ # analysis time (YYYYMMDDHH) ANAL_TIME=2010050700 # working direcotry, where GSI runs WORK_ROOT=/data1/class05/GSI/gps_arw_${ANAL_TIME} # path and name of background file BK_FILE=/wrfhelp/GSI/Datafiles/2010050700/arw_wrfinput_d01_2010-05-07_00:00:00 # path of observations OBS_ROOT=/wrfhelp/GSI/Datafiles/2010050700/obs PREPBUFR=/wrfhelp/GSI/Datafiles/2010050700/obs/le_nam.t00z.prepbufr.tm00.nr # path of fix files FIX_ROOT=/data1/class05/GSI/comGSI_v2/fix # path and name of the gsi executable GSI_EXE=/data1/class05/GSI/comGSI_v2/run/gsi.exe #which WRF core is used as background (NMM or ARW) bk_core=ARW # which background error covariance and parameter will be used (GLOBAL or NAM) bkcv_option=NAM Run_gsi.ksh: Setup (Example from Practical Sessions)
Running Options-Namelist Run_gsi.ksh has the namelist inside the script.
What is a Namelist? • The Fortran namelist (namelist.input) file helps the user to configure a GSI run without recompiling the code. • Specific Fortran 90 namelist format • Description of WRF-Varnamelist variables are given in GSI User’s Guide and gsimod.F90. &namelistname - start / - end
GSI Namelist &SETUP miter=2,niter(1)=5,niter(2)=5, write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., qoption=1, gencode=78,factqmin=0.005,factqmax=0.005,deltim=$DELTIM, ndat=59,npred=5,iguess=-1, oneobtest=.false.,retrieval=.false.,l_foto=.false., use_pbl=.false., $SETUP / &GRIDOPTS JCAP=$JCAP,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS,hybrid=.true., wrf_nmm_regional=.false.,wrf_mass_regional=.true., diagnostic_reg=.false., filled_grid=.false.,half_grid=.true.,netcdf=.true., regional=.true.,nlayers(63)=3,nlayers(64)=6, $GRIDOPTS
GSI Namelist SETUP: General control variables. GRIDOPTS: Grid setup variab;e, including global regional specific namelist variables. BKGERR:Background error related variables. ANBKGERRAnisotropic background error related variables. JCOPTS: Constraint term in cost function (Jc) STRONGOPTS: Strong dynamic constraint. OBSQC: Observation quality control variables. OBS_INPUT: Input data control variables. SPEROB_RADAR: Level 2 BUFR file of radar wind superobs. LAG_DATA: Lagrangian data assimilation related variables. SINGLEOB_TEST: Pseudo single observation test setup.
GSI Namelist-SETUP Nhr_assimilation: Assimilation time interval (currently 6 hours for global, 3 hours for regional )
GSI Namelist-SETUP(cont.) miter=2: number of outer loops of analysis. niter(1)=50: maximum iteration number of 1st inner loop iterations. Inner loop will stop either reach this maximum number or reach convergence condition or broken. niter(2)=50: maximum iteration number of 2nd inner loop iterations Niter_no_qc: Inner loop iteration at which to turn on variational quality control
GSI Namelist-SETUP(cont.) • qoption = 1 or 2: option of moisture analysis variable; 1:q/qsatg 2:normalized RH • When qoption=1, the moisture analysis variable is pseudo-relative humidity. The saturation specific humidity, qsatg, is computed from the guess and held constant during the inner loop. Thus, the RH control variable can only change via changes in specific humidity, q. • When qoption=2, the moisture analysis variable is normalized RH. In this formulation we allow RH to change in the inner loop via changes to surface pressure (pressure), temperature, or specific humidity.
GSI Namelist-SETUP(cont.) • Diag_rad, diag_pcp, …: logical to turn off or on the diagnostic radiance file (true=on) • Write_diag: Logical to write out diagnostic files for outer iteration
GSI Namelist-GRIDOPTS regional: if true, perform a regional GSI run using either ARW or NMM inputs as background. If false, perform a global GSI analysis. wrf_nmm_regional: if true, background comes from WRF NMM. When use WRF ARW or perform a global analysis, set it to false. wrf_mass_regional: if true, background comes from WRF ARW. When use WRF NMM or perform a global analysis, set it to false. netcdf: if true, wrf files are in NETCDF format, otherwise wrf files are in binary format. This option only works for performing a regional GSI analysis.
GSI Namelist-GRIDOPTS(cont.) Nlon_regional: Number of x grid point in whole regional domain Nlat_reginoal: Number of y grid point in whole regional domain Nsig: number of sigma levels
GSI Namelist-BKGERR Refer to the talk “Background Errors Estimation and Tuning”
GSI Namelist-ANBKGERR Currently used in the RTMA operational run (for surface data analysis) and some hurricane studies. Research topic?
GSI Namelist-SETUP ndat=43: number of observation variables (not observation types). This number should be consistent with the lines in OBS_INPUT. So if adding a new observation variable, ndat must be incremented by one and one new line is added in OBS_INPUT. Based on dimensions of the variables in OBS_INPUT (e.g., dfile), the maximum value of ndat is 100.
GSI Namelist-OBS_INPUT • dfile(01)='prepbufr': observation file name. The observation file contains observations used for a GSI analysis. This file can include several observation variables from different observation types. The file name is default in GSI and cannot be changed. • dtype(01)='ps': analysis variable name that GSI can read in and handle. As an example here, GSI will read all ps observations from the file prepbufr. Please note this name should be consistent with that used in the GSI code. Otherwise, GSI will give a warning message like: ‘this is unknown observation variables and it will not be used in GSI analysis’