SCALE-RM
scale_da_read_mp_pawr_toshiba.F90
Go to the documentation of this file.
2  use iso_c_binding
3 
4  integer, parameter :: rdim = 800 ! max number of Range bins
5  integer, parameter :: azdim = 320 ! max number of AZ angles
6  integer, parameter :: eldim = 120 ! max number of AZ angles
7 
8  type, bind(c) :: c_mppawr_header
9  character(c_char) :: data_name(32), site_name(32), sq_name(16)
10  integer(c_int) :: s_yr, s_mn, s_dy, s_hr, s_mi, s_sc
11  integer(c_int) :: e_yr, e_mn, e_dy, e_hr, e_mi, e_sc
12  integer(c_int) :: el_num, ray_num, range_num
13  integer(c_int) :: range_res
14  real(c_double) :: latitude, longitude, altitude
15  real(c_float) :: start_az, start_el, end_az, end_el
16  real(c_float) :: mesh_offset
17  end type c_mppawr_header
18 
19  interface
20  integer(kind=c_int) function read_toshiba_mpr_c(in_file, opt_verbose, hd, az, el, rtdat) bind(C, name="read_toshiba_mpr")
21  use iso_c_binding
22  import c_mppawr_header
23  import rdim, azdim, eldim
24 
25  character(c_char) :: in_file(*)
26  integer(c_int), value :: opt_verbose
27  type(c_mppawr_header) :: hd
28  real(c_float) :: az(azdim, eldim)
29  real(c_float) :: el(azdim, eldim)
30  real(c_float) :: rtdat(rdim, azdim, eldim)
31  end function read_toshiba_mpr_c
32  end interface
33 
34  public
35 
36 contains
37 
38  function da_read_mp_pawr_toshiba(fname, verbose, hd, az, el, rtdat)
40  character(*), intent(in) :: fname
41  integer(c_int), value :: verbose
42  type(c_mppawr_header), intent(out) :: hd
43  real(c_float), intent(out) :: az(azdim, eldim)
44  real(c_float), intent(out) :: el(azdim, eldim)
45  real(c_float), intent(out) :: rtdat(rdim, azdim, eldim)
46  character(c_char) :: c_fname*1025
47 
48  !write(*, *) "jitdt_read_toshiba_f#jitdt_read_toshiba"
49  c_fname = trim(fname) // c_null_char
50 
51  da_read_mp_pawr_toshiba = read_toshiba_mpr_c(c_fname, verbose, hd, az, el, rtdat)
52  end function da_read_mp_pawr_toshiba
53 
55 
scale_da_read_mp_pawr_toshiba::azdim
integer, parameter azdim
Definition: scale_da_read_mp_pawr_toshiba.F90:5
scale_da_read_mp_pawr_toshiba::c_mppawr_header
Definition: scale_da_read_mp_pawr_toshiba.F90:8
scale_da_read_mp_pawr_toshiba
Definition: scale_da_read_mp_pawr_toshiba.F90:1
scale_da_read_mp_pawr_toshiba::read_toshiba_mpr_c
Definition: scale_da_read_mp_pawr_toshiba.F90:20
scale_da_read_mp_pawr_toshiba::da_read_mp_pawr_toshiba
integer function da_read_mp_pawr_toshiba(fname, verbose, hd, az, el, rtdat)
Definition: scale_da_read_mp_pawr_toshiba.F90:39
scale_da_read_mp_pawr_toshiba::eldim
integer, parameter eldim
Definition: scale_da_read_mp_pawr_toshiba.F90:6
scale_da_read_mp_pawr_toshiba::rdim
integer, parameter rdim
Definition: scale_da_read_mp_pawr_toshiba.F90:4