SCALE-RM
scale_da_read_pawr_toshiba.F90
Go to the documentation of this file.
2  use iso_c_binding
3 
4  integer, parameter :: rdim = 600 ! max number of Range bins
5  integer, parameter :: azdim = 320 ! max number of AZ angles
6  integer, parameter :: eldim = 121 ! max number of AZ angles
7 
8  type, bind(c) :: c_pawr_header
9  integer(kind=c_int) s_yr, s_mn, s_dy, s_hr, s_mi, s_sc
10  integer(kind=c_int) e_yr, e_mn, e_dy, e_hr, e_mi, e_sc
11  integer(kind=c_int) data_size
12  integer(kind=c_int) total_step_num, el_num, total_el_num
13  integer(kind=c_int) hit_num, sector_num, range_num, range_res, mesh_size
14  real(kind=c_double) latitude, longitude, altitude
15  real(kind=c_float) start_angle, end_angle, mesh_lsb, mesh_offset
16  real(kind=c_float) tx_freq, tx_power, pulse_len_l, pulse_len_s
17  real(kind=c_float) ant_gain, beam_wid_h, beam_wid_v
18  real(kind=c_float) tx_loss, rx_loss, smin_h, smin_l
19  real(kind=c_float) prf_l, prf_h, zr_b, zr_beta
20  end type c_pawr_header
21 
22  interface
23  integer(kind=c_int) function read_toshiba_c(jitdt_place, hd, az, el, rtdat) bind(C, name="read_toshiba")
24  use iso_c_binding
25  import c_pawr_header
26  import rdim, azdim, eldim
27 
28  character(kind=c_char) :: jitdt_place(*)
29  type(c_pawr_header) :: hd
30  real(kind=c_float) :: az(azdim, eldim)
31  real(kind=c_float) :: el(azdim, eldim)
32  real(kind=c_float) :: rtdat(rdim, azdim, eldim)
33  end function read_toshiba_c
34  end interface
35 
36  public
37 
38 contains
39 
40  function da_read_pawr_toshiba(fname, hd, az, el, rtdat)
42  character(*), intent(in) :: fname
43  type(c_pawr_header), intent(out) :: hd
44  real(kind=c_float), intent(out) :: az(azdim, eldim)
45  real(kind=c_float), intent(out) :: el(azdim, eldim)
46  real(kind=c_float), intent(out) :: rtdat(rdim, azdim, eldim)
47  character(kind=c_char) :: c_fname*1025
48 
49  !write(*, *) "jitdt_read_toshiba_f#jitdt_read_toshiba"
50  c_fname = trim(fname) // c_null_char
51 
52  da_read_pawr_toshiba = read_toshiba_c(c_fname, hd, az, el, rtdat)
53  end function da_read_pawr_toshiba
54 
scale_da_read_pawr_toshiba::eldim
integer, parameter eldim
Definition: scale_da_read_pawr_toshiba.F90:6
scale_da_read_pawr_toshiba::rdim
integer, parameter rdim
Definition: scale_da_read_pawr_toshiba.F90:4
scale_da_read_pawr_toshiba::da_read_pawr_toshiba
integer function da_read_pawr_toshiba(fname, hd, az, el, rtdat)
Definition: scale_da_read_pawr_toshiba.F90:41
scale_da_read_pawr_toshiba::c_pawr_header
Definition: scale_da_read_pawr_toshiba.F90:8
scale_da_read_pawr_toshiba::azdim
integer, parameter azdim
Definition: scale_da_read_pawr_toshiba.F90:5
scale_da_read_pawr_toshiba::read_toshiba_c
Definition: scale_da_read_pawr_toshiba.F90:23
scale_da_read_pawr_toshiba
Definition: scale_da_read_pawr_toshiba.F90:1