Atmosphere Generator Toolkit (AGT)

The Atmospheric Generator Toolkit (AGT) allows users to define new atmospheric profiles (i.e., vertical distribution of atmospheric pressure, temperature and gas concentrations) beyond the predefined atmospheric models. With AGT, users can define their own custom atmospheric models profiles or interface with existing radiosonde datasets and global meteorological reanalysis data from ECMWF and NCEP.

Introduction

expand all

Tool overview

    The Atmosphere Generator Toolkit (AGT) can be opened from the main ALG interface by pressing the ATK button () or, alternatively, through the menu bar by clicking on ToolsAGT:

    The AGT is composed of four main elements being:

    1. The atmospheric profiles listbox, where it will be displayed the names of the user-defined atmospheric vertical profiles.
    2. The atmospheric profiles table, where users can visualize and edit the vertical profiles of temperature, pressure and gas concentration. Users can also use this table to instert profile values for a new user-defined vertical profile.
    3. The profile generator option selection pop-up menu, where users can access to different functionalities to import external atmospheric profiles.
    4. The atmospheric profile parameters block, where users will be able to inster the parameters depending on the selected profile generator option.
    Notice that, in ALG, the definition of a new user-defined atmospheric profile is based on the gases defined for MODTRAN. ALG will internally handle the atmospheric profiles database to adapt the profiles to the selected atmospheric RTM in the simulations, this way keeping the consistency in atmospheric profiles for different models.

    The new user-defined atmospheric profiles defined with AGT will be stored in the atmdb.h5 stored in the UserData folder. Please check here for further description about the content of AGT's user atmospheres database file.

    In the following sections, further information will be given to use the different profile generator options.

The atmospheric profiles table

    One of the core elements of AGT is the atmospheric profiles table, where users can visualize and edit the values of each vertical profile of temperature, pressure and gas concentration. This table is divided in the following elements as indicated in the following figure:

    • The first column (in red) indicates the profile names that define a new atmosphere.
    • The second column (in green) indicates the units of every profile constituents. The units can be changed by clicking on the arrow next to it, which will display the available units. The allowed units depend on the profile magnitude, in some cases being limited to the following options:
      • The air temperature (first row) can only be set to K.
      • The air pressure (second row) can only be set to mbar.
      • The water vapor (third row) can be modified between ppmv, g.cm-3 (absolute humidity) or % (relative humidity).
      • For the remaining gases (fourth to last rows), the units can be converted between ppmv and g.cm-3.
      The values in the table are automatically modified when units are converted following the equations given in Section 8.
    • The third column (in blue) allows to fill a specific profile by one of the default MODTRAN profiles, also described in (Anderson et al., 1986): tropical, mid-latitude summer, mid-latitude winter, sub-arctic summer and sub-arctic winter.
    • To facilitate a simple profile filling, users can select one default MODTRAN profile in the pop-up menu marked in orange. This will fill the entire table with the profiles that are assigned to this profile model.

    Users can edit the values of each profile constituent at any given altitude (indicated in as column names) by modifying the content of any cell in the table (only numeric values are accepted). When saving an atmospheric profile, AGT will fill non valid values (marked with the value -1) by spline interpolation of neighbour valid elements. Notice that an entire profile can be set with -1 when the considered gas is not relevant to the user. In this case, ALG (and the third party RTMs) will assume a default vertical profile for that specific gas (if available for each RTM).

Saving profile data

    Once of atmospheric profile table is filled with the desired values (user-input or loaded from external data), users can introduce a new user-defined atmospheric profile in AGT's database. To do so, start by writting a valid Profile name in the corresponding text box, then click on the Save button. To remove an atmospheric profile from the database, simply select it in the atmospheric profile listbox and press the Remove button ().

Plotting profile data

    AGT provides a plotting tool that allows visualizing the atmospheric profiles in the atmbd.h5 atmospheric profiles database file. Users only have to select an atmosphere from the atmospheric profiles listbox (control-click for selecting more than one atmosphere), then click on the Plot selected button. This will display a pop-up window like the following one:

    This window has an interactive plot axis that shows the selected profiles for the selected atmospheres in the listbox. To change the profile consituent (i.e., temperature, pressure or gas concentration), simply click on the pop-up menu and select the desired option.

Radiosonde data

expand all

When selecting the radiosonde data option from the profile generator option pop-up menu, the atmospheric profiles parameters block will show the following parameters:

Here, the user will be able to access to Wyoming University radiosonde data through two different options: (1) Online access, (2) radiosonde file(s). The following sections will describe the use of each radiosonde option.

Online access

    AGT allows users to load radiosonde data from Wyoming University directly from their servers. To do so, the used must select a valid date with the format YYYY-MM-DD (YYYY being the year, MM being the month from 01 to 12, and DD being the day). In addition, the user must introduce the identification number of the radiosonde station (see here to find further information about the available stations). With this option, the AGT will read the selected radiosonde data directly from the Wyoming online server. The loaded data includes the following information:

    • The geopotential altitude grid (in m) in which the radiosonde data is acquired.
    • The pressure (in hPa) for each point in the grid.
    • The temperature profile (in degrees Celsius).
    • The relative humidity (in %) at each altitude grid point.
    This data is provided over several hundreds of altitude levels, typically ranging from 0 km to 30 km. In order to make the radiosonde data compatible with atmospheric RTMs, the loaded information is post-processed. This processing is automatically performed by AGT and consists on the following steps:
    1. The units in the radiosonde data are changed to: (1) air temperature is converted between degrees Celsius to K by adding 273 K to the loaded values, (2) the altitude grid is converted from m to km by dividing by 1000, and (3) the relative humidity is converted from % to ppmv (see Section 8).
    2. Within the altitude minimum-maximum range of the radiosonde data, the altitude grid is redefined to MODTRAN's default grid, which is between 0 km and 25 km at steps of 1 km, then in steps of 2.5 km (up to 47.5 km altitude).
    3. The radiosonde profiles of temperature and water vapor are fitted by a linear weight of all six MODTRAN's default profiles (e.g. $T=∑_iw_iT_i$ being $T_i$ each of the six MODTRAN temperature profiles from $i$=1 to 6). These weigths are applied to fill the remaining altitudes from the top altitude layer of the radiosonde (typically around 30 km) to the top of atmosphere (at 120 km).
    4. For the remaining gases (e.g., O3, O2, CO2, CH4), the previous weights calculated for water vapor and air temperature are averaged and the resulting weight applied to MODTRAN's default profiles (for further information about the default MODTRAN profiles refer to Anderson et al., 1986).

    These steps above are represented in the next figure for the specitic case of the temperature profile. The original radiosonde profile (in red dots) is resampled to MODTRAN altitude grid (blue circles) and the profile is filled in the higher altitudes by an average of MODTRAN's default profiles (gray crosses).

    After reading and processing this online radiosonde data, the atmospheric profiles table will be updated and filled with the loaded radiosonde data. To save the loaded profile into the atmospheric database file insert a profile name in the dedicated text box and press the Save button. The saved atmospheric profile will be displayed in the atmospheric profiles listbox for later visualization and editing.

Radiosonde file(s)

    Radiosonde data can instead be loaded from pre-stored files in your local computer. To do so, click on the Load radiosonde file(s) button. This will pop-up a file-selection window from which you can choose files on one of the two allowed formats: (1) the Wyoming website .htm files, or (2) the NOAA/ESRL radiosonde files (in .cdf format).

    In the case of using the Wyoming website files (.htm), users can select more one or more files. AGT will automatically read and process these files using the same steps described above. In case of more than one file is selected, AGT will automatically save in the atmospheric profiles database the loaded radiosonde profiles, assigning the same profile name of the loaded radiosonde .htm files.

    In the case of using the NOAA/ESRL radiosondes, only one .cdf file can be selected at a time. However, these files can contain more than one radiosonde, which will be automatically processed in AGT and saved in the atmospheric profiles database file with the same name of the loaded file and a number # from 1 to the total number of radiosondes stored in the .cdf file. The processing of the NOAA/ESRL radiosonde data files into AGT atmospheric profiles is similar to the described above for Wyoming radiosondes. The only difference is regarding the conversion of humidity from the Dew Point Depression units (in degrees Celsius) to Absolute Humidity in ppmv (see here for further information).

ECMWF's CAMS near-real-time data

expand all

AGT allows users to import vertical profiles from ECMWF CAMS near-real-time data set. To do so, select the corresponding option in the profile generator option pop-up menu. The atmospheric profiles parameters block will show the following parameters:

With this option, users have to select the day of the month (1 to 31) and latitude/longitud location of the ECMWF profile. Notice that, currently in AGT, only one time-location coordinate can be introduced at a time, and thus only one ECMWF profile will be stored in AGT atmospheric profiles database. After introducing the time and location (latitude/longitud) coordinates, click on the Apply button. This will pop-up a window where the user must select a CAMS near-real-time pressure profile file (in .nc) downloaded from ECMWF servers. This CAMS .nc file contains the vertical profiles in a pressure grid (from 1 to 100 hPa) for the entire planet over a latitude/longitud grid that can be selected between 3x3 deg to 0.125x0.125 deg. The following fields/datasets are obligatory for being processed in AGT:

  • Temperature (in K).
  • Geopotential (in m2.s-2).
  • Relative humidity (in %).

In addition, AGT can process the following optional fields from CAMS near-real-time data, all in units of kg.kg-1:

  • Carbon monoxide.
  • GEMS ozone.
  • Methane.
  • Nitrogen dioxide.
  • Nitrogen monoxide.
  • Sulfur dioxide.

As with the radiosonde data, the CAMS near-real-time data must be processed for further use in AGT. The first step is to select the profiles from the exact user-defined day and with the latitude/longitude grid point closer to the user-defined location. In addition, the following processing steps are performed on CAMS datasets:

  1. The first step consists to do the unit conversion in geopotential to altitude (in km) by dividing by 1000 (to convert from m to km) and the gravity of acceleration (approx. 9.80665 m.s-2). Also, the relative humidity is converted to absolute humidity in ppmv (see here).
  2. Within the altitude minimum-maximum range of the CAMS data (typically up to 50 km), the altitude grid is redefined to MODTRAN's default grid, which is between 0 km and 25 km at steps of 1 km, then in steps of 2.5 km (up to 50 km altitude).
  3. The profiles of temperature, pressure, water vapor and other optional gases are fitted by a linear weight of all six MODTRAN's default profiles (e.g. $T=∑_iw_iT_i$ being $T_i$ each of the six MODTRAN temperature profiles from $i$=1 to 6). These weigths are applied to fill the remaining altitudes from the top altitude layer of the CAMS near-real-time data (typically up to 50 km) to the top of atmosphere (at 120 km).
  4. For the remaining gases not available in CAMS (e.g., CO2) or the optional not-selected gases, the previous weights calculated for water vapor and air temperature are averaged and the resulting weight applied to MODTRAN's default profiles.

These steps above are represented in the next figure for the specific case of the temperature profile. The original CAMS profile (in red dots) is resampled to MODTRAN altitude grid (blue circles) and the profile is filled in the higher altitudes by an average of MODTRAN's default profiles (gray crosses).

When loading ECMWF's CAMS data, the profile name text box will be automatically filled with the name ECWMF_LAT_LON_DAY, where LAT, LON and DAY are respectively the selected latitude, longitude and day. You can edit the name before saving the profiles into AGT's atmospheric profile database.

NOAA's NCEP reanalysis data

expand all

AGT is compatible with loading profile data from NOAA's NCEP reanalysis. These datasets must be previously downloaded from NCEP FTP (ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis.derived/pressure/). In particular, the three following files must be downloaded and stored in ALG's User Data folder (/UserData/NCEP):

  • The monthly mean air temperature dataset (air.mon.mean.nc, nearly 310 MB).
  • The monthly mean geopotential height dataset (hgt.mon.mean.nc, nearly 285 MB).
  • The monthly mean relative humidity dataset (rhum.mon.mean.nc, nearly 175 MB).

If these files are not available, AGT will automatically download them from NOAA's NCEP servers.

After clicking on the corresponding NCEP option in the profile option pop-up menu, the following block will be displayed:

Similar to ECMWF's CAMS near-real-time data, the reading of NCEP requires the user selection of a date (in the format YYYY-MM-DD for year, month and day) and a spatial location in latitude/longitude. The NCEP reanalysis data is also processed for further use in AGT. The first step is to select the profiles from the exact user-defined day and with the latitude/longitude grid point closer to the user-defined location. In addition, the following processing steps are performed on CAMS datasets:

  1. The first step consists to do the unit conversion in altitude (from m to km by dividing by 1000), air temperaute (from degrees Celsius to K by adding 273 K) and relative humidity to absolute humidity in ppmv (see here).
  2. Within the altitude minimum-maximum range of the NCEP data (typically up to 30 km), the altitude grid is redefined to MODTRAN's default grid, which is between 0 km and 25 km at steps of 1 km, then in steps of 2.5 km (up to 50 km altitude).
  3. The profiles of temperature, pressure and water vapor are fitted by a linear weight of all six MODTRAN's default profiles (e.g. $T=∑_iw_iT_i$ being $T_i$ each of the six MODTRAN temperature profiles from $i$=1 to 6). These weigths are applied to fill the remaining altitudes from the top altitude layer of the CAMS near-real-time data (typically around 30 km) to the top of atmosphere (at 120 km).
  4. For remaining gases, the previous weights calculated for water vapor and air temperature are averaged and the resulting weight applied to MODTRAN's default profiles.

These steps are similar to those applied for the radiosonde data and ECMWF's CAMS data.

When loading NOAA's NCEP data, the profile name text box will be automatically filled with the name NCEP_LAT_LON_DATE, where LAT, LON and DATE are respectively the selected latitude, longitude and date (year-month-day). You can edit the name before saving the profiles into AGT's atmospheric profile database.

MODTRAN-based profile mixtures (Time-Location)

expand all

In AGT, users can alternatively define a new atmospheric profile based on a time-location interpolation of MODTRAN default profiles as implemented in the user-defined atmospheric profiles option when creating a new atmospheric LUT (see here for further information).

Here, the user starts by introducing (1) the day-of-year (DOY, ∈[1,365]) and latitude (∈[0,90] deg) in the corresponding text boxes, and (2) the number of atmospheric profiles (N) on the corresponding text block. By clicking on the Apply button AGT will perform a 2D interpolation (in DOY and latitude) from a set of reference atmospheric profiles.

Reference atmospheric modelDay-of-yearLatitude (deg)

Tropical (TRO)

0 (year average)

<15

Mid-Latitude Summer (MLS)

182 (June)

45

Mid-Latitude Winter (MLW)

1 (January)

45

Sub-Arctic Summer (SAS)

182 (June)

>65

Sub-Arctic Winter (SAW)

1 (January)

>65

US Standard 1986 (USS)

0 (year average)

40

The interpolation of the reference profiles is done as follows:

  • If the latitude is <15 deg, the profiles are assigned to the reference TRO profile regardless the values of DOY and latitude.

  • If the latitude is ≥15 deg and <45 deg, the profiles are interpolated between the TRO, MLS and MLW based on the input DOY and latitude.

  • If the latitude is ≥45 deg and ≤65 deg, the profiles are interpolated between the MLS, MLW, SAS and SAW based on the input DOY and latitude.

  • If the latitude is >65 deg, the profiles are calculated by linear interpolation between SAS and SAW based on the DOY value.

Notice that only positive values of latitude are allowed since the northern and southern hemispheres are considered to behave in a similar manner. Notice also that the winter-spring-summer variations in the atmospheric profiles (DOY from 1 to 182) are the same as the summer-autumn-winter variations (DOY from 182 to 365), thus it is adviced to select DOY values from 1 to 182 to avoid repetitions of the atmospheric profiles.

User profile data (ALG format)

expand all

The last profile generation option to be selected in the pop-up menu is to insert a user-defined profile from an external datafile. This profile(s) must be stored in a .h5 file with the same format that the AGT's user atmosphere database file. This file must include at least vertical profiles of altitude, pressure and temperature. All remaining atmospheric gases (e.g., O3, CO2) not included in the loaded .h5 file will be obtained by a linear combination of MODTRAN default profiles as it is done for the radiosonde, ECMWF's CAMS and NOAA's NCEP options. In addition, each profile dataset can contain N profiles corresponding to N different atmospheres. AGT will go through each of these profiles and will save them in AGT's user atmosphere database file.

The purpose of this profile generation option is to leave the door open for users to insert their own atmospheric profiles obtained from different sources that are not yet considered in the current version of AGT. Alternatively, this option is suitable for users who want to import more than one time/location profiles from NCEP or ECMWF data. In this case, users must read and process their data and format it the .h5 data file suitable for its use in AGT.

AGT's user atmosphere database file

expand all

The parameters of the user-defined atmospheric profiles using AGT are stored in the atmdb.h5. In order to be used by ALG, this atmospheric profile database file must be available in the UserData folder of the ALG's software package. The AGT's atmospheric profile database file (atmdb.h5) is splitted in groups, each of them refering to a specific profile. Each of these groups is at the same time divided into individual datasets of altitude (ZM), air temperature (T), pressure (P) and other gas constituents (e.g., H2O, O3, CO2, CH4). Each of these datasets come together with an attribute of units that identifies the units of each profile. By default, the following units are used in AGT: km for altitude grid, mbar for pressure profile, K for air temperature and ppmv for gas concentration.

When selecting an atmospheric RTM to generate a new LUT, ALG will detect if a user-defined atmospheric profile model option is available. In such case, ALG will automatically read the AGT's atmdb.h5 file and extract the user-defined atmospheric profiles. These models will now appear in the Key Input Variables window as shown in the figure below:

When introduced in a LUT, the selected AGT's atmospheric profiles will have an assigned ID with an integer value higher than 10.

Units conversion

expand all

Relative humidity (in %) to absolute humidity ($AH_g$, in g.cm-3)

    In order to convert the amount of water vapor from relative humidity ($RH$, in %) into absolute humidity in g.cm-3, we first need to calculate the saturated water vapor pressure ($P_{ws}$, in MPa) by applying the following equation based on (Wagner and Pruss, 2002):

    $$P_{ws} = P_c·\exp[-(T_c/T)(a_1θ+a_2θ^1.5+a_3θ^3+a_4θ^3.5+a_5θ^4+a_6θ^7.5)]$$

    where $θ=1-T/T_c$ being $T$ the air temperature (altitude dependent), in K, and $T_c=647.096$ the critical temperature (in K). The coefficients $a_i$ have the following tabulated values: $a_1$=-7.85951783, $a_2$=1.84408259, $a_3$=-11.7866497, $a_4$=22.6807411, $a_5$=-15.9618719 and $a_6$=1.80122502.

    Second, the input $RH$ is converted into water vapour pressure ($P_w$, in MPa) using the previously calculated saturated water vapour pressure as: $P_w=RH·P_{ws}/100$. This is then converted to absolute humidity ($AH_{g}$, in g.cm-3) taking into account the temperature profile ($T$) as $AH_{g}=P_w/{T·R_w}$, where $R_w$=4.615·10-7 is the gas constant for H2O (in m3MPa.K-1mol-1).

Relative humidity (in %) to absolute humidity (in ppmv)

    The conversion between relative humidity ($RH$, in %) and absolute humidity ($AH_{ppmv}$, in ppmv) starts from the convertion between $RH$ to $AH_g$ described in the section above. Once $AH_g$ is calculated, the absolute humidity can be converted into units of ppmv given the following equation:

    $$AH_{ppmv}=10^6AH_{g}R{T}/{M_{H2O}·P}$$

    where $P$ is the pressure in atm, $M_{H2O}$=18.01528 is the molecular weight of H2O and $R$=8.205746·10-5 is the ideal gas constant in units of m3atm·K-1g-1.

Particle density between g.cm-3 and ppmv

    For any gas, the conversion between particle density units of g.cm-3 ($X_g$) to ppmv ($X_{ppmv}$) is based on the equation shown in section above:

    $$X_{ppmv}=10^6X_{g}RT/{M_x·P}$$

    Here, $M_x$ is the molecular weigth of a gas $x$ with the values: 18.01528 (H2O), 48 (O3), 44.01 (CO2), 44.013 (N2O), 18.01 (CO), 16.04 (CH4), 15.999 (O2), 30.01 (NO), 64.066 (SO2), 46.0055 (NO2), 17.031 (NH3), 63.01 (HNO3).

Dew point depression (in K) to relative humidity (in %)

    Dew point depression ($DPD$, in K) is defined as the difference between the air temperature ($T$) and the dew point temperature ($T_D$). Accordingly, one can calculate the relative humidity ($RH$, in %) from the dew point following the next equation:

    $$RH = 100·\exp({b·T_D}/{c+T_D}-{b·T}/{c+T})$$

    where the temperatures $T$ and $T_D$ are expressed in degrees Celcius for the parameters $b$=18.678 and $c$=257.14.

References