SCALE-RM
read_toshiba_mpr.h
Go to the documentation of this file.
1 /*----------------------------------------------------------------------
2  FILE NAME: grads_MPR.h
3 ----------------------------------------------------------------------*/
4 /* constant fixed parameter */
5 #define RDIM 800 /* max number of Range bins */
6 #define AZDIM 320 /* max number of AZ angles */
7 #define ELDIM 120 /* max number of EL angles */
8 #define NFNAME 128 /* number of characters in file names */
9 #define DMISS -327.68 /* missing data in output (& input data offset) */
10 #define DNOISE -327.00 /* noise level data in output */
11 
12 #define RAD (3.141592653589/180.0)
13 
14 // added by Otsuka
15 #define LEN_BUFRDHD 512
16 #define LEN_BUFPBHD 10368
17 #define LEN_BUFELHD 432
18 
19 /* Dimension of output XYZ(CAPPI), XY(PPI) and XZ(RHI) */
20 #define XYRESO 0.25 /* horizontal resolution in km */
21 #define ZRESO 0.25 /* vertical resolution in km */
22 
23 #define CXDIM 481 /* X-dim of CAPPI output (include center) */
24 #define CYDIM 481 /* Y-dim of CAPPI output (include center) */
25 #define CZDIM 65 /* Z-dim of CAPPI output (include surface) */
26 #define CXKM0 -60.0 /* start X coords from the radar (in km) */
27 #define CYKM0 -60.0 /* start Y coords from the radar (in km) */
28 #define CZKM0 0.0 /* start Z coords from the radar (in km) */
29 
30 #define PXDIM 481 /* X-dim of PPI output (include center) */
31 #define PYDIM 481 /* Y-dim of PPI output (include center) */
32 #define PELDIM 20 /* EL-dim of output EL number (< ELDIM) */
33 #define PXKM0 -60.0 /* start X coords from the radar (in km) */
34 #define PYKM0 -60.0 /* start Y coords from the radar (in km) */
35 
36 #define RXDIM 241 /* X-dim of RHI output (include center) */
37 #define RZDIM 65 /* Z-dim of RHI output (include surface) */
38 #define RAZDIM 300 /* AZ-dim of RHI output (< AZDIM) */
39 #define RZKM0 0.0 /* start Z coords from the radar (in km) */
40 
41 typedef struct {
42  char data_name[32], site_name[32], sq_name[16];
43  int s_yr, s_mn, s_dy, s_hr, s_mi, s_sc;
44  int e_yr, e_mn, e_dy, e_hr, e_mi, e_sc;
45  int el_num, ray_num, range_num;
46  int range_res;
47  double latitude, longitude, altitude;
48  float start_az, start_el, end_az, end_el;
49  float mesh_offset;
51 
52 int16_t char2int16(void *input);
53 uint16_t char2uint16(void *input);
54 int32_t char2int32(void *input);
55 
56 int read_toshiba_mpr(char *in_file,
57  int opt_verbose,
58  mppawr_header *hd,
59  float az[ELDIM][AZDIM],
60  float el[ELDIM][AZDIM],
61  float rtdat[ELDIM][AZDIM][RDIM]);
62 
63 int decode_toshiba_mpr(size_t bufsize, unsigned char *buf,
64  int opt_verbose,
65  mppawr_header *hd,
66  float az[ELDIM][AZDIM],
67  float el[ELDIM][AZDIM],
68  float rtdat[ELDIM][AZDIM][RDIM]);
69 
70 int ggrads_ctl(char *c_name, char *g_name, int nx, int ny, int nz, int nt,
71  double xmin, double ymin, double zmin, double tmin,
72  double dx, double dy, double dz, double dt, double no_data,
73  int ihour, int imin, int iday, int imonth, int iyear,
74  char *c_var, char *c_memo);
mppawr_header::start_el
float start_el
Definition: read_toshiba_mpr.h:48
decode_toshiba_mpr
int decode_toshiba_mpr(size_t bufsize, unsigned char *buf, int opt_verbose, mppawr_header *hd, float az[ELDIM][AZDIM], float el[ELDIM][AZDIM], float rtdat[ELDIM][AZDIM][RDIM])
Definition: read_toshiba_mpr.c:152
mppawr_header::s_yr
int s_yr
Definition: read_toshiba_mpr.h:43
mppawr_header
Definition: read_toshiba_mpr.h:41
mppawr_header::ray_num
int ray_num
Definition: read_toshiba_mpr.h:45
read_toshiba_mpr
int read_toshiba_mpr(char *in_file, int opt_verbose, mppawr_header *hd, float az[ELDIM][AZDIM], float el[ELDIM][AZDIM], float rtdat[ELDIM][AZDIM][RDIM])
Definition: read_toshiba_mpr.c:109
char2int32
int32_t char2int32(void *input)
Definition: read_toshiba.c:50
mppawr_header::longitude
double longitude
Definition: read_toshiba_mpr.h:47
RDIM
#define RDIM
Definition: read_toshiba_mpr.h:5
ELDIM
#define ELDIM
Definition: read_toshiba_mpr.h:7
scale_atmos_grid_cartesc::dx
real(rp), public dx
Definition: scale_atmos_grid_cartesC.F90:39
mppawr_header::range_res
int range_res
Definition: read_toshiba_mpr.h:46
ggrads_ctl
int ggrads_ctl(char *c_name, char *g_name, int nx, int ny, int nz, int nt, double xmin, double ymin, double zmin, double tmin, double dx, double dy, double dz, double dt, double no_data, int ihour, int imin, int iday, int imonth, int iyear, char *c_var, char *c_memo)
mppawr_header::mesh_offset
float mesh_offset
Definition: read_toshiba_mpr.h:49
mppawr_header::e_yr
int e_yr
Definition: read_toshiba_mpr.h:44
char2int16
int16_t char2int16(void *input)
Definition: read_toshiba.c:22
scale_atmos_grid_cartesc::dy
real(rp), public dy
Definition: scale_atmos_grid_cartesC.F90:39
char2uint16
uint16_t char2uint16(void *input)
Definition: read_toshiba.c:36
scale_atmos_grid_cartesc::dz
real(rp), public dz
Definition: scale_atmos_grid_cartesC.F90:39
AZDIM
#define AZDIM
Definition: read_toshiba_mpr.h:6