| Index variable | Meaning |
|---|---|
| I | Array dimension is of I predictors (Istd and Iint are variants) |
| J | Array dimension is of J absorbing species |
| K | Array dimension is of K atmospheric layers |
| L | Array dimension is of L spectral channels |
| M | Array dimension is of M profiles |
where the predictors are used to compute the optical depth of the various absorbing species in the gas absorption model.
This usage carries through to loop variables over the various dimensions. So, for example, if you see a loop variable k it means the loop is over the atmospheric layer dimension.
In the various routine headers you will see routine arguments documented like so,
Layer_T: Profile set layer average temperature array.
UNITS: Kelvin
TYPE: REAL( fp_kind )
DIMENSION: Rank-1 (K) or Rank-2 (K x M)
ATTRIBUTES: INTENT( IN )
where, in the "DIMENSION" entry, the K indicates a rank-1 array of size corresponding to the number of atmospheric layers, and the K x M indicates a rank-2 array where the first dimension, K, is the number of layers and the second dimension, M, is the number of profiles.
The reason two different ranks are listed in the above example is because all the user accessible interfaces are overloaded so that you can process a single profile or multiple profiles. Table 2 below gives some examples of how the dimensionality of the various arguments change between the two interfaces (indeed, this is how the different private, user-inaccessible specific interfaces are disambiguated for the generic public interface since the variable types are the same).
| Multiple Profile Interface | Single Profile Interface | ||
|---|---|---|---|
| Rank | Dimension | Rank | Dimension |
| Rank-2 | K x M | Rank-1 | K |
| Rank-1 | M | Scalar | - |
| Rank-1 | L*M | Rank-1 | L |
| Rank-2 | K x L*M | Rank-2 | K x L |
Error_Handler).
USE Type_Kinds USE Error_Handler
For more information on these and other utility modules, see the Utility page.
Access to the pCRTM parameters and initialization functions is achieved by the following USE statements,
USE Parameters USE Initialize
and access to the various components (forward, tangent-linear, adjoint, or K-matrix) of the pCRTM is achieved via the following USE statements,
USE Forward_Model USE Tangent_Linear_Model USE Adjoint_Model USE K_Matrix_Model
Currently, the two datasets that are loaded during initialization are the spectral coefficient (SpcCoeff) data containing various instrument and channel information such as central frequencies, Planck coefficients, etc., and the gas absorption coefficient data (TauCoeff) used to compute the clear sky absorption coefficients.
The initialization call is the same regardless of the RTM component,
! -- Initialize the IRSSE model
Error_Status = Initialize_RTM( Spectral_File = SpcCoeff_File, &
Tau_File = TauCoeff_File )
IF ( Error_Status /= SUCCESS ) THEN
CALL Display_Message( PROGRAM_NAME, &
'Error initializing RT model', &
Error_Status)
STOP
END IF
where the optional arguments Spectral_File and Tau_File default to the names "spectral_coefficients" and "transmittance_coefficients" respectively if the datafile names are not specified in the initialization call.
The SpcCoeff and TauCoeff datafiles for supported instruments can be found at the SpcCoeff data and TauCoeff data pages respectively (these links are also available in the Menu at left under the "Data Files" heading). Note that the binary, not netCDF, formats are required for use with the pCRTM. For more information about these input data (e.g. data structure definitions, file structures) you can visit the main SpcCoeff and TauCoeff pages.
The SpcCoeff and TauCoeff data are organised by instrument channel. Thus both files used in the pCRTM initialization must have the channels organised in the same order. The channels are simply indexed in the order they occur in the SpcCoeff and TauCoeff files. So, for example, if your data files contain the coefficient data for HIRS and AMSU-A/B for all the NOAA-15 to NOAA-17 platforms in that specified order, the channel indices for the various instruments are as shown in table 3 below,
| File Position | Instrument | Number of Channels | Channel Index |
|---|---|---|---|
| 1 | NOAA-15 HIRS | 19 | 1 - 19 |
| 2 | NOAA-15 AMSU-A | 15 | 20 - 34 |
| 3 | NOAA-15 AMSU-B | 5 | 35 - 39 |
| 4 | NOAA-16 HIRS | 19 | 40 - 58 |
| 5 | NOAA-16 AMSU-A | 15 | 59 - 73 |
| 6 | NOAA-16 AMSU-B | 5 | 74 - 78 |
| 7 | NOAA-17 HIRS | 19 | 79 - 97 |
| 8 | NOAA-17 AMSU-A | 15 | 98 - 112 |
| 9 | NOAA-17 AMSU-B | 5 | 113 - 117 |
Thus, if you want to do a calculation for NOAA-16 AMSU-A channel 5, you will need to know that this corresponds to channel index 63 as determined by the data order in the SpcCoeff and TauCoeff data files.
These channel indices correspond to what is required for the Channel_Index argument in the pCRTM routines so that the correct coefficient data is used in a calculation. You can see how getting the channel index wrong will produce incorrect results. Channel indexing errors may cause incorrect values to appear correct if the channels in question are spectrally similar, so be careful.
Error_Status = Compute_RTM( Level_Pressure, & ! Input, K
Layer_Pressure, & ! Input
Layer_Temperature, & ! Input
Layer_Water_Vapor, & ! Input
Layer_Ozone, & ! Input
Surface_Temperature, & ! Input
Surface_Emissivity, & ! Input
Surface_Reflectivity, & ! Input
Secant_View_Angle, & ! Input
Secant_Solar_Angle, & ! Input
n_Channels_Per_Profile, & ! Input
Channel_Index, & ! Input
Tau, & ! Output
Flux_Tau, & ! Output
Solar_Tau, & ! Output
Upwelling_Radiance, & ! Output
Brightness_Temperature, & ! Output
Solar_Reflectivity = Solar_Reflectivity, & ! Optional input
Secant_Flux_Angle = Secant_Flux_Angle, & ! Optional input
n_Input_Profiles = n_Input_Profiles, & ! Optional input
Message_Log = Message_Log ) ! Error messaging
IF ( Error_Status /= SUCCESS ) THEN
CALL Display_Message( PROGRAM_NAME, &
'Error in Compute_RTM call', &
Error_Status )
STOP
END IF
Note that the Compute_RTM function is overloaded so that a single profile can be processed (e.g. the arguments Level_Pressure, Layer_Pressure, Layer_Temperature, etc are rank-1 vectors with the dimension corresponding to the vertical extent of the profile), or a number of profiles can be processed (e.g. the arguments Level_Pressure, Layer_Pressure, Layer_Temperature, etc are rank-2 arrays where the first dimension corresponds to the vertical extent, and the second dimension corresponds to the profile number).
To ensure the correct dimensionalities are specified for all the arguments, please read the Compute_RTM documentation, or study the Forward_Model_Example test program.
Error_Status = Compute_RTM_TL( Level_Pressure, & ! Input
Layer_Pressure, & ! Input
Layer_Temperature, & ! Input
Layer_Water_Vapor, & ! Input
Layer_Ozone, & ! Input
Surface_Temperature, & ! Input
Surface_Emissivity, & ! Input
Surface_Reflectivity, & ! Input
Level_Pressure_TL, & ! Input
Layer_Pressure_TL, & ! Input
Layer_Temperature_TL, & ! Input
Layer_Water_vapor_TL, & ! Input
Layer_Ozone_TL, & ! Input
Surface_Temperature_TL, & ! Input
Surface_Emissivity_TL, & ! Input
Surface_Reflectivity_TL, & ! Input
Secant_View_Angle, & ! Input
Secant_Solar_Angle, & ! Input
n_Channels_Per_Profile, & ! Input
Channel_Index, & ! Input
Tau, Flux_Tau, Solar_Tau, & ! Output
Upwelling_Radiance, & ! Output
Brightness_Temperature, & ! Output
Tau_TL, Flux_Tau_TL, Solar_Tau_TL, & ! Output
Upwelling_Radiance_TL, & ! Output
Brightness_Temperature_TL, & ! Output
Solar_Reflectivity = Solar_Reflectivity, & ! Optional input
Solar_Reflectivity_TL = Solar_Reflectivity_TL, & ! Optional input
Secant_Flux_Angle = Secant_Flux_Angle, & ! Optional input
Message_Log = Message_Log ) ! Error messaging
IF ( Error_Status /= SUCCESS ) THEN
CALL Display_Message( PROGRAM_NAME, &
'Error in Compute_RTM_TL call', &
Error_Status )
STOP
END IF
Again, like the forward model, the Compute_RTM_TL function is overloaded so that a single profile or multiple profiles can be can be processed in one call.
To ensure the correct dimensionalities are specified for all the arguments, please read the Compute_RTM_TL documentation, or study the Tangent_Linear_Model_Example test program.
Error_Status = Compute_RTM_AD( Level_Pressure, & ! Input
Layer_Pressure, & ! Input
Layer_Temperature, & ! Input
Layer_Water_Vapor, & ! Input
Layer_Ozone, & ! Input
Surface_Temperature, & ! Input
Surface_Emissivity, & ! Input
Surface_Reflectivity, & ! Input
Tau_AD, Flux_Tau_AD, Solar_Tau_AD, & ! Input
Upwelling_Radiance_AD, & ! Input
Brightness_Temperature_AD, & ! Input
Secant_View_Angle, & ! Input
Secant_Solar_Angle, & ! Input
n_Channels_Per_Profile, & ! Input
Channel_Index, & ! Input
Tau, Flux_Tau, Solar_Tau, & ! Output
Upwelling_Radiance, & ! Output
Brightness_Temperature, & ! Output
Level_Pressure_AD, & ! Output
Layer_Pressure_AD, & ! Output
Layer_Temperature_AD, & ! Output
Layer_Water_vapor_AD, & ! Output
Layer_Ozone_AD, & ! Output
Surface_Temperature_AD, & ! Output
Surface_Emissivity_AD, & ! Output
Surface_Reflectivity_AD, & ! Output
Solar_Reflectivity = Solar_Reflectivity, & ! Optional input
Secant_Flux_Angle = Secant_Flux_Angle, & ! Optional input
Solar_Reflectivity_AD = Solar_Reflectivity_AD, & ! Optional output
Message_Log = Message_Log ) ! Error messaging
IF ( Error_Status /= SUCCESS ) THEN
CALL Display_Message( PROGRAM_NAME, &
'Error in Compute_RTM_AD call', &
Error_Status )
STOP
END IF
As like the oher components, the Compute_RTM_AD function is overloaded so that a single profile or multiple profiles can be can be processed in one call.
To ensure the correct dimensionalities are specified for all the arguments, please read the Compute_RTM_AD documentation, or study the Adjoint_Model_Example test program.
The two public interfaces for the K-matrix are Compute_RTM_K and K_Matrix_RTM. Once more, as with all the other components, users will want to use the first form to avoid all the intermediary arguments in the second form. The Compute_RTM_K calling sequence is,
Error_Status = Compute_RTM_K( Level_Pressure, & ! Input
Layer_Pressure, & ! Input
Layer_Temperature, & ! Input
Layer_Water_Vapor, & ! Input
Layer_Ozone, & ! Input
Surface_Temperature, & ! Input
Surface_Emissivity, & ! Input
Surface_Reflectivity, & ! Input
Tau_K, Flux_Tau_K, Solar_Tau_K, & ! Input
Upwelling_Radiance_K, & ! Input
Brightness_Temperature_K, & ! Input
Secant_View_Angle, & ! Input
Secant_Solar_Angle, & ! Input
n_Channels_Per_Profile, & ! Input
Channel_Index, & ! Input
Tau, Flux_Tau, Solar_Tau, & ! Output
Upwelling_Radiance, & ! Output
Brightness_Temperature, & ! Output
Level_Pressure_K, & ! Output
Layer_Pressure_K, & ! Output
Layer_Temperature_K, & ! Output
Layer_Water_vapor_K, & ! Output
Layer_Ozone_K, & ! Output
Surface_Temperature_K, & ! Output
Surface_Emissivity_K, & ! Output
Surface_Reflectivity_K, & ! Output
Solar_Reflectivity = Solar_Reflectivity, & ! Optional input
Secant_Flux_Angle = Secant_Flux_Angle, & ! Optional input
Solar_Reflectivity_K = Solar_Reflectivity_K, & ! Optional output
Message_Log = Message_Log ) ! Error messaging
IF ( Error_Status /= SUCCESS ) THEN
CALL Display_Message( PROGRAM_NAME, &
'Error in Compute_RTM_K call', &
Error_Status )
STOP
END IF
As like the oher components, the Compute_RTM_K function is overloaded so that a single profile or multiple profiles can be processed in one call.
To ensure the correct dimensionalities are specified for all the arguments, please read the Compute_RTM_K documentation, or study the K_Matrix_Model_Example test program.
The model destruction is carried out by the Destroy_RTM function,
! -- Destroy the RTM space
Error_Status = Destroy_RTM()
IF ( Error_Status /= SUCCESS ) THEN
CALL Display_Message( PROGRAM_NAME, &
'Error destroying RTM', &
Error_Status )
STOP
END IF