obs2ioda utilizes CMake as its primary build system. Follow the steps below to build the project:
Please make sure the following libraries are installed:
- NetCDF
- NCEP BUFR library. (Instructions for installing the NCEP BUFR library are provided in a subsequent section)
If you are building obs2ioda on a platform other than Derecho, skip Step 2.
-
First, clone the repository into your preferred directory (
<OBS2IODA_ROOT_DIR>):git clone https://github.com/NCAR/obs2ioda.git <OBS2IODA_ROOT_DIR>
-
To build
obs2iodaon Derecho, navigate to theobs2ioda/env-setupdirectory and source the appropriate environment script based on your compiler and shell:- For GNU compiler and Bash shell:
source gnu_derecho.sh - For GNU compiler and C Shell:
source gnu_derecho.csh - For Intel compiler and Bash shell:
source intel_derecho.sh - For Intel compiler and C Shell:
source intel_derecho.csh
- For GNU compiler and Bash shell:
-
Create a new directory
buildand navigate into it:mkdir build && cd build
-
Locate the NCEP BUFR library by executing the following command in the
NCEP BUFRlibrary's build directory:find . -name *libbufr*
-
Run
CMakefrom thebuilddirectory to configure the project. Be sure to set the build type (Release,RelWithDebInfo, orDebug) and provide the required path to theNCEP BUFRlibrary. To build theGOES-ABIconverter, enable it explicitly with-DBUILD_GOES_ABI_CONVERTER=ON.cmake <OBS2IODA_ROOT_DIR> \ -DNCEP_BUFR_LIB=<NCEP_BUFR_LIB_PATH> \ -DCMAKE_BUILD_TYPE=<BUILD_TYPE> \ -DBUILD_GOES_ABI_CONVERTER=ON
-
Finally, build
obs2iodausingCMake's build tool. In this case, we useGNU Make, but other build tools supported byCMakecan be used:make
The obs2ioda-v3 executable will reside in the bin directory within the build directory.
- Run the unit test suite using
ctestfrom theobs2iodabuild directory. To see detailed output and the list of tests being executed, add the--verboseflag:(Thectest --verbose
--verboseflag is optional.)
Steps 1–2 are optional if you already have a Python environment with pytest, netCDF4, and requests installed.
-
Create and activate a virtual environment in the
obs2iodaroot directory:python3 -m venv .obs2ioda source .obs2ioda/bin/activate -
Install required dependencies:
pip install pytest netCDF4 requests
-
Run the test suite from the
obs2iodabuild directory. To display detailed output and see which tests are being run, use the--verboseflag:pytest --verbose
-
Run a specific test suite by using the
-mflag followed by the suite name. For example, to run only the GOES-ABI tests:pytest -m goes_abi --verbose
Or to run the NCEP PREPBUFR tests:
pytest -m ncep_prepbufr_bufr --verbose
goes_abincep_prepbufr_bufr
To install the NCEP BUFR library, follow these steps:
- Clone the NCEP BUFR repository into a directory of your choice (
<NCEP_BUFR_ROOT_DIR>):git clone https://github.com/NOAA-EMC/NCEPLIBS-bufr.git <NCEP_BUFR_ROOT_DIR>
- Create a new directory
buildand navigate into it:mkdir build && cd build
- Run CMake to configure the build (Ensure NetCDF is installed):
cmake <NCEP_BUFR_ROOT_DIR>
- Build the library with the command:
make
- To locate the NCEP BUFR library, run:
find . -name *libbufr*
Remember to note down the library path (<NCEP_BUFR_LIB_PATH>) required for the build process of obs2ioda-v3.
Usage: obs2ioda-v3 [-i input_dir] [-o output_dir] [bufr_filename(s)_to_convert] [-split]
If [-i input_dir] [-o output_dir] are not specified in the command line, the default is the current working directory.
If [bufr_filename(s)_to_convert] is not specified in the command line, the code looks for file name, prepbufr.bufr (also satwnd.bufr, gnssro.bufr, amsua.bufr, airs.bufr, mhs.bufr, iasi.bufr, cris.bufr), in the input/working directory. If the file exists, do the conversion, otherwise skip it.
If specify -split, the converted file will contain hourly data.
obs2ioda-v3 -i input_dir -o output_dir prepbufr.gdas.YYYYMMDD.tHHz.nr
Example output files (date in the output filename is extracted from the input bufr files):
aircraft_obs_YYYYMMDDHH.h5
ascat_obs_YYYYMMDDHH.h5
profiler_obs_YYYYMMDDHH.h5
satwind_obs_YYYYMMDDHH.h5
sfc_obs_YYYYMMDDHH.h5
sondes_obs_YYYYMMDDHH.h5
obs2ioda-v3 -i input_dir -o output_dir gdas.satwnd.tHHz.YYYYMMDD.bufr
Example output files (date in the output filename is extracted from the input bufr files):
satwnd_obs_YYYYMMDDHH.h5 (GOES-16/GOES-17, AVHRR (METOP/NOAA), VIIRS (NPP/NOAA), LEOGEO AMVs)
obs2ioda-v3 -i input_dir -o output_dir gdas.1bamua.tHHz.YYYYMMDD.bufr
Example output files:
amsua_metop-a_obs_YYYYMMDDHH.h5
amsua_metop-b_obs_YYYYMMDDHH.h5
amsua_n15_obs_YYYYMMDDHH.h5
amsua_n18_obs_YYYYMMDDHH.h5
amsua_n19_obs_YYYYMMDDHH.h5
obs2ioda-v3 -i input_dir -o output_dir gdas.airsev.tHHz.YYYYMMDD.bufr
Example output files:
amsua_aqua_obs_YYYYMMDDHH.h5
obs2ioda-v3 -i input_dir -o output_dir gdas.1bmhs.tHHz.YYYYMMDD.bufr
Example output files:
mhs_metop-a_obs_YYYYMMDDHH.h5
mhs_metop-b_obs_YYYYMMDDHH.h5
mhs_n18_obs_YYYYMMDDHH.h5
mhs_n19_obs_YYYYMMDDHH.h5
obs2ioda-v3 -i input_dir -o output_dir gdas.mtiasi.tHHz.YYYYMMDD.bufr
the following CRTM SpcCoeff files in little_endian must be present in the working directory for IASI radiance to brightness temperature conversion
iasi_metop-a.SpcCoeff.bin -> iasi616_metop-a.SpcCoeff.bin
iasi_metop-b.SpcCoeff.bin -> iasi616_metop-b.SpcCoeff.bin
iasi_metop-c.SpcCoeff.bin -> iasi616_metop-c.SpcCoeff.bin
Example output files:
iasi_metop-a_obs_YYYYMMDDHH.h5
iasi_metop-b_obs_YYYYMMDDHH.h5
iasi_metop-c_obs_YYYYMMDDHH.h5
obs2ioda-v3 -i input_dir -o output_dir gdas.crisf4.tHHz.YYYYMMDD.bufr
the following CRTM SpcCoeff files in little_endian must be present in the working directory for CrIS radiance to brightness temperature conversion
for cris bufr file
cris_npp.SpcCoeff.bin -> cris399_npp.SpcCoeff.bin
cris_n20.SpcCoeff.bin -> cris399_n20.SpcCoeff.bin
for crisf4 bufr file
cris_npp.SpcCoeff.bin -> cris-fsr431_npp.SpcCoeff.bin
cris_n20.SpcCoeff.bin -> cris-fsr431_n20.SpcCoeff.bin
Example output files:
cris_npp_obs_YYYYMMDDHH.h5
cris_n20_obs_YYYYMMDDHH.h5
obs2ioda-v3 -i input_dir -o output_dir gdas.gpsro.tHHz.YYYYMMDD.bufr
Example output files:
gnssro_obs_YYYYMMDDHH.h5
Usage: obs2ioda-v3 -i input_dir -ahi -t YYYYMMDDHHNN -s num_pixels_to_skip [-superob half_width]
- Input files are a list of Himawari Standard Data, e.g. HS_H08_20200815_0000_B14_FLDK_R20_S0210.DAT in the input_dir.
- Minute must be specified in the time (-t) option.
- Number of pixels to skip must be specified in the (-s) option.
- By providing the optional -superob argument, the code enables superobbing for AHI observations. The superob_halfwidth parameter sets the half-width of the superobbing grid. Based on this value, the code defines a grid box and calculates the average brightness temperature within that box.
- The output prefix (before _obs) is defined in define_mod.f90
- The mapping of numeric report types to the named types is coded in define_mod.f90 through subroutines set_obtype_conv, set_name_satellite, set_name_sensor.
- For gdas.satwnd.tHHz.YYYYMMDD.bufr, only GOES-16/GOES-17, AVHRR (METOP/NOAA), VIIRS (NPP/NOAA), LEOGEO AMVs are converted when available. Other AMVs are available through PREPBUFR files.
- The ob errors of conventional observations are either extracted from the input prepbufr or from an external error table (if obs_errtable exists in the working directory).
- The ob errors of AMSU-A/MHS radiances are coded in define_mod.f90. This should be changed in the future to read in from an external error table.
- The ob errors of satwnd-decoded AMVs are from an external error table (obs_errtable).
- Subroutine filter_obs_conv applies some additional QC for conventional observations as in GSI's read_prepbufr.f90 for the global model and can be de-activated through
-noqccommand-line option. 100 is added to the @PreQC value when the ob is flagged as not-use by filter_obs_conv.
100 is chosen to make the original prepbufr quality marker easily readable. - Subroutine filter_obs_satwnd applies QC for GOES-16/GOES-17 AMVs as in GSI's read_satwnd.f90.
@PreQC value is set to 15 for rejected obs.
Usage: goes_abi_converterRuntime options are configured through the Fortran namelist file namelist.goes_abi_converter.
Input filenames (excluding the path) should be listed in a plain text file.
&data_nml
nc_list_file = 'flist.txt'
data_dir = '/data/goes', ! Path to the GRB netCDF files
data_id = 'OR_ABI-L1b-RadF-M6', ! File prefix
sat_id = 'G16',
n_subsample = 1
/OR_ABI-L1b-RadF-M6C07_G16_s20212370000202_e20212370009522_c20212370009562.nc
OR_ABI-L1b-RadF-M6C08_G16_s20212370000202_e20212370009510_c20212370009564.nc
OR_ABI-L1b-RadF-M6C09_G16_s20212370000202_e20212370009516_c20212370009566.nc
OR_ABI-L1b-RadF-M6C10_G16_s20212370000202_e20212370009522_c20212370009559.nc
OR_ABI-L1b-RadF-M6C11_G16_s20212370000202_e20212370009510_c20212370009563.nc
OR_ABI-L1b-RadF-M6C12_G16_s20212370000202_e20212370009516_c20212370009569.nc
OR_ABI-L1b-RadF-M6C13_G16_s20212370000202_e20212370009521_c20212370009573.nc
OR_ABI-L1b-RadF-M6C14_G16_s20212370000202_e20212370009510_c20212370009579.nc
OR_ABI-L1b-RadF-M6C15_G16_s20212370000202_e20212370009516_c20212370009582.nc
OR_ABI-L1b-RadF-M6C16_G16_s20212370000202_e20212370009522_c20212370009576.nc
For each scan time listed in flist.txt, one IODA-v3 NetCDF file is generated. Example output:
OR_ABI-L1b-RadF-M6_G16_2021-08-25T00:00:20.2Z.nc4
- Currently, only bands 7–16 are processed.