module_radiance.f90

References to this file elsewhere.
1 module module_radiance
2 
3    !---------------------------------------------------------------------------
4    ! Purpose: module for radiance data assimilation. 
5    !---------------------------------------------------------------------------
6 
7    use da_control, only : pi, use_landem, t_landem, t_kelvin
8    use da_reporting, only : da_error,message
9 
10 #ifdef RTTOV
11    use rttov_const,  only : &
12             errorstatus_success, &
13             errorstatus_fatal,   &
14             platform_name      , &
15             inst_name          , &
16             gas_id_watervapour  ,&
17             gas_unit_specconc   ,&
18             gas_unit_ppmv, sensor_id_mw
19    use rttov_types
20 #endif
21 
22 #ifdef CRTM
23   ! -- Modules to define CRTM constants etc.
24    USE CRTM_Parameters, only : INVALID_WMO_SENSOR_ID
25    !USE Type_Kinds
26    !USE Error_Handler
27    !USE CRTM_Utility
28 
29   ! -- CRTM RT_models modules
30    USE CRTM_Module, only : graupel_cloud, rain_cloud, snow_cloud,crtm_adjoint, &
31       crtm_allocate_atmosphere, crtm_allocate_surface, crtm_assign_atmosphere, &
32       crtm_assign_surface,crtm_destroy_atmosphere,crtm_destroy_surface, &
33       crtm_forward,crtm_init,crtm_k_matrix, &
34       crtm_tangent_linear, grass_soil, h2o_id,hail_cloud,ice_cloud,new_snow, &
35       o3_id, water_cloud, crtm_rtsolution_type, crtm_channelinfo_type, &
36       crtm_atmosphere_type, crtm_surface_type, crtm_geometryinfo_type, &
37       crtm_zero_surface, crtm_zero_atmosphere, crtm_destroy, &
38       crtm_destroy_channelinfo
39 
40    USE CRTM_SensorInfo
41 #endif
42 
43    use gsi_kinds      ,  only : r_kind,r_double,i_kind,r_single
44    use gsi_constants  ,  only : deg2rad, rad2deg,       &
45                             init_constants_derived, &
46                             one, three, zero, half, &
47                             one_tenth, two, four
48 
49    ! use irsse_model, only: forward_irsse
50    implicit none
51    
52    real, parameter             :: q2ppmv = 1.60771704e+6
53 
54   Character (len=8), Parameter :: rttov_platform_name(1:20) = &
55        (/ 'noaa    ', 'dmsp    ', 'meteosat', 'goes    ', 'gms     ', &
56           'fy2     ', 'trmm    ', 'ers     ', 'eos     ', 'metop   ', &
57           'envisat ', 'msg     ', 'fy1     ', 'adeos   ', 'mtsat   ', &
58           'coriolis', 'npoess  ', 'gifts   ', 'xxxxxxxx', 'xxxxxxxx'/)
59 
60   ! List of instruments  !!!! HIRS is number 0
61   Character (len=8), Dimension(0:34) :: rttov_inst_name  =                &
62        & (/ 'hirs    ', 'msu     ', 'ssu     ', 'amsua   ', 'amsub   ',  &
63        &    'avhrr   ', 'ssmi    ', 'vtpr1   ', 'vtpr2   ', 'tmi     ',  &
64        &    'ssmis   ', 'airs    ', 'hsb     ', 'modis   ', 'atsr    ',  &
65        &    'mhs     ', 'iasi    ', 'amsr    ', 'imager  ', 'atms    ',  &
66        &    'mviri   ', 'seviri  ', 'imager  ', 'sounder ', 'imager  ',  &
67        &    'vissr   ', 'mvisr   ', 'cris    ', 'cmis    ', 'viirs   ',  &
68        &    'windsat ', 'gifts   ', 'xxxxxxxx', 'airs    ', 'xxxxxxxx'   /)
69 
70 ! n=noaa; f=dmsp; g=goes; c=npoess; eos-1/2=aqua/terra;
71    character(len=8), parameter :: crtm_platform_name(1:20) = &
72        (/ 'n       ', 'f       ', 'meteosat', 'g       ', 'gms     ', &
73           'fy2     ', 'trmm    ', 'ers     ', 'eos     ', 'metop   ', &
74           'envisat ', 'msg     ', 'fy1     ', 'adeos   ', 'mtsat   ', &
75           'coriolis', 'c       ', 'gifts   ', 'xxxxxxxx', 'xxxxxxxx'/)
76 
77 ! List of instruments  !!!! HIRS is number 0
78   Character (len=8), Dimension(0:34) :: crtm_sensor_name  =                &
79        & (/ 'hirs    ', 'msu     ', 'ssu     ', 'amsua   ', 'amsub   ',  &
80        &    'avhrr   ', 'ssmi    ', 'vtpr1   ', 'vtpr2   ', 'tmi     ',  &
81        &    'ssmis   ', 'airs    ', 'hsb     ', 'modis   ', 'atsr    ',  &
82        &    'mhs     ', 'iasi    ', 'amsre   ', 'imager  ', 'atms    ',  &
83        &    'mviri   ', 'seviri  ', 'imgr    ', 'sndr    ', 'imager  ',  &
84        &    'vissr   ', 'mvisr   ', 'cris    ', 'cmis    ', 'viirs   ',  &
85        &    'windsat ', 'gifts   ', 'amsre   ', 'xxxxxxxx', 'xxxxxxxx'   /)
86 
87    integer                     :: n_scatt_coef
88    character(len=5), pointer   :: coefs_scatt_instname(:)
89    real,             pointer   :: time_slots(:)
90 #ifdef RTTOV
91    type( rttov_coef ), pointer :: coefs(:)         ! RTTOV8_5 coefficients
92    type( rttov_scatt_coef ), pointer :: coefs_scatt(:)
93 #endif
94 
95    type satinfo_type
96       integer, pointer   :: ichan(:)      ! channel index
97       integer, pointer   :: iuse (:)      ! usage flag (-1: not use) from GSI info file
98       real   , pointer   :: error(:)      ! error Standard Deviation from GSI info file
99       real   , pointer   :: polar(:)      ! polarisation (0:ver; 1:hori) from GSI info file
100       real   , pointer   :: error_factor(:) ! error tuning factor ! from error tuning file
101      ! new air mass bias correction coefs.
102       real   , pointer   :: scanbias(:,:) ! scan bias without latitude band variation
103       real   , pointer   :: scanbias_b(:,:,:) ! scan bias with latitude band variation
104       real   , pointer   :: bcoef(:,:)   ! airmass predictor bias coefficients
105       real   , pointer   :: bcoef0(:)    ! airmass constant coefficient
106       real   , pointer   :: error_std(:) ! error standard deviation
107    end type satinfo_type
108 
109    type (satinfo_type), pointer :: satinfo(:)
110 
111    CHARACTER( 80 ), allocatable, save :: Sensor_Descriptor(:)
112 
113 contains
114 
115 #include "gsi_emiss.inc"
116 #include "emiss_ssmi.inc"
117 #include "iceem_amsu.inc"
118 #include "siem_ats.inc"
119 #include "siem_bts.inc"
120 #include "siem_interpolate.inc"
121 #include "landem.inc"
122 #include "snwem_amsu.inc"
123 #include "seaem.inc"
124 #include "ossmem.inc"
125 
126 end module module_radiance
127