Rel-2.0.2.Crtm User Guide
Rel-2.0.2.Crtm User Guide
Rel-2.0.2.Crtm User Guide
1 Introduction 1
1.1 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Naming of Structure Types and Instances of Structures . . . . . . . . . . . . . . . . . . . 1
1.1.2 Naming of Definition Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.3 Naming of Application Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.4 Naming of I/O Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 Atmospheric Optics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.2 Surface Optics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.3 Radiative Transfer Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Design Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
i
3 How to build the CRTM library 8
3.1 Build Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Predefined Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3 Compilation Environment Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.4 Building the library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.5 Testing the library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.6 Installing the library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.7 Clean Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.8 Linking to the library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Bibliography 30
ii
A.2.5 CRTM Atmosphere DefineVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . 40
A.2.6 CRTM Atmosphere Destroy interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
A.2.7 CRTM Atmosphere Inspect interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
A.2.8 CRTM Atmosphere IsValid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
A.2.9 CRTM Atmosphere Zero interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
A.2.10 CRTM Atmosphere IOVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
A.2.11 CRTM Atmosphere InquireFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
A.2.12 CRTM Atmosphere ReadFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
A.2.13 CRTM Atmosphere WriteFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
A.3 Cloud Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
A.3.1 CRTM Cloud AddLayerCopy interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
A.3.2 CRTM Cloud Associated interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
A.3.3 CRTM Cloud Compare interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
A.3.4 CRTM Cloud Create interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
A.3.5 CRTM Cloud DefineVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
A.3.6 CRTM Cloud Destroy interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
A.3.7 CRTM Cloud Inspect interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
A.3.8 CRTM Cloud IsValid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
A.3.9 CRTM Cloud Zero interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
A.3.10 CRTM Cloud IOVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
A.3.11 CRTM Cloud InquireFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
A.3.12 CRTM Cloud ReadFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
A.3.13 CRTM Cloud WriteFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
A.4 Aerosol Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
A.4.1 CRTM Aerosol AddLayerCopy interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
A.4.2 CRTM Aerosol Associated interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
A.4.3 CRTM Aerosol Compare interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
A.4.4 CRTM Aerosol Create interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
A.4.5 CRTM Aerosol DefineVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
A.4.6 CRTM Aerosol Destroy interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
A.4.7 CRTM Aerosol Inspect interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
A.4.8 CRTM Aerosol IsValid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
A.4.9 CRTM Aerosol Zero interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
A.4.10 CRTM Aerosol IOVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
A.4.11 CRTM Aerosol InquireFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
A.4.12 CRTM Aerosol ReadFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
A.4.13 CRTM Aerosol WriteFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
A.5 Surface Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
A.5.1 CRTM Surface Associated interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
A.5.2 CRTM Surface Compare interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
iii
A.5.3 CRTM Surface CoverageType interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
A.5.4 CRTM Surface Create interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
A.5.5 CRTM Surface DefineVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
A.5.6 CRTM Surface Destroy interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
A.5.7 CRTM Surface Inspect interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
A.5.8 CRTM Surface IsCoverageValid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
A.5.9 CRTM Surface IsValid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
A.5.10 CRTM Surface Zero interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
A.5.11 CRTM Surface IOVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
A.5.12 CRTM Surface InquireFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
A.5.13 CRTM Surface ReadFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
A.5.14 CRTM Surface WriteFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
A.6 SensorData Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
A.6.1 CRTM SensorData Associated interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
A.6.2 CRTM SensorData Compare interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
A.6.3 CRTM SensorData Create interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
A.6.4 CRTM SensorData DefineVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . 84
A.6.5 CRTM SensorData Destroy interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
A.6.6 CRTM SensorData Inspect interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
A.6.7 CRTM SensorData IsValid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
A.6.8 CRTM SensorData Zero interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
A.6.9 CRTM SensorData IOVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
A.6.10 CRTM SensorData InquireFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
A.6.11 CRTM SensorData ReadFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
A.6.12 CRTM SensorData WriteFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
A.7 Geometry Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
A.7.1 CRTM Geometry DefineVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
A.7.2 CRTM Geometry Destroy interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
A.7.3 CRTM Geometry GetValue interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
A.7.4 CRTM Geometry Inspect interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
A.7.5 CRTM Geometry IsValid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
A.7.6 CRTM Geometry SetValue interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
A.7.7 CRTM Geometry IOVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
A.7.8 CRTM Geometry InquireFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
A.7.9 CRTM Geometry ReadFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
A.7.10 CRTM Geometry WriteFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
A.8 RTSolution Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
A.8.1 CRTM RTSolution Associated interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
A.8.2 CRTM RTSolution Compare interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
A.8.3 CRTM RTSolution Create interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
iv
A.8.4 CRTM RTSolution DefineVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . 109
A.8.5 CRTM RTSolution Destroy interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
A.8.6 CRTM RTSolution Inspect interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
A.8.7 CRTM RTSolution IOVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
A.8.8 CRTM RTSolution InquireFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
A.8.9 CRTM RTSolution ReadFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
A.8.10 CRTM RTSolution WriteFile interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
A.9 Options Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
A.9.1 CRTM Options Associated interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
A.9.2 CRTM Options Create interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
A.9.3 CRTM Options DefineVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
A.9.4 CRTM Options Destroy interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
A.9.5 CRTM Options Inspect interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
A.9.6 CRTM Options IsValid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
A.10 SSU Input Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
A.10.1 SSU Input CellPressureIsSet interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
A.10.2 SSU Input DefineVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
A.10.3 SSU Input GetValue interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
A.10.4 SSU Input Inspect interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
A.10.5 SSU Input IsValid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
A.10.6 SSU Input SetValue interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
A.11 Zeeman Input Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
A.11.1 Zeeman Input DefineVersion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
A.11.2 Zeeman Input GetValue interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
A.11.3 Zeeman Input Inspect interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
A.11.4 Zeeman Input IsValid interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
A.11.5 Zeeman Input SetValue interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
v
List of Figures
vi
List of Tables
3.1 Supplied configuration files for the CRTM library and test/example program build. . . . . . . . . 8
A.1 CRTM Atmosphere structure valid Climatology definitions. The same set as defined for LBLRTM
is used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A.2 CRTM Atmosphere structure valid Absorber ID definitions. The same molecule set as defined for
HITRAN is used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A.3 CRTM Atmosphere structure valid Absorber Units definitions. The same set as defined for
LBLRTM is used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A.4 CRTM Cloud structure valid Type definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
A.5 CRTM Aerosol structure valid Type definitions and effective radii. SSAM ≡ Sea Salt Accumula-
tion Mode, SSCM ≡ Sea Salt Coarse Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
A.6 CRTM Surface structure component description. . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
A.7 CRTM Surface structure default values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
A.8 CRTM Surface structure valid Land Type definitions. . . . . . . . . . . . . . . . . . . . . . . . . 70
A.9 CRTM Surface structure valid Water Type definitions. . . . . . . . . . . . . . . . . . . . . . . . 70
A.10 CRTM Surface structure valid Snow Type definitions. . . . . . . . . . . . . . . . . . . . . . . . . 70
A.11 CRTM Surface structure valid Ice Type definitions. . . . . . . . . . . . . . . . . . . . . . . . . . 71
A.12 CRTM SensorData structure component description. . . . . . . . . . . . . . . . . . . . . . . . . . 82
A.13 CRTM Geometry structure component description. . . . . . . . . . . . . . . . . . . . . . . . . . . 92
A.14 CRTM RTSolution structure component description . . . . . . . . . . . . . . . . . . . . . . . . . 107
A.15 CRTM Options structure component description . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
A.16 CRTM SSU Input structure component description . . . . . . . . . . . . . . . . . . . . . . . . . . 121
A.17 CRTM Zeeman Input structure component description . . . . . . . . . . . . . . . . . . . . . . . . 126
vii
What’s New in v2.0
New Science
Multiple transmittance algorithms There are now two transmittance models available for use in the CRTM:
ODAS (Optical Depth in Absorber Space), which is equivalent to the previous CompactOPTRAN algo-
rithm; and ODPS (Optical Depth in Pressure Space) which is similar to the RTTOV-type of transmittance
algorithm, except here OPTRAN is used for water vapor line absorption.
The algorithm is selectable by the user via the transmittance coefficient (TauCoeff) data file used to
initialise the CRTM. This method, rather than a switch argument in the CRTM Init() function, was chosen
to allow users to “mix-and-match” transmittance algorithms for different sensors in the same initialisation
call.
SSU-specific transmittance model Similar to the multiple transmittance algorithm approach, a separate
algorithm just for the SSU instrument has been constructed. The algorithm is based on the ODAS approach,
but with elements to account for the time-dependence of the SSU CO2 cell pressures.
Zeeman-splitting transmittance model for SSMIS upper-level channels A separate algorithm is avail-
able to account for the change in absorption at very low pressures due to the Zeeman-splitting of absorption
lines. Currently this algorithm has only been applied to the affected channels in the SSMIS instrument,
19-22.
Visible sensor capability The CRTM now supports radiative transfer for visible instruments/channels. The
treatment of visible channels was handled in the CRTM framework by considering them separate instru-
ments. The sensor identifier for these instruments/channels are differentiated from their infrared counter-
parts by a “v.” prefix. For example, while modis aqua is the sensor identifier for the infrared channels,
v.modis aqua identifies the visible channels.
Inclusion of Matrix Operator Method (MOM) in radiaitve transfer To handle visible wavelength ra-
diative transfer in the prescence of aerosols, the Advanced Doubling-Adding (ADA) algorithm was adapted
to use the MOM technique [Liu and Ruprecht, 1996].
Inclusion of additional infrared sea surface emissivity model Files containing the emissivity data (EmisCoeff)
for the Nalli et al. [2008a] model are provided. Previously, only the EmisCoeff files for the Wu and Smith
[1997] model were provided. Users can now select between the Nalli et al. [2008a] or Wu and Smith [1997]
models by specifying the requisite filename in the call to CRTM Init().
Surface BRDF for solar-affected shortwave IR channels A bi-directional reflectance distribution func-
tion (BRDF) has been added to account for reflected solar in affected shortware infrared channels [Breon,
1993].
Reflectivity for downwelling infrared over water The reflectivity for downwelling infrared radiation over
water surface has been changed from Lambertian to specular.
viii
Aerosol type changes To account for changes in the handling of GOCART [Chin et al., 2002] aerosol model
output, additional sea salt coarse modes were added to the list of allowed aerosol types. Also, the separate
dry and wet types for organic and black carbon aerosols were combined, with a relatvie humidity of 0%
used to indicate the previous “dry” aerosol type. See table A.5 for the new list of accepted aerosol types.
Interface Changes
CRTM Initialisation function The changes to the CRTM Init() interface were relatively minor but do require
calling codes to be modified:
The Sensor Id argument is now mandatory. This argument is used to construct the sensor-specific
SpcCoeff and TauCoeff filename and in the past was optional to allow for “generic” filenames. This
is no longer allowed and generic SpcCoeff and TauCoeff files are no longer used.
The loading of the CloudCoeff and AerosolCoeff datafiles containing the optical properties of
cloud and aerosol particulates is no longer mandatory. For cloud-free CRTM runs, the load of
the CloudCoeff and AerosolCoeff datafiles can be disabled via the optional Load CloudCoeff and
Load AerosolCoeff arguments which are logical switches (true or false).
User accessible structures The structures are defined as those that are used in the argument lists of the
main CRTM functions (e.g. initialisation; the forward, tangent-linear, adjoint, and K-matrix models; and
destruction). Changes were made to both the structure definitions and their procedures. To mitigate
the possibility of memory leaks, the definitions of array members of structures have had their POINTER
attribute replaced with ALLOCATABLE. This was a first step in preparation for use of Fortran2003 Object
Oriented features in the CRTM (once Fortran2003 compiler become widely available), where the derived
type structure definitions will be reclassified as objects and their procedures will be type-bound. To
delineate this change from previous versions of CRTM the interfaces of the derived type procedures have
been altered by:
changing the procedure names to use the convention CRTM object action where an object can be any of
the user accessible CRTM derived types (e.g. CRTM Atmosphere type, CRTM RTSolution type etc),
and the action can be those defined operations for the structure (e.g. Create, Destroy, Inspect,
etc).
making the first dummy argument of the definition module procedures the derived type itself. This
will eventually allow the procedures to be called via an instance of the derived type12
All of the current derived type definitions and their associated procedures and interfaces are shown in
appendix A.
GeometryInfo to Geometry structure name change Previously, the GeometryInfo structure held both the
user input to the CRTM as well as the internally computed geometry data. To separate these two sets of
quantities, the name of the geometry information structure that is passed into the CRTM functions was
changed from CRTM GeometryInfo type to CRTM Geometry type. This means that all of the user input
structures are now strictly INTENT(IN) arguments.
Options structure specific changes The additional changes made to the CRTM Options type definition:
all usage on/off switches have been changed from integers (0/1) to logicals (true/false),
a logical switch to control input checking, Check Input, has been added.
structure components for SSU-specific and Zeeman model input have been added.
To migrate from the CRTM v1.2.x calling structures to those implemented in v2.0.x, see Appendix C, “Migration
Path from REL-1.2 to REL-2.0.”
1 Interested readers can investigate the PASS attribute that can be used in the PROCEDURE statement within derived type definitions
in Fortran2003.
2 The I/O functions do not yet follow this convention, since they are considered secondary to the definition module procedures
ix
What’s New in v2.0.1
Bug Fixes
Replacing CRTM Atmosphere IsValid WARNING message for missing ozone with FAILURE The CRTM con-
tains two different transmittance model algorithm: the Optical Depth in Absorber Space (ODAS) algorithm
and the Optical Depth in Pressure Space (ODPS) algorithm. The ODPS algorithm was constructed to
handle “missing” profiles of major trace gas absorbers (e.g. ozone). The ODAS algorithm, however, cannot
yet handle a missing ozone profile. As such, we have switched back to missing ozone being a FAILURE error,
regardless of whether or not the ODAS or ODPS transmittance algorithm is being used. See ticket 1503 .
Allowed for user profile top level pressures to be less than 0.005hPa in the ODAS algorithm. This
corrected a bug that generated negative absorber amounts for the top layer when a user input a profile
where the top level pressure is less than 0.005hPa. See ticket 151.
Fixed test of SensorData%Tb component The previous test (called within the CRTM Surface IsValid pro-
cedure) caused a FAILURE when any of the supplied brightness temperatures were less than zero. This test
has been changed to fail only when all of the input brightness temperatures are less than zero to allow
channel subsets of data to be passed. See ticket 110.
Corrected error mesage in CRTM Atmosphere IsValid function. The error message for invalid input ab-
sorber units was corrected. See ticket 141.
Coefficient load message suppression in the CRTM Init function was not occurring correctly This prob-
lem was traced to a logic error in several of the coefficient load procedures when the optional MPI process
identifier arguments were passed in. The logic has been corrected in the affected load procedures. See
ticket 143.
Memory leak in CRTM IRSSEM module fixed This was a bug caused by apparent compiler bugs (in more
than one compiler) where declaring the internals of a local (i.e. not PUBLIC) structure as PRIVATE caused
a memory leak. Removal of the internal PRIVATE statement solved the problem. See ticket 144.
3 The ticket references and links are included to allow CRTM developers to easily navigate to the CRTM Source Code Management
system from this document
x
Modification of Type Kinds module to allow for Intel ifort compilation This work around was neces-
sary due to an ifort v11.1 compiler bug that surfaced due to the CRTM build switches for this compiler
promote compiler warnings to errors. Rather than require users to modify their compilation setup to avoid
this error, the Type Kinds module was modified to avoind it entirely. See ticket 112.
Modification of CRTM Atmosphere AddLayerCopy procedure to allow for PGI pgf95 compilation The REL-
2.0 version of the CRTM Atmosphere AddLayerCopy procedure was identified as a problem for the PGI pgf95
v10.2-1 compiler. A bug report was submitted to PGI Support and filed as TPR 16814. The bug is fixed
in the v10.4 release of the pgf95 compiler, which does not have a problem with the original CRTM code.
See ticket 114.
This update is probably the biggest change in REL-2.0.1. The CRTM tarball structure was updated to include
the test/example codes – as opposed to supplying a separate tarball just for the example programs. The reasoning
here was to establish the typical “make, make test” procedures for building packages, but be aware that the
setup is still rather unsophisticated; we are still investigating ways to more easily configure the CRTM library
and test/example programs (e.g. autoconf).
For a full description of the necessary steps to build the CRTM library and test/example programs, refer to the
README file supplied with the CRTM release tarball.
xi
What’s New in v2.0.2
Fix two critical defects: one introduced in v2.0; another in the v2.0.1 update.
Bug Fixes
Fix for specular reflection of IR sensors over water In v2.0, the reflectance behaviour for IR sensors over
water was changed from Lambertian to specular. The problem with the update is due to the design
of how sub-FOV surface differences are handled in the CRTM. Currently there is no way to handle a
mixed land/water FOV where land reflectivity is assumed Lambertian and water reflectivity specular. The
reflectivity behaviour ended up being that associated with the surface type having the largest FOV fraction.
The temporary fix applied is that all IR sensor reflectivities are now treated as specular. See ticket 164.
Fix for invalid maximum number of azimuth angles for visible sensors To speed up visible sensor cal-
culations in v2.0.1, the maximum number of azimuth angles used was switched from a fixed maximum to
a dynamic one based on the number of Legendre terms required to properly simulate molecular scattering.
However, the maximum number of azimuth angle assignment was being performed prior to the minimum
acceptable value being set. This lead to an invalid value being specified for the number of azimuth angles
in some cases. See ticket 165.
An additional forward model test, Example5 ClearSky, was introduced to test the bug fixes mentioned above.
All test comparison output files have been updated accordingly.
xii
1
Introduction
1.1 Conventions
The following are conventions that have been adhered to in the current release of the CRTM framework. They
are guidelines intended to make understanding the code at a glance easier, to provide a recognisable “look and
feel”, and to minimise name space clashes.
CRTM_Atmosphere_type
CRTM_RTSolution_type
An instance of a structure is then referred to via its name, or some sort of derivate of its name. Some structure
declarations examples are,
where the K-matrix structure variables are identified with a “ K” suffix. Similarly, tangent-linear and adjoint
variables are suffixed with “ TL” or “ AD” respectively.
CRTM_Atmosphere_Define
CRTM_RTSolution_Define
The actual source code files for these modules have the same name with a “.f90” suffix.
1 The terms “derived type” and “structure” are used interchangably in this document.
1
1.1.3 Naming of Application Modules
Modules containing the routines that perform the calculations for the various components of the CRTM are
termed application modules. The naming convention adopted for application modules in the CRTM is,
CRTM name
Some examples are,
CRTM_AtmAbsorption
CRTM_SfcOptics
CRTM_RTSolution
However, in this case, name does not necessarilty refer just to a structure type. Separate application modules are
used as required to split up tasks in manageable (and easily maintained) chunks. For example, separate modules
have been provided to contain the cloud and aerosol optical property retrieval; similarly separate modules handle
different surface types for different instrument types in computing surface optics.
Again, the actual source code files for these modules have the same name with a “.f90” suffix. Note that not
all definition modules have a corresponding application module since some structures (e.g. SpcCoeff structures)
are simply data containers.
CRTM_Atmosphere_IO
CRTM_RTSolution_IO
As with the other module types, the actual source code files for these modules have the same name with a “.f90”
suffix.
In the context of the CRTM, the term “Binary” is a euphemisn for sequential, unformatted I/O in Fortran.
1.2 Components
The CRTM is designed around three broad categories: atmospheric optics, surface optics and radiative transfer.
2
The scattering component simply interpolates look-up-tables (LUTs) of optical properties – such as mass ex-
tinction coefficient and single scatter albedo – for cloud and aerosol types that are then used in the radiative
transfer component. See tables A.4 and A.5 for the valid cloud and aerosol types, respectively, that are valid in
the CRTM.
1.3 Models
The CRTM is composed of four models: a forward model, a tangent-linear model, an adjoint model, and a
K-matrix model. These can be represented as shown in equations 1.1a to 1.1d.
δ ∗Tl , δ ∗ql , δ ∗Ts,l , ... = K(T, q, Ts , ...δ ∗TB ) for l = 1, 2, ..., L (1.1d)
Here F is the forward operator that, given the atmospheric temperature and absorber profiles (T and q), surface
temperature (Ts ), etc., produces a vector of channel brightness temperatures (TB ) and radiances (R).
The tangent-linear operator, H, represents a linearisation of the forward model about T, q, Ts , etc. and when
also supplied with perturbations about the linearisation point (quantities represented by the δ’s) produces the
expected perturbations to the brightness temperature and channel radiances.
The adjoint operator, HT , is simply the transpose of the tangent-linear operator and produces gradients (the
quantities represented by the δ ∗’s). It is worth noting that, in the CRTM, these adjoint gradients are accumulated
over channel and thus do not represent channel-specific Jacobians.
The K-matrix operator3 , K, is effectively the same as the adjoint but with the results preserved by channel
(indicated via the subscript l). In the CRTM, the adjoint and K-matrix results are related by,
L
X
δ ∗x = δ ∗xl (1.2)
l=1
3 The term K-matrix is used because references to this operation in the literature commonly use the symbol K
3
Thus, the K-matrix results are the derivatives of the diagnostic variables with respect to the prognostic variables,
e.g.
∂TB,l
δ ∗xl = (1.3)
∂x
Typically, only the forward or K-matrix models are used in applications. However, the intermediate models are
generated and retained for maintenance and testing purposes. Any changes to the CRTM forward model are
translated to the tangent-linear model and the latter tested against the former. When the tangent-linear model
changes have been verified, the changes then translated to the adjoint model and, as before, the latter is tested
against the former. This process is repeated for the adjoint-to-K-matrix models also.
This document is not really the place to fully discuss the design framework of the CRTM, so it will only be
briefly mentioned here. Where appropriate, different physical processes are isolated into their own modules. The
CRTM interfaces presented to the user are, at their core, simply drivers for the individual parts. This is shown
schematically in the forward and K-matrix model flowcharts of figure 1.1.
A fundamental tenet of the CRTM design is that each component define its own structure definition and applica-
tion modules to facilitate independent development of an algorithm outside of the mainline CRTM development.
By isolating different processes, we can more easily identify requirements for an algorithm with a view to min-
imise or eliminate potential software conflicts and/or redundancies. The end result sought via this approach is
that components developed by different groups can more easily be added into the framework leading to faster
implementation of new science and algorithms.
4
Begin
K-Matrix Model
Channel independent
forward model
calculations
Compute
RTSolution adjoint
surface temperature
Compute stream
angles
Compute AtmAbsorption
predictors Perform adjoint
radiative transfer
Adjoint AtmAbsorption,
Any Yes Compute CloudScatter CloudScatter and
clouds? optical properties AerosolScatter combine
No
No
Sensor loop
Profile loop
No
RTSolution
Compute adjoint
Compute stream AtmAbsorption
angles
Perform radiative
transfer Compute adjoint
surface temperature
No No
No No
No No
5
2
How to obtain the CRTM
The CRTM source code and coefficients are released as compressed tarballs1 via the CRTM ftp site:
ftp://ftp.emc.ncep.noaa.gov/jcsda/CRTM/
The REL-2.0.2 release is available directly from
ftp://ftp.emc.ncep.noaa.gov/jcsda/CRTM/REL-2.0.2
Also note that additional releases, e.g. beta or experimental branches, are also made available on this ftp site.
The tarball labeled as “Coeffs” packages up all the transmittance, spectral, cloud, aerosol, and emissivity
coefficient data needed by the CRTM. The coefficient tarball directory structure is organised by coefficient and
format type as shown in figure 2.1.
Both big- and little-endian format files are provided to save users the trouble of switching what they use for
their system2 . Note in the TauCoeff directory there are two subdirectories: ODAS and ODPS. These directories
correspond to the coefficient files for the different transmittance model algorithms. The user can select which
algorithm to use by using the corresponding TauCoeff file.
To run the CRTM, all the required coefficient files need to be in the same path (see the CRTM initialisation
function description) so users will have to move/link the datafiles as required.
6
CRTM Coefficients/
SpcCoeff/
Big Endian/
Little Endian/
} Spectral coefficients
TauCoeff/
ODAS/
Big Endian/
Little Endian/
} ODAS fast transmittance
model coefficients
ODPS/
Big Endian/
Little Endian/
} ODPS fast transmittance
model coefficients
AerosolCoeff/
Big Endian/
Little Endian/
} Aerosol optical properties
CloudCoeff/
Big Endian/
Little Endian/
} Cloud optical properties
EmisCoeff/
Big Endian/
Little Endian/
} Surface emissivity model coefficients
Figure 2.1: The CRTM coefficients tarball structure
7
3
How to build the CRTM library
The build system for the CRTM is currently quite unsophisticated. It consists of a number of make, include,
and configuration files in the CRTM tarball hierarchy:
makefile : The main makefile
make.macros : The include file containing the defined macros.
make.rules : The include file containing the suffix rules for compiling Fortran95/2003 source
code.
configure : The directory containing build environment definitions.
The build makefiles now assumes that environment variables (envars) will be defined that describe the compilation
and link environment. The envars that must be defined are:
FC : the Fortran95/2003 compiler executable,
FC FLAGS : the flags/switches provided to the Fortran compiler,
FL : the linker used to create the executable test/example programs, and
FL FLAGS : the flags/switches provided to the linker.
Several shell source files are provided for the build environment definitions for the compilers to which we have
access and have tested here at the JCSDA. These shell source files are in the configure subdirectory of the
tarball. The configuration files provided are shown in table 3.1. Both “production” and debug configurations are
supplied, with the former using compiler switches to produce fast code and the latter using compiler switches
to turn on all the available debugging capabilities. Note that the debug configurations will produce executables
much slower than the production builds.
Table 3.1: Supplied configuration files for the CRTM library and test/example program build.
8
3.3 Compilation Environment Setup
To set the compilation envars for your CRTM build, you need to source the required “setup” file. For example,
to use gfortran to build the CRTM you would type
. configure/gfortran.setup
in the main directory. Note the “.” and space preceding the filename. This should print out something like the
following:
=========================================
CRTM compilation environment variables:
FC: gfortran
FC_FLAGS: -c -O3 -fconvert=big-endian -ffast-math -ffree-form
-fno-second-underscore -frecord-marker=4 -funroll-loops
-ggdb -static -Wall
FL: gfortran
FL_FLAGS:
=========================================
make
If you are using the DEBUG compiler flags you may, unfortunately, see many warnings similar to:
Warning (137): Variable ’cosaz’ at (1) is never used and never set
Warning (112): Variable ’rlongitude’ at (1) is set but never used
Warning (140): Implicit conversion at (1) may cause precision loss
Warning: Unused dummy argument ’group_index’ at (1)
PGF90-I-0035-Predefined intrinsic scale loses intrinsic property
etc..
The actual format of the warning message depends on the compiler. We are working on eliminating these warning
messages.
Several test/example programs exercising the forward and K-matrix functions have been supplied with the
CRTM. To build and run all these tests, type,
make test
9
This process does generate a lot of output to screen so be prepared to scroll through it. Currently there are four
forward model test, or example, programs:
test/forward/Example1_Simple
test/forward/Example2_SSU
test/forward/Example3_Zeeman
test/forward/Example4_ODPS
And there are the same four cases for the K-matrix model:
test/k_matrix/Example1_Simple
test/k_matrix/Example2_SSU
test/k_matrix/Example3_Zeeman
test/k_matrix/Example4_ODPS
Both the forward and K-matrix tests should end with output that looks like:
======================
SUMMARY OF ALL RESULTS
======================
Passed 14 of 14 tests.
Failed 0 of 14 tests.
Currently they both have the same number of tests. If you encounter failures you might see something like:
======================
SUMMARY OF ALL RESULTS
======================
Passed 10 of 14 tests.
Failed 4 of 14 tests. <----<<< **WARNING**
The supplied results were generated using the gfortran DEBUG build.
Comparisons between DEBUG and PRODUCTION builds can be different due to various compiler switches
that modify floating point arithmetic (e.g. optimisation levels), or different hardware.
For test failures, you can view the differences between the generated and supplied ASCII output files. For
example, to view the K-matrix Example1 Simple test case differences for the amsua metop-a sensor you
would do something like:
$ cd test/k_matrix/Example1_Simple
$ diff -u amsua_metop-a.output results/amsua_metop-a.output | more
where the amsua metop-a.output file is generated during the test run, and the results/amsua metop-a.output
file is supplied with the CRTM tarball.
10
3.6 Installing the library
A very simple install target is specified in the supplied makefile to put all the necessary include files (the generated
*.mod files containing all the procedure interface information) in an /include subdirectory and the library itself
(the generated libCRTM.a file) in a /lib subdirectory. The make command is
make install
The /include and /lib subdirectories can then be copied/moved/linked to a more suitable location on your
system, for example: $HOME/local/CRTM
NOTE: Currently, running the tests also invokes this install target. That will change in future tarball releases
so do not rely on the behaviour.
3.7 Clean Up
make clean
Removes all the compilation and link products from the libsrc/ directory.
make distclean
This does the same as the “clean” target but also deletes the library and include directories created by the
“install” target.
Let’s assume you’ve built the CRTM library and placed the /include and /lib subdirectories in your own local
area, $HOME/local/CRTM. In the makefile for your application that uses the CRTM, you will need to add
-I$HOME/local/CRTM/include
to your list of compilation switches, and the following to your list of link switches,
-L$HOME/local/CRTM/lib -lCRTM
11
4
How to use the CRTM library
This section will hopefully get you started using the CRTM library as quickly as possible. Refer to the following
sections for more information about the structures and interfaces.
The examples shown here assume you are processing one sensor at a time. The CRTM can handle multiple
sensors at once, but specifying the input information in a simple way is difficult; e.g. the Geometry structure
that is used to specify the sensor viewing geometry – even sensors on the same platform typically have different
numbers of fields-of-view (FOVs) per scan. For multiple sensor processing, we’ll assume they will be separately
processed in parallel.
Because there are many variations in what information is known ahead of time (and by “ahead of time” we mean
at compile-time of your code), let’s approach this via examples for a fixed number of atmospheric profiles, and
a known sensors. It is left as an exercise to the reader to tailor calls to the CRTM in their application code
according to their particular needs.
With regards to sensor identification, the CRTM uses a character string – refered to as the Sensor Id – to distin-
guish sensors and platforms. The lists of currently supported sensors, along with their associated Sensor Id’s,
are shown in appendix B.
12
2. Surface data such as type of surface, temperature, surface type specific parameters etc. Handled using the
Surface structure.
3. Geometry information such as sensor scan angle, zenith angle, etc. Handled using the Geometry structure.
4. Instrument information, particularly which instrument(s), or sensor(s)1 , you want to simulate. Handled
using the ChannelInfo structure.
5. Results of the radiative transfer calculation. Handled using the RTSolution structure.
6. Optional inputs. Handled using the Options structure.
Let’s assume you want to process, say, 50 profiles for the NOAA-18 AMSU-A sensor which has 15 channels. The
forward model declarations would look something like,
! Processing parameters
INTEGER , PARAMETER :: N_SENSORS = 1
INTEGER , PARAMETER :: N_CHANNELS = 15
INTEGER , PARAMETER :: N_PROFILES = 50
CHARACTER(*), PARAMETER :: SENSOR_ID(N_SENSORS) = (/’amsua_n18’/)
TYPE(CRTM_ChannelInfo_type) :: chInfo(N_SENSORS)
TYPE(CRTM_Geometry_type) :: geo(N_PROFILES)
TYPE(CRTM_Options_type) :: opt(N_PROFILES)
! Forward declarations
TYPE(CRTM_Atmosphere_type) :: atm(N_PROFILES)
TYPE(CRTM_Surface_type) :: sfc(N_PROFILES)
TYPE(CRTM_RTSolution_type) :: rts(N_CHANNELS,N_PROFILES)
If you are also interested in calling the K-matrix model, you will also need the following declarations,
! K-Matrix declarations
TYPE(CRTM_Atmosphere_type) :: atm_K(N_CHANNELS,N_PROFILES)
TYPE(CRTM_Surface_type) :: sfc_K(N_CHANNELS,N_PROFILES)
TYPE(CRTM_RTSolution_type) :: rts_K(N_CHANNELS,N_PROFILES)
INTEGER :: errStatus
....
errStatus = CRTM_Init( SENSOR_ID, chInfo, File_Path=’./coeff_data’ )
IF ( errStatus /= SUCCESS ) THEN
handle error...
END IF
Here we see for the first time how the CRTM functions let you know if they were successful. As you can see
the CRTM Init() function result is an error status that is checked against a parameterised integer error code,
SUCCESS. The function result should not be tested against the actual value of the error code, just its parameterised
name. Other available error code parameters are FAILURE, WARNING, and INFORMATION – although the latter is
never used as a function result.
For a list of all the accepted sensor identifiers, see appendix B.
1 The terms “instrument” and “sensor” are used interchangeably in this document.
13
4.1.4 Step 4: Allocate the CRTM structures
Now we need to create instances of the various CRTM structures where necessary to hold the input or output
data. Functions are used to perform any necessary component allocations allocations. The function naming
convention is CRTM object Create where, for typical usage, the CRTM structures that need to be allocated are
the Atmosphere, RTSolution and, if used, Options structures. Potentially, the SensorData component of the
Surface structure may also need to be allocated to allow for input of sensor observations for some of the NESDIS
microwave surface emissivity models.
First, we’ll allocate the atmosphere structures to the required dimensions. The forward variable is allocated like
so:
Note that for the ODAS algorithm the allowed number of absorbers is at most two: that of H2 O and O3 . For
the ODPS algoithm, CO2 can also be specified. In future releases, trace gases such as CO, CH4 , and N2 O will
also be accepted as input.
To return additional information used in the radiative transfer calculations, such as upwelling radiance and layer
optical depth profiles, the RTSolution structure must be allocated to the number of atmospheric layers used:
14
! Check it was actually allocated
IF ( ANY(.NOT. CRTM_RTSolution_Associated( rts )) ) THEN
handle error...
END IF
Note that internal checks are performed in the CRTM to determine if the RTSolution structure has been allocated
before its array components are accessed. Thus, if the additional information is not required, the RTSolution
structure does not need to be allocated. Also, the extra information returned is only applicable to the forward
model, not any of the tangent-linear, adjoint, or K-matrix models.
If user-supplied surface emissivity data is to be used, then the options structure must first be allocated to the
necessary number of channels:
If no emissivities are to be input, the options structure does not need to be allocated.
In the CRTM, all profile layering is from top-of-atmosphere (TOA) to surface (SFC). So, for an atmospheric
profile layered as k = 1, 2, ..., K, layer 1 is the TOA layer and layer K is the SFC layer.
In the Atmosphere structure, both the level and layer pressure profiles must be specified.
In the Atmosphere structure, the absorber profile data units must be mass mixing ratio for water vapour
and ppmv for other absorbers. The Absorber Units component is not yet utilised to allow conversion of
different user-supplied concentration units.
In the Atmosphere structure, the Absorber Id array must be set to the correct absorber identifiers (see
table A.2) to allow the software to find a particular absorber. There is no necessary order in specifying the
concentration profiles for different gaseous absorbers.
In the Surface structure, the sum of the coverage types must add up to 1.0.
In the Geometry structure, the sensor zenith and sensor scan angles should be consistent.
Graphical definitions of the Geometry structure sensor scan, sensor zenith, sensor azimuth, source zenith,
and source azimuth angles are shown in figures A.8, A.9, A.10, A.11, and A.12 respectively.
The Options structure contains two “substructures”, SSU Input and Zeeman Input to hold the necessary
inputs for the SSU and Zeeman transmittance models. These substructures are private and can only be
access via “GetValue” and “SetValue” functions as discussed further below.
15
For the K-matrix structures, you should zero the K-matrix outputs, atm K, sfc K,
and initialise the K-matrix input, rts K, to provide you with the derivatives you want. For example, if you want
the atm K, sfc K outputs to contain brightness temperature derivatives, you should initialise rts K like so,
Alternatively, if you want radiance derivatives returned in atm K and sfc K, the rts K structure should be
initialised like so,
Filling the Options substructures for SSU and Zeeman model input
As mentioned above, the SSU Input and Zeeman Input data structures are private. This means the contents of
the structure cannot be accessed directly, but via helper subroutines. For example, to set the SSU instrument
mission time, one would call the SSU Input SetValue subroutine,
where the local variable mission time contains the required time.
Similarly for the necessary Zeeman model parameters,
where, again, Be and angle are the local variables for the necessary data.
16
and for the K-matrix model, the calling syntax is,
Note that the K-matrix model also returns the forward model radiances. The tangent-linear and adjoint models
have similar call structures and will not be shown here.
to deallocate all the shared coefficient data, as well as calling the individual structure destroy functions to
deallocate as required. For the example here, that entails deallocating the various structure arrays that were
created in Step 4.1.4. The cleanup mirrors that of the create step:
CALL CRTM_Options_Destroy(opt)
CALL CRTM_RTSolution_Destroy(rts)
CALL CRTM_Atmosphere_Destroy(atm_K)
CALL CRTM_Atmosphere_Destroy(atm)
NAME:
CRTM_Init
PURPOSE:
Function to initialise the CRTM.
CALLING SEQUENCE:
Error_Status = CRTM_Init( Sensor_ID , &
ChannelInfo , &
CloudCoeff_File = CloudCoeff_File , &
AerosolCoeff_File = AerosolCoeff_File, &
17
EmisCoeff_File = EmisCoeff_File , &
File_Path = File_Path , &
Load_CloudCoeff = Load_CloudCoeff , &
Load_AerosolCoeff = Load_AerosolCoeff, &
Quiet = Quiet , &
Process_ID = Process_ID , &
Output_Process_ID = Output_Process_ID )
INPUTS:
Sensor_ID: List of the sensor IDs (e.g. hirs3_n17, amsua_n18,
ssmis_f16, etc) with which the CRTM is to be
initialised. These sensor ids are used to construct
the sensor specific SpcCoeff and TauCoeff filenames
containing the necessary coefficient data, i.e.
<Sensor_ID>.SpcCoeff.bin
and
<Sensor_ID>.TauCoeff.bin
for each sensor Id in the list.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Rank-1 (n_Sensors)
ATTRIBUTES: INTENT(IN), OPTIONAL
OUTPUTS:
ChannelInfo: ChannelInfo structure array populated based on
the contents of the coefficient files and the
user inputs.
UNITS: N/A
TYPE: CRTM_ChannelInfo_type
DIMENSION: Same as input Sensor_Id argument
ATTRIBUTES: INTENT(OUT)
OPTIONAL INPUTS:
CloudCoeff_File: Name of the CRTM Binary format CloudCoeff file
containing the scattering coefficient data. If not
specified the default filename is "CloudCoeff.bin".
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
18
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
Load_CloudCoeff: Set this logical argument for not loading the CloudCoeff data
to save memory space under the clear conditions
If == .FALSE., the CloudCoeff data will not be loaded;
== .TRUE., the CloudCoeff data will be loaded.
If not specified, default is .TRUE. (will be loaded)
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
Load_AerosolCoeff: Set this logical argument for not loading the AerosolCoeff data
to save memory space under the clear conditions
If == .FALSE., the AerosolCoeff data will not be loaded;
== .TRUE., the AerosolCoeff data will be loaded.
If not specified, default is .TRUE. (will be loaded)
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
19
the passed Process_ID value agrees with this value
the INFORMATION messages are output.
This argument is ignored if the Quiet argument
is set.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error
status. The error codes are defined in the
Message_Handler module.
If == SUCCESS the CRTM initialisation was successful
== FAILURE an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
SIDE EFFECTS:
All public data arrays accessed by this module and its dependencies
are overwritten.
RESTRICTIONS:
If specified, the length of the combined file path and filename strings
cannot exceed 2000 characters.
NAME:
CRTM_Forward
PURPOSE:
Function that calculates top-of-atmosphere (TOA) radiances
and brightness temperatures for an input atmospheric profile or
profile set and user specified satellites/channels.
CALLING SEQUENCE:
Error_Status = CRTM_Forward( Atmosphere , &
Surface , &
Geometry , &
ChannelInfo , &
RTSolution , &
Options = Options )
INPUTS:
Atmosphere: Structure containing the Atmosphere data.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Rank-1 (n_Profiles)
20
ATTRIBUTES: INTENT(IN)
OUTPUTS:
RTSolution: Structure containing the soluition to the RT equation
for the given inputs.
UNITS: N/A
TYPE: CRTM_RTSolution_type
DIMENSION: Rank-2 (n_Channels x n_Profiles)
ATTRIBUTES: INTENT(IN OUT)
OPTIONAL INPUTS:
Options: Options structure containing the optional arguments
for the CRTM.
UNITS: N/A
TYPE: CRTM_Options_type
DIMENSION: Same as input Atmosphere structure
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS the computation was sucessful
== FAILURE an unrecoverable error occurred
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
COMMENTS:
- The Options optional input structure argument contains
spectral information (e.g. emissivity) that must have the same
spectral dimensionality (the "L" dimension) as the output
RTSolution structure.
21
- The INTENT on the output RTSolution argument is IN OUT rather
than just OUT. This is necessary because the argument may be defined
upon input. To prevent memory leaks, the IN OUT INTENT is a must.
NAME:
CRTM_Tangent_Linear
PURPOSE:
Function that calculates tangent-linear top-of-atmosphere (TOA)
radiances and brightness temperatures for an input atmospheric
profile or profile set and user specified satellites/channels.
CALLING SEQUENCE:
Error_Status = CRTM_Tangent_Linear( Atmosphere , &
Surface , &
Atmosphere_TL , &
Surface_TL , &
Geometry , &
ChannelInfo , &
RTSolution , &
RTSolution_TL , &
Options = Options )
INPUTS:
Atmosphere: Structure containing the Atmosphere data.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Rank-1 (n_Profiles)
ATTRIBUTES: INTENT(IN)
22
Geometry: Structure containing the view geometry
information.
UNITS: N/A
TYPE: CRTM_Geometry_type
DIMENSION: Same as input Atmosphere structure
ATTRIBUTES: INTENT(IN)
OUTPUTS:
RTSolution: Structure containing the solution to the RT equation
for the given inputs.
UNITS: N/A
TYPE: CRTM_RTSolution_type
DIMENSION: Rank-2 (n_Channels x n_Profiles)
ATTRIBUTES: INTENT(IN OUT)
OPTIONAL INPUTS:
Options: Options structure containing the optional forward model
arguments for the CRTM.
UNITS: N/A
TYPE: CRTM_Options_type
DIMENSION: Same as input Atmosphere structure
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS the computation was sucessful
== FAILURE an unrecoverable error occurred
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
COMMENTS:
- The Options optional input structure arguments contain
spectral information (e.g. emissivity) that must have the same
spectral dimensionality (the "L" dimension) as the output
RTSolution structures.
23
than just OUT. This is necessary because the arguments may be defined
upon input. To prevent memory leaks, the IN OUT INTENT is a must.
NAME:
CRTM_Adjoint
PURPOSE:
Function that calculates the adjoint of top-of-atmosphere (TOA)
radiances and brightness temperatures for an input atmospheric
profile or profile set and user specified satellites/channels.
CALLING SEQUENCE:
Error_Status = CRTM_Adjoint( Atmosphere , &
Surface , &
RTSolution_AD , &
Geometry , &
ChannelInfo , &
Atmosphere_AD , &
Surface_AD , &
RTSolution , &
Options = Options )
INPUTS:
Atmosphere: Structure containing the Atmosphere data.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Rank-1 (n_Profiles)
ATTRIBUTES: INTENT(IN)
24
DIMENSION: Same as input Atmosphere argument
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
Options: Options structure containing the optional forward model
arguments for the CRTM.
UNITS: N/A
TYPE: CRTM_Options_type
DIMENSION: Same as input Atmosphere structure
ATTRIBUTES: INTENT(IN), OPTIONAL
OUTPUTS:
Atmosphere_AD: Structure containing the adjoint Atmosphere data.
**NOTE: On ENTRY to this function, the contents of
this structure should be defined (e.g.
initialized to some value based on the
position of this function in the call chain.)
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Same as input Atmosphere argument
ATTRIBUTES: INTENT(IN OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS the computation was sucessful
== FAILURE an unrecoverable error occurred
UNITS: N/A
TYPE: INTEGER
25
DIMENSION: Scalar
SIDE EFFECTS:
Note that the input adjoint arguments are modified upon exit, and
the output adjoint arguments must be defined upon entry. This is
a consequence of the adjoint formulation where, effectively, the
chain rule is being used and this function could reside anywhere
in the chain of derivative terms.
COMMENTS:
- The Options optional structure arguments contain
spectral information (e.g. emissivity) that must have the same
spectral dimensionality (the "L" dimension) as the RTSolution
structures.
NAME:
CRTM_K_Matrix
PURPOSE:
Function that calculates the K-matrix of top-of-atmosphere (TOA)
radiances and brightness temperatures for an input atmospheric
profile or profile set and user specified satellites/channels.
CALLING SEQUENCE:
Error_Status = CRTM_K_Matrix( Atmosphere , &
Surface , &
RTSolution_K , &
Geometry , &
ChannelInfo , &
Atmosphere_K , &
Surface_K , &
RTSolution , &
Options = Options )
INPUTS:
Atmosphere: Structure containing the Atmosphere data.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Rank-1 (n_Profiles)
ATTRIBUTES: INTENT(IN)
26
TYPE: CRTM_Surface_type
DIMENSION: Same as input Atmosphere argument.
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
Options: Options structure containing the optional forward model
arguments for the CRTM.
UNITS: N/A
TYPE: CRTM_Options_type
DIMENSION: Same as input Atmosphere structure
ATTRIBUTES: INTENT(IN), OPTIONAL
OUTPUTS:
Atmosphere_K: Structure containing the K-matrix Atmosphere data.
**NOTE: On ENTRY to this function, the contents of
this structure should be defined (e.g.
initialized to some value based on the
position of this function in the call chain.)
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Same as input RTSolution_K argument
ATTRIBUTES: INTENT(IN OUT)
27
DIMENSION: Same as input RTSolution_K argument
ATTRIBUTES: INTENT(IN OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS the computation was sucessful
== FAILURE an unrecoverable error occurred
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
SIDE EFFECTS:
Note that the input K-matrix arguments are modified upon exit, and
the output K-matrix arguments must be defined upon entry. This is
a consequence of the K-matrix formulation where, effectively, the
chain rule is being used and this funtion could reside anywhere
in the chain of derivative terms.
COMMENTS:
- The Options optional structure arguments contain
spectral information (e.g. emissivity) that must have the same
spectral dimensionality (the "L" dimension) as the RTSolution
structures.
NAME:
CRTM_Destroy
PURPOSE:
Function to deallocate all the shared data arrays allocated and
populated during the CRTM initialization.
CALLING SEQUENCE:
Error_Status = CRTM_Destroy( ChannelInfo , &
Process_ID = Process_ID )
28
OUTPUTS:
ChannelInfo: Reinitialized ChannelInfo structure.
UNITS: N/A
TYPE: CRTM_ChannelInfo_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN OUT)
OPTIONAL INPUTS:
Process_ID: Set this argument to the MPI process ID that this
function call is running under. This value is used
solely for controlling message output. If MPI is not
being used, ignore this argument.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error
status. The error codes are defined in the
Message_Handler module.
If == SUCCESS the CRTM deallocations were successful
== FAILURE an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
SIDE EFFECTS:
All CRTM shared data arrays and structures are deallocated.
COMMENTS:
Note the INTENT on the output ChannelInfo argument is IN OUT rather than
just OUT. This is necessary because the argument may be defined upon
input. To prevent memory leaks, the IN OUT INTENT is a must.
29
Bibliography
F.M. Breon. An analytical model for the cloud-free atmosphere/ocean system reflectance. Remote Sens. Environ.,
43(2):179–192, 1993.
M. Chin, P. Ginoux, S. Kinne, O. Torres, B.N. Holben, B.N. Duncan, R.V. Martin, J.A. Logan, A. Higurashi,
and T. Nakajima. Tropospheric aerosol optical thickness from the GOCART model and comparisons with
satellite and sun photometer meaasurements. J. Atmos. Sci., 59:461–483, 2002.
Q. Liu and E. Ruprecht. Radiative transfer model: matrix operator method. Appl. Opt., 35(21):4229–4237,
1996.
N.R. Nalli, P.J. Minnett, and P. van Delst. Emissivity and reflection model for calculating unpolarized isotropic
water surface-leaving radiance in the infrared. 1: Theoretical development and calculations. Appl. Opt., 47
(21):3701–3721, 2008a.
X. Wu and W.L. Smith. Emissivity of rough sea surface for 8-13µm: modeling and verification. Appl. Opt., 36
(12):2609–2619, 1997.
30
A
Structure and procedure interface definitions
31
A.1 ChannelInfo Structure
TYPE :: CRTM_ChannelInfo_type
! Allocation indicator
LOGICAL :: Is_Allocated = .FALSE.
! Dimensions
INTEGER :: n_Channels = 0 ! L dimension
! Scalar data
CHARACTER(STRLEN) :: Sensor_ID = ’’
INTEGER :: WMO_Satellite_ID = INVALID_WMO_SATELLITE_ID
INTEGER :: WMO_Sensor_ID = INVALID_WMO_SENSOR_ID
INTEGER :: Sensor_Index = 0
! Array data
INTEGER, ALLOCATABLE :: Sensor_Channel(:) ! L
INTEGER, ALLOCATABLE :: Channel_Index(:) ! L
END TYPE CRTM_ChannelInfo_type
NAME:
CRTM_ChannelInfo_Associated
PURPOSE:
Elemental function to test the status of the allocatable components
of a CRTM ChannelInfo object.
CALLING SEQUENCE:
Status = CRTM_ChannelInfo_Associated( ChannelInfo )
OBJECTS:
ChannelInfo: ChannelInfo object which is to have its member’s
status tested.
UNITS: N/A
TYPE: TYPE(CRTM_ChannelInfo_type)
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
Status: The return value is a logical value indicating the
status of the ChannelInfo members.
.TRUE. - if the array components are allocated.
.FALSE. - if the array components are not allocated.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as input ChannelInfo argument
32
A.1.2 CRTM ChannelInfo DefineVersion interface
NAME:
CRTM_ChannelInfo_DefineVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_ChannelInfo_DefineVersion( Id )
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_ChannelInfo_Destroy
PURPOSE:
Elemental subroutine to re-initialize CRTM ChannelInfo objects.
CALLING SEQUENCE:
CALL CRTM_ChannelInfo_Destroy( ChannelInfo )
OBJECTS:
ChannelInfo: Re-initialized ChannelInfo object.
UNITS: N/A
TYPE: TYPE(CRTM_ChannelInfo_type)
DIMENSION: Scalar OR any rank
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_ChannelInfo_Inspect
PURPOSE:
Subroutine to print the contents of a CRTM ChannelInfo object
to stdout.
33
CALLING SEQUENCE:
CALL CRTM_ChannelInfo_Inspect( ChannelInfo )
INPUTS:
ChannelInfo: ChannelInfo object to display.
UNITS: N/A
TYPE: TYPE(CRTM_ChannelInfo_type)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_ChannelInfo_n_Channels
PURPOSE:
Function to return the number of channels defined in a ChannelInfo
structure or structure array
CALLING SEQUENCE:
n_Channels = CRTM_ChannelInfo_n_Channels( ChannelInfo )
INPUTS:
ChannelInfo: ChannelInfo structure or structure which is to have its
channels counted.
UNITS: N/A
TYPE: TYPE(CRTM_ChannelInfo_type)
DIMENSION: Scalar
or
Rank-1
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
n_Channels: The number of defined channels in the input argument.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
34
A.2 Atmosphere Structure
TYPE :: CRTM_Atmosphere_type
! Allocation indicator
LOGICAL :: Is_Allocated = .FALSE.
! Dimension values
INTEGER :: Max_Layers = 0 ! K dimension
INTEGER :: n_Layers = 0 ! Kuse dimension
INTEGER :: n_Absorbers = 0 ! J dimension
INTEGER :: Max_Clouds = 0 ! Nc dimension
INTEGER :: n_Clouds = 0 ! NcUse dimension
INTEGER :: Max_Aerosols = 0 ! Na dimension
INTEGER :: n_Aerosols = 0 ! NaUse dimension
! Number of added layers
INTEGER :: n_Added_Layers = 0
! Climatology model associated with the profile
INTEGER :: Climatology = US_STANDARD_ATMOSPHERE
! Absorber ID and units
INTEGER, ALLOCATABLE :: Absorber_ID(:) ! J
INTEGER, ALLOCATABLE :: Absorber_Units(:) ! J
! Profile LEVEL and LAYER quantities
REAL(fp), ALLOCATABLE :: Level_Pressure(:) ! 0:K
REAL(fp), ALLOCATABLE :: Pressure(:) ! K
REAL(fp), ALLOCATABLE :: Temperature(:) ! K
REAL(fp), ALLOCATABLE :: Absorber(:,:) ! K x J
! Clouds associated with each profile
TYPE(CRTM_Cloud_type), ALLOCATABLE :: Cloud(:) ! Nc
! Aerosols associated with each profile
TYPE(CRTM_Aerosol_type), ALLOCATABLE :: Aerosol(:) ! Na
END TYPE CRTM_Atmosphere_type
35
Climatology Type Parameter
Tropical TROPICAL
Midlatitude summer MIDLATITUDE SUMMER
Midlatitude winter MIDLATITUDE WINTER
Subarctic summer SUBARCTIC SUMMER
Subarctic winter SUBARCTIC WINTER
U.S. Standard Atmosphere US STANDARD ATMOSPHERE
Table A.1: CRTM Atmosphere structure valid Climatology definitions. The same set as defined
for LBLRTM is used.
Table A.2: CRTM Atmosphere structure valid Absorber ID definitions. The same molecule set
as defined for HITRAN is used.
Units Parameter
Volume mixing ratio, ppmv VOLUME MIXING RATIO UNITS
Number density, cm−3 NUMBER DENSITY UNITS
Mass mixing ratio, g/kg MASS MIXING RATIO UNITS
Mass density, g.m−3 MASS DENSITY UNITS
Partial pressure, hPa PARTIAL PRESSURE UNITS
Dewpoint temperature, K (H2 O ONLY) DEWPOINT TEMPERATURE K UNITS
Dewpoint temperature, C (H2 O ONLY) DEWPOINT TEMPERATURE C UNITS
Relative humidity, % (H2 O ONLY) RELATIVE HUMIDITY UNITS
Specific amount, g/g SPECIFIC AMOUNT UNITS
Integrated path, mm INTEGRATED PATH UNITS
Table A.3: CRTM Atmosphere structure valid Absorber Units definitions. The same set as
defined for LBLRTM is used.
36
A.2.1 CRTM Atmosphere AddLayerCopy interface
NAME:
CRTM_Atmosphere_AddLayerCopy
PURPOSE:
Elemental function to copy an instance of the CRTM Atmosphere object
with additional layers added to the TOA of the input.
CALLING SEQUENCE:
Atm_out = CRTM_Atmosphere_AddLayerCopy( Atm, n_Added_Layers )
OBJECTS:
Atm: Atmosphere structure to copy.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
INPUTS:
n_Added_Layers: Number of layers to add to the function result.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as atmosphere object
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
Atm_out: Copy of the input atmosphere structure with space for
extra layers added to TOA.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Same as input.
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Atmosphere_Associated
PURPOSE:
Elemental function to test the status of the allocatable components
of a CRTM Atmosphere object.
CALLING SEQUENCE:
Status = CRTM_Atmosphere_Associated( Atm )
OBJECTS:
Atm: Atmosphere structure which is to have its member’s
status tested.
37
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
Status: The return value is a logical value indicating the
status of the Atmosphere members.
.TRUE. - if the array components are allocated.
.FALSE. - if the array components are not allocated.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as input
PURPOSE:
Elemental function to compare two CRTM_Atmosphere objects to within
a user specified number of significant figures.
CALLING SEQUENCE:
is_comparable = CRTM_Atmosphere_Compare( x, y, n_SigFig=n_SigFig )
OBJECTS:
x, y: Two CRTM Atmosphere objects to be compared.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
n_SigFig: Number of significant figure to compare floating point
components.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar or same as input
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
is_equal: Logical value indicating whether the inputs are equal.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as inputs.
38
NAME:
CRTM_Atmosphere_Create
PURPOSE:
Elemental subroutine to create an instance of the CRTM Atmosphere object.
CALLING SEQUENCE:
CALL CRTM_Atmosphere_Create( Atm , &
n_Layers , &
n_Absorbers, &
n_Clouds , &
n_Aerosols )
OBJECTS:
Atm: Atmosphere structure.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
INPUTS:
n_Layers: Number of layers dimension.
Must be > 0.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as atmosphere object
ATTRIBUTES: INTENT(IN)
39
A.2.5 CRTM Atmosphere DefineVersion interface
NAME:
CRTM_Atmosphere_DefineVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Atmosphere_DefineVersion( Id )
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Atmosphere_Destroy
PURPOSE:
Elemental subroutine to re-initialize CRTM Atmosphere objects.
CALLING SEQUENCE:
CALL CRTM_Atmosphere_Destroy( Atm )
OBJECTS:
Atm: Re-initialized Atmosphere structure.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Atmosphere_Inspect
PURPOSE:
Subroutine to print the contents of a CRTM Atmosphere object to stdout.
CALLING SEQUENCE:
40
CALL CRTM_Atmosphere_Inspect( Atm )
INPUTS:
Atm: CRTM Atmosphere object to display.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_Atmosphere_IsValid
PURPOSE:
Non-pure function to perform some simple validity checks on a
CRTM Atmosphere object.
CALLING SEQUENCE:
result = CRTM_Atmosphere_IsValid( Atm )
or
OBJECTS:
Atm: CRTM Atmosphere object which is to have its
contents checked.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
result: Logical variable indicating whether or not the input
passed the check.
If == .FALSE., Atmosphere object is unused or contains
invalid data.
== .TRUE., Atmosphere object can be used in CRTM.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
41
NAME:
CRTM_Atmosphere_Zero
PURPOSE:
Elemental subroutine to zero out the data arrays
in a CRTM Atmosphere object.
CALLING SEQUENCE:
CALL CRTM_Atmosphere_Zero( Atm )
OUTPUTS:
Atm: CRTM Atmosphere structure in which the data arrays
are to be zeroed out.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
COMMENTS:
- The dimension components of the structure are *NOT* set to zero.
- The Climatology, Absorber_ID, and Absorber_Units components are
*NOT* reset in this routine.
NAME:
CRTM_Atmosphere_IOVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Atmosphere_IOVersion( Id )
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Atmosphere_InquireFile
42
PURPOSE:
Function to inquire CRTM Atmosphere object files.
CALLING SEQUENCE:
Error_Status = CRTM_Atmosphere_InquireFile( Filename , &
n_Channels = n_Channels, &
n_Profiles = n_Profiles )
INPUTS:
Filename: Character string specifying the name of a
CRTM Atmosphere data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OPTIONAL OUTPUTS:
n_Channels: The number of spectral channels for which there is
data in the file. Note that this value will always
be 0 for a profile-only dataset-- it only has meaning
for K-matrix data.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file inquire was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_Atmosphere_ReadFile
PURPOSE:
Function to read CRTM Atmosphere object files.
CALLING SEQUENCE:
43
Error_Status = CRTM_Atmosphere_ReadFile( Filename , &
Atmosphere , &
Quiet = Quiet , &
n_Channels = n_Channels , &
n_Profiles = n_Profiles , &
INPUTS:
Filename: Character string specifying the name of an
Atmosphere format data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OUTPUTS:
Atmosphere: CRTM Atmosphere object array containing the Atmosphere
data. Note the following meanings attributed to the
dimensions of the object array:
Rank-1: M profiles.
Only profile data are to be read in. The file
does not contain channel information. The
dimension of the structure is understood to
be the PROFILE dimension.
Rank-2: L channels x M profiles
Channel and profile data are to be read in.
The file contains both channel and profile
information. The first dimension of the
structure is the CHANNEL dimension, the second
is the PROFILE dimension. This is to allow
K-matrix structures to be read in with the
same function.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Rank-1 (M) or Rank-2 (L x M)
ATTRIBUTES: INTENT(OUT)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
OPTIONAL OUTPUTS:
n_Channels: The number of channels for which data was read. Note that
this value will always be 0 for a profile-only dataset--
it only has meaning for K-matrix data.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
44
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file read was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_Atmosphere_WriteFile
PURPOSE:
Function to write CRTM Atmosphere object files.
CALLING SEQUENCE:
Error_Status = CRTM_Atmosphere_WriteFile( Filename , &
Atmosphere , &
Quiet = Quiet )
INPUTS:
Filename: Character string specifying the name of the
Atmosphere format data file to write.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
45
information. The first dimension of the
array is the CHANNEL dimension, the second
is the PROFILE dimension. This is to allow
K-matrix structures to be read in with the
same function.
UNITS: N/A
TYPE: CRTM_Atmosphere_type
DIMENSION: Rank-1 (M) or Rank-2 (L x M)
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file write was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
SIDE EFFECTS:
- If the output file already exists, it is overwritten.
- If an error occurs during *writing*, the output file is deleted before
returning to the calling routine.
46
A.3 Cloud Structure
TYPE :: CRTM_Cloud_type
! Allocation indicator
LOGICAL :: Is_Allocated = .FALSE.
! Dimension values
INTEGER :: Max_Layers = 0 ! K dimension.
INTEGER :: n_Layers = 0 ! Kuse dimension.
! Number of added layers
INTEGER :: n_Added_Layers = 0
! Cloud type
INTEGER :: Type = INVALID_CLOUD
! Cloud state variables
REAL(fp), ALLOCATABLE :: Effective_Radius(:) ! K. Units are microns
REAL(fp), ALLOCATABLE :: Effective_Variance(:) ! K. Units are microns^2
REAL(fp), ALLOCATABLE :: Water_Content(:) ! K. Units are kg/m^2
END TYPE CRTM_Cloud_type
47
A.3.1 CRTM Cloud AddLayerCopy interface
NAME:
CRTM_Cloud_AddLayerCopy
PURPOSE:
Elemental function to copy an instance of the CRTM Cloud object
with additional layers added to the TOA of the input.
CALLING SEQUENCE:
cld_out = CRTM_Cloud_AddLayerCopy( cld, n_Added_Layers )
OBJECTS:
cld: Cloud structure to copy.
UNITS: N/A
TYPE: CRTM_Cloud_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
INPUTS:
n_Added_Layers: Number of layers to add to the function result.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as Cloud object
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
cld_out: Copy of the input Cloud structure with space for
extra layers added to TOA.
UNITS: N/A
TYPE: CRTM_Cloud_type
DIMENSION: Same as input.
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Cloud_Associated
PURPOSE:
Elemental function to test the status of the allocatable components
of a CRTM Cloud object.
CALLING SEQUENCE:
Status = CRTM_Cloud_Associated( Cloud )
OBJECTS:
Cloud: Cloud structure which is to have its member’s
status tested.
48
UNITS: N/A
TYPE: CRTM_Cloud_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
Status: The return value is a logical value indicating the
status of the Cloud members.
.TRUE. - if the array components are allocated.
.FALSE. - if the array components are not allocated.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as input Cloud argument
PURPOSE:
Elemental function to compare two CRTM_Cloud objects to within
a user specified number of significant figures.
CALLING SEQUENCE:
is_comparable = CRTM_Cloud_Compare( x, y, n_SigFig=n_SigFig )
OBJECTS:
x, y: Two CRTM Cloud objects to be compared.
UNITS: N/A
TYPE: CRTM_Cloud_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
n_SigFig: Number of significant figure to compare floating point
components.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar or same as input
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
is_equal: Logical value indicating whether the inputs are equal.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as inputs.
49
NAME:
CRTM_Cloud_Create
PURPOSE:
Elemental subroutine to create an instance of the CRTM Cloud object.
CALLING SEQUENCE:
CALL CRTM_Cloud_Create( Cloud, n_Layers )
OBJECTS:
Cloud: Cloud structure.
UNITS: N/A
TYPE: CRTM_Cloud_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
INPUTS:
n_Layers: Number of layers for which there is cloud data.
Must be > 0.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as Cloud object
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_Cloud_DefineVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Cloud_DefineVersion( Id )
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Cloud_Destroy
50
PURPOSE:
Elemental subroutine to re-initialize CRTM Cloud objects.
CALLING SEQUENCE:
CALL CRTM_Cloud_Destroy( Cloud )
OBJECTS:
Cloud: Re-initialized Cloud structure.
UNITS: N/A
TYPE: CRTM_Cloud_type
DIMENSION: Scalar OR any rank
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Cloud_Inspect
PURPOSE:
Subroutine to print the contents of a CRTM Cloud object to stdout.
CALLING SEQUENCE:
CALL CRTM_Cloud_Inspect( Cloud )
INPUTS:
Cloud: CRTM Cloud object to display.
UNITS: N/A
TYPE: CRTM_Cloud_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_Cloud_IsValid
PURPOSE:
Non-pure function to perform some simple validity checks on a
CRTM Cloud object.
CALLING SEQUENCE:
result = CRTM_Cloud_IsValid( cloud )
or
51
IF ( CRTM_Cloud_IsValid( cloud ) ) THEN....
OBJECTS:
cloud: CRTM Cloud object which is to have its
contents checked.
UNITS: N/A
TYPE: CRTM_Cloud_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
result: Logical variable indicating whether or not the input
passed the check.
If == .FALSE., Cloud object is unused or contains
invalid data.
== .TRUE., Cloud object can be used in CRTM.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
NAME:
CRTM_Cloud_Zero
PURPOSE:
Elemental subroutine to zero out the data arrays in a CRTM Cloud object.
CALLING SEQUENCE:
CALL CRTM_Cloud_Zero( Cloud )
OBJECTS:
Cloud: CRTM Cloud structure in which the data arrays are
to be zeroed out.
UNITS: N/A
TYPE: CRTM_Cloud_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
COMMENTS:
- The dimension components of the structure are *NOT* set to zero.
- The cloud type component is *NOT* reset.
NAME:
52
CRTM_Cloud_IOVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Cloud_IOVersion( Id )
OUTPUT ARGUMENTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Cloud_InquireFile
PURPOSE:
Function to inquire CRTM Cloud object files.
CALLING SEQUENCE:
Error_Status = CRTM_Cloud_InquireFile( Filename , &
n_Clouds = n_Clouds )
INPUTS:
Filename: Character string specifying the name of a
CRTM Cloud data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OPTIONAL OUTPUTS:
n_Clouds: The number of Cloud profiles in the data file.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file inquire was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
53
DIMENSION: Scalar
NAME:
CRTM_Cloud_ReadFile
PURPOSE:
Function to read CRTM Cloud object files.
CALLING SEQUENCE:
Error_Status = CRTM_Cloud_ReadFile( Filename , &
Cloud , &
Quiet = Quiet , &
No_Close = No_Close, &
n_Clouds = n_Clouds )
INPUTS:
Filename: Character string specifying the name of a
Cloud format data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OUTPUTS:
Cloud: CRTM Cloud object array containing the Cloud data.
UNITS: N/A
TYPE: CRTM_Cloud_type
DIMENSION: Rank-1
ATTRIBUTES: INTENT(OUT)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
No_Close: Set this logical argument to NOT close the file upon exit.
If == .FALSE., the input file is closed upon exit [DEFAULT]
== .TRUE., the input file is NOT closed upon exit.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
54
ATTRIBUTES: INTENT(IN), OPTIONAL
OPTIONAL OUTPUTS:
n_Clouds: The actual number of cloud profiles read in.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file read was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_Cloud_WriteFile
PURPOSE:
Function to write CRTM Cloud object files.
CALLING SEQUENCE:
Error_Status = CRTM_Cloud_WriteFile( Filename , &
Cloud , &
Quiet = Quiet , &
No_Close = No_Close )
INPUTS:
Filename: Character string specifying the name of the
Cloud format data file to write.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
55
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
No_Close: Set this logical argument to NOT close the file upon exit.
If == .FALSE., the input file is closed upon exit [DEFAULT]
== .TRUE., the input file is NOT closed upon exit.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file write was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
SIDE EFFECTS:
- If the output file already exists, it is overwritten.
- If an error occurs during *writing*, the output file is deleted before
returning to the calling routine.
56
A.4 Aerosol Structure
TYPE :: CRTM_Aerosol_type
! Allocation indicator
LOGICAL :: Is_Allocated = .FALSE.
! Dimension values
INTEGER :: Max_Layers = 0 ! K dimension.
INTEGER :: n_Layers = 0 ! Kuse dimension
! Number of added layers
INTEGER :: n_Added_Layers = 0
! Aerosol type
INTEGER :: Type = INVALID_AEROSOL
! Aerosol state variables
REAL(fp), ALLOCATABLE :: Effective_Radius(:) ! K. Units are microns
REAL(fp), ALLOCATABLE :: Concentration(:) ! K. Units are kg/m^2
END TYPE CRTM_Aerosol_type
Table A.5: CRTM Aerosol structure valid Type definitions and effective radii. SSAM ≡ Sea Salt
Accumulation Mode, SSCM ≡ Sea Salt Coarse Mode.
57
A.4.1 CRTM Aerosol AddLayerCopy interface
NAME:
CRTM_Aerosol_AddLayerCopy
PURPOSE:
Elemental function to copy an instance of the CRTM Aerosol object
with additional layers added to the TOA of the input.
CALLING SEQUENCE:
aer_out = CRTM_Aerosol_AddLayerCopy( aer, n_Added_Layers )
OBJECTS:
aer: Aerosol structure to copy.
UNITS: N/A
TYPE: CRTM_Aerosol_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
INPUTS:
n_Added_Layers: Number of layers to add to the function result.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as Aerosol object
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
aer_out: Copy of the input Aerosol structure with space for
extra layers added to TOA.
UNITS: N/A
TYPE: CRTM_Aerosol_type
DIMENSION: Same as input.
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Aerosol_Associated
PURPOSE:
Elemental function to test the status of the allocatable components
of a CRTM Aerosol object.
CALLING SEQUENCE:
Status = CRTM_Aerosol_Associated( Aerosol )
OBJECTS:
Aerosol: Aerosol structure which is to have its member’s
status tested.
58
UNITS: N/A
TYPE: CRTM_Aerosol_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
Status: The return value is a logical value indicating the
status of the Aerosol members.
.TRUE. - if the array components are allocated.
.FALSE. - if the array components are not allocated.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as input Aerosol argument
PURPOSE:
Elemental function to compare two CRTM_Aerosol objects to within
a user specified number of significant figures.
CALLING SEQUENCE:
is_comparable = CRTM_Aerosol_Compare( x, y, n_SigFig=n_SigFig )
OBJECTS:
x, y: Two CRTM Aerosol objects to be compared.
UNITS: N/A
TYPE: CRTM_Aerosol_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
n_SigFig: Number of significant figure to compare floating point
components.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar or same as input
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
is_equal: Logical value indicating whether the inputs are equal.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as inputs.
59
NAME:
CRTM_Aerosol_Create
PURPOSE:
Elemental subroutine to create an instance of the CRTM Aerosol object.
CALLING SEQUENCE:
CALL CRTM_Aerosol_Create( Aerosol, n_Layers )
OBJECTS:
Aerosol: Aerosol structure.
UNITS: N/A
TYPE: CRTM_Aerosol_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
INPUTS:
n_Layers: Number of layers for which there is Aerosol data.
Must be > 0.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as Aerosol object
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_Aerosol_DefineVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Aerosol_DefineVersion( Id )
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Aerosol_Destroy
60
PURPOSE:
Elemental subroutine to re-initialize CRTM Aerosol objects.
CALLING SEQUENCE:
CALL CRTM_Aerosol_Destroy( Aerosol )
OBJECTS:
Aerosol: Re-initialized Aerosol structure.
UNITS: N/A
TYPE: CRTM_Aerosol_type
DIMENSION: Scalar OR any rank
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Aerosol_Inspect
PURPOSE:
Subroutine to print the contents of a CRTM Aerosol object to stdout.
CALLING SEQUENCE:
CALL CRTM_Aerosol_Inspect( Aerosol )
INPUTS:
Aerosol: CRTM Aerosol object to display.
UNITS: N/A
TYPE: CRTM_Aerosol_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_Aerosol_IsValid
PURPOSE:
Non-pure function to perform some simple validity checks on a
CRTM Aerosol object.
CALLING SEQUENCE:
result = CRTM_Aerosol_IsValid( Aerosol )
or
61
IF ( CRTM_Aerosol_IsValid( Aerosol ) ) THEN....
OBJECTS:
Aerosol: CRTM Aerosol object which is to have its
contents checked.
UNITS: N/A
TYPE: CRTM_Aerosol_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
result: Logical variable indicating whether or not the input
passed the check.
If == .FALSE., Aerosol object is unused or contains
invalid data.
== .TRUE., Aerosol object can be used in CRTM.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
NAME:
CRTM_Aerosol_Zero
PURPOSE:
Elemental subroutine to zero out the data arrays in a CRTM Aerosol object.
CALLING SEQUENCE:
CALL CRTM_Aerosol_Zero( Aerosol )
OBJECTS:
Aerosol: CRTM Aerosol object in which the data arrays are
to be zeroed out.
UNITS: N/A
TYPE: CRTM_Aerosol_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
COMMENTS:
- The dimension components of the structure are *NOT* set to zero.
- The Aerosol type component is *NOT* reset.
NAME:
62
CRTM_Aerosol_IOVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Aerosol_IOVersion( Id )
OUTPUT ARGUMENTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Aerosol_InquireFile
PURPOSE:
Function to inquire CRTM Aerosol object files.
CALLING SEQUENCE:
Error_Status = CRTM_Aerosol_InquireFile( Filename , &
n_Aerosols = n_Aerosols )
INPUTS:
Filename: Character string specifying the name of a
CRTM Aerosol data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OPTIONAL OUTPUTS:
n_Aerosols: The number of Aerosol profiles in the data file.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file inquire was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
63
DIMENSION: Scalar
NAME:
CRTM_Aerosol_ReadFile
PURPOSE:
Function to read CRTM Aerosol object files.
CALLING SEQUENCE:
Error_Status = CRTM_Aerosol_ReadFile( Filename , &
Aerosol , &
Quiet = Quiet , &
No_Close = No_Close , &
n_Aerosols = n_Aerosols )
INPUTS:
Filename: Character string specifying the name of a
Aerosol format data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OUTPUTS:
Aerosol: CRTM Aerosol object array containing the aerosol data.
UNITS: N/A
TYPE: CRTM_Aerosol_type
DIMENSION: Rank-1
ATTRIBUTES: INTENT(OUT)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
No_Close: Set this logical argument to NOT close the file upon exit.
If == .FALSE., the input file is closed upon exit [DEFAULT]
== .TRUE., the input file is NOT closed upon exit.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
64
ATTRIBUTES: INTENT(IN), OPTIONAL
OPTIONAL OUTPUTS:
n_Aerosols: The actual number of aerosol profiles read in.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file read was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_Aerosol_WriteFile
PURPOSE:
Function to write CRTM Aerosol object files.
CALLING SEQUENCE:
Error_Status = CRTM_Aerosol_WriteFile( Filename , &
Aerosol , &
Quiet = Quiet , &
No_Close = No_Close )
INPUTS:
Filename: Character string specifying the name of the
Aerosol format data file to write.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
65
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
No_Close: Set this logical argument to NOT close the file upon exit.
If == .FALSE., the input file is closed upon exit [DEFAULT]
== .TRUE., the input file is NOT closed upon exit.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file write was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
SIDE EFFECTS:
- If the output file already exists, it is overwritten.
- If an error occurs during *writing*, the output file is deleted before
returning to the calling routine.
66
A.5 Surface Structure
TYPE :: CRTM_Surface_type
! Allocation indicator
LOGICAL :: Is_Allocated = .TRUE. ! Placeholder for future expansion
! Dimension values
! ...None yet
! Gross type of surface determined by coverage
REAL(fp) :: Land_Coverage = ZERO
REAL(fp) :: Water_Coverage = ZERO
REAL(fp) :: Snow_Coverage = ZERO
REAL(fp) :: Ice_Coverage = ZERO
! Land surface type data
INTEGER :: Land_Type = DEFAULT_LAND_TYPE
REAL(fp) :: Land_Temperature = DEFAULT_LAND_TEMPERATURE
REAL(fp) :: Soil_Moisture_Content = DEFAULT_SOIL_MOISTURE_CONTENT
REAL(fp) :: Canopy_Water_Content = DEFAULT_CANOPY_WATER_CONTENT
REAL(fp) :: Vegetation_Fraction = DEFAULT_VEGETATION_FRACTION
REAL(fp) :: Soil_Temperature = DEFAULT_SOIL_TEMPERATURE
! Water type data
INTEGER :: Water_Type = DEFAULT_WATER_TYPE
REAL(fp) :: Water_Temperature = DEFAULT_WATER_TEMPERATURE
REAL(fp) :: Wind_Speed = DEFAULT_WIND_SPEED
REAL(fp) :: Wind_Direction = DEFAULT_WIND_DIRECTION
REAL(fp) :: Salinity = DEFAULT_SALINITY
! Snow surface type data
INTEGER :: Snow_Type = DEFAULT_SNOW_TYPE
REAL(fp) :: Snow_Temperature = DEFAULT_SNOW_TEMPERATURE
REAL(fp) :: Snow_Depth = DEFAULT_SNOW_DEPTH
REAL(fp) :: Snow_Density = DEFAULT_SNOW_DENSITY
REAL(fp) :: Snow_Grain_Size = DEFAULT_SNOW_GRAIN_SIZE
! Ice surface type data
INTEGER :: Ice_Type = DEFAULT_ICE_TYPE
REAL(fp) :: Ice_Temperature = DEFAULT_ICE_TEMPERATURE
REAL(fp) :: Ice_Thickness = DEFAULT_ICE_THICKNESS
REAL(fp) :: Ice_Density = DEFAULT_ICE_DENSITY
REAL(fp) :: Ice_Roughness = DEFAULT_ICE_ROUGHNESS
! SensorData containing channel brightness temperatures
TYPE(CRTM_SensorData_type) :: SensorData
END TYPE CRTM_Surface_type
67
Component Description Units Dimensions
n Sensors The number of sensors for which data is pro- N/A Scalar
vided inside the SensorData structure
Land Coverage Fraction of the FOV that is land surface N/A Scalar
Water Coverage Fraction of the FOV that is water surface N/A Scalar
Snow Coverage Fraction of the FOV that is snow surface N/A Scalar
Ice Coverage Fraction of the FOV that is ice surface N/A Scalar
Wind Speed Surface wind speed m.s−1 Scalar
Wind Direction Surface wind direction deg. E from N Scalar
Land Type Land surface type N/A Scalar
Land Temperature Land surface temperature Kelvin Scalar
Soil Moisture Content Volumetric water content of the soil g.cm−3 Scalar
Canopy Water Content Gravimetric water content of the canopy g.cm−3 Scalar
Vegetation Fraction Vegetation fraction of the surface % Scalar
Soil Temperature Soil temperature Kelvin Scalar
Water Type Water surface type N/A Scalar
Water Temperature Water surface temperature Kelvin Scalar
Salinity Water salinity Scalar
Snow Type Snow surface type N/A Scalar
Snow Temperature Snow surface temperature Kelvin Scalar
Snow Depth Snow depth mm Scalar
Snow Density Snow density g.m−3 Scalar
Snow Grain Size Snow grain size mm Scalar
Ice Type Ice surface type N/A Scalar
Ice Temperature Ice surface temperature Kelvin Scalar
Ice Thickness Thickness of ice mm Scalar
Ice Density Density of ice g.m−3 Scalar
Ice Roughness Measure of the surface roughness of the ice N/A Scalar
SensorData Satellite sensor data required for some surface N/A Scalar
emissivity algorithms
68
Parameter Value Units
Surface type independent data
DEFAULT WIND SPEED 5.0 m.s−1
DEFAULT WIND DIRECTION 0.0 deg. E from N
Land surface type data
DEFAULT LAND TYPE GRASS SOIL N/A
DEFAULT LAND TEMPERATURE 283.0 K
DEFAULT SOIL MOISTURE CONTENT 0.05 g.cm−3
DEFAULT CANOPY WATER CONTENT 0.05 g.cm−3
DEFAULT VEGETATION FRACTION 0.3 30%
DEFAULT SOIL TEMPERATURE 283.0 K
Water type data
DEFAULT WATER TYPE SEA WATER N/A
DEFAULT WATER TEMPERATURE 283.0 K
DEFAULT SALINITY 33.0 ppmv
Snow surface type data
DEFAULT SNOW TYPE NEW SNOW N/A
DEFAULT SNOW TEMPERATURE 263.0 K
DEFAULT SNOW DEPTH 50.0 mm
DEFAULT SNOW DENSITY 0.2 g.cm−3
DEFAULT SNOW GRAIN SIZE 2.0 mm
Ice surface type data
DEFAULT ICE TYPE FRESH ICE N/A
DEFAULT ICE TEMPERATURE 263.0 K
DEFAULT ICE THICKNESS 10.0 mm
DEFAULT ICE DENSITY 0.9 g.cm−3
DEFAULT ICE ROUGHNESS 0.0 N/A
69
Land Type Parameter
Compacted soil COMPACTED SOIL
Tilled soil TILLED SOIL
Sand SAND
Rock ROCK
Irrigated low vegetation IRRIGATED LOW VEGETATION
Meadow grass MEADOW GRASS
Scrub SCRUB
Broadleaf forest BROADLEAF FOREST
Pine forest PINE FOREST
Tundra TUNDRA
Grass-soil GRASS SOIL
Broadleaf-pine forest BROADLEAF PINE FOREST
Grass scrub GRASS SCRUB
Soil-grass-scrub SOIL GRASS SCRUB
Urban concrete URBAN CONCRETE
Pine brush PINE BRUSH
Broadleaf brush BROADLEAF BRUSH
Wet soil WET SOIL
Scrub-soil SCRUB SOIL
Broadleaf(70)-Pine(30) BROADLEAF70 PINE30
70
Ice Type Parameter
Fresh ice FRESH ICE
First year sea ice FIRST YEAR SEA ICE
Multiple year sea ice MULTI YEAR SEA ICE
Ice floe ICE FLOE
Ice ridge ICE RIDGE
71
A.5.1 CRTM Surface Associated interface
NAME:
CRTM_Surface_Associated
PURPOSE:
Elemental function to test the status of the allocatable components
of a CRTM Surface object.
CALLING SEQUENCE:
Status = CRTM_Surface_Associated( Sfc )
OBJECTS:
Sfc: Surface structure which is to have its member’s
status tested.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
Status: The return value is a logical value indicating the
status of the Surface members.
.TRUE. - if the array components are allocated.
.FALSE. - if the array components are not allocated.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as input
PURPOSE:
Elemental function to compare two CRTM_Surface objects to within
a user specified number of significant figures.
CALLING SEQUENCE:
is_comparable = CRTM_Surface_Compare( x, y, n_SigFig=n_SigFig )
OBJECTS:
x, y: Two CRTM Surface objects to be compared.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
n_SigFig: Number of significant figure to compare floating point
components.
72
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar or same as input
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
is_equal: Logical value indicating whether the inputs are equal.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as inputs.
NAME:
CRTM_Surface_CoverageType
PURPOSE:
Elemental function to return the gross surface type based on coverage.
CALLING SEQUENCE:
type = CRTM_Surface_CoverageType( sfc )
INPUTS:
Sfc: CRTM Surface object for which the gross surface type is required.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
FUNCTION:
type: Surface type indicator for the passed CRTM Surface object.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as input
COMMENTS:
For a scalar Surface object, this function result can be used to
determine what gross surface types are included by using it to
index the SURFACE_TYPE_NAME parameter arrays, e.g.
WRITE(*,*) SURFACE_TYPE_NAME(CRTM_Surface_CoverageType(sfc))
NAME:
CRTM_Surface_Create
PURPOSE:
Elemental subroutine to create an instance of the CRTM Surface object.
73
CALLING SEQUENCE:
CALL CRTM_Surface_Create( Sfc , &
n_Channels )
OBJECTS:
Sfc: Surface structure.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
INPUT ARGUMENTS:
n_Channels: Number of channels dimension of SensorData
substructure
** Note: Can be = 0 (i.e. no sensor data). **
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as Surface object
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_Surface_DefineVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Surface_DefineVersion( Id )
OUTPUT ARGUMENTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Surface_Destroy
PURPOSE:
Elemental subroutine to re-initialize CRTM Surface objects.
74
CALLING SEQUENCE:
CALL CRTM_Surface_Destroy( Sfc )
OBJECTS:
Sfc: Re-initialized Surface structure.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Surface_Inspect
PURPOSE:
Subroutine to print the contents of a CRTM Surface object to stdout.
CALLING SEQUENCE:
CALL CRTM_Surface_Inspect( Sfc )
INPUTS:
Sfc: CRTM Surface object to display.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_Surface_IsCoverageValid
PURPOSE:
Function to determine if the coverage fractions are valid
for a CRTM Surface object.
CALLING SEQUENCE:
result = CRTM_Surface_IsCoverageValid( Sfc )
OBJECTS:
Sfc: CRTM Surface object which is to have its
coverage fractions checked.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Scalar
75
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
result: Logical variable indicating whether or not the input
passed the check.
If == .FALSE., Surface object coverage fractions are invalid.
== .TRUE., Surface object coverage fractions are valid.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
NAME:
CRTM_Surface_IsValid
PURPOSE:
Non-pure function to perform some simple validity checks on a
CRTM Surface object.
CALLING SEQUENCE:
result = CRTM_Surface_IsValid( Sfc )
or
OBJECTS:
Sfc: CRTM Surface object which is to have its
contents checked.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
result: Logical variable indicating whether or not the input
passed the check.
If == .FALSE., Surface object is unused or contains
invalid data.
== .TRUE., Surface object can be used in CRTM.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
76
A.5.10 CRTM Surface Zero interface
NAME:
CRTM_Surface_Zero
PURPOSE:
Elemental subroutine to zero out the data arrays
in a CRTM Surface object.
CALLING SEQUENCE:
CALL CRTM_Surface_Zero( Sfc )
OUTPUT ARGUMENTS:
Sfc: CRTM Surface structure in which the data arrays
are to be zeroed out.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
COMMENTS:
- The various surface type indicator flags are
*NOT* reset in this routine.
NAME:
CRTM_Surface_IOVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Surface_IOVersion( Id )
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
77
CRTM_Surface_InquireFile
PURPOSE:
Function to inquire CRTM Surface object files.
CALLING SEQUENCE:
Error_Status = CRTM_Surface_InquireFile( Filename , &
n_Channels = n_Channels, &
n_Profiles = n_Profiles )
INPUTS:
Filename: Character string specifying the name of a
CRTM Surface data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OPTIONAL OUTPUTS:
n_Channels: The number of spectral channels for which there is
data in the file. Note that this value will always
be 0 for a profile-only dataset-- it only has meaning
for K-matrix data.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file inquire was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_Surface_ReadFile
PURPOSE:
Function to read CRTM Surface object files.
78
CALLING SEQUENCE:
Error_Status = CRTM_Surface_ReadFile( Filename , &
Surface , &
Quiet = Quiet , &
n_Channels = n_Channels , &
n_Profiles = n_Profiles , &
INPUTS:
Filename: Character string specifying the name of an
Surface format data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OUTPUTS:
Surface: CRTM Surface object array containing the Surface
data. Note the following meanings attributed to the
dimensions of the object array:
Rank-1: M profiles.
Only profile data are to be read in. The file
does not contain channel information. The
dimension of the structure is understood to
be the PROFILE dimension.
Rank-2: L channels x M profiles
Channel and profile data are to be read in.
The file contains both channel and profile
information. The first dimension of the
structure is the CHANNEL dimension, the second
is the PROFILE dimension. This is to allow
K-matrix structures to be read in with the
same function.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Rank-1 (M) or Rank-2 (L x M)
ATTRIBUTES: INTENT(OUT)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
OPTIONAL OUTPUTS:
n_Channels: The number of channels for which data was read. Note that
this value will always be 0 for a profile-only dataset--
it only has meaning for K-matrix data.
UNITS: N/A
79
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file read was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_Surface_WriteFile
PURPOSE:
Function to write CRTM Surface object files.
CALLING SEQUENCE:
Error_Status = CRTM_Surface_WriteFile( Filename , &
Surface , &
Quiet = Quiet )
INPUTS:
Filename: Character string specifying the name of the
Surface format data file to write.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
80
Channel and profile data are to be read in.
The file contains both channel and profile
information. The first dimension of the
array is the CHANNEL dimension, the second
is the PROFILE dimension. This is to allow
K-matrix structures to be read in with the
same function.
UNITS: N/A
TYPE: CRTM_Surface_type
DIMENSION: Rank-1 (M) or Rank-2 (L x M)
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file write was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
SIDE EFFECTS:
- If the output file already exists, it is overwritten.
- If an error occurs during *writing*, the output file is deleted before
returning to the calling routine.
81
A.6 SensorData Structure
TYPE :: CRTM_SensorData_type
! Allocation indicator
LOGICAL :: Is_Allocated = .FALSE.
! Dimension values
INTEGER :: n_Channels = 0 ! L
! The data sensor IDs
CHARACTER(STRLEN) :: Sensor_Id = ’ ’
INTEGER :: WMO_Satellite_ID = INVALID_WMO_SATELLITE_ID
INTEGER :: WMO_Sensor_ID = INVALID_WMO_SENSOR_ID
! The sensor channels and brightness temperatures
INTEGER , ALLOCATABLE :: Sensor_Channel(:) ! L
REAL(fp), ALLOCATABLE :: Tb(:) ! L
END TYPE CRTM_SensorData_type
82
A.6.1 CRTM SensorData Associated interface
NAME:
CRTM_SensorData_Associated
PURPOSE:
Elemental function to test the status of the allocatable components
of a CRTM SensorData object.
CALLING SEQUENCE:
Status = CRTM_SensorData_Associated( SensorData )
OBJECTS:
SensorData: SensorData structure which is to have its member’s
status tested.
UNITS: N/A
TYPE: CRTM_SensorData_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
Status: The return value is a logical value indicating the
status of the SensorData members.
.TRUE. - if the array components are allocated.
.FALSE. - if the array components are not allocated.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as input SensorData argument
PURPOSE:
Elemental function to compare two CRTM_SensorData objects to within
a user specified number of significant figures.
CALLING SEQUENCE:
is_comparable = CRTM_SensorData_Compare( x, y, n_SigFig=n_SigFig )
OBJECTS:
x, y: Two CRTM SensorData objects to be compared.
UNITS: N/A
TYPE: CRTM_SensorData_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
n_SigFig: Number of significant figure to compare floating point
components.
83
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar or same as input
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
is_equal: Logical value indicating whether the inputs are equal.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as inputs.
NAME:
CRTM_SensorData_Create
PURPOSE:
Elemental subroutine to create an instance of the CRTM SensorData object.
CALLING SEQUENCE:
CALL CRTM_SensorData_Create( SensorData, n_Channels )
OBJECTS:
SensorData: SensorData structure.
UNITS: N/A
TYPE: CRTM_SensorData_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
INPUTS:
n_Channels: Number of sensor channels.
Must be > 0.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as SensorData object
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_SensorData_DefineVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_SensorData_DefineVersion( Id )
84
OUTPUT ARGUMENTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_SensorData_Destroy
PURPOSE:
Elemental subroutine to re-initialize CRTM SensorData objects.
CALLING SEQUENCE:
CALL CRTM_SensorData_Destroy( SensorData )
OBJECTS:
SensorData: Re-initialized SensorData structure.
UNITS: N/A
TYPE: CRTM_SensorData_type
DIMENSION: Scalar OR any rank
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_SensorData_Inspect
PURPOSE:
Subroutine to print the contents of a CRTM SensorData object to stdout.
CALLING SEQUENCE:
CALL CRTM_SensorData_Inspect( SensorData )
INPUTS:
SensorData: CRTM SensorData object to display.
UNITS: N/A
TYPE: CRTM_SensorData_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
85
A.6.7 CRTM SensorData IsValid interface
NAME:
CRTM_SensorData_IsValid
PURPOSE:
Non-pure function to perform some simple validity checks on a
CRTM SensorData object.
CALLING SEQUENCE:
result = CRTM_SensorData_IsValid( SensorData )
or
OBJECTS:
SensorData: CRTM SensorData object which is to have its
contents checked.
UNITS: N/A
TYPE: CRTM_SensorData_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
result: Logical variable indicating whether or not the input
passed the check.
If == .FALSE., SensorData object is unused or contains
invalid data.
== .TRUE., SensorData object can be used in CRTM.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
NAME:
CRTM_SensorData_Zero
PURPOSE:
Elemental subroutine to zero out the data arrays in a
CRTM SensorData object.
CALLING SEQUENCE:
CALL CRTM_SensorData_Zero( SensorData )
OBJECTS:
SensorData: CRTM SensorData structure in which the data arrays are
86
to be zeroed out.
UNITS: N/A
TYPE: CRTM_SensorData_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
COMMENTS:
- The dimension components of the structure are *NOT* set to zero.
- The SensorData sensor id and channel components are *NOT* reset.
NAME:
CRTM_SensorData_IOVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_SensorData_IOVersion( Id )
OUTPUT ARGUMENTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_SensorData_InquireFile
PURPOSE:
Function to inquire CRTM SensorData object files.
CALLING SEQUENCE:
Error_Status = CRTM_SensorData_InquireFile( Filename , &
n_DataSets = n_DataSets )
INPUTS:
Filename: Character string specifying the name of a
CRTM SensorData data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
87
ATTRIBUTES: INTENT(IN)
OPTIONAL OUTPUTS:
n_DataSets: The number of datasets in the file.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file inquire was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_SensorData_ReadFile
PURPOSE:
Function to read CRTM SensorData object files.
CALLING SEQUENCE:
Error_Status = CRTM_SensorData_ReadFile( Filename , &
SensorData , &
Quiet = Quiet , &
No_Close = No_Close , &
n_DataSets = n_DataSets )
INPUTS:
Filename: Character string specifying the name of a
SensorData format data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OUTPUTS:
SensorData: CRTM SensorData object array containing the sensor data.
UNITS: N/A
TYPE: CRTM_SensorData_type
DIMENSION: Rank-1
ATTRIBUTES: INTENT(OUT)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
88
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
No_Close: Set this logical argument to NOT close the file upon exit.
If == .FALSE., the input file is closed upon exit [DEFAULT]
== .TRUE., the input file is NOT closed upon exit.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
OPTIONAL OUTPUTS:
n_DataSets: The actual number of datasets read in.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file read was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_SensorData_WriteFile
PURPOSE:
Function to write CRTM SensorData object files.
CALLING SEQUENCE:
Error_Status = CRTM_SensorData_WriteFile( Filename , &
SensorData , &
Quiet = Quiet , &
No_Close = No_Close )
INPUTS:
Filename: Character string specifying the name of the
89
SensorData format data file to write.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
No_Close: Set this logical argument to NOT close the file upon exit.
If == .FALSE., the input file is closed upon exit [DEFAULT]
== .TRUE., the input file is NOT closed upon exit.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file write was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
SIDE EFFECTS:
- If the output file already exists, it is overwritten.
- If an error occurs during *writing*, the output file is deleted before
returning to the calling routine.
90
A.7 Geometry Structure
TYPE :: CRTM_Geometry_type
! Allocation indicator
LOGICAL :: Is_Allocated = .TRUE. ! Placeholder for future expansion
! Field of view index (1-nFOV)
INTEGER :: iFOV = 0
! Earth location
REAL(fp) :: Longitude = ZERO
REAL(fp) :: Latitude = ZERO
REAL(fp) :: Surface_Altitude = ZERO
! Sensor angle information
REAL(fp) :: Sensor_Scan_Angle = ZERO
REAL(fp) :: Sensor_Zenith_Angle = ZERO
REAL(fp) :: Sensor_Azimuth_Angle = ZERO
! Source angle information
REAL(fp) :: Source_Zenith_Angle = 100.0_fp ! Below horizon
REAL(fp) :: Source_Azimuth_Angle = ZERO
! Flux angle information
REAL(fp) :: Flux_Zenith_Angle = DIFFUSIVITY_ANGLE
! Date for geometry calculations
INTEGER :: Year = 2001
INTEGER :: Month = 1
INTEGER :: Day = 1
END TYPE CRTM_Geometry_type
91
Component Description Units Dimensions
iFOV The scan line FOV index N/A Scalar
Longitude Earth longitude deg. E (0→360) Scalar
Latitude Earth latitude deg. N (-90→+90) Scalar
Surface Altitude Altitude of the Earth’s surface at the specified metres (m) Scalar
lon/lat location
Sensor Scan Angle The sensor scan angle from nadir. See fig.A.8 degrees Scalar
Sensor Zenith Angle The sensor zenith angle of the FOV. See degrees Scalar
fig.A.9
Sensor Azimuth Angle The sensor azimuth angle is the angle sub- deg. from N Scalar
tended by the horizontal projection of a di-
rect line from the satellite to the FOV and
the North-South axis measured clockwise from
North. See fig.A.10
Source Zenith Angle The source zenith angle. The source is typi- degrees Scalar
cally the Sun (IR/VIS) or Moon (MW/VIS)
[only solar source valid in current release] See
fig.A.11
Source Azimuth Angle The source azimuth angle is the angle sub- deg. from N Scalar
tended by the horizontal projection of a di-
rect line from the source to the FOV and
the North-South axis measured clockwise from
North. See fig.A.12
Flux Zenith Angle The zenith angle used to approximate down- degrees Scalar
welling flux transmissivity. If not set, the de-
fault value is that of the diffusivity approx-
imation, such that sec(F ) = 5/3. Maximum
allowed value is determined from sec(F ) = 9/4
Year The year in 4-digit format N/A Scalar
Month The month of year (1-12) N/A Scalar
Day The day of month (1-28/29/30/31) N/A Scalar
92
θS
Nadir FOV
Figure A.8: Definition of Geometry sensor scan angle component.
Zenith
θZ
FOV
Figure A.9: Definition of Geometry sensor zenith angle component.
93
North Sub-satellite
point
φA
West East
FOV
Figure A.10: Definition of Geometry sensor azimuth angle component.
Zenith
θ¯
FOV
Figure A.11: Definition of Geometry source zenith angle component.
94
Horizontal projection
North of direct line
from source
φ¯
West East
FOV
Figure A.12: Definition of Geometry source azimuth angle component.
95
A.7.1 CRTM Geometry DefineVersion interface
NAME:
CRTM_Geometry_DefineVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Geometry_DefineVersion( Id )
OUTPUT ARGUMENTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Geometry_Destroy
PURPOSE:
Elemental subroutine to re-initialize CRTM Geometry objects.
CALLING SEQUENCE:
CALL CRTM_Geometry_Destroy( geo )
OBJECTS:
geo: Re-initialized Geometry structure.
UNITS: N/A
TYPE: CRTM_Geometry_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Geometry_GetValue
PURPOSE:
Elemental subroutine to get the values of CRTM Geometry
object components.
96
CALLING SEQUENCE:
CALL CRTM_Geometry_GetValue( geo, &
iFOV = iFOV , &
Longitude = Longitude , &
Latitude = Latitude , &
Surface_Altitude = Surface_Altitude , &
Sensor_Scan_Angle = Sensor_Scan_Angle , &
Sensor_Zenith_Angle = Sensor_Zenith_Angle , &
Sensor_Azimuth_Angle = Sensor_Azimuth_Angle, &
Source_Zenith_Angle = Source_Zenith_Angle , &
Source_Azimuth_Angle = Source_Azimuth_Angle, &
Flux_Zenith_Angle = Flux_Zenith_Angle , &
Year = Year , &
Month = Month , &
Day = Day )
OBJECTS:
geo: Geometry object from which component values
are to be retrieved.
UNITS: N/A
TYPE: CRTM_Geometry_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
OPTIONAL OUTPUTS:
iFOV: Sensor field-of-view index.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar or same as geo input
ATTRIBUTES: INTENT(OUT), OPTIONAL
97
ATTRIBUTES: INTENT(OUT), OPTIONAL
98
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar or same as geo input
ATTRIBUTES: INTENT(OUT), OPTIONAL
NAME:
CRTM_Geometry_Inspect
PURPOSE:
Subroutine to print the contents of a CRTM Geometry object to stdout.
CALLING SEQUENCE:
CALL CRTM_Geometry_Inspect( geo )
INPUTS:
geo: CRTM Geometry object to display.
UNITS: N/A
TYPE: CRTM_Geometry_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_Geometry_IsValid
PURPOSE:
Non-pure function to perform some simple validity checks on a
CRTM Geometry object.
CALLING SEQUENCE:
result = CRTM_Geometry_IsValid( geo )
or
OBJECTS:
geo: CRTM Geometry object which is to have its
contents checked.
UNITS: N/A
TYPE: CRTM_Geometry_type
DIMENSION: Scalar
99
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
result: Logical variable indicating whether or not the input
passed the check.
If == .FALSE., Geometry object is unused or contains
invalid data.
== .TRUE., Geometry object can be used in CRTM.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
NAME:
CRTM_Geometry_SetValue
PURPOSE:
Elemental subroutine to set the values of CRTM Geometry
object components.
CALLING SEQUENCE:
CALL CRTM_Geometry_SetValue( geo, &
iFOV = iFOV , &
Longitude = Longitude , &
Latitude = Latitude , &
Surface_Altitude = Surface_Altitude , &
Sensor_Scan_Angle = Sensor_Scan_Angle , &
Sensor_Zenith_Angle = Sensor_Zenith_Angle , &
Sensor_Azimuth_Angle = Sensor_Azimuth_Angle, &
Source_Zenith_Angle = Source_Zenith_Angle , &
Source_Azimuth_Angle = Source_Azimuth_Angle, &
Flux_Zenith_Angle = Flux_Zenith_Angle , &
Year = Year , &
Month = Month , &
Day = Day )
OBJECTS:
geo: Geometry object for which component values
are to be set.
UNITS: N/A
TYPE: CRTM_Geometry_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
OPTIONAL INPUTS:
iFOV: Sensor field-of-view index.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar or same as geo input
100
ATTRIBUTES: INTENT(IN), OPTIONAL
101
UNITS: degrees from North (0->360)
TYPE: REAL(fp)
DIMENSION: Scalar or same as geo input
ATTRIBUTES: INTENT(IN), OPTIONAL
NAME:
CRTM_Geometry_IOVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Geometry_IOVersion( Id )
OUTPUT ARGUMENTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
102
A.7.8 CRTM Geometry InquireFile interface
NAME:
CRTM_Geometry_InquireFile
PURPOSE:
Function to inquire CRTM Geometry object files.
CALLING SEQUENCE:
Error_Status = CRTM_Geometry_InquireFile( Filename , &
n_Profiles = n_Profiles )
INPUTS:
Filename: Character string specifying the name of a
CRTM Geometry data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OPTIONAL OUTPUTS:
n_Profiles: The number of profiles for which their is geometry
information in the data file.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file inquire was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_Geometry_ReadFile
PURPOSE:
Function to read CRTM Geometry object files.
CALLING SEQUENCE:
Error_Status = CRTM_Geometry_ReadFile( Filename , &
Geometry , &
Quiet = Quiet , &
n_Profiles = n_Profiles )
103
INPUTS:
Filename: Character string specifying the name of an
a Geometry data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OUTPUTS:
Geometry: CRTM Geometry object array containing the
data read from file.
UNITS: N/A
TYPE: CRTM_Geometry_type
DIMENSION: Rank-1
ATTRIBUTES: INTENT(OUT)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
OPTIONAL OUTPUTS:
n_Profiles: The number of profiles for which data was read.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file read was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_Geometry_WriteFile
PURPOSE:
104
Function to write CRTM Geometry object files.
CALLING SEQUENCE:
Error_Status = CRTM_Geometry_WriteFile( Filename , &
Geometry , &
Quiet = Quiet )
INPUTS:
Filename: Character string specifying the name of the
Geometry format data file to write.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file write was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
SIDE EFFECTS:
- If the output file already exists, it is overwritten.
- If an error occurs during *writing*, the output file is deleted before
returning to the calling routine.
105
A.8 RTSolution Structure
TYPE :: CRTM_RTSolution_type
! Allocation indicator
LOGICAL :: Is_Allocated = .FALSE.
! Dimensions
INTEGER :: n_Layers = 0 ! K
! Internal variables. Users do not need to worry about these.
LOGICAL :: Scattering_Flag = .TRUE.
INTEGER :: n_Full_Streams = 0
INTEGER :: n_Stokes = 0
! Forward radiative transfer intermediate results for a single channel
! These components are not defined when they are used as TL, AD
! and K variables
REAL(fp) :: Surface_Emissivity = ZERO
REAL(fp) :: Up_Radiance = ZERO
REAL(fp) :: Down_Radiance = ZERO
REAL(fp) :: Down_Solar_Radiance = ZERO
REAL(fp) :: Surface_Planck_Radiance = ZERO
REAL(fp), ALLOCATABLE :: Upwelling_Radiance(:) ! K
! The layer optical depths
REAL(fp), ALLOCATABLE :: Layer_Optical_Depth(:) ! K
! Radiative transfer results for a single channel/node
REAL(fp) :: Radiance = ZERO
REAL(fp) :: Brightness_Temperature = ZERO
END TYPE CRTM_RTSolution_type
106
Component Description Units Dimensions
n Layers Number of atmospheric profile layers (K) N/A Scalar
Surface Emissivity The computed surface emissivity N/A Scalar
Up Radiance The atmospheric portion of the upwelling ra- mW/(m2 .sr.cm-1 ) Scalar
diance
Down Radiance The atmospheric portion of the downwelling mW/(m2 .sr.cm-1 ) Scalar
radiance
Down Solar Radiance The downwelling direct solar radiance mW/(m2 .sr.cm-1 ) Scalar
Surface Planck Radiance The surface radiance mW/(m2 .sr.cm-1 ) Scalar
Upwelling Radiance The upwelling radiance profile, including the mW/(m2 .sr.cm-1 ) K
reflected downwelling and surface contribu-
tions.
Layer Optical Depth The layer optical depth profile N/A K
Radiance The sensor radiance mW/(m2 .sr.cm-1 ) Scalar
Brightness Temperature The sensor brightness temperature Kelvin Scalar
107
A.8.1 CRTM RTSolution Associated interface
NAME:
CRTM_RTSolution_Associated
PURPOSE:
Elemental function to test the status of the allocatable components
of a CRTM RTSolution object.
CALLING SEQUENCE:
Status = CRTM_RTSolution_Associated( RTSolution )
OBJECTS:
RTSolution: RTSolution structure which is to have its member’s
status tested.
UNITS: N/A
TYPE: CRTM_RTSolution_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
Status: The return value is a logical value indicating the
status of the RTSolution members.
.TRUE. - if the array components are allocated.
.FALSE. - if the array components are not allocated.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as input RTSolution argument
PURPOSE:
Elemental function to compare two CRTM_RTSolution objects to within
a user specified number of significant figures.
CALLING SEQUENCE:
is_comparable = CRTM_RTSolution_Compare( x, y, n_SigFig=n_SigFig )
OBJECTS:
x, y: Two CRTM RTSolution objects to be compared.
UNITS: N/A
TYPE: CRTM_RTSolution_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
n_SigFig: Number of significant figure to compare floating point
components.
108
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar or same as input
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
is_equal: Logical value indicating whether the inputs are equal.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as inputs.
NAME:
CRTM_RTSolution_Create
PURPOSE:
Elemental subroutine to create an instance of the CRTM RTSolution object.
CALLING SEQUENCE:
CALL CRTM_RTSolution_Create( RTSolution, n_Layers )
OBJECTS:
RTSolution: RTSolution structure.
UNITS: N/A
TYPE: CRTM_RTSolution_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
INPUTS:
n_Layers: Number of layers for which there is RTSolution data.
Must be > 0.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as RTSolution object
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_RTSolution_DefineVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_RTSolution_DefineVersion( Id )
109
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_RTSolution_Destroy
PURPOSE:
Elemental subroutine to re-initialize CRTM RTSolution objects.
CALLING SEQUENCE:
CALL CRTM_RTSolution_Destroy( RTSolution )
OBJECTS:
RTSolution: Re-initialized RTSolution structure.
UNITS: N/A
TYPE: CRTM_RTSolution_type
DIMENSION: Scalar OR any rank
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_RTSolution_Inspect
PURPOSE:
Subroutine to print the contents of a CRTM RTSolution object to stdout.
CALLING SEQUENCE:
CALL CRTM_RTSolution_Inspect( RTSolution )
INPUTS:
RTSolution: CRTM RTSolution object to display.
UNITS: N/A
TYPE: CRTM_RTSolution_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
110
A.8.7 CRTM RTSolution IOVersion interface
NAME:
CRTM_RTSolution_IOVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_RTSolution_IOVersion( Id )
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_RTSolution_InquireFile
PURPOSE:
Function to inquire CRTM RTSolution object files.
CALLING SEQUENCE:
Error_Status = CRTM_RTSolution_InquireFile( Filename , &
n_Channels = n_Channels, &
n_Profiles = n_Profiles )
INPUTS:
Filename: Character string specifying the name of a
CRTM RTSolution data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OPTIONAL OUTPUTS:
n_Channels: The number of spectral channels for which there is
data in the file.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
111
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file inquire was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_RTSolution_ReadFile
PURPOSE:
Function to read CRTM RTSolution object files.
CALLING SEQUENCE:
Error_Status = CRTM_RTSolution_ReadFile( Filename , &
RTSolution , &
Quiet = Quiet , &
n_Channels = n_Channels , &
n_Profiles = n_Profiles , &
INPUTS:
Filename: Character string specifying the name of an
RTSolution format data file to read.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
OUTPUTS:
RTSolution: CRTM RTSolution object array containing the RTSolution
data.
UNITS: N/A
TYPE: CRTM_RTSolution_type
DIMENSION: Rank-2 (n_Channels x n_Profiles)
ATTRIBUTES: INTENT(OUT)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
112
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
OPTIONAL OUTPUTS:
n_Channels: The number of channels for which data was read.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
ATTRIBUTES: OPTIONAL, INTENT(OUT)
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file read was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
NAME:
CRTM_RTSolution_WriteFile
PURPOSE:
Function to write CRTM RTSolution object files.
CALLING SEQUENCE:
Error_Status = CRTM_RTSolution_WriteFile( Filename , &
RTSolution , &
Quiet = Quiet )
INPUTS:
Filename: Character string specifying the name of the
RTSolution format data file to write.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
113
data.
UNITS: N/A
TYPE: CRTM_RTSolution_type
DIMENSION: Rank-2 (n_Channels x n_Profiles)
ATTRIBUTES: INTENT(IN)
OPTIONAL INPUTS:
Quiet: Set this logical argument to suppress INFORMATION
messages being printed to stdout
If == .FALSE., INFORMATION messages are OUTPUT [DEFAULT].
== .TRUE., INFORMATION messages are SUPPRESSED.
If not specified, default is .FALSE.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN), OPTIONAL
FUNCTION RESULT:
Error_Status: The return value is an integer defining the error status.
The error codes are defined in the Message_Handler module.
If == SUCCESS, the file write was successful
== FAILURE, an unrecoverable error occurred.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar
SIDE EFFECTS:
- If the output file already exists, it is overwritten.
- If an error occurs during *writing*, the output file is deleted before
returning to the calling routine.
114
A.9 Options Structure
TYPE :: CRTM_Options_type
! Allocation indicator
LOGICAL :: Is_Allocated = .FALSE.
! Input checking on by default
LOGICAL :: Check_Input = .TRUE.
! User defined emissivity/reflectivity
! ...Dimensions
INTEGER :: n_Channels = 0 ! L dimension
! ...Index into channel-specific components
INTEGER :: Channel = 0
! ...Emissivity optional arguments
LOGICAL :: Use_Emissivity = .FALSE.
REAL(fp), ALLOCATABLE :: Emissivity(:) ! L
! ...Direct reflectivity optional arguments
LOGICAL :: Use_Direct_Reflectivity = .FALSE.
REAL(fp), ALLOCATABLE :: Direct_Reflectivity(:) ! L
! Antenna correction application
LOGICAL :: Use_Antenna_Correction = .FALSE.
! SSU instrument input
TYPE(SSU_Input_type) :: SSU
! Zeeman-splitting input
TYPE(Zeeman_Input_type) :: Zeeman
END TYPE CRTM_Options_type
115
Component Description Units Dimensions
Check Input Logical switch to enable or disable input data checking. N/A Scalar
If:
.FALSE.: No input data check.
.TRUE. : Input data is checked [DEFAULT].
n Channels Number of sensor channels (L). N/A Scalar
Channel Index into channel-specific components. N/A Scalar
Use Emissivity Logical switch to apply user-defined surface emissivity. N/A Scalar
If:
.FALSE.: Calculate emissivity [DEFAULT].
.TRUE. : Use user-defined emissivity
Emissivity User-defined surface emissivity for each sensor channel. N/A L
Use Direct Reflectivity Logical switch to apply user-defined reflectivity for N/A Scalar
downwelling source (e.g. solar). This switch is ignored
unless the Use Emissivity switch is also set. If:
.FALSE.: Calculate reflectivity [DEFAULT].
.TRUE. : Use user-defined reflectivity
Direct Reflectivity User-defined direct reflectivity for downwelling source N/A L
for each sensor channel.
Use Antenna Correction Logical switch to apply antenna correction for the N/A Scalar
AMSU-A, AMSU-B, and MHS sensors. Note that for
this switch to be effective in the CRTM call, the FOV
field of the input Geometry structure must be set and
the antenna correction coefficients must be present in
the sensor SpcCoeff datafile. If:
.FALSE.: No correction [DEFAULT].
.TRUE. : Apply antenna correction.
SSU Structure component containing optional SSU sensor- N/A Scalar
specific input. See section A.10.
Zeeman Structure component containing optional input for those N/A Scalar
sensors where Zeeman-splitting is an issue for high-
peaking channels. See section A.11.
116
A.9.1 CRTM Options Associated interface
NAME:
CRTM_Options_Associated
PURPOSE:
Elemental function to test the status of the allocatable components
of a CRTM Options object.
CALLING SEQUENCE:
Status = CRTM_Options_Associated( Options )
OBJECTS:
Options: Options structure which is to have its member’s
status tested.
UNITS: N/A
TYPE: CRTM_Options_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
Status: The return value is a logical value indicating the
status of the Options members.
.TRUE. - if the array components are allocated.
.FALSE. - if the array components are not allocated.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Same as input Options argument
NAME:
CRTM_Options_Create
PURPOSE:
Elemental subroutine to create an instance of the CRTM Options object.
CALLING SEQUENCE:
CALL CRTM_Options_Create( Options, n_Channels )
OBJECTS:
Options: Options structure.
UNITS: N/A
TYPE: CRTM_Options_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(OUT)
INPUTS:
n_Channels: Number of channels for which there is Options data.
Must be > 0.
117
This dimension only applies to the emissivity-related
components.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Same as Options object
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_Options_DefineVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL CRTM_Options_DefineVersion( Id )
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
CRTM_Options_Destroy
PURPOSE:
Elemental subroutine to re-initialize CRTM Options objects.
CALLING SEQUENCE:
CALL CRTM_Options_Destroy( Options )
OBJECTS:
Options: Re-initialized Options structure.
UNITS: N/A
TYPE: CRTM_Options_type
DIMENSION: Scalar OR any rank
ATTRIBUTES: INTENT(OUT)
118
A.9.5 CRTM Options Inspect interface
NAME:
CRTM_Options_Inspect
PURPOSE:
Subroutine to print the contents of a CRTM Options object to stdout.
CALLING SEQUENCE:
CALL CRTM_Options_Inspect( Options )
INPUTS:
Options: CRTM Options object to display.
UNITS: N/A
TYPE: CRTM_Options_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
NAME:
CRTM_Options_IsValid
PURPOSE:
Non-pure function to perform some simple validity checks on a
CRTM Options object.
CALLING SEQUENCE:
result = CRTM_Options_IsValid( opt )
or
OBJECTS:
opt: CRTM Options object which is to have its
contents checked.
UNITS: N/A
TYPE: CRTM_Options_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
result: Logical variable indicating whether or not the input
passed the check.
If == .FALSE., Options object is unused or contains
invalid data.
== .TRUE., Options object can be used in CRTM.
119
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
120
A.10 SSU Input Structure
The SSU Input structure is a component of the Options input structure. Note in figure A.15 that the structure
is declared as PRIVATE. As such, the only way to set values in, or get values from, the structure is via the
SSU Input SetValue or SSU Input GetValue subroutines respectively.
TYPE :: SSU_Input_type
PRIVATE
! Time in decimal year (e.g. 2009.08892694 corresponds to 11:00 Feb. 2, 2009)
REAL(fp) :: Time = ZERO
! SSU CO2 cell pressures (hPa)
REAL(fp) :: Cell_Pressure(MAX_N_CHANNELS) = ZERO
END TYPE SSU_Input_type
NAME:
SSU_Input_CellPressureIsSet
PURPOSE:
Elemental function to determine if SSU_Input object cell pressures
are set (i.e. > zero).
CALLING SEQUENCE:
result = SSU_Input_CellPressureIsSet( ssu )
or
OBJECTS:
ssu: SSU_Input object for which the cell pressures
are to be tested.
UNITS: N/A
TYPE: SSU_Input_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN)
121
FUNCTION RESULT:
result: Logical variable indicating whether or not all the
SSU cell pressures are set.
If == .FALSE., cell pressure values are <= 0.0hPa and
thus are considered to be NOT set or valid.
== .TRUE., cell pressure values are > 0.0hPa and
thus are considered to be set and valid.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
NAME:
SSU_Input_DefineVersion
PURPOSE:
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL SSU_Input_DefineVersion( Id )
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
SSU_Input_GetValue
PURPOSE:
Elemental subroutine to Get the values of SSU_Input
object components.
CALLING SEQUENCE:
CALL SSU_Input_GetValue( SSU_Input , &
Channel = Channel , &
Time = Time , &
Cell_Pressure = Cell_Pressure, &
n_Channels = n_Channels )
OBJECTS:
122
SSU_Input: SSU_Input object for which component values
are to be set.
UNITS: N/A
TYPE: SSU_Input_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
OPTIONAL INPUTS:
Channel: SSU channel for which the CO2 cell pressure
is required.
UNITS: N/A
TYPE: INTEGER
DIMENSION: Scalar or same as SSU_Input
ATTRIBUTES: INTENT(IN), OPTIONAL
OPTIONAL OUTPUTS:
Time: SSU instrument mission time.
UNITS: decimal year
TYPE: REAL(fp)
DIMENSION: Scalar or same as SSU_Input
ATTRIBUTES: INTENT(OUT), OPTIONAL
NAME:
SSU_Input_Inspect
PURPOSE:
Subroutine to print the contents of an SSU_Input object to stdout.
CALLING SEQUENCE:
CALL SSU_Input_Inspect( ssu )
INPUTS:
ssu: SSU_Input object to display.
UNITS: N/A
123
TYPE: SSU_Input_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
NAME:
SSU_Input_IsValid
PURPOSE:
Non-pure function to perform some simple validity checks on a
SSU_Input object.
CALLING SEQUENCE:
result = SSU_Input_IsValid( ssu )
or
OBJECTS:
ssu: SSU_Input object which is to have its
contents checked.
UNITS: N/A
TYPE: SSU_Input_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
result: Logical variable indicating whether or not the input
passed the check.
If == .FALSE., object is unused or contains
invalid data.
== .TRUE., object can be used.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
NAME:
SSU_Input_SetValue
PURPOSE:
Elemental subroutine to set the values of SSU_Input
124
object components.
CALLING SEQUENCE:
CALL SSU_Input_SetValue( SSU_Input , &
Time = Time , &
Cell_Pressure = Cell_Pressure, &
Channel = Channel )
OBJECTS:
SSU_Input: SSU_Input object for which component values
are to be set.
UNITS: N/A
TYPE: SSU_Input_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
OPTIONAL INPUTS:
Time: SSU instrument mission time.
UNITS: decimal year
TYPE: REAL(fp)
DIMENSION: Scalar or same as SSU_Input
ATTRIBUTES: INTENT(IN), OPTIONAL
125
A.11 Zeeman Input Structure
The Zeeman Input structure is a component of the Options input structure. Note in figure A.16 that the
structure is declared as PRIVATE. As such, the only way to set values in, or get values from, the structure is via
the Zeeman Input SetValue or Zeeman Input GetValue subroutines respectively.
TYPE :: Zeeman_Input_type
PRIVATE
! Earth magnetic field strength in Gauss
REAL(fp) :: Be = DEFAULT_MAGENTIC_FIELD
! Cosine of the angle between the Earth
! magnetic field and wave propagation direction
REAL(fp) :: Cos_ThetaB = ZERO
! Cosine of the azimuth angle of the Be vector.
REAL(fp) :: Cos_PhiB = ZERO
! Doppler frequency shift caused by Earth-rotation.
REAL(fp) :: Doppler_Shift = ZERO
END TYPE Zeeman_Input_type
NAME:
Zeeman_Input_DefineVersion
PURPOSE:
126
Subroutine to return the module version information.
CALLING SEQUENCE:
CALL Zeeman_Input_DefineVersion( Id )
OUTPUTS:
Id: Character string containing the version Id information
for the module.
UNITS: N/A
TYPE: CHARACTER(*)
DIMENSION: Scalar
ATTRIBUTES: INTENT(OUT)
NAME:
Zeeman_Input_GetValue
PURPOSE:
Elemental subroutine to get the values of Zeeman_Input
object components.
CALLING SEQUENCE:
CALL Zeeman_Input_GetValue( Zeeman_Input , &
Field_Strength = Field_Strength, &
Cos_ThetaB = Cos_ThetaB , &
Cos_PhiB = Cos_PhiB , &
Doppler_Shift = Doppler_Shift )
OBJECTS:
Zeeman_Input: Zeeman_Input object for which component values
are to be set.
UNITS: N/A
TYPE: Zeeman_Input_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
OPTIONAL OUTPUTS:
Field_Strength: Earth’s magnetic filed strength
UNITS: Gauss
TYPE: REAL(fp)
DIMENSION: Scalar or same as Zeeman_Input
ATTRIBUTES: INTENT(OUT), OPTIONAL
127
Cos_PhiB: Cosine of the azimuth angle of the Earth magnetic
field vector.
UNITS: N/A
TYPE: REAL(fp)
DIMENSION: Scalar or same as Zeeman_Input
ATTRIBUTES: INTENT(OUT), OPTIONAL
NAME:
Zeeman_Input_Inspect
PURPOSE:
Subroutine to print the contents of an Zeeman_Input object to stdout.
CALLING SEQUENCE:
CALL Zeeman_Input_Inspect( z )
INPUTS:
z: Zeeman_Input object to display.
UNITS: N/A
TYPE: Zeeman_Input_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
NAME:
Zeeman_Input_IsValid
PURPOSE:
Non-pure function to perform some simple validity checks on a
Zeeman_Input object.
CALLING SEQUENCE:
result = Zeeman_Input_IsValid( z )
128
or
IF ( Zeeman_Input_IsValid( z ) ) THEN....
OBJECTS:
z: Zeeman_Input object which is to have its
contents checked.
UNITS: N/A
TYPE: Zeeman_Input_type
DIMENSION: Scalar
ATTRIBUTES: INTENT(IN)
FUNCTION RESULT:
result: Logical variable indicating whether or not the input
passed the check.
If == .FALSE., object is unused or contains
invalid data.
== .TRUE., object can be used.
UNITS: N/A
TYPE: LOGICAL
DIMENSION: Scalar
NAME:
Zeeman_Input_SetValue
PURPOSE:
Elemental subroutine to set the values of Zeeman_Input
object components.
CALLING SEQUENCE:
CALL Zeeman_Input_SetValue( Zeeman_Input , &
Field_Strength = Field_Strength, &
Cos_ThetaB = Cos_ThetaB , &
Cos_PhiB = Cos_PhiB , &
Doppler_Shift = Doppler_Shift )
OBJECTS:
Zeeman_Input: Zeeman_Input object for which component values
are to be set.
UNITS: N/A
TYPE: Zeeman_Input_type
DIMENSION: Scalar or any rank
ATTRIBUTES: INTENT(IN OUT)
OPTIONAL INPUTS:
Field_Strength: Earth’s magnetic filed strength
UNITS: Gauss
TYPE: REAL(fp)
129
DIMENSION: Scalar or same as Zeeman_Input
ATTRIBUTES: INTENT(IN), OPTIONAL
130
B
Valid Sensor Identifiers
131
B.1 Infrared instruments
132
Instrument Sensor Id Instrument Sensor Id
Aqua AIRS (281ch. subset) airs281 aqua NOAA-16 HIRS/3 hirs3 n16
Aqua AIRS (324ch. subset) airs324 aqua NOAA-17 HIRS/3 hirs3 n17
Aqua AIRS Module-1a airsM1a aqua NOAA-18 HIRS/4 hirs4 n18
Aqua AIRS Module-1b airsM1b aqua MetOp-A HIRS/4 hirs4 metop-a
Aqua AIRS Module-2a airsM2a aqua NOAA-19 HIRS/4 hirs4 n19
Aqua AIRS Module-2b airsM2b aqua MetOp-A IASI (300ch. subset) iasi300 metop-a
Aqua AIRS Module-3 airsM3 aqua MetOp-A IASI (316ch. subset) iasi316 metop-a
Aqua AIRS Module-4a airsM4a aqua MetOp-A IASI (616ch. subset) iasi616 metop-a
Aqua AIRS Module-4b airsM4b aqua MetOp-A IASI Band 1 iasiB1 metop-a
Aqua AIRS Module-4c airsM4c aqua MetOp-A IASI Band 2 iasiB2 metop-a
Aqua AIRS Module-4d airsM4d aqua MetOp-A IASI Band 3 iasiB3 metop-a
Aqua AIRS Module-5 airsM5 aqua MetOp-A IASI iasi metop-a
Aqua AIRS Module-6 airsM6 aqua NPP CrIS Band 1 crisB1 npp
Aqua AIRS Module-7 airsM7 aqua NPP CrIS Band 2 crisB2 npp
Aqua AIRS Module-8 airsM8 aqua NPP CrIS Band 3 crisB3 npp
Aqua AIRS Module-9 airsM9 aqua GOES-08 Imager imgr g08
Aqua AIRS Module-10 airsM10 aqua GOES-09 Imager imgr g09
Aqua AIRS Module-11 airsM11 aqua GOES-10 Imager imgr g10
Aqua AIRS Module-12 airsM12 aqua GOES-11 Imager imgr g11
Aqua AIRS airs aqua GOES-12 Imager imgr g12
TIROS-N AVHRR/2 avhrr2 tirosn GOES-13 Imager imgr g13
NOAA-06 AVHRR/2 avhrr2 n06 GOES-R ABI abi gr
NOAA-07 AVHRR/2 avhrr2 n07 MTSAT-1R Imager imgr mt1r
NOAA-08 AVHRR/2 avhrr2 n08 Aqua MODIS modis aqua
NOAA-09 AVHRR/2 avhrr2 n09 Terra MODIS modis terra
NOAA-10 AVHRR/2 avhrr2 n10 MeteoSat-08 SEVIRI seviri m08
NOAA-11 AVHRR/2 avhrr2 n11 MeteoSat-09 SEVIRI seviri m09
NOAA-12 AVHRR/2 avhrr2 n12 MeteoSat-10 SEVIRI seviri m10
NOAA-14 AVHRR/2 avhrr2 n14 GOES-08 Sounder sndr g08
NOAA-15 AVHRR/3 avhrr3 n15 GOES-09 Sounder sndr g09
NOAA-16 AVHRR/3 avhrr3 n16 GOES-10 Sounder sndr g10
NOAA-17 AVHRR/3 avhrr3 n17 GOES-11 Sounder sndr g11
NOAA-18 AVHRR/3 avhrr3 n18 GOES-12 Sounder sndr g12
MetOp-A AVHRR/3 avhrr3 metop-a GOES-13 Sounder sndr g13
NOAA-19 AVHRR/3 avhrr3 n19 TIROS-N SSU ssu tirosn
TIROS-N HIRS/2 hirs2 tirosn NOAA-06 SSU ssu n06
NOAA-06 HIRS/2 hirs2 n06 NOAA-07 SSU ssu n07
NOAA-07 HIRS/2 hirs2 n07 NOAA-08 SSU ssu n08
NOAA-08 HIRS/2 hirs2 n08 NOAA-09 SSU ssu n09
NOAA-09 HIRS/2 hirs2 n09 NOAA-10 SSU ssu n11
NOAA-10 HIRS/2 hirs2 n10 NOAA-11 SSU ssu n14
NOAA-11 HIRS/2 hirs2 n11 GMS-5 VISSR (Detector A) vissrDetA gms5
NOAA-12 HIRS/2 hirs2 n12 Fengyun-3A VIRR virr fy3a
NOAA-14 HIRS/2 hirs2 n14 Fengyun-3A IRAS iras fy3a
NOAA-15 HIRS/3 hirs3 n15 Fengyun-3A MERSI mersi fy3a
133
B.2 Microwave instruments
134
C
Migration Path from REL-1.2.x to REL-2.0.x
This section details the user code changes that need to be made to migrate from using CRTM v1.2.x to v2.0.x.
The Sensor Id argument to the CRTM initialisation function identifies the sensors for which the CRTM will be
initialised. In v1.2.x this argument was optional because generic SpcCoeff and TauCoeff files could be used. In
v2.0.x, generic SpcCoeff and TauCoeff coefficient files are no longer accepted and, thus, a sensor identifier must
be specified.
In v1.2.x the CRTM Init interface looked like:
where both the Sensor Id and ChannelInfo arguments are mandatory. See the CRTM Init section for complete
details about the v2.0.x interface.
As mentioned in the “What’s New in v2.0” section, the user-accessible structures (i.e. those used to define the
inputs to, and return the outputs from, the CRTM) and their associated life cycle procedures (i.e. allocation
and deallocation) have been changed. To mitigate the possibility of memory leaks, the definitions of array
members of structures have had their POINTER attribute replaced with ALLOCATABLE. This was a first step in
preparation for use of Fortran2003 Object Oriented features in the CRTM (once Fortran2003 compiler become
widely available), where the derived type structure definitions will be reclassified as objects and their procedures
will be type-bound. The changes in the affected user-accessible structure procedures are shown below.
In addition to the general interface changes, all of the structure life cycle procedures are now elemental. That
is, there is no longer a restriction on the dimensionality of the arguments as long as they are conformable.
C.2.1 Atmosphere
Creation
In v1.2.x the Atmosphere structure allocation was a function returning an error status,
135
errStatus = CRTM_Allocate_Atmosphere( n_Layers , &
n_Absorbers, &
n_Clouds , &
n_Aerosols , &
Atmosphere )
IF ( errStatus /= SUCCESS ) THEN
...
END IF
where the error checking is achieved via the CRTM Atmosphere Associated function call.
Destruction
In v1.2.x the Atmosphere structure destruction was a function returning an error status,
where, again, the error checking is achieved via the CRTM Atmosphere Associated function call.
C.2.2 Surface
The Surface structure procedure changes only apply if you utilise the SensorData component.
Creation
In v1.2.x the Surface structure allocation was a function returning an error status,
136
The v2.0.x interface was changed to an elemental subroutine,
where the error checking is achieved via the CRTM Surface Associated function call.
Destruction
In v1.2.x the Surface structure destruction was a function returning an error status,
where, again, the error checking is achieved via the CRTM Surface Associated function call.
C.2.3 Options
Creation
In v1.2.x the Options structure allocation was a function returning an error status,
where the error checking is achieved via the CRTM Options Associated function call.
137
Destruction
In v1.2.x the Options structure destruction was a function returning an error status,
where, again, the error checking is achieved via the CRTM Options Associated function call.
C.2.4 RTSolution
Creation
In v1.2.x the RTSolution structure allocation was a function returning an error status,
where the error checking is achieved via the CRTM RTSolution Associated function call.
Destruction
In v1.2.x the RTSolution structure destruction was a function returning an error status,
where, again, the error checking is achieved via the CRTM RTSolution Associated function call.
138
C.3 CRTM Structure Replacement
An additional change was the replacement of the CRTM GeometryInfo type input structure definition with that
of CRTM Geometry type. This was done to strictly separate the user defined inputs from the derived values
determined inside the main CRTM functions.
In v1.2.x the input structure definition would look something like:
TYPE(CRTM_GeometryInfo_type) :: geo(N_PROFILES)
for a predefined number of atmospheric profiles (via N PROFILES). The v2.0.x definition would be,
TYPE(CRTM_Geometry_type) :: geo(N_PROFILES)
Users should check that they are assigning values to all the necessary structure components.
139