Baixe ARWUsers Guide V3 e outras Notas de estudo em PDF para Engenharia Agrícola, somente na Docsity!
Mesoscale & Microscale Meteorology Division • National Center for Atmospheric Research
Version 3 Modeling System User’s Guide July 2014
ARW
For the latest version of this document, please visit the ARW Users’ Web site at http://www.mmm.ucar.edu/wrf/users/. Contributors to this guide: Wei Wang, Cindy Bruyère, Michael Duda, Jimy Dudhia, Dave Gill, Michael Kavulich, Kelly Keene, Hui-Chuan Lin, John Michalakes, Syed Rizvi, Xin Zhang, Judith Berner and Kate Smith Contributors to WRF-Fire chapter: Jonathan D. Beezley, Janice L. Coen, and Jan Mandel Contributors to UPP section: Hui-Ya Chuang, Nicole McKee, Tricia Slovacek, Jamie Wolff, and Kate Smith Special Acknowledgment: We gratefully acknowledge the late Dr. Thomas T. Warner for his years of research, development, instruction, leadership, and motivation in the field of NWP modeling.
CONTENTS
WRF-ARW V3: User’s Guide i
CONTENTS
- − Introduction 1 - 1. Overview
- − The WRF Modeling System Program Components 1 -
- − Introduction 2 - 2. Software Installation
- − Required Compilers and Scripting Languages 2 -
- − Required/Optional Libraries to Download 2 -
- − Post-Processing Utilities............................................................... 2 -
- − UNIX Environment Settings 2 -
- − Building the WRF Code 2 -
- − Building the WPS Code 2 -
- − Building the WRFDA Code (for 3DVAR) 2 -
- − Building the WRFDA Code (for 4DVAR) ………………………….. 2 -
- − Introduction 3 - 3. The WRF Preprocessing System (WPS)
- − Function of Each WPS Program 3 -
- − Installing the WPS 3 -
- − Running the WPS 3 -
- − Creating Nested Domains with the WPS 3 -
- Land Use Data 3 - − Selecting Between USGS and MODIS-based
- − Selecting Static Data for the Gravity Wave Drag Scheme 3 -
- − Using Multiple Meteorological Data Sources 3 -
- − Alternative Initialization of Lake SSTs…………………………… 3 -
- − Parallelism in the WPS 3 -
- − Checking WPS Output 3 -
- − WPS Utility Programs 3 -
- − Writing Meteorological Data to the Intermediate Format........... 3 -
- − Creating and Editing Vtables..................................................... 3 -
- − Writing Static Data to the Geogrid Binary Format 3 -
- − Creating an Urban Fraction Field from NLCD Data 3-
- − Description of Namelist Variables 3 -
- − Description of GEOGRID.TBL Options 3 -
- − Description of index Options 3 -
- − Description of METGRID.TBL Options 3 -
- − Available Interpolation Options in Geogrid and Metgrid 3 -
- − Land Use and Soil Categories in the Static Data 3 -
- − WPS Output Fields 3 -
- − Introduction 4 - 4. WRF Initialization
- − Initialization for Ideal Cases 4 -
- − Initialization for Real Data Cases 4 - WRF-ARW V3: User’s Guide ii
- − Introduction 5 - 5. WRF Model
- − Installing WRF 5 -
- − Running WRF 5 -
- − Examples of namelists for various applications 5 -
- − Check Output 5 -
- − Trouble Shooting 5 -
- − Physics and Dynamics Options 5 -
- − Summary of PBL Physics Options………………………………. 5-
- − Summary of Microphysics Options………………………………. 5-
- − Summary of Cumulus Parameterization Options………………. 5-
- − Summary of Radiation Physics Options.................................... 5-
- − Description of Namelist Variables 5 -
- − WRF Output Fields 5 -
- − Introduction 6 - 6. WRF Data Assimilation
- − Installing WRFDA for 3D-Var Run…. 6 -
- − Installing WRFPLUS and WRFDA for 4D-Var Run 6 -
- − Running Observation Preprocessor (OBSPROC) 6 -
- − Running WRFDA 6 -
- − Radiance Data Assimilations in WRFDA 6 -
- − Precipitation Data Assimilation in WRFDA 4D-Var…………….. 6-
- − Updating WRF boundary conditions 6 -
- − Running gen_be 6 -
- − Additional WRFDA Exercises 6 -
- − WRFDA with Multivariate Background Error (MBE) Statistics… 6 -
- − WRFDA Diagnostics 6 -
- − Hybrid Data Assimilation 6 -
- − ETKF Data Assimilation............................................................. 6-
- − Description of Namelist Variables 6 -
- − Introduction 7 - 7. Objective Analysis (OBSGRID)
- − Program Flow 7 -
- − Source of Observations 7 -
- − Objective Analysis techniques in OBSGRID 7 -
- − Quality Control for Observations 7 -
- − Additional Observations 7 -
- − Surface FDDA option 7 -
- − Objective Analysis on Model Nests 7 -
- − How to run OBSGRID 7 - WRF-ARW V3: User’s Guide iii
- − Output Files 7 -
- − Plot Utilities 7 -
- − Observations Format 7 -
- − OBSGRID Namelist 7 -
- − WRF Build Mechanism 8 - 8. WRF Software
- − Registry 8 -
- − I/O Applications Program Interface (I/O API) 8 -
- − Timekeeping 8 -
- − Software Documentation 8 -
- − Performance 8 -
- − Introduction 9 - 9. Post-Processing Programs
- − NCL 9 -
- − RIP4 9 -
- − ARWpost 9 -
- − UPP 9 -
- − VAPOR 9 -
- − Introduction 10 - 10. Utilities and Tools
- − read_wrf_nc 10 -
- − iowrf 10 -
- − p_interp 10 -
- − TC Bogus Scheme 10 -
- − v_interp 10 -
- − proc_oml.f 10 -
- − Tools 10 -
- − Introduction A- Appendix A: WRF-Fire
- − WRF_Fire in idealized cases A-
- − Fire variables in namelist.input A-
- − namelist.fire A-
- − Running WRF_Fire on real data A-
- − Fire state variables A-
- − WRF-Fire software A-
CONTENTS WRF-ARW V3: User’s Guide iv
OVERVIEW WRF-ARW V3: User’s Guide 1 - 2 The WRF modeling system software is in the public domain and is freely available for community use.
The WRF Modeling System Program Components
The following figure shows the flowchart for the WRF Modeling System Version 3. As shown in the diagram, the WRF Modeling System consists of these major programs:
- The WRF Preprocessing System (WPS)
- WRF-DA
- ARW solver
- Post-processing & Visualization tools WPS This program is used primarily for real-data simulations. Its functions include 1) defining simulation domains; 2) interpolating terrestrial data (such as terrain, landuse, and soil
OVERVIEW WRF-ARW V3: User’s Guide 1 - 3 types) to the simulation domain; and 3) degribbing and interpolating meteorological data from another model to this simulation domain. Its main features include:
- GRIB 1/2 meteorological data from various centers around the world
- USGS 24 category and MODIS 20 category land datasets; USGS GTOPO elevation dataset; Global 5-minutes United Nation FAO, and North-America STATSGO 30 sec soil category dataset; 10-min greenness fraction data based on AVHRR and 30-sec greenness fraction data based on 10 years MODIS; MODIS- based leaf-area index; 0.15 degree monthly albedo and snow albedo data; and 1- degree deep soil temperature data; plus a few specialized datasets
- Map projections for 1) polar stereographic, 2) Lambert-Conformal, 3) Mercator and
- latitude-longitude
- Nesting
- User-interfaces to input other static data as well as met data WRF-DA This program is optional, but can be used to ingest observations into the interpolated analyses created by WPS. It can also be used to update WRF model's initial conditions when the WRF model is run in cycling mode. Its main features are as follows:
- It is based on an incremental variational data assimilation technique, and has both 3D- Var and 4D-Var capabilities
- It also includes the capability of hybrid data assimilation (Variational + Ensemble)
- The conjugate gradient method is utilized to minimize the cost function in the analysis control variable space
- Analysis is performed on an un-staggered Arakawa A-grid
- Analysis increments are interpolated to staggered Arakawa C-grid and it gets added to the background (first guess) to get the final analysis of the WRF-model grid
- Conventional observation data input may be supplied either in ASCII format via the “obsproc” utility or “PREPBUFR” format.
- Multiple satellite observation data input may be supplied in BUFR format
- Multiple radar data (reflectivity & radial velocity) input is supplied through ASCII format
- Multiple outer loop to address the nonlinearity
- Capability to compute adjoint sensitivity
- Horizontal component of the background (first guess) error is represented via a recursive filter (for regional) or power spectrum (for global). The vertical component is applied through projections on climatologically generated averaged eigenvectors and its corresponding Eigen values
- Horizontal and vertical background errors are non-separable. Each eigenvector has its own horizontal climatologically-determined length scale
- Preconditioning of the background part of the cost function is done via the control variable transform U defined as B= UU T
OVERVIEW WRF-ARW V3: User’s Guide 1 - 5
- Adaptive time stepping
- Orographic gravity wave drag
- Stochastic kinetic-energy backscatter scheme
- A number of idealized examples Graphics and Verification Tools Several programs are supported, including RIP4 (based on NCAR Graphics), NCAR Graphics Command Language (NCL), and conversion programs for other readily available graphics packages like GrADS. Program VAPOR, V isualization and A nalysis P latform for O cean, Atmosphere, and Solar R esearchers (http://www.vapor.ucar.edu/), is a 3-dimensional data visualization tool, and it is developed and supported by the VAPOR team at NCAR ([email protected]). Program MET, M odel E valuation T ools (http://www.dtcenter.org/met/users/), is developed and supported by the Developmental Testbed Center at NCAR ([email protected]). The details of these programs (with the exception of the MET program) are described more in the later chapters of this user's guide. See the above link for information about MET.
OVERVIEW WRF-ARW V3: User’s Guide 1 - 6
SOFTWARE INSTALLATION WRF-ARW V3: User’s Guide 2 - 2 Vendor Hardware OS Compiler Cray XC30 Intel Linux Intel Cray XE AMD Linux Intel IBM Power Series AIX vendor IBM Intel Linux Intel / PGI / gfortran SGI IA64 / Opteron Linux Intel COTS* IA32 Linux Intel / PGI / gfortran / g95 / PathScale COTS IA64 / Opteron Linux Intel / PGI / gfortran / PathScale Mac Power Series Darwin xlf / g95 / PGI / Intel Mac Intel Darwin gfortran / PGI / Intel NEC NEC Linux vendor Fujitsu FX10 Intel Linux vendor
- Commercial Off-The-Shelf systems The WRF model may be built to run on a single-processor machine, a shared-memory machine (that uses the OpenMP API), a distributed memory machine (with the appropriate MPI libraries), or on a distributed cluster (utilizing both OpenMP and MPI). The WRFDA and WPS packages run on the above-listed systems.
Required Compilers and Scripting Languages
The majority of the WRF model, WPS, and WRFDA codes are written in Fortran (what many refer to as Fortran 90). The software layer, RSL, which sits between WRF and WRFDA, and the MPI interface is written in C. WPS makes direct calls to the MPI libraries for distributed memory message passing. There are also ancillary programs that are written in C to perform file parsing and file construction, which are required for default building of the WRF modeling code. Additionally, the WRF build mechanism uses several scripting languages: including perl, Cshell and Bourne shell. The traditional UNIX text/file processing utilities are used: make, m4, sed, and awk. See Chapter 8: WRF Software (Required Software) for a more detailed listing of the necessary pieces for the WRF build.
SOFTWARE INSTALLATION WRF-ARW V3: User’s Guide 2 - 3
Required/Optional Libraries to Download
The only library that is always required is the netCDF package from Unidata (login > Downloads > NetCDF). Most of the WRF post-processing packages assume that the data from the WRF model, the WPS package, or the WRFDA program are using the netCDF libraries. One may also need to add ‘/path-to-netcdf/netcdf/bin’ to their path so that they may execute netCDF utility commands, such as ncdump. Use a netCDF version that is 3.6.1 or later. WRF does not currently use any of the additional capabilities that are in the newer versions of netCDF (such as 4.0 and later): compression, chunking, HDF5, etc. Note 1 : If one wants to compile WRF system components on a Linux or Darwin system that has access to multiple compilers, link the correct external libraries. For example, do not link the libraries built with PathScale when compiling the WRF components with gfortran. Even more, the same options when building the netCDF libraries must be used when building the WRF code (32 vs 64 bit, assumptions about underscores in the symbol names, etc.). Note 2 : If netCDF-4 is used, be sure that it is installed without activating parallel I/O based on HDF5. The WRF modeling system is able to use either the classic data model from netCDF-3 or the compression options supported in netCDF-4. If you are going to be running distributed memory WRF jobs, you need a version of MPI. You can pick up a version of mpich, but you might want your system group to install the code. A working installation of MPI is required prior to a build of WRF using distributed memory. Either MPI-1 or MPI-2 are acceptable. Do you already have an MPI lying around? Try which mpif which mpicc which mpirun If these are all defined executables in your path, you are probably OK. Make sure your paths are set up to point to the MPI lib , include , and bin directories. As with the netCDF libraries, you must build MPI consistently with the WRF source code. Note that to output WRF model data in Grib1 format, Todd Hutchinson (WSI) has provided a complete source library that is included with the software release. However, when trying to link the WPS, the WRF model, and the WRFDA data streams together, always use the netCDF format.
SOFTWARE INSTALLATION WRF-ARW V3: User’s Guide 2 - 5 o if you have OpenMP on your system, this is how to specify the number of threads
- setenv MP_STACK_SIZE 64000000 o OpenMP blows through the stack size, set it large o However, if the model still crashes, it may be a problem of over- specifying stack size. Set stack size sufficiently large, but not unlimited. o On some systems, the equivalent parameter could be KMP_STACKSIZE, or OMP_STACKSIZE
- unlimit o especially if you are on a small system
Building the WRF Code
The WRF code has a fairly complicated build mechanism. It tries to determine the architecture that you are on, and then presents you with options to allow you to select the preferred build method. For example, if you are on a Linux machine, it determines whether this is a 32 or 64 bit machine, and then prompts you for the desired usage of processors (such as serial, shared memory, or distributed memory). You select from among the available compiling options in the build mechanism. For example, do not choose a PGI build if you do not have PGI compilers installed on your system. An instructional web site describes the sequence of steps required to build the WRF and WPS codes (though the instructions are specifically given for tcsh and GNU compilers). http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php
- Get the WRF zipped tar file for WRFV3 from o http://www.mmm.ucar.edu/wrf/users/download/get_source.html o Always get the latest version if you are not trying to continue a long project, or duplicate previous work
- unzip and untar the file o gzip - cd WRFV3.TAR.gz | tar - xf – o Alternatively tar – xzf WRFV3.TAR.gz on some systems
- cd WRFV
- ./configure o serial means single processor o smpar means Symmetric Multi-Processing/Shared Memory Parallel (OpenMP) – this does not reliably work on most non-IBM machines o dmpar means Distributed Memory Parallel (MPI) o dm+sm means Distributed Memory with Shared Memory (for example, MPI across nodes with OpenMP within a node) – usually better performance is through dmpar only o The second option is for nesting: 0 = no nesting, 1 = standard static nesting, 2 = nesting with a prescribed set of moves, 3 = nesting that allows
SOFTWARE INSTALLATION WRF-ARW V3: User’s Guide 2 - 6 a domain to follow a vortex (typhoon tracking) o A typical option that may be included on the ./ configure command is the flag “ - d ” (for debug). This option removes optimization, which is useful when running a debugger (such as gdb or dbx) o For bounds checking and some additional exception handling, the debugging flag “ - D ” may be selected. Only PGI, Intel, and gfortran have been set up to use this option.
- ./compile em_real (or any of the directory names in ./WRFV3/test directory)
- ls - ls main/.exe* o If you built a real-data case, you should see ndown.exe , real.exe , and wrf.exe o If you built an ideal-data case, you should see ideal.exe and wrf.exe The WRF code supports a parallel build option, an option that compiles separate source code files in the WRF directories at the same time on separate processors (though those processors need to share memory) via a parallel make. The purpose of the parallel build option is to be able to speed-up the time required to construct executables. In practice, users typically see approximately a 2x speed-up, a limit imposed by the various dependencies in the code due to modules and USE association. To enable the parallel build option, the user sets an environment variable, J. In csh, to utilize two processors, before the ./compile command, issue the following: setenv J “-j 2” Users may wish to only use a single processor for the build. In which case: setenv J “-j 1” Users wishing to run the WRF chemistry code must first download the WRF model tar file, and untar it. Then the chemistry code is untar’ed in the WRFV3 directory (this is the chem directory structure). Once the source code from the tar files is combined, then users may proceed with the WRF chemistry build.
Building the WPS Code
Building WPS requires that WRFV3 be already built. If you plan to use Grib2 data, additional libraries for zlib, png, and jasper are required. Please see details in Chapter 3.
- Get the WPS zipped tar file WPSV3.TAR.gz from o http://www.mmm.ucar.edu/wrf/users/download/get_source.html
- Also download the geographical datasets from the same page. There are new data sets for land cover for North America (NLCD), and high-resolution urban data sets for select North American cities.
- Unzip and untar the source code file o gzip - cd WPSV3.TAR.gz | tar - xf -