Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / var / da / da_radiance / da_crtm_k.inc
blob609d4702046eada4ce2d4a6bea8eb0b75ed8b7d5
1 #ifdef CRTM
2 subroutine da_crtm_k(  nsensor, nchan, nprof, &
3                             Atmosphere,   &
4                             Surface,      &
5                             RTSolution_K, &
6                             GeometryInfo, &
7                             ChannelInfo,  &
8                             Atmosphere_K,   &
9                             Surface_K,   &
10                             RTSolution,   &
11                             Options)
13    integer, intent(in)            :: nsensor, nchan, nprof
14    type (CRTM_RTSolution_type ),  intent(inout)  :: RTSolution(nchan,nprof)
15    type (CRTM_RTSolution_type ),  intent(inout)  :: RTSolution_K(nchan,nprof)
16    type (CRTM_ChannelInfo_type),  intent(in)     :: ChannelInfo(nsensor)
17    type( CRTM_Atmosphere_type ),  intent(in)     :: Atmosphere(nprof)
18    type( CRTM_Atmosphere_type ),  intent(inout)  :: Atmosphere_K(nchan,nprof)
19    type( CRTM_Surface_type ),     intent(in)     :: Surface(nprof)
20    type( CRTM_Surface_type ),     intent(inout)  :: Surface_K(nchan,nprof)
21    type( CRTM_Geometry_type ),    intent(inout)  :: GeometryInfo(nprof)
22    type (CRTM_Options_type),      intent(in)     :: Options(nprof)
24    integer :: Error_Status
26    if (trace_use) call da_trace_entry("da_crtm_k")
28          Error_Status = CRTM_K_Matrix(Atmosphere,   &
29                             Surface,      &
30                             RTSolution_K,&
31                             GeometryInfo, &
32                             ChannelInfo,  &
33                             Atmosphere_K,&
34                             Surface_K,   &
35                             RTSolution,   &
36                             Options)
37          if ( Error_Status /= 0 ) then
38               call da_error(__FILE__,__LINE__, &
39                  (/"Error in calling CRTM_K_Matrix"/))
40          end if
42    if (trace_use) call da_trace_exit("da_crtm_k")
44 end subroutine da_crtm_k
45 #endif