Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / var / da / da_radiance / da_rttov.f90
blob9bad0db61f9dee935bba2b9ad92aa52ca019cfeb
1 module da_rttov
3 !---------------------------------------------------------------------------
4 ! Purpose: module for radiance data assimilation.
5 !---------------------------------------------------------------------------
7 #ifdef RTTOV
8 use da_define_structures, only : iv_type, y_type, x_type
9 use module_domain, only : domain
11 use module_radiance, only : satinfo, &
12 i_kind,r_kind, r_double, &
13 one, zero, three,deg2rad, q2ppmv, &
14 coefs, opts,opts_rt_ir, rttov_inst_name
15 use module_radiance, only : rttov_options, rttov_opts_rt_ir, rttov_coefs, rttov_profile, &
16 rttov_transmission, rttov_radiance, rttov_chanprof, &
17 jpim, jprb, errorstatus_success, errorstatus_fatal, gas_id_watervapour, &
18 atlas, atlas_type, atlas_id, atlas_type_ir, atlas_type_mw, &
19 sensor_id_ir, sensor_id_mw, sensor_id_hi, sensor_id_po, rttov_emissivity
21 use da_control, only : max_ob_levels,missing_r, &
22 v_interp_p, v_interp_h, tovs_batch, gravity, &
23 missing, max_error_uv, max_error_t, max_error_p,max_error_q, &
24 max_stheight_diff,missing_data,max_error_bq,max_error_slp, &
25 max_error_bt, max_error_buv, rtminit_platform,rtminit_satid, &
26 rtminit_nsensor,rtminit_sensor,filename_len,read_biascoef,analysis_date, &
27 time_window_max,time_window_min, kts,kte,kms,kme, &
28 rtm_option_rttov,use_rttov_kmatrix,rtm_option_crtm, gravity, &
29 print_detail_rad,stderr, mw_emis_sea, &
30 rtminit_print, rttov_scatt,comm,ierr,biasprep, qc_rad, &
31 num_fgat_time,stdout,trace_use, use_error_factor_rad, &
32 qc_good, qc_bad,myproc,biascorr, global,ims,ime,jms,jme, &
33 use_clddet, time_slots, rttov_emis_atlas_ir, rttov_emis_atlas_mw, &
34 use_mspps_emis, use_mspps_ts, use_clddet_zz
35 use da_interpolation, only : da_to_zk_new, &
36 da_interp_lin_2d, da_interp_lin_3d, da_interp_lin_3d_adj, da_interp_lin_2d_adj, &
37 da_interp_2d_partial
38 use da_physics, only: da_trop_wmo
39 use da_tools_serial, only : da_get_unit, da_free_unit
40 #ifdef DM_PARALLEL
41 use da_par_util, only : true_mpi_real
42 use da_wrf_interfaces, only : wrf_dm_bcast_integer
43 #endif
44 use da_radiance1, only : num_tovs_after,tovs_copy_count, &
45 tovs_send_pe, tovs_recv_pe, tovs_send_start, tovs_send_count, &
46 tovs_recv_start,con_vars_type,aux_vars_type, &
47 da_biascorr, da_detsurtyp,da_biasprep, da_mspps_emis, da_mspps_ts
48 use da_reporting, only : da_message, message, da_warning, da_error
49 use da_tools, only : da_convert_zk, da_get_time_slots
50 use da_tracing, only : da_trace_entry, da_trace_exit, da_trace
52 #ifdef DM_PARALLEL
53 include 'mpif.h'
54 #endif
56 !#include "rttov_setup.interface"
57 #include "rttov_direct.interface"
58 #include "rttov_tl.interface"
59 #include "rttov_ad.interface"
60 #include "rttov_k.interface"
61 !#include "rttov_dealloc_coefs.interface"
62 #include "rttov_alloc_rad.interface"
63 #include "rttov_alloc_transmission.interface"
64 #include "rttov_alloc_prof.interface"
65 #include "rttov_errorreport.interface"
66 #include "rttov_read_coefs.interface"
67 #include "rttov_init_coefs.interface"
68 #include "rttov_setup_emis_atlas.interface"
69 #include "rttov_get_emis.interface"
70 #include "rttov_deallocate_emis_atlas.interface"
72 contains
74 #include "da_get_innov_vector_rttov.inc"
75 #include "da_transform_xtoy_rttov.inc"
76 #include "da_transform_xtoy_rttov_adj.inc"
78 #include "da_rttov_init.inc"
79 #include "da_rttov_direct.inc"
80 #include "da_rttov_tl.inc"
81 #include "da_rttov_ad.inc"
82 #include "da_rttov_k.inc"
84 #endif
86 end module da_rttov