{"id":10913,"date":"2017-08-31T15:31:09","date_gmt":"2017-08-31T15:31:09","guid":{"rendered":"https:\/\/www.nwpsaf.eu\/site\/?page_id=10913"},"modified":"2025-01-29T09:50:29","modified_gmt":"2025-01-29T09:50:29","slug":"aapp-v8-installation-guide","status":"publish","type":"page","link":"https:\/\/nwp-saf.eumetsat.int\/site\/software\/aapp\/documentation\/aapp-v8-installation-guide\/","title":{"rendered":"AAPP v8 Installation Guide"},"content":{"rendered":"<h1><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/nwp-saf.eumetsat.int\/images\/NWPSAFLogo_gradient_S.png\" alt=\"NWP SAF\" \/><\/h1>\n<h1 style=\"text-align: center;\">AAPP Installation Guide<\/h1>\n<p style=\"text-align: center;\"><span style=\"font-size: small;\">ATOVS and AVHRR Pre-processing Package (AAPP)<\/span><\/p>\n<p><span style=\"font-family: Arial;\">Document: NWPSAF-MO-UD-005<\/p>\n<p>Date: <\/span> January 2025<\/p>\n<p><small><i><span style=\"font-family: Arial;\"><span style=\"font-size: small;\"><small>Author: Nigel Atkinson (Met Office)<\/small><\/span><\/span><\/i><\/small><\/p>\n<p style=\"text-align: left;\"><small> <\/small>This documentation was developed within the context of the EUMETSAT Satellite Application Facility on Numerical Weather Prediction (NWP SAF), under the Cooperation Agreement dated 29 June 2011 between EUMETSAT and the Met Office, UK, by one or more partners within the NWP SAF. The partners in the NWP SAF are the Met Office, ECMWF, DWD and M\u00e9t\u00e9o France.<\/p>\n<p style=\"text-align: left;\"><b>Copyright 2017, EUMETSAT, All Rights Reserved.<br \/>\n<\/b><\/p>\n<hr \/>\n\n<h2>Introduction<\/h2>\n<p>This document describes the installation of the ATOVS and AVHRR Processing Package (AAPP), which is a deliverable of EUMETSAT&#8217;s Numerical Weather Prediction Satellite Application Facility (NWP SAF). For details on the capabilities of AAPP, please see the companion document the <a href=\"https:\/\/nwp-saf.eumetsat.int\/site\/software\/aapp\/documentation\/aapp-v8-userguide\/\">AAPP User Guide<\/a>.<\/p>\n<p>The currently available software has been developed for UNIX and Linux systems. Users who want to adapt the software to other operating system environments are obliged to do this without installation support. AAPP has been tested by the NWP SAF on Linux and macOS operating systems. It has also been run on AIX systems, though currently only limited support can be provided for this type of system.<\/p>\n<p>The following is required for the installation of the main AAPP modules:<\/p>\n<ul>\n<li>UNIX or Linux operating system (32-bit or 64-bit)<\/li>\n<li>Korn shell<\/li>\n<li>A Fortran90 Compiler<\/li>\n<li>A C compiler<\/li>\n<li>make utilities<\/li>\n<li>perl, flex, yacc, bison<\/li>\n<li>gunzip and tar<\/li>\n<li>about 9GB of disk space<\/li>\n<\/ul>\n<p>External libraries are required to run some parts of AAPP (detailed more fully in a later section):<\/p>\n<ul>\n<li>A BUFR library, either BUFRDC or ecCodes, both available from <a href=\"https:\/\/www.ecmwf.int\/en\/computing\/software\">ECMWF<\/a><\/li>\n<li>HDF5 libraries (available from <a href=\"https:\/\/portal.hdfgroup.org\/documentation\/index.html\">The HDF Group<\/a>)<\/li>\n<li>SZIP and ZLIB compression (for use with HDF5 &#8211; see <a href=\"https:\/\/support.hdfgroup.org\/HDF5\/release\/obtain5.html#extlibs\">http:\/\/www.hdfgroup.org\/HDF5\/release\/obtain5.html#extlibs<\/a>)<\/li>\n<\/ul>\n<p>The IASI local processing software, OPS-LRS, is delivered separately from the main AAPP, and its installation is described in the <a href=\"https:\/\/nwp-saf.eumetsat.int\/site\/download\/documentation\/aapp\/NWPSAF-MF-UD-006_OPS_manual.pdf\">OPS-LRS User Manual<\/a>.<\/p>\n<p>If a system library is missing, and if you have administrator access, you may be able to install it like this<\/p>\n<ul>\n<li>CentOS: sudo yum install [flex bison &#8230;]<\/li>\n<li>Ubuntu: sudo apt install [flex bison &#8230;]<\/li>\n<\/ul>\n<p>You shoud avoid installing AAPP or the test cases into directories whose names contain accents e.g. \u00e9. The Fortran code cannot cope with accents and is likely to fail.<\/p>\n<h2>Delivered items<\/h2>\n<p>AAPP is normally delivered via the <a href=\"https:\/\/nwp-saf.eumetsat.int\/site\/\">NWP SAF web site<\/a>. Each user needs to first register on the web site. Then select the &#8220;software downloads&#8221; button and follow the instructions to select the required deliverables (e.g. AAPP and OPS-LRS). A link to the latest full release will then be displayed, which can be downloaded as a gzipped tar file. This file contains source code and the majority of the required data files. You may also need to download some of the update packages, which allow building of a specific release, if required.<\/p>\n<p>Some of the larger data files must be downloaded separately. These can be downloaded via <a href=\"https:\/\/nwp-saf.eumetsat.int\/site\/software\/aapp\/download\/\">https:\/\/nwp-saf.eumetsat.int\/site\/software\/aapp\/download\/<\/a>. If you plan to run the MAIA cloud mask then you will need the <span style=\"font-style: italic;\">MAIA4 data file<\/span>, and if you plan to run OPS-LRS (the IASI level 1 processor) you will need the <span style=\"font-style: italic;\">OPS-LRS auxiliary data<\/span>. Note that a script is available to simplify the process of downloading the auxiliary data. Test cases are also available for download.<\/p>\n<p>An important part of each release is the <span style=\"font-style: italic;\">Release Note<\/span>. This will give details on the changes made and will provide guidance on how to build or update your installation. Release notes can be found on the <a href=\"https:\/\/nwp-saf.eumetsat.int\/site\/software\/aapp\/documentation\/release-history\/\">Release History<\/a> page.<\/p>\n<p>You may also need to consult the other documents on the <a href=\"https:\/\/nwp-saf.eumetsat.int\/site\/software\/aapp\/documentation\/\">AAPP documentation<\/a> page. For example, the Scientific Description, the Software Description and the Data Formats documents.<\/p>\n<h2>Installation<\/h2>\n<p>The procedure to install AAPP can be summarised as follows:<\/p>\n<ol>\n<li>Download the required AAPP files\u00a0to your workstation and unpack them<\/li>\n<li>Install any external libraries that you may need<\/li>\n<li>Configure the installation to suit your workstation<\/li>\n<li>Build AAPP by runing &#8220;make&#8221;<\/li>\n<\/ol>\n<p>The paragraphs below describe the various steps required to build AAPP, but you may also wish to consult the example build scripts that are available in the <a href=\"https:\/\/nwp-saf.eumetsat.int\/downloads\/aapp_data_files\">downloads directory<\/a>, in particular <a href=\"https:\/\/nwp-saf.eumetsat.int\/downloads\/aapp_data_files\/install_aapp8.sh\">install_aapp8.sh<\/a>. Save the script to your workstation and run <em>chmod +x install_aapp8.sh<\/em>. You can run the different parts of the script in turn, first to download and install specified versions of the external libraries, then to configure and install AAPP and OPS-LRS, and finally to download the necessary data files. You can customise the build script to suit your requirements.<\/p>\n<h3>Download and unpack AAPP<\/h3>\n<p>We assume the use of AAPP v8.1 in the example below, but it could be any full release.<\/p>\n<p>Copy the AAPP_8.1.tgz file and (optionally) the AAPP_MAIA4_thresholds_v8.tgz and AAPP_MAIA4_atlas.tgz files to a suitable location on your system and unpack them like this:<\/p>\n<pre>tar -xzf AAPP_8.1.tgz\r\ncd AAPP_8.1\r\ntar -xzf ..\/AAPP_MAIA4_atlas.tgz\r\ntar -xzf ..\/AAPP_MAIA4_thresholds_v8.tgz\r\n<\/pre>\n<p>If you wish, you can re-name the AAPP_8.1 directory after the first step. It is referred to in this document as the <span style=\"font-style: italic;\">AAPP top directory.<\/span><\/p>\n<p>Some older versions of tar do not support gunzip, in which case you can do:<\/p>\n<pre>gunzip -c AAPP_8.1.tgz | tar -xf -\r\n<\/pre>\n<p>If you need to install an update release (having previously installed a full release), go to the AAPP top directory and type<\/p>\n<pre>tar -xmzf AAPP_update_8.x.tgz\r\n<\/pre>\n<p>where x is the update number and the -m flag ensures that the newly-unpacked files have a current time stamp and will therefore be picked up by the subsequent &#8220;make&#8221;.<\/p>\n<h3>Install external libraries<\/h3>\n<p>The table below lists the external libraries that are most likely to be needed, their use in AAPP, and how to build them (after unpacking). In the table, <span style=\"font-family: monospace;\">yyy<\/span> and <span style=\"font-family: monospace;\">zzz<\/span> indicate directories that you have to specify on your system. Some of these libraries (e.g. HDF5) can be downloaded as binaries, but the table assumes you are building from source. Most users will not need to install all the libraries, just the ones needed for your application.<\/p>\n<table border=\"1\" width=\"100%\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"10%\"><center>Library<\/center><\/td>\n<td valign=\"top\" width=\"20%\"><center>Uses in AAPP<\/center><\/td>\n<td valign=\"top\" width=\"10%\"><center>Available from<\/center><\/td>\n<td valign=\"top\" width=\"30%\"><center>Install scripts<\/center><\/td>\n<td valign=\"top\" width=\"30%\"><center>Notes<\/center><\/td>\n<\/tr>\n<tr>\n<td>BUFRDC<\/td>\n<td>Legacy BUFR library. Used in AAPP for encoding and decoding of BUFR datasets from a range microwave and infrared sounders.<\/td>\n<td><a href=\"https:\/\/www.ecmwf.int\/en\/computing\/software\">ECMWF<\/a><\/td>\n<td><span style=\"font-family: monospace;\"><br \/>\n.\/build_library<br \/>\n.\/install<\/span><\/td>\n<td>Fortran77 and C code.<br \/>\nThe <span style=\"font-family: monospace;\">build_library<\/span> interactive script offers you a choice of compilers and installation location. Use the same compiler for AAPP. Environment variable BUFR_TABLES is needed at run time.<br \/>\n<a href=\"https:\/\/software.ecmwf.int\/wiki\/display\/EMOS\/Emoslib\">EMOSLIB<\/a> may be used as an alternative to BUFRDC.<\/td>\n<\/tr>\n<tr>\n<td>ecCodes<\/td>\n<td>BUFR and GRIB library from ECMWF. Has largely superseded GRIB_API and will eventually replace BUFRDC.<\/p>\n<p>For BUFR encode\/decode, the AAPP v8 user can choose whether to use the BUFRDC interface or the ecCodes interface.<\/p>\n<p>For MAIA, GRIB forecast files are used as input. It is recommended to use ecCodes for this, but GRIB_API will work as an alternative. The choice should be made at the AAPP configure step; you should not build AAPP with both ecCodes and GRIB_API.<\/p>\n<p>Note: ecCodes is relatively new, so if you encounter a problem, please report it to software.support@ecmwf.int<\/td>\n<td><a href=\"https:\/\/www.ecmwf.int\/en\/computing\/software\">ECMWF<\/a><\/td>\n<td>If &#8220;cmake&#8221; is not already installed on your system, you will need to install this first.<br \/>\n<span style=\"font-family: monospace;\"><br \/>\ncd $build_dir<br \/>\ncmake \\<br \/>\n-DCMAKE_INSTALL_PREFIX=${install_dir} \\<br \/>\n-DCMAKE_Fortran_COMPILER=${FC} \\<br \/>\n$source_dir<br \/>\nmake<br \/>\nmake install &gt;install.out<\/span><\/td>\n<td>The environment variables and directories could be set up as follows (using v2.22.1 as an example; it is recommended to use the latest release):<br \/>\n<span style=\"font-family: monospace;\"><br \/>\nFC=gfortran<br \/>\nsource_dir=$PWD\/eccodes-2.22.1-Source<br \/>\nbuild_dir=$PWD\/build_2.22.1_${FC}<br \/>\ninstall_dir=$PWD\/install_2.22.1_${FC}<br \/>\nrm -rf $build_dir $install_dir<br \/>\nmkdir -p $build_dir $install_dir<br \/>\n<\/span>On some systems you may need to build a static version of the library, using the flag <span style=\"font-family: monospace;\">-DBUILD_SHARED_LIBS=OFF<\/span> or <span style=\"font-family: monospace;\">-DBUILD_SHARED_LIBS=BOTH<\/span>If you will be working with GFS forecast files (for MAIA4) then it is important to ensure that ecCodes is built with jpeg2000 support &#8211; via the OpenJPEG or JasPer libraries. Normally cmake will detect installed copies of these libraries when building ecCodes, e.g. \/usr\/lib64\/libjasper.so. However, if you have them installed in a non-standard location you can use the cmake directive <span style=\"font-family: monospace;\">-DCMAKE_PREFIX_PATH=[directory]<\/span>. If jpeg2000 is correctly enabled, you should see the text &#8220;HAVE_JPEG=1&#8221; in ecbuild.log, after the &#8220;cmake&#8221; step.<\/p>\n<p>Please note that for recent ecCodes releases (2.19.0 onwards) the libraries (libeccodes.so, etc.) are installed in a directory <em>lib64<\/em>, not <em>lib<\/em>. If you are using the AAPP build script to install ecCodes (install_aapp8.sh), a link is created from <em>lib64<\/em> to <em>lib<\/em>.<\/td>\n<\/tr>\n<tr>\n<td>HDF5<\/td>\n<td>1) Reading Sensor Data Record files for ATMS, CrIS, VIIRS, MWHS, MWTS, IRAS.<br \/>\n2) Reading IASI eigenvector files.<br \/>\n3) Creating the MAIA output files.<br \/>\n4) Generating .h5 versions of the various .l1c datasets.<\/td>\n<td><a href=\"https:\/\/portal.hdfgroup.org\/documentation\/index.html\">The HDF group<\/a><\/td>\n<td><span style=\"font-family: monospace;\"><span style=\"font-family: monospace;\"><br \/>\n#For AIX:<br \/>\nFCFLAGS=&#8221;-qextname&#8221;<br \/>\nexport FCFLAGS<\/span><\/span>#For all systems:<br \/>\n.\/configure [options]make<br \/>\nmake install<\/td>\n<td>Typical configure:&gt;<br \/>\n<span style=\"font-family: monospace;\"><br \/>\n.\/configure \u2212\u2212prefix=yyy \\<br \/>\n\u2212\u2212enable-fortran <\/span>The Fortran interface (libhdf5hl_fortran) is required if you wish to use MAIA. It is not required for the other applications.You may also need (see below):<br \/>\n<span style=\"font-family: monospace;\"><br \/>\n\u2212\u2212with-szlib=PATH_TO_SZIP<br \/>\n<\/span><br \/>\nFor MAIA, it is best to use HDF5 version 1.8.8 or later (a patch is available if you want to use earlier versions &#8211; contact the NWP SAF Helpdesk for details).<\/p>\n<p>Note for AIX xlf: By default, AAPP is built with the &#8220;-qextname&#8221; compiler flag; in which case you should use it for the hdf5 library also.<\/td>\n<\/tr>\n<tr>\n<td>SZIP and ZLIB<\/td>\n<td>May be used by HDF5.<\/td>\n<td><a href=\"https:\/\/support.hdfgroup.org\/HDF5\/release\/obtain5.html#extlibs\">The HDF group<\/a><\/td>\n<td><span style=\"font-family: monospace;\">.\/configure \u2212\u2212prefix=zzz<br \/>\nmake<br \/>\nmake install<\/span><\/td>\n<td>These libraries are not explicitly used by AAPP, but they may be needed for your installation.<\/td>\n<\/tr>\n<tr>\n<td>GRIB_API<\/td>\n<td>Although GRIB_API is still available from ECMWF, it has now been superseded by ecCodes, so the description has been removed for this version of the document.<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Flex<\/td>\n<td>Needed for OPS-LRS. Often comes with Linux distribution, but not always.<\/td>\n<td><a href=\"https:\/\/github.com\/westes\/flex\/releases\">Github<\/a>. The latest release should work, or use 2.5.35.<\/td>\n<td><span style=\"font-family: monospace;\">.\/autogen.sh<br \/>\n.\/configure \u2212\u2212prefix=zzz<br \/>\nmake<br \/>\nmake install <\/span><\/td>\n<td>For OPS-LRS use, you can copy the libfl.a to OPS-LRS directory src\/EXT\/env\/lib<\/td>\n<\/tr>\n<tr>\n<td>gettext<\/td>\n<td>autopoint is needed to install flex. Often comes with Linux distribution, but not always.<\/td>\n<td><a href=\"http:\/\/ftp.gnu.org\/pub\/gnu\/gettext\/\">ftp.gnu.org<\/a><\/td>\n<td><span style=\"font-family: monospace;\">.\/configure \u2212\u2212prefix=zzz<br \/>\nmake<br \/>\nmake install <\/span><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>jasper<\/td>\n<td>jpeg2000 support when reading GFS forecast files in MAIA4<\/td>\n<td><a href=\"https:\/\/www.ece.uvic.ca\/~frodo\/jasper\/\">Univ of Victoria<\/a><\/td>\n<td><span style=\"font-family: monospace;\">mkdir -p $build &amp;&amp; cd $build<br \/>\ncmake -G &#8220;Unix Makefiles&#8221; -H$src -B$build \\<br \/>\n-DCMAKE_INSTALL_PREFIX=$install \\<br \/>\n-DCMAKE_BUILD_TYPE=Release \\<br \/>\n-DCMAKE_SKIP_INSTALL_RPATH=YES \\<br \/>\n-DJAS_ENABLE_DOC=NO<br \/>\nmake<br \/>\nmake install<\/span><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>metopizer<\/td>\n<td>Provides utilities for converting Metop raw data to level 0. Level 0 is the specified input format for AAPP_RUN_METOP.<\/td>\n<td><a href=\"https:\/\/user.eumetsat.int\">EUMETSAT<\/a> (search for eps tool metopizer)<\/td>\n<td><span style=\"font-family: monospace;\">export CXXFLAGS=&#8221;-std=c++98&#8243;<br \/>\n.\/configure \u2212\u2212prefix=zzz<br \/>\nmake install <\/span><\/td>\n<td>Note the use of the legacy C++ standard<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Note that some other external libraries (e.g. xerces) are also needed to build OPS-LRS. These are available from the <a href=\"https:\/\/nwp-saf.eumetsat.int\/site\/software\/aapp\/download\/\">AAPP Download<\/a> page. See the OPS-LRS User Manual for details.<\/p>\n<p>As a guide, the requirements for external libraries, depending on your application, are listed below:<\/p>\n<ul>\n<li>Processing raw (or level 0 in the case of Metop) ATOVS and AVHRR data to level 1c or 1d: <strong>none<\/strong><\/li>\n<li>Processing IASI using OPS-LRS: <strong>xerces<\/strong> and <strong>fftw<\/strong><\/li>\n<li>Converting to hdf5, or reading IASI eigenvector files: <strong>HDF5 C interface<\/strong><\/li>\n<li>BUFR encode \/ decode (e.g. DBNet data handling): <strong>BUFRDC<\/strong> and\/or <strong>ecCodes<\/strong><\/li>\n<li>Running MAIA: <strong>HDF5 Fortran interface<\/strong> and <strong>ecCodes<\/strong><\/li>\n<\/ul>\n<h3>Configure AAPP<\/h3>\n<p>This section is split into 2 parts: firstly the instructions for configuring a &#8220;core&#8221; AAPP installation with no external libraries (which may be adequate for some users), and secondly the instructions for creating a fuller installation. Note that the procedure uses a perl script named <span style=\"font-style: italic;\">configure<\/span> that is located in the AAPP top directory. (It does not use GNU autotools).<\/p>\n<h4 style=\"margin-left: 40px;\">Configure the &#8220;core&#8221; AAPP<\/h4>\n<p>All that is required to install &#8220;core&#8221; AAPP is to go to the AAPP top directory and run the <span style=\"font-style: italic;\">configure<\/span> script with your site-id specified as:<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212site-id=\u00a0<\/span>a 3-character abbreviation of your centre<br \/>\nand the Fortran compiler you are using as<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212fortran-compiler=<\/span> any of : gfortran ifort pgf90 g95 AIX AIX-Hitachi<br \/>\nFor example, to configure AAPP for a Linux system using gfortran you could type (from the top directory)<br \/>\n&lt;divstyle=&#8221;margin-left: 40px;=&#8221;&#8221; margin-top:=&#8221;&#8221; 10px;=&#8221;&#8221; height:=&#8221;&#8221; 15px;=&#8221;&#8221;&gt;&lt;spanchecked=&#8221;true&#8221;style=&#8221;font-family: courier=&#8221;&#8221; new,courier,monospace;=&#8221;&#8221;&gt;<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">.\/configure \u2212\u2212site-id=UKM \u2212\u2212fortran-compiler=gfortran<\/span><br \/>\n&lt;\/spanchecked=&#8221;true&#8221;style=&#8221;font-family:&gt;&lt;\/divstyle=&#8221;margin-left:&gt; There are additional options (type <span style=\"font-family: Courier New,Courier,monospace;\">.\/configure<\/span> from the top directory to view them) that you may wish to specify, such as your local station name, and some must be specified to obtain full AAPP functionality as described below. But to complete the &#8220;core&#8221; AAPP installation type<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">make<\/span><\/p>\n<p>Check that the installation was successful and that you did not see any errors. If it was OK you may start testing AAPP. You will be able to run the NOAA test case and parts of the Metop test case.<\/p>\n<h4 style=\"margin-left: 40px;\">Configure your &#8220;fuller&#8221; AAPP installation<\/h4>\n<p>Go to the <span style=\"font-style: italic;\">AAPP top directory<\/span> and type <span style=\"font-family: Courier New,Courier,monospace;\">.\/configure<\/span> to see the options.<\/p>\n<p>You have to specify the following:<\/p>\n<div style=\"margin-left: 40px;\"><span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212site-id=\u00a0 <\/span>a 3-character abbreviation of your centre<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212fortran-compiler=<\/span>any of : gfortran ifort pgf90 AIX AIX-Hitachi<\/div>\n<p>Note 1: To see the complete list of compilers that have been used in past versions of AAPP, check the contents of the files in directory <span style=\"font-style: italic;\">config<\/span>. However, some of these are no longer supportable by the NWP SAF due to their age and lack of test platforms. In particular, we no longer recommend the use of a FORTRAN77 compiler such as g77, as many parts of AAPP will not build. Also g95 does not work with the MAIA4 calls in avh2hirs.<\/p>\n<p>Note 2: Some Fortran 90 compilers require different flags to indicate the directory to search for Module files. The default is &#8220;-I&#8221;, but you may need &#8220;-M&#8221;. If necessary, you can adjust the applicable file in the <span style=\"font-style: italic;\">config<\/span> directory (and please inform the NWP SAF Helpdesk if you find something that needs changing).<\/p>\n<p>In addition, you can optionally specify:<\/p>\n<div style=\"margin-left: 40px;\"><span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212prefix=<\/span> installation prefix, if you wish to install the AAPP executables and data files to somewhere other than the current directory e.g. $HOME\/AAPP_8_runtime<br \/>\nNote: do <em>not<\/em> choose this directory to be the same as the AAPP top directory, otherwise all your source files will be deleted!<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212station=<\/span> your local station name (see list in AAPP\/src\/navigation\/libnavtool\/stations.txt). The default is &#8220;dummy_station&#8221;<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212station-id=<\/span> your local station ID, for &#8220;datset name&#8221; field in the level 1a\/1b header. The default is WE (Western Europe)<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212external-libs=<\/span> location and options for external libraries (in quotes), e.g. <span style=\"font-family: Courier New,Courier,monospace;\">&#8220;-L${DIR_ECCODES}\/lib -leccodes -leccodes_f90 -L${DIR_HDF5}\/lib -lhdf5 -lhdf5_hl -lhdf5_fortran -lhdf5hl_fortran&#8221;<\/span>.<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212external-includes=<\/span> location and library options for external include files, e.g. <span style=\"font-family: Courier New,Courier,monospace;\">-I${DIR_HDF5}\/include<\/span><br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212external-modules=<\/span> location for external Fortran90 modules, e.g. <span style=\"font-family: Courier New,Courier,monospace;\">-M ${DIR_ECCODES}\/include<\/span><br \/>\nNote: some compilers use <span style=\"font-family: Courier New,Courier,monospace;\">&#8220;-I&#8221;<\/span> instead of <span style=\"font-family: Courier New,Courier,monospace;\">&#8220;-M&#8221;<\/span>.<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212c-compiler=<\/span> name of your C compiler (for use with METOP tools, IASI tools and HDF5).<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212tle-user=<\/span> www.space-track.org username; required for using tle retrieval from the internet.<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212tle-passwd=<\/span> www.space-track.org password<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212scriptdir=<\/span> optional directory in which to place the AAPP shell scripts. Normally the scripts and .exe files are placed together in &#8220;bin&#8221; directories, but on some systems, notably Cygwin, they must be separated, e.g. specify &#8220;scripts&#8221;.<\/div>\n<p>If an external library is centrally installed on your system (e.g. in \/usr\/lib), you will not need to specify <span style=\"font-family: Courier New,Courier,monospace;\">-L<\/span> under <span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212external libs<\/span>, but you will need to link to it using <span style=\"font-family: Courier New,Courier,monospace;\">-l<\/span>. Similarly, if your external library has centrally-installed include files (e.g. in \/usr\/include) then you will not need to specify <span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212external-includes<\/span>.<\/p>\n<p>Regarding HDF5: if you do not need to run MAIA, and just want the HDF5 conversion tools, it is sufficient to just specify &#8220;<span style=\"font-family: Courier New,Courier,monospace;\">-lhdf5<\/span>&#8220;. Some systems may require <span style=\"font-family: Courier New,Courier,monospace;\">-lz<\/span>.<\/p>\n<p>You will probably need to use the same Fortran compiler for AAPP as was used to build the HDF5 Fortran interface. You may also need some of the same compiler flags (e.g. &#8220;-qextname&#8221; for the AIX xlf compiler).<\/p>\n<p>If the Fortran compiler you wish to use is not listed, you may create your own configuration file in the <em>config<\/em> directory, taking one of the existing ones as a template. If you do so successfully, please inform the NWP SAF, for the benefit of other users.<\/p>\n<p>If your station is not contained in the station list file, AAPP\/src\/navigation\/libnavtool\/<b>stations.txt<\/b>, you can edit and update the file if necessary before you go on to build AAPP. Please notify the NWP SAF of the coordinates of your station, so that it can be included in a future update.<\/p>\n<p>The &#8220;station&#8221;, &#8220;station_id&#8221;, &#8220;tle_user&#8221; and &#8220;tle_password&#8221; options are optional. The values that you enter are stored in the ATOVS_ENV8 file. You may edit this file later if you want to change the values.<\/p>\n<p>When you build AAPP, the source, data files and executables are initially placed in a fixed directory tree structure as follows:<\/p>\n<div style=\"margin-left: 80px;\"><span style=\"font-family: Courier New,Courier,monospace;\">AAPP_8\/AAPP\/bin<br \/>\nAAPP_8.1\/AAPP\/data<br \/>\nAAPP_8.1\/AAPP\/src<br \/>\nAAPP_8.1\/metop-tools\/bin<br \/>\nAAPP_8.1\/metop-tools\/src<br \/>\netc.<\/span><\/div>\n<p>This will be fine for many users. However, if the &#8220;prefix&#8221; option is specified then you can install elsewhere the <em>bin<\/em> and <em>data<\/em> directories, and other files needed at run time. This is done via the &#8220;make install&#8221; command. The path that you enter is also stored in the ATOVS_ENV8 file, as environment variable AAPP_PREFIX. If you do not use the &#8220;prefix&#8221; option then AAPP_PREFIX is set to the AAPP top directory.<\/p>\n<p>Thus the run-time directories are always <span style=\"font-family: Courier New,Courier,monospace;\">$AAPP_PREFIX\/AAPP\/bin<\/span>, <span style=\"font-family: Courier New,Courier,monospace;\">$AAPP_PREFIX\/AAPP\/data<\/span>, etc.<\/p>\n<p>For example, an installation with hdf5, BUFRDC and ecCodes capability could be set up like this:<\/p>\n<pre>hdf=\/path_to_hdf5\r\nbufr=\/path_to_bufrdc\r\nec=\/path_to_eccodes\r\n\r\n[[ ${LD_LIBRARY_PATH:-} = *${hdf}* ]] || export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${hdf}\/lib\r\n[[ ${LD_LIBRARY_PATH:-} = *${ec}* ]] || export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}${ec}\/lib\r\nconfigure \u2212\u2212station=exeter \u2212\u2212fortran-compiler=ifort \u2212\u2212site-id=UKM \\\r\n    \u2212\u2212external-libs=\"-L$bufr\/lib -lbufr -L$ec\/lib -leccodes -leccodes_f90 -L$hdf\/lib -lhdf5 -lhdf5_hl -lhdf5_fortran -lhdf5hl_fortran\" \\\r\n    \u2212\u2212external-includes=\"-I$hdf\/include -I$ec\/include\"\r\n<\/pre>\n<p>If a library is centrally installed on your system you will not need to modify <span style=\"font-family: Courier New,Courier,monospace;\">LD_LIBRARY_PATH<\/span>. The error messages from the build step should tell you if any libraries are missing.<\/p>\n<p>The <em>configure<\/em> script creates a file &lt;em&#8221;&gt;Makefile.ARCH in the top directory, which contains the system settings and is referenced by all the lower-level makefiles. You may wish to modify the contents of this file before proceeding, for example:<\/p>\n<ul>\n<li>to change some of the compiler flags. In particular you are advised to check that the optimisation flags are suitable for your system.<\/li>\n<li>to provide an explicit path to the Fortran compiler.<\/li>\n<\/ul>\n<p>Some components of AAPP may be customised by the user. For example, the IASI level 1d format is defined by the file <em>AAPP\/include\/iasi1d.h<\/em>. This file has parameters that define the maximum number of Principal Components scores that can be accommodated in the 1d file, and the maximum number of channels. If you want something other than the default (500 channels, plus 300 scores) then you should modify this file before building the software. The number of channels or scores actually <em>used<\/em> may be set at run time, provided it is less than the maximum.<\/p>\n<h3>Build AAPP<\/h3>\n<p>To build the complete package you just need to do one of the following:<\/p>\n<div style=\"margin-left: 40px;\">If you did not specify an installation prefix in the <span style=\"font-style: italic;\">configure<\/span> step, type<\/div>\n<p style=\"margin-left: 80px;\"><span style=\"font-family: Courier New,Courier,monospace;\">make<\/span><\/p>\n<div style=\"margin-left: 40px;\">If you did specify an installation prefix, type<\/div>\n<div style=\"margin-left: 80px;\"><span style=\"font-family: Courier New,Courier,monospace;\">make install<\/span><\/div>\n<p>There are a number of other possibilities that users requiring flexibility may adopt:<\/p>\n<ul>\n<li>AAPP v8 comprises three main components: (i) the core AAPP, (ii) METOP tools and (iii) IASI tools. To build or re-build just one component, <span style=\"font-style: italic;\">cd<\/span> to the appropriate directory (AAPP, metop-tools or iasi-tools) then run <em>make<\/em> as before. Note that metop-tools must be built before iasi-tools. However, it is advisable to first run <em>make<\/em> from the top of the AAPP tree in order to avoid problems with library dependencies.<\/li>\n<li>To clean the whole of AAPP, i.e. to delete all the binaries, libraries, data files and object files in the AAPP_8 tree (not the installation tree), type<\/li>\n<\/ul>\n<div style=\"margin-left: 80px;\"><span style=\"font-family: Courier New,Courier,monospace;\">make clean<\/span><\/div>\n<ul>\n<li>To clean part of AAPP (e.g. AAPP, metop-tools, iasi-tools or a lower-level module), go to the appropriate directory and type<\/li>\n<\/ul>\n<div style=\"margin-left: 80px;\"><span style=\"font-family: Courier New,Courier,monospace;\">make clean<\/span><\/div>\n<ul>\n<li>To clean the object files of AAPP (or metop-tools, or iasi-tools), leaving the data files and executables unchanged (this can be useful on operational systems), go to the AAPP, metop-tools or iasi-tools directory and type<\/li>\n<\/ul>\n<div style=\"margin-left: 80px;\"><span style=\"font-family: Courier New,Courier,monospace;\">make clean_obj<\/span><\/div>\n<ul>\n<li>To re-build a lower-level module of AAPP (e.g. amsubcl), cd to the appropriate library (e.g. AAPP\/src\/calibration\/libamsubcl) and type<\/li>\n<\/ul>\n<div style=\"margin-left: 80px; font-family: Courier New,Courier,monospace;\">make lib<br \/>\ncd ..\/bin<br \/>\nmake bin<\/div>\n<ul>\n<li>To re-install selected data files, cd to the sub-directory of <span style=\"font-style: italic;\">src<\/span> that contains the\u00a0data<br \/>\nfile and type<\/li>\n<\/ul>\n<div style=\"margin-left: 80px;\"><span style=\"font-family: Courier New,Courier,monospace;\">make dat<\/span><\/div>\n<ul>\n<li>AAPP is delivered with Makefiles already supplied. To re-generate all makefiles (e.g. if you have added a module), go to the top directory and type<\/li>\n<\/ul>\n<div style=\"margin-left: 80px;\"><span style=\"font-family: Courier New,Courier,monospace;\">perl makefile.PL<\/span><\/div>\n<p>If <em>make<\/em> fails because an external library is missing, locate the library and modify your <span style=\"font-style: italic;\">Makefile.ARCH<\/span> or re-run<span style=\"font-style: italic;\"> configure<\/span>. Remember that <span style=\"font-family: monospace;\">-L<\/span> specifies the location of the library (if it is not in one of the standard directories) and <span style=\"font-family: monospace;\">-lx<\/span> links the library named <span style=\"font-family: monospace;\">libx.a<\/span>. For example, on the ECMWF AIX system, when building AAPP with HDF5 support it was necessary to add <span style=\"font-family: monospace;\">-lz<\/span> to link the centrally-installed zlib.<br \/>\nIf the <span style=\"font-style: italic;\">make<\/span> fails for reasons that are not obvious, before re-trying it is recommended that you remove any partially installed components using <span style=\"font-style: italic;\">make clean<\/span>. Similarly if having built AAPP you decide that you want to install the BUFR or GRIB libraries, then you can <span style=\"font-style: italic;\">make clean<\/span>, re-run <span style=\"font-style: italic;\">configure<\/span>, then re-run <span style=\"font-style: italic;\">make.<br \/>\n<\/span><\/p>\n<h3>The ATOVS_ENV8 file<\/h3>\n<p>In AAPP v1 to v5 the ATOVS_ENV file that sets up the AAPP environment was always located in the user&#8217;s $HOME directory. This caused problems for some users and made it difficult to run different versions of AAPP simultaneously. For AAPP v6 the system was changed, and it is the same in AAPP v7 and v8:<\/p>\n<ul>\n<li>The script that sets up the environment is\u00a0called ATOVS_ENV8.<\/li>\n<li>ATOVS_ENV8 is created in the installation directory by the <span style=\"font-style: italic;\">configure<\/span> script.<\/li>\n<li>Also in the AAPP installation directory is a file called ATOVS_CONF. This file is run by all the built-in AAPP scripts.<\/li>\n<li>When ATOVS_CONF is called it first looks for an ATOVS_ENV8 file in $HOME. If one exists, it will be used.<\/li>\n<li>If there is no $HOME\/ATOVS_ENV8 then the ATOVS_ENV8 file in the AAPP installation directory will be used.<\/li>\n<\/ul>\n<p>The user may if required move the ATOVS_ENV8 file to his $HOME directory (or create a link). Then to set up the environment for AAPP the user&#8217;s script (or interactive shell) needs:<\/p>\n<div style=\"margin-left: 40px;\"><span style=\"font-family: Courier New,Courier,monospace;\">. $HOME\/ATOVS_ENV8<br \/>\n<\/span><\/div>\n<p>Alternatively the user&#8217;s script may source ATOVS_CONF:<\/p>\n<div style=\"margin-left: 40px;\"><span style=\"font-family: Courier New,Courier,monospace;\">AAPP_PREFIX=&#8230;&#8230;.<br \/>\n. $AAPP_PREFIX\/ATOVS_CONF<br \/>\n<\/span><\/div>\n<p>In either case all the AAPP scripts and binaries (including those in metop-tools and iasi-tools) will then be accessible by name, since ATOVS_ENV8 sets up $PATH to include the necessary directories.<\/p>\n<p>You may need to edit the ATOVS_ENV8 file after it has been created by <span style=\"font-style: italic;\">configure<\/span> &#8211; e.g. to set the correct path for the <span style=\"font-style: italic;\">GMT<\/span> executables (rarely used these days) and to set $LD_LIBRARY_PATH for use with HDF5 or ecCodes. Note that older versions of the HDF5 library (5-1.8.1 and earlier) required the SZIP library to be centrally installed or included in $LD_LIBRARY_PATH.<\/p>\n<h3>Special considerations for Windows PC installation<\/h3>\n<p>Previous versions of the AAPP Installation Guide gave hints on running AAPP under (i) Microsoft Windows Services for Unix (SFU) and (ii) Microsoft\u00a0Subsystem for UNIX-based Applications (SUA). However, these are considered obsolete so those sections have been removed. It may still be possible to run AAPP under Cygwin, but this has not been tested by the NWP SAF. The notes made some years ago are included below.<\/p>\n<p>Cygwin is available from <a href=\"http:\/\/www.cygwin.com\/\">http:\/\/www.cygwin.com\/<\/a>.As well as standard utilities, you need to install perl, a korn shell (pdksh.exe) and a suitable Fortran compiler. The following changes are needed:<\/p>\n<ul style=\"margin-left: 40px;\">\n<li>Ensure the LIB environment variable (<span style=\"font-style: italic; font-family: monospace;\">echo $LIB<\/span>) does not contain any Windows path names with colons or spaces, otherwise <span style=\"font-style: italic;\">make<\/span> will fail. You can nullify this variable by typing:<\/li>\n<\/ul>\n<div style=\"font-family: monospace; margin-left: 120px;\">LIB=<\/div>\n<ul style=\"margin-left: 40px;\">\n<li>The AAPP scripts require that the korn shell executable exists as \/bin\/ksh. So create a link as follows<\/li>\n<\/ul>\n<div style=\"margin-left: 120px;\"><span style=\"font-family: monospace;\">ln -s \/bin\/pdksh.exe \/bin\/ksh<\/span><\/div>\n<ul style=\"margin-left: 40px;\">\n<li>You should use the <span style=\"font-family: Courier New,Courier,monospace;\">\u2212\u2212scriptdir=scripts<\/span> option in <span style=\"font-style: italic;\">configure<\/span>. If you do not then the scripts will not be installed; this is because Cygwin will not create <span style=\"font-style: italic;\">prog<\/span> if <span style=\"font-style: italic;\">prog.exe<\/span> already exists in the same directory.<\/li>\n<\/ul>\n<ul style=\"margin-left: 40px;\">\n<li>Having run <span style=\"font-style: italic;\">configure<\/span>, ensure that your PATH definition in ATOVS_ENV8 does not contain any Windows path names with spaces. Edit ATOVS_ENV8 if necessary.<\/li>\n<\/ul>\n<ul style=\"margin-left: 40px;\">\n<li>On some systems, <span style=\"font-style: italic;\">make<\/span> fails because it does not recognise &#8220;\\cp&#8221; in the Makefiles. If this is the case, edit <span style=\"font-style: italic;\">Makefile.PL<\/span>,<br \/>\nchange &#8220;\\cp&#8221; to &#8221; cp&#8221;, change &#8220;\\rm&#8221; to &#8221; rm&#8221; and &#8220;\\mkdir&#8221; to &#8221; mkdir&#8221; (i.e. space instead of \\). Then type<\/li>\n<\/ul>\n<div style=\"margin-left: 120px;\"><span style=\"font-family: monospace;\">perl Makefile.PL<\/span><\/div>\n<h3>AAPP directory structure<\/h3>\n<p>After the successful installation of AAPP on your machine you should find on your system the following AAPP directory structure:<br \/>\n.\/AAPP<br \/>\n.\/AAPP\/bin<br \/>\n.\/AAPP\/gmt<br \/>\n.\/AAPP\/include<br \/>\n.\/AAPP\/lib<br \/>\n.\/AAPP\/man<br \/>\n.\/AAPP\/man\/man1<br \/>\n.\/AAPP\/man\/man3<br \/>\n.\/AAPP\/man\/man5<br \/>\n.\/AAPP\/module<br \/>\n.\/AAPP\/orbelems<br \/>\n.\/AAPP\/orbelems\/ephe<br \/>\n.\/AAPP\/orbelems\/orb_elem<br \/>\n.\/AAPP\/orbelems\/satpos<br \/>\n.\/AAPP\/orbelems\/tbus_db<br \/>\n.\/AAPP\/orbelems\/tbus_db\/2010-03<br \/>\n.\/AAPP\/orbelems\/tracking<br \/>\n.\/AAPP\/src<br \/>\n.\/AAPP\/src\/calibration<br \/>\n.\/AAPP\/src\/calibration\/bin<br \/>\n.\/AAPP\/src\/calibration\/libamsuacl<br \/>\n.\/AAPP\/src\/calibration\/libamsubcl<br \/>\n.\/AAPP\/src\/calibration\/libavhrcl<br \/>\n.\/AAPP\/src\/calibration\/libcal<br \/>\n.\/AAPP\/src\/calibration\/libhirscl<br \/>\n.\/AAPP\/src\/calibration\/libhirscl_algoV4<br \/>\n.\/AAPP\/src\/calibration\/libmhscl<br \/>\n.\/AAPP\/src\/calibration\/libmsucl<br \/>\n.\/AAPP\/src\/decommutation<br \/>\n.\/AAPP\/src\/decommutation\/bin<br \/>\n.\/AAPP\/src\/decommutation\/libdecom<br \/>\n.\/AAPP\/src\/libauxaapp<br \/>\n.\/AAPP\/src\/libbufrdummy<br \/>\n.\/AAPP\/src\/maia4<br \/>\n.\/AAPP\/src\/maia4\/bin<br \/>\n.\/AAPP\/src\/maia4\/libaapp_viirs<br \/>\n.\/AAPP\/src\/maia4\/libavhrrin_tools<br \/>\n.\/AAPP\/src\/maia4\/libmaia4<br \/>\n.\/AAPP\/src\/maia4\/libmaia4IO<br \/>\n.\/AAPP\/src\/maia4\/libmapviirscris<br \/>\n.\/AAPP\/src\/navigation<br \/>\n.\/AAPP\/src\/navigation\/bin<br \/>\n.\/AAPP\/src\/navigation\/libMSLIB77_V3.1<br \/>\n.\/AAPP\/src\/navigation\/libbrolyd<br \/>\n.\/AAPP\/src\/navigation\/libephtrack<br \/>\n.\/AAPP\/src\/navigation\/libnavnoaa<br \/>\n.\/AAPP\/src\/navigation\/libnavtool<br \/>\n.\/AAPP\/src\/navigation\/libsgp<br \/>\n.\/AAPP\/src\/navigation\/libtbus<br \/>\n.\/AAPP\/src\/navigation\/libtle<br \/>\n.\/AAPP\/src\/preproc<br \/>\n.\/AAPP\/src\/preproc\/bin<br \/>\n.\/AAPP\/src\/preproc\/libatov<br \/>\n.\/AAPP\/src\/preproc\/libatovin<br \/>\n.\/AAPP\/src\/preproc\/libatovpp<br \/>\n.\/AAPP\/src\/preproc\/libavh2hirs<br \/>\n.\/AAPP\/src\/preproc\/libmappiasi<br \/>\n.\/AAPP\/src\/tools<br \/>\n.\/AAPP\/src\/tools\/bin<br \/>\n.\/AAPP\/src\/tools\/libaappbufr<br \/>\n.\/AAPP\/src\/tools\/libaapphdf5<br \/>\n.\/AAPP\/src\/tools\/libf7cp<br \/>\n.\/AAPP\/src\/tools\/libf7gp<br \/>\n.\/AAPP\/src\/tools\/libf7ml<br \/>\n.\/AAPP\/src\/tools\/libf7nl1b<br \/>\n.\/AAPP\/src\/tools\/libf7tp<br \/>\n.\/AAPP\/src\/tools\/libsatid<br \/>\n.\/AAPP\/src\/tools_eccodes<br \/>\n.\/AAPP\/src\/tools_eccodes\/bin<br \/>\n.\/AAPP\/src\/tools_eccodes\/libecbufr<br \/>\n.\/config<br \/>\n.\/iasi-tools<br \/>\n.\/iasi-tools\/bin<br \/>\n.\/iasi-tools\/include<br \/>\n.\/iasi-tools\/lib<br \/>\n.\/iasi-tools\/man<br \/>\n.\/iasi-tools\/src<br \/>\n.\/iasi-tools\/src\/bin<br \/>\n.\/iasi-tools\/src\/libcnes_iasi_brd_1.6<br \/>\n.\/iasi-tools\/src\/libcnes_iasi_brd_1.7<br \/>\n.\/iasi-tools\/src\/libcnes_iasi_ctx_1.2<br \/>\n.\/iasi-tools\/src\/libcnes_iasi_grd_1.6<br \/>\n.\/iasi-tools\/src\/libcnes_iasi_grd_1.7<br \/>\n.\/iasi-tools\/src\/libcnes_iasi_odb_1.4<br \/>\n.\/iasi-tools\/src\/libeps_iasil1b_6.6<br \/>\n.\/iasi-tools\/src\/libeps_iasil1b_9.0<br \/>\n.\/iasi-tools\/src\/libeps_iasil1c_6.6<br \/>\n.\/iasi-tools\/src\/libeps_iasil1c_9.0<br \/>\n.\/metop-tools<br \/>\n.\/metop-tools\/bin<br \/>\n.\/metop-tools\/include<br \/>\n.\/metop-tools\/lib<br \/>\n.\/metop-tools\/man<br \/>\n.\/metop-tools\/src<br \/>\n.\/metop-tools\/src\/bin<br \/>\n.\/metop-tools\/src\/libaapp_avhrrl1b<br \/>\n.\/metop-tools\/src\/libaapp_avhrrl1c<br \/>\n.\/metop-tools\/src\/libccsds<br \/>\n.\/metop-tools\/src\/libeps_avhrrl1b_6.5<br \/>\n.\/metop-tools\/src\/libeps_common<br \/>\n.\/metop-tools\/src\/libeps_metopl0<br \/>\n.\/metop-tools\/src\/libmetop_amsua<br \/>\n.\/metop-tools\/src\/libmetop_avhrr<br \/>\n.\/metop-tools\/src\/libmetop_common<br \/>\n.\/metop-tools\/src\/libmetop_hirs<br \/>\n.\/metop-tools\/src\/libmetop_intex<br \/>\n.\/metop-tools\/src\/libmetop_mhs<br \/>\n.\/metop-tools\/src\/libmetop_mmam<br \/>\n.\/metop-tools\/src\/libobtutc<\/p>\n<p>In the run-time directory $AAPP_PREFIX (if applicable) you will find:<br \/>\n.\/AAPP\/<br \/>\n.\/AAPP\/bin\/<br \/>\n.\/AAPP\/lib\/<br \/>\n.\/AAPP\/include\/<br \/>\n.\/AAPP\/data\/<br \/>\n.\/metop-tools\/<br \/>\n.\/metop-tools\/bin\/<br \/>\n.\/metop-tools\/lib\/<br \/>\n.\/metop-tools\/include\/<br \/>\n.\/iasi-tools\/<br \/>\n.\/iasi-tools\/bin\/<br \/>\n.\/iasi-tools\/lib\/<br \/>\n.\/iasi-tools\/include\/<\/p>\n<p>TLE files for the test cases are provided as part of the test case. For running with your own HRPT data you should create the following directories: <span style=\"font-family: monospace;\">${DIR_NAVIGATION}\/tle_db<\/span> and\/or <span style=\"font-family: monospace;\">${DIR_NAVIGATION}\/tbus_db<\/span> (where <span style=\"font-family: monospace;\">DIR_NAVIGATION<\/span> is defined in <span style=\"font-family: monospace;\">ATOVS_ENV8<\/span>) and place your TBUS or TLE files in monthly subdirectories. In the case of TLE, the &#8220;get_tle&#8221; script does all this automatically, creating directories as required.<\/p>\n<h3>After installation<\/h3>\n<p>After you have executed the installation procedure a few steps have to be performed before you can go to run AAPP:<\/p>\n<ul>\n<li>Check whether your installation was successful. Note that the error messages from the Fortran compilations might differ depending on the compiler you are using. Some compilation warnings are to be expected, but you should not see any actual errors. The &#8220;make&#8221; process will terminate early if there is an error.<\/li>\n<li>If you have customised the configuration file (e.g. are using a different compiler from those that are supported), it is advisable to run the tools <span style=\"font-style: italic;\">det_ftnfort<\/span> and <span style=\"font-style: italic;\">det_reclen<\/span> (both installed into AAPP\/bin) to check that you have used the correct convention for Fortran file names and record length specifiers. These scripts will tell you what to do if the values need changing.<\/li>\n<li>You should be aware that l1b\/l1c\/l1d output files will always be in the native byte order of the machine you are running on (not applicable to BUFR output, which is character-oriented). If you&#8217;re not sure whether your machine is big or little endian, type a command such as <span style=\"font-family: monospace;\">echo 01 | od -x<\/span> . The result will be <span style=\"font-family: monospace;\">3130<\/span> on a little-endian system and <span style=\"font-family: monospace;\">3031<\/span> on a big-endian system.<\/li>\n<li>If your UNIX system does <span style=\"font-style: italic;\">not<\/span> have a Korn shell then you will need to adapt the various scripts (e.g. in directory\u00a0AAPP\/bin) to your shell type. Modify also accordingly the *.ksh scripts contained in\u00a0subdirectories of\u00a0AAPP\/src in order not to lose the modifications when you rebuild AAPP in order to implement e.g. code modifications.<\/li>\n<li>Some of the AAPP commands have man pages. Add directory (destination directory)\/AAPP\/man\/ to your MANPATH list to get access to the AAPP manual pages by e.g. adding to your .profile<br \/>\n<blockquote><p>MANPATH=(destination directory)\/AAPP\/man:$MANPATH<\/p><\/blockquote>\n<p>The man pages are contained in the subdirectories man1\/, man3\/ and man5\/ of directory (dest.-dir.)\/AAPP\/man. You can display the man pages in the usual way by typing at your shell prompt<\/p>\n<blockquote><p>man filename (without .suffix).<\/p><\/blockquote>\n<p>However, the definitive descriptions of the AAPP commands are given in the software description document, rather than the man pages. And not all commands have a man page.<\/li>\n<li>To allow you to call AAPP scripts and binaries directly, it is recommended that you source the <span style=\"font-family: monospace;\">ATOVS_CONF<\/span> file as part of your own setup, as described previously.<\/li>\n<li>Orbital prediction: Two orbital prediction methods are implemented in AAPP v8: TBUS and Two-Line-Element (TLE). A third method, referred to as the &#8220;SPOT model&#8221;, is now obsolete. TLE is recommended as an alternative to TBUS since the accuracy is usually better. The data may be downloaded from the <a href=\"https:\/\/www.space-track.org\/\">Space-Track<\/a> web site using AAPP script <i>get_tle<\/i>, or alternatively from <a href=\"http:\/\/celestrak.com\/NORAD\/elements\/\">Celestrak<\/a>. You will need to obtain a user name and password for the Space-Track site, which should be entered in ATOVS_ENV8 under parameters PAR_NAVIGATION_TLE_USER and PAR_NAVIGATION_TLE_PASSWD. This assumes that the computer on which you run AAPP has internet access; if it does not then you will need to download the files using a different computer and transfer them. To choose which method to use for a given satellite, just modify the ATOVS_ENV8 variable PAR_NAVIGATION_LISTEBUL, e.g.\n<pre> \r\nPAR_NAVIGATION_DEFAULT_LISTESAT='noaa19 noaa18 noaa15 M02 M01'\r\nPAR_NAVIGATION_DEFAULT_LISTEBUL='tle tle tle tle tle'\r\n<\/pre>\n<p>AAPP will use TBUS bulletins for satellites for which &#8220;tbus&#8221; is specified and TLE for satellites with &#8220;tle&#8221;. These parameters are used by commands <i>AAPP_RUN_NOAA, AAPP_RUN_METOP, alleph, amsuacl, amsubcl, hirscl, mhscl<\/i> and <i> avhrcl<\/i>. These programs are not applicable to the NPP satellite, and therefore NPP is not included in the <tt>PAR_NAVIGATION_DEFAULT_LISTESAT<\/tt> list. But you can generate <span style=\"font-style: italic;\">satpos<\/span> files for NPP in the usual way, by running <span style=\"font-family: monospace;\">tleing -s NPP<\/span> and <span style=\"font-family: monospace;\">satpostle -s NPP<\/span>.<\/p>\n<p>There are 4 other optional environment parameters related to TLE &#8211; <i>get_tle<\/i> will provide default values if they are not defined by the user or in ATOVS_ENV8. The defaults are given below:<\/p>\n<pre>export DIR_DATA_TLE=${DIR_NAVIGATION}\/tle_db  #directory to store data\r\nexport PAR_NAVIGATION_TLE_TIMEOUT=60 #connection timeout in seconds\r\nexport PAR_NAVIGATION_TLE_URL_DOWNLOAD='https:\/\/www.space-track.org'\r\nexport PAR_NAVIGATION_TLE_CATALOGUE='25338,26536,27453,28654,33591,37849,29499,38771,27431,32958,37214,25994,27424' #Catalogue numbers\r\n<\/pre>\n<\/li>\n<li>Choice of HIRS calibration algorithm:<br \/>\nThe HIRS calibration algorithm is selected by means of environment variable HIRSCL_VERSION in ATOVS_ENV8. To select the old algorithm, as used in AAPP v4 and earlier, set the value to 0. To select the newer algorithm set it to 1. The new algorithm accumulates data on calibration runs from previous passes, and is designed to give better consistency with global data, especially for partial super-swaths. There are various other parameters available for the new algorithm &#8211; see comment lines in ATOVS_ENV8. If in doubt, use the default for these.<\/li>\n<li>Locale<br \/>\nOn some systems the unix &#8220;sort&#8221; command (which is used by several AAPP scripts) may give unexpected answers. You should check your locale settings (type <span style=\"font-style: italic;\">locale<\/span>): you should see\u00a0<span style=\"font-family: monospace;\">LC_ALL=C<\/span> or <span style=\"font-family: monospace;\">LANG=C<\/span> (with <span style=\"font-family: monospace;\">LC_ALL<\/span> undefined). If this is not the case, add <span style=\"font-family: monospace;\">LC_ALL=C<\/span> to your shell startup script (or add it to ATOVS_ENV8).<\/li>\n<\/ul>\n<h3>A note on the Community Satellite Processing Package (CSPP) and HDF utilities<\/h3>\n<p>The CSPP is supplied by the University of Wisconsin, for level 1 and level 2 processing Suomi-NPP and JPSS direct readout data. For detailed information, see the <a href=\"http:\/\/cimss.ssec.wisc.edu\/cspp\/\">CSPP web page<\/a>. A detailed description of CSPP is beyond the scope of this document. However, it is worth pointing out some matters relevant to AAPP.<\/p>\n<p>Firstly, CSPP includes pre-built copies of various libraries, including HDF5 library (C interface &#8211; not Fortran90), SZIP, Jasper, etc. You may wish to link to these when building AAPP.<\/p>\n<p>Secondly, CSPP includes the HDF5 tools, which can be used to complement AAPP. These are in directory <span style=\"font-family: monospace;\">CSPP3.2\/SDR_3_2\/common\/local\/bin\/<\/span> . You may wish to add this directory to your $PATH. Of particular relevance is the utility <span style=\"font-style: italic;\">nagg<\/span>, which can be used to concatenate NPP products and granules. For example, to concatenate granules of VIIRS channels M9, M10 and the terrain-corrected geolocation:<\/p>\n<pre>nagg -g 0 -n 100 -O cspp -D dev -t GMTCO,SVM09,SVM10 GMTCO*.h5 SVM*.h5\r\n<\/pre>\n<p>This version of nagg supports CrIS FSR (full spectral resolution) data. For more detail on this utility, see the corresponding <a href=\"https:\/\/support.hdfgroup.org\/projects\/jpss\/nagg_index.html\">HDF group web page<\/a>.<\/p>\n<h2>Testing<\/h2>\n<h3>Test cases<\/h3>\n<p>After having successfully installed AAPP on your workstation you may start testing AAPP. Several different test cases are provided. You should run the ones that are relevant to your application. The test cases supplied with AAPP v8.1 are listed in the following table. Other test cases may be available via the AAPP web pages. Each test case is provided with a 00README.txt file that gives detailed instructions.<\/p>\n<table border=\"1\" width=\"100%\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"15%\"><b>Title<\/b><\/td>\n<td valign=\"top\" width=\"10%\"><b>File<\/b><\/td>\n<td valign=\"top\" width=\"35%\"><b>Purpose<\/b><\/td>\n<td valign=\"top\" width=\"20%\"><b>Scripts<\/b><\/td>\n<td valign=\"top\" width=\"20%\"><b>Notes<\/b><\/td>\n<\/tr>\n<tr>\n<td>NOAA-19 HRPT<\/td>\n<td style=\"font-family: monospace;\">noaa19_test.tgz<\/td>\n<td>Processes raw HRPT to level 1d for AMSU-A, MHS and HIRS, and AVHRR to level 1b. Optionally run MAIA to generate cloud masks on the HIRS grid and\/or the AVHRR grid. Data from July 2017.<\/td>\n<td><span style=\"font-family: monospace;\">noaa19_run.sh<br \/>\nnoaa19_maia_avhrr.sh<\/span><\/td>\n<td>No external libraries needed for the basic l1c\/l1d generation.<br \/>\nTo run MAIA, set environment variable RUN_MAIA=&#8221;yes&#8221;. HDF5 library needed for MAIA. GFS forecast files are downloaded from the internet.<\/td>\n<\/tr>\n<tr>\n<td>Metop-B AHRPT<\/td>\n<td style=\"font-family: monospace;\">metopb_test.tgz<\/td>\n<td>Processes raw HRPT to level 1d for AMSU-A, MHS and HIRS, and AVHRR to level 1b. Optionally run OPS-LRS for IASI. Optionally run MAIA to generate cloud masks on the HIRS grid and\/or the AVHRR grid. Data from July 2017.<\/td>\n<td><span style=\"font-family: monospace;\">metopb_run.sh<br \/>\n<\/span><span style=\"font-family: monospace;\">metopb_maia_avhrr.sh<\/span><\/td>\n<td>No external libraries needed for the basic l1c\/l1d generation.<br \/>\nTo run OPS-LRS, set environment variable PATH_OPS. Auxiliary files are downloaded from NWPSAF web site if they are not already present.<br \/>\nTo run MAIA, set environment variable RUN_MAIA=&#8221;yes&#8221;. HDF5 library needed for MAIA. GFS forecast files are downloaded from the internet.<\/td>\n<\/tr>\n<tr>\n<td>ATMS\/CrIS preprocessing<\/td>\n<td>atmscris_test.tgz<\/td>\n<td>Ingest SDR data files generated by CSPP. Carry out spatial filtering for ATMS and spectral thinning for CrIS. Map ATMS to CrIS.<\/td>\n<td><span style=\"font-family: monospace;\">atmscris_run.sh<\/span><\/td>\n<td>HDF5 library needed.<\/td>\n<\/tr>\n<tr>\n<td>BUFR<\/td>\n<td style=\"font-family: monospace;\">bufr_test.tgz<\/td>\n<td>Exercise the BUFR encode\/decode routines for both BUFRDC and ecCodes, and compare the results. Uses the 1c\/1d output files from the NOAA19, Metop-B and ATMS\/CrIS test cases, and also a set of SDR files for the FY-3C instruments.<\/td>\n<td><span style=\"font-family: monospace;\">bufr_run_bufrdc.sh<br \/>\nbufr_run_eccodes.sh<br \/>\ncompare_bufr_data.sh<br \/>\ncompare_decoded_data.sh<\/span><\/td>\n<td>BUFRDC and\/or ecCodes library needed.<br \/>\nHDF5 library needed for FY-3C ingest.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>There are also some legacy test cases on the AAPP web pages that are still relevant for AAPP v8:<\/p>\n<table border=\"1\" width=\"100%\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"15%\"><b>Title<\/b><\/td>\n<td valign=\"top\" width=\"10%\"><b>File<\/b><\/td>\n<td valign=\"top\" width=\"35%\"><b>Purpose<\/b><\/td>\n<td valign=\"top\" width=\"20%\"><b>Scripts<\/b><\/td>\n<td valign=\"top\" width=\"20%\"><b>Notes<\/b><\/td>\n<\/tr>\n<tr>\n<td>Metopizer<\/td>\n<td style=\"font-family: monospace;\">metopizer_and_AAPP.tgz<\/td>\n<td>Processing of Metop CADU data to level 1c<\/td>\n<td><span style=\"font-family: monospace;\">run_metopizer_and_AAPP.sh<\/span><\/td>\n<td>Metopizer is a software package supplied by EUMETSAT, for handling raw AHRPT. Available from <a href=\"https:\/\/www.eumetsat.int\/software\">Software<\/a>.<\/td>\n<\/tr>\n<tr>\n<td>VIIRS to CrIS<\/td>\n<td style=\"font-family: monospace;\">viirs_to_cris.tgz<\/td>\n<td>Mapping of VIIRS imager data to CrIS footprint<\/td>\n<td><span style=\"font-family: monospace;\">viirs_to_cris_run.sh<br \/>\nviirs_to_cris_withMAIA4.sh<\/span><\/td>\n<td>2 granules of CrIS data and 1 granule of VIIRS data are supplied. Makes use of &#8220;nagg&#8221;. For MAIA4, forecast files are downloaded from the internet.<\/td>\n<\/tr>\n<tr>\n<td>MMAM<\/td>\n<td style=\"font-family: monospace;\">test_MMAM.tgz<\/td>\n<td>Extraction of Multi Mission Administrative Message from Metop HKTM file<\/td>\n<td><span style=\"font-family: monospace;\">test_mmam.sh<\/span><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Each test case is contained within a zipped tar file. To unpack a test case, copy the file to a suitable directory and type <span style=\"font-family: Courier New,Courier,monospace;\">tar -xzf name.tgz<\/span><\/p>\n<p>Before running any of the test cases, you should set the environment variable AAPP_PREFIX to the installation directory for AAPP v8.<\/p>\n<h3>Preparation for Processing Your Own HRPT Read-Out Data<\/h3>\n<p>Before trying to use AAPP for processing NOAA HRPT read-out data from your own station check first whether<\/p>\n<ul>\n<li>your station delivers the data in the format expected by AAPP, i.e. the 10-bit words of the down-linked HRPT data are stored right-justified in 16-bit words.<br \/>\nIf this is not the case you have to reformat the data. If your data are in packed 10-bit words then you can use the tool <span style=\"font-style: italic;\">unpack_noaa_hrpt<\/span>to unpack the data, but you will probably need to change the values of parameters <span style=\"font-style: italic;\">bytes_in<\/span> and <span style=\"font-style: italic;\">words_out<\/span> in <span style=\"font-style: italic;\">unpack_noaa_hrpt.F<\/span>, since different stations use different conventions.<\/li>\n<li>your station position is contained in AAPP\/src\/navigation\/libnavtool\/stations.txt. If this is not the case insert it and copy the updated file additionally to AAPP\/data\/navigation\/, and modify the variable &#8220;STATION&#8221; in the environment variable file ATOVS_ENV8 with the name of your station. Note: if &#8220;STATION&#8221; is empty then AAPP_RUN_NOAA will fail!<\/li>\n<\/ul>\n<p>To process METOP AHRPT data you must make sure that your station produces PFS Level 0 data files, as defined by EUMETSAT. If the reception station does not deliver files in L0 format then the user should consider using METOPizer software to pre-process the raw AHRPT (available from <a href=\"https:\/\/www.eumetsat.int\/software\">www.eumetsat.int\/software<\/a>. The METOPizer programs <span style=\"font-style: italic;\">tvcdu_to_ccsds<\/span> and <span style=\"font-style: italic;\">ccsds_to_l0<\/span> are likely to be needed. Please note the following advice from EUMETSAT:<\/p>\n<div style=\"margin-left: 40px;\">If you are reading CADU packets then the installation procedure has changed. The Metopizer used to include a Reed-Solomon library licensed under the GPL which has to be installed separately now. There is an INSTALL file inside the package with instructions.<\/div>\n<p>To process NPP and JPSS data you will need an external processing package to generate Sensor Data Record (SDR) files suitable for input to AAPP. Suitable packages are supplied by NASA (&#8220;IPOPP&#8221;) and by the University of Wisconsin (&#8220;CSPP&#8221;). Details are available elsewhere.<\/p>\n<h3>Processing scripts<\/h3>\n<p><span style=\"font-weight: bold; text-decoration: underline;\">Direct readout processing<\/span><br \/>\nThe AAPP_RUN_NOAA chain script processes NOAA HRPT data through to level 1d. The script offers the following options:<\/p>\n<ul>\n<li>Specify the instruments to be processed (from the list &#8220;AMSU-A AMSU-B HIRS MSU AVHRR DCS ATMS CRIS&#8221;)<\/li>\n<li>Specify the output grids required at level 1d (from the list &#8220;AMSU-A AMSU-B HIRS ATMS CRIS&#8221;)<\/li>\n<li>Specify an output directory to receive the product files<\/li>\n<li>Omit <span style=\"font-style: italic;\">avh2hirs<\/span> if not required<\/li>\n<\/ul>\n<p>In early versions of AAPP, it was suggested that the user should customise the script to suit his own requirements, but now that the functionality is provided by command-line options, this should be unnecessary. If you do wish to customise the script, please give it a different name, to avoid confusion.<\/p>\n<p>If your HRPT reception system automatically delivers the orbit number, time, date, etc. (e.g. in the file name) then you may pefer to use a simplified script, as in<span style=\"font-style: italic;\"> AAPP_RUN_NOAA_simplified<\/span>.<\/p>\n<p>In the example below we use environment variables &#8220;ATOVS&#8221; and &#8220;AVHRR&#8221; to control which parts of AAPP are run.<\/p>\n<p>To process METOP AHRPT data you may use the\u00a0AAPP_RUN_METOP script which works as follows:<\/p>\n<ul>\n<li>Looks for PFS level 0 files in an input directory (dump mode assumed, i.e. one file per instrument)<\/li>\n<li>Processes data for the specified instruments (from the list &#8220;AMSU-A MHS HIRS AVHRR IASI&#8221;)<\/li>\n<li>Generates 1d output on the requested grids (&#8220;AMSU-A MHS HIRS IASI&#8221;)<\/li>\n<li>Sends output files to the specified output directory<\/li>\n<\/ul>\n<p>The script allows the user to take two passes through the data &#8211; the first to generate traditional HIRS, AMSU-A and MHS 1d files, and the second optional pass to run OPS-LRS and generate products on the IASI grid. For full details, please see the description in the source.<\/p>\n<p>If your station does not generate one file per instrument per pass (e.g. it uses 3 minute granules) then you will need to concatenate the granules, otherwise the HIRS calibration will fail. Level 0 granules can beconcatenated using the Unix &#8220;cat&#8221; command.<\/p>\n<p><span style=\"text-decoration: underline; font-weight: bold;\">Processing externally supplied level 1b files<\/span><br \/>\nMany users also use AAPP to process global or regional ATOVS data, which are typically supplied at level 1b or 1c. To do this you need to call <span style=\"font-style: italic;\">atovin<\/span> and\/or <span style=\"font-style: italic;\">atovpp<\/span> directly from your script. For example, to convert ATOVS data from level 1b to level 1d on the HIRS grid you would typically do the following:<\/p>\n<pre>    ln -sf amsua_1bfile aman.l1b\r\n    ln -sf amsub_1bfile ambn.l1b\r\n    ln -sf hirs_1bfilehrsn.l1b\r\n    atovin AMSU-A AMSU-B HIRS\r\n    atovpp -i \"AMSU-A AMSU-B HIRS\" -g \"HIRS\"\r\n<\/pre>\n<p>Note that if you are ordering data from NOAA CLASS, you should untick the box that says &#8220;include archive header&#8221; (or do this in your user preferences). Otherwise you will have to strip off the first 512 bytes from each 1b file before running atovin (e.g.\u00a0<span style=\"font-family: monospace;\">dd\u00a0bs=512<br \/>\nskip=1<\/span>).<\/p>\n<p>To process historic TOVS level 1b data from CLASS (i.e. NOAA-14 and earlier), you have to first run the script <span style=\"font-style: italic;\">noaa_class_to_aapp<\/span>.<\/p>\n<p>In the case of METOP data distributed in BUFR, you would need to run <span style=\"font-style: italic;\">aapp_decodebufr_1c <\/span>and then <span style=\"font-style: italic;\">atovpp<\/span>.<\/p>\n<p>But note that global METOP data are distributed in short (typically 3 minute) granules, and there is no guarantee that the granules for the different instruments will be aligned in time. Therefore a utility has been provided to concatenate level 1c files, called <span style=\"font-style: italic;\">combine_1c<\/span>, in order to ensure that the instrument to be mapped covers a wider time interval than the instrument to be used as a grid. It is up to the user to write his script such that the appropriate input files are concatenated.<\/p>\n<p>If difficulties are encountered, please seek advice using the Feedback Form available from the <a href=\"https:\/\/nwp-saf.eumetsat.int\/site\/\">NWP SAF<\/a>.<\/p>\n<p><span style=\"font-weight: bold; text-decoration: underline;\">Processing ATMS and CrIS data<\/span><br \/>\nATMS and CrIS data may be received as near-real-time global BUFR files or as SDR files. You will need to run some or all of the following AAPP tools:<\/p>\n<ul>\n<li><span style=\"font-style: italic;\">aapp_decodebufr_1c<\/span>, to convert from BUFR to\u00a0AAPP-style level 1c<\/li>\n<li><span style=\"font-style: italic;\">atms_sdr<\/span> or <span style=\"font-style: italic;\">cris_sdr<\/span>, to convert from SDR in HDF5 format to AAPP-style level 1c<\/li>\n<li><span style=\"font-style: italic;\">atms_beamwidth<\/span>, to modify the effective beamwidth and noise characteristics of ATMS (at level 1c)<\/li>\n<li><span style=\"font-style: italic;\">atovpp<\/span>, to create a CrIS level 1d file (ATMS + CrIS, various options) or to create an ATMS level 1d file on the original ATMS grid<\/li>\n<li><span style=\"font-style: italic;\">cris_channels<\/span> is for users who need to generate a channel-selected 1c dataset, independent of atovpp. For example, DBNet stations can use it during the conversion from SDR to channel-selected BUFR product. Uses the channel selection in CRIS.fdf. Note that AAPP convention is to use the standard channel numbering system, where channel 1 is 650 cm<sup>-1<\/sup> and there are 1305 channels. (There are additional channels for &#8220;Full Spectral Resolution&#8221; mode)<\/li>\n<li><span style=\"font-style: italic;\">atms_thin1d<\/span>, to create a spatially thinned ATMS product (AMSU-like sampling)<\/li>\n<li><span style=\"font-style: italic;\">aapp_encodebufr_1c<\/span>\n<ul>\n<li>BUFR encode the 1c ATMS or CrIS files, or<\/li>\n<li>Create a BUFR-encoded level 1d file for ATMS or CrIS. This option was developed for use at the Met Office (and uses some local BUFR descriptors), but may be useful to others.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>For more information on the processing, see AAPP document NWPSAF-MO-UD-027 &#8220;Pre-processing of ATMS and CrIS&#8221;.<\/p>\n<p>In some cases you will need to do some preparation of the data before running the AAPP utilities. Data often arrive with one file per 32-second granule &#8211; which is too short for effective use of <span style=\"font-style: italic;\">atms_beamwidth <\/span>and <span style=\"font-style: italic;\">atovpp<\/span>. Also, in some cases the granules may not arrive in time order. One solution to this problem that has been employed at the Met Office for ATMS\/CrIS BUFR data is to aggregate files as follows:<\/p>\n<ol>\n<li>Use the time stamp in the file name to compute a granule number, defined as the second of day divided by 32. Append this to the file name.<\/li>\n<li>Also compute an aggregation number, equal to the granule number divided by the number of granules you wish to aggregate (e.g. 10). Append this to the file name also.<\/li>\n<li>When all 10 granules have arrived for a given aggregation number, concatenate the individual granules (unix <span style=\"font-style: italic;\">cat<\/span> will work for BUFR data) and proceed to the AAPP processing.<\/li>\n<\/ol>\n<p>A similar approach could be used for processing HDF5 granules, except that <span style=\"font-style: italic;\">atms_sdr<\/span> or <span style=\"font-style: italic;\">cris_sdr<\/span> would be run first, and the *.l1c granules aggregated using <span style=\"font-style: italic;\">combine_1c<\/span>.<br \/>\nThis problem does not arise with HDF5 data from NOAA\/CLASS because files can be delivered already aggregated into chunks of 8 minutes (15 granules).<\/p>\n<p><span style=\"text-decoration: underline; font-weight: bold;\">Processing archived data from EUMETSAT Data Centre<\/span><br \/>\nAAPP can ingest the following types of data from the EUMETSAT Data Centre:<\/p>\n<ul>\n<li>EPS level 0<\/li>\n<li>EPS level 1 (native format) for AVHRR or IASI (but <span style=\"font-style: italic;\">not<\/span> for AMSU, MHS or HIRS)<\/li>\n<li>BUFR level 1 for AMSU, MHS, HIRS, IASI<\/li>\n<\/ul>\n<p>Note that unless you specify a regional subset, then the input files will be full-orbit. For AVHRR and IASI this results in quite large input files. If you wish to process AVHRR files that contain more than 33 minutes of data, the following changes are needed in AAPP:<\/p>\n<ol>\n<li>For level 0 processing, increase the value of mx_hrpscn in hrptdc.h. Normally set to 12000; increase to 32767 which is the maximum possible, since the AVHRR 1b format holds avh_h_scnlin as a 2-byte integer. Note that a full-orbit would be 36400 scans.<\/li>\n<li>Increase the value of avh_mxscn\u00a0in avhrcl.h. Also normally set to 12000.<\/li>\n<\/ol>\n<p>It is preferable to specify a geographical subset (defined by lat\/lon limits) when you order the data.<\/p>\n<p>The applicable AAPP scripts are:<\/p>\n<ul>\n<li><span style=\"font-style: italic;\">AAPP_RUN_METOP<\/span>, for processing level 0. You will need to obtain appropriate orbital elements files.<\/li>\n<li><span style=\"font-style: italic;\">convert_avh1b<\/span>, to convert AVHRR EPS level 1b to AAPP 1b format &#8211; but with scaled radiances instead of the original instrument counts<\/li>\n<li><span style=\"font-style: italic;\">convert_iasi1c<\/span>, to convert IASI EPS level 1b to AAPP 1c format<\/li>\n<li><span style=\"font-style: italic;\">aapp_decodebufr_1c<\/span> or <span style=\"font-style: italic;\">eccodes_decodebufr_1c<\/span>, to decode BUFR files<\/li>\n<\/ul>\n<h3>Satellite attitude<\/h3>\n<p>Some users may wish to manually set the values of roll, pitch and yaw (&#8220;attitude&#8221;) for a particular satellite. The default attitude for each satellite is set in the file <span style=\"font-family: Courier New,Courier,monospace;\">${DIR_NAVIGATION}satid.txt<\/span>. Look for the lines that say &#8220;number of orbital bulletin dependant attitude biases&#8221;. Underneath are listed the default yaw, roll and pitch (in milliradians) for up to four types of bulletin (in the order TBUS, Argos, 2-line, Spot). These values may be changed by the user if required, or attitude biases inserted if there are no values already present (i.e. older satellites). This file also specifies misalignment parameters for individual instruments.<\/p>\n<p>If you wish to change the attitude for specific orbits then you need to create a file<br \/>\n<span style=\"font-family: Courier New,Courier,monospace;\">${DIR_NAVIGATION}\/ana\/estatt_${BUL}_${SATIMG}.txt<\/span>, where <span style=\"font-family: Courier New,Courier,monospace;\">${BUL}<\/span> is &#8220;tbus&#8221; or &#8220;tle&#8221; and <span style=\"font-family: Courier New,Courier,monospace;\">${SATIMG}<\/span> is the name of the satellite, e.g. &#8220;noaa19&#8221;. This is a text file with the following values on each line<\/p>\n<div style=\"margin-left: 40px;\"><span style=\"font-style: italic;\">yaw roll pitch orbit<\/span> 0<\/div>\n<p>where <span style=\"font-style: italic;\">yaw<\/span>, <span style=\"font-style: italic;\">roll<\/span> and <span style=\"font-style: italic;\">pitch<\/span> are in milliradians and &#8220;0&#8221; means the data are good. If this file exists, it is read by the scripts avhrcl, amsuacl, amsubcl, etc. If the orbit being processed (or the previous orbit) matches a line in the file then the corresponding attitude values are used; if not then the default (from satid.txt) is used.<\/p>\n<h3>Satellite manoeuvres<\/h3>\n<p>Some satellites (notably MetOp) undergo pre-planned manoeuvres in order to maintain the correct orbit. For MetOp these may be either &#8220;in-plane&#8221; (no change to attitude) or out-of-plane (in which the satellite is rotated so that the station-keeping rockets are pointing at 90 degrees to the direction of motion). For AAPP users the in-plane manoeuvres are usually of little concern, however the out-of-plane manoeuvres (conducted typically every 1-2 years) can cause problems with the quality control of the orbital elements files (TBUS or 2-line).<\/p>\n<p>Given the fact that TLE bulletins are now very reliable, and out-of-plane manoeuvre announcements can be missed by users, we recommend that users should modify the built-in quality control mechanisms by setting an environment variable as follows:<\/p>\n<div style=\"margin-left: 40px;\"><span style=\"font-family: Courier New,Courier,monospace;\">PAR_NAVIGATION_EXTRAP_LIMIT=500   #(this was 100 but recommended to increase)<br \/>\nexport PAR_NAVIGATION_EXTRAP_LIMIT<\/span><\/div>\n<p>This may be either inserted into your ATOVS_ENV8 file or into your calling script. If you wish to revert back to the default (e.g. if it is found that there are problems with the bulletins themselves) then you can set <span style=\"font-family: Courier New,Courier,monospace;\">PAR_NAVIGATION_EXTRAP_LIMIT=&#8221;&#8221;<\/span>.<\/p>\n<p>To check whether a bulletin has been successfully ingested, look at your index file, e.g. $DIR_NAVIGATION\/tle_db\/tle_M02.index. The second number in each line should be &#8220;0&#8221; if the corresponding bulletin was OK. To ingest a specific TLE file by hand (e.g. published in the MetOp Admin message) then you can run <span style=\"font-style: italic;\">tleing<\/span> by hand with the &#8220;-f&#8221; option (type <span style=\"font-style: italic;\">tleing -h<\/span> for usage instructions), e.g.<\/p>\n<div style=\"margin-left: 40px;\"><span style=\"font-family: Courier New,Courier,monospace;\">tleing -s M02 -f .\/2011-10\/tle_20111005_1130.txt<\/span><\/div>\n<p>If you manually ingest a bulletin in order to correct a geolocation error, remember to delete the old satpos file, otherwise AAPP will continue to use that satpos file for the remainder of the day and you will still get the error.<\/p>\n<h3>On the use of working directories<\/h3>\n<p>The ATOVS_ENV8 setup defines an environment variable $WRK (default $HOME\/tmp), which is used by several of the AAPP scripts. For example, <span style=\"font-style: italic;\">AAPP_RUN_NOAA<\/span> and <span style=\"font-style: italic;\">AAPP_RUN_METOP<\/span> do a &#8220;cd&#8221; to this directory during the script execution. Other scripts assume you are already in a suitable working directory (e.g. atovpp). You can set up your working directory before running the script, e.g. to use the current directory do<\/p>\n<pre>    WRK=$PWD &amp;&amp; export WRK<\/pre>\n<p>If you are running multiple instances of AAPP on the same machine (e.g. processing global and local data at the same time), <span style=\"color: #ff0000;\">it is very important that they do not attempt to use the same working directory<\/span>, otherwise you will get unpredictable results.<\/p>\n<p>One way to do this would be to define temporary working directories before running a script, e.g.<\/p>\n<pre>    WRK=$PWD\/tmp_$$_$(date +%H%M%S_%N) &amp;&amp; export WRK\r\n    mkdir -p $WRK\r\n    cd $WRK<\/pre>\n<p>where the temporary directory has been created accoring to the shell process number ($$) and the system time. Remember to delete the temporary directory when you have finished with it.<\/p>\n<p>Most users are unlikely to need this level of complexity, but the issue has been raised in the past via the NWP SAF Helpdesk, therefore we mention it as something to be aware of when you are designing your processing systems.<\/p>\n<h2>Change record<\/h2>\n<table border=\"1\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"10%\"><center>Version<\/center><\/td>\n<td valign=\"top\" width=\"20%\"><center>Date<\/center><\/td>\n<td valign=\"top\" width=\"24%\"><center>Author \/ changed by<\/center><\/td>\n<td valign=\"top\" width=\"46%\"><center>Remarks<\/center><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"10%\">8.0<\/td>\n<td valign=\"top\" width=\"20%\">Dec 2017<\/td>\n<td valign=\"top\" width=\"24%\">Nigel Atkinson<\/td>\n<td valign=\"top\" width=\"46%\">This document previously existed as 6 separate html files. For this release it has been brought into one document and extensively edited.<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"10%\">8.1<\/td>\n<td valign=\"top\" width=\"20%\">Apr 2019<\/td>\n<td valign=\"top\" width=\"24%\">Nigel Atkinson<\/td>\n<td valign=\"top\" width=\"46%\">Update links<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"10%\">8.2<\/td>\n<td valign=\"top\" width=\"20%\">July 2020<\/td>\n<td valign=\"top\" width=\"24%\">Nigel Atkinson<\/td>\n<td valign=\"top\" width=\"46%\">Add details about building ecCodes with jpeg2000 support<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"10%\">8.3<\/td>\n<td valign=\"top\" width=\"20%\">November 2020<\/td>\n<td valign=\"top\" width=\"24%\">Nigel Atkinson<\/td>\n<td valign=\"top\" width=\"46%\">Update links<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"10%\">8.4<\/td>\n<td valign=\"top\" width=\"20%\">December 2024<\/td>\n<td valign=\"top\" width=\"24%\">Nigel Atkinson<\/td>\n<td valign=\"top\" width=\"46%\">Modify the guidance on satellite manoeuvres<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>AAPP Installation Guide ATOVS and AVHRR Pre-processing Package (AAPP) Document: NWPSAF-MO-UD-005 Date: January 2025 Author: Nigel Atkinson (Met Office) This documentation was developed within the context of the EUMETSAT Satellite Application Facility on Numerical Weather Prediction (NWP SAF), under the Cooperation Agreement dated 29 June 2011 between EUMETSAT and the Met Office, UK, by one or more partners within the NWP SAF. The partners in the NWP SAF are the Met Office, ECMWF, DWD and M\u00e9t\u00e9o France. Copyright 2017, EUMETSAT, All Rights Reserved. Introduction This document describes the installation of the ATOVS and AVHRR Processing Package (AAPP), which is a [&hellip;]<\/p>\n","protected":false},"author":24,"featured_media":0,"parent":998,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-10913","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nwp-saf.eumetsat.int\/site\/wp-json\/wp\/v2\/pages\/10913","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nwp-saf.eumetsat.int\/site\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nwp-saf.eumetsat.int\/site\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nwp-saf.eumetsat.int\/site\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/nwp-saf.eumetsat.int\/site\/wp-json\/wp\/v2\/comments?post=10913"}],"version-history":[{"count":0,"href":"https:\/\/nwp-saf.eumetsat.int\/site\/wp-json\/wp\/v2\/pages\/10913\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/nwp-saf.eumetsat.int\/site\/wp-json\/wp\/v2\/pages\/998"}],"wp:attachment":[{"href":"https:\/\/nwp-saf.eumetsat.int\/site\/wp-json\/wp\/v2\/media?parent=10913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}