Module for rearrangement of the radial grid and some operations for undef data in tools/ programs
Setting variable order in read/write file
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | VT | ||||
| integer, | public | :: | VR | ||||
| integer, | public | :: | VTs | ||||
| integer, | public | :: | VTc | ||||
| integer, | public | :: | VRs | ||||
| integer, | public | :: | VRc | ||||
| integer, | public | :: | phi | ||||
| integer, | public | :: | phis | ||||
| integer, | public | :: | phic | ||||
| integer, | public | :: | zeta | ||||
| integer, | public | :: | zetas | ||||
| integer, | public | :: | zetac |
Check the innermost radius of data with no undef If the innermost radius has not been found, the value of zero is returned.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | val(:,:) |
original data |
||
| double precision, | intent(in) | :: | undef |
missing value |
||
| integer, | intent(in), | optional | :: | nt_count |
minimum of data gridpoints default = size(val,2) |
|
| character(len=3), | intent(in), | optional | :: | dir |
direction for searching 'i2o': inner to outer radii (default) 'o2i': outer to inner radii |
|
| integer, | intent(out), | optional | :: | ncount |
available sampling number |
Check positive value of the innermost radius. If the innermost radius is negative, the element number located at the innermost positive radius is returned.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nrin |
A given element of the innermost radius |
||
| integer, | intent(in) | :: | nrout |
A given element of the outermost radius |
||
| double precision, | intent(in) | :: | radi(nrin:nrout) |
Original radial grids |
replace orgval with repval in ival2d array
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(inout) | :: | ival2d(:,:) |
base |
||
| double precision, | intent(in) | :: | orgval |
replace from this |
||
| double precision, | intent(in) | :: | repval |
replace to this |
replace ioval2d with undefv at the point undeflag == .true.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(inout) | :: | ioval2d(:,:) |
base |
||
| logical, | intent(in) | :: | undeflag(size(ioval2d,1),size(ioval2d,2)) |
flag for undefined point |
||
| double precision, | intent(in) | :: | undefv |
undefined value |
projection of a uniform wind [(ux,vy) on Cartesian grids] to the line-of-sight component along the radar beam
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | xcent |
Radar location (x or lon) |
||
| double precision, | intent(in) | :: | ycent |
Radar location (y or lat) |
||
| double precision, | intent(in) | :: | xx(:,:) |
x coordinate (x or lon) |
||
| double precision, | intent(in) | :: | yy(size(xx,1),size(xx,2)) |
y coordinate (y or lat) |
||
| double precision, | intent(in) | :: | ux |
X component of the uniform wind (m/s) |
||
| double precision, | intent(in) | :: | vy |
Y component of the uniform wind (m/s) |
||
| double precision, | intent(out) | :: | projV(size(xx,1),size(xx,2)) |
line-of-sight component on (xx,yy) |
||
| double precision, | intent(in) | :: | undef |
undefined value |
projection of a uniform wind [(ux,vy) on Cartesian grids] to the radial and tangential components on the polar coordinate
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | radi(:) |
radial grid (m) |
||
| double precision, | intent(in) | :: | thet(:) |
azimuthal grid (rad) |
||
| double precision, | intent(in) | :: | ux |
X-component of a uniform wind (m/s) |
||
| double precision, | intent(in) | :: | vy |
Y-component of a uniform wind (m/s) |
||
| double precision, | intent(out) | :: | projVR(size(radi),size(thet)) |
radial wind |
||
| double precision, | intent(out) | :: | projVT(size(radi),size(thet)) |
tangential wind |
||
| double precision, | intent(in) | :: | undef |
undefined value |
decomposition of VD to the components parallel and normal to the direction of thetad = 0
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | Vd(:,:) |
Doppler velocity (m/s) |
||
| double precision, | intent(in) | :: | thetad(size(Vd,1),size(Vd,2)) |
azimuthal angle from the line of radar to TC center (rad) |
||
| double precision, | intent(out) | :: | u_decomp(size(Vd,1),size(Vd,2)) |
parallel component |
||
| double precision, | intent(out) | :: | v_decomp(size(Vd,1),size(Vd,2)) |
normal component |
||
| double precision, | intent(in) | :: | undef |
undefined value |
rearrange the radial grids: 1. skip radii with few azimuthal sampling (less than "skip_thres") 2. rearrange the radial coordinate. [Note1]: r, rh, thetad, and Vra must be given by the same as the array number in the original. (that is, size(r_org) == size(r).) [Note2]: nr_out_org >= nr_out. Undef value is given in r, rh, thetad, and Vra outside nr_out.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | skip_thres |
threshold for unused radius |
||
| integer, | intent(in) | :: | nr_in |
innermost array number in radius |
||
| integer, | intent(in) | :: | nr_out_org |
outermost array number in radius (orig) |
||
| integer, | intent(in) | :: | nt |
azimuthal array number |
||
| logical, | intent(in), | dimension(nr_in:nr_out_org,1:nt) | :: | undef_grid |
flag of undefined grid (.true. is undef) |
|
| double precision, | intent(in), | dimension(nr_in:nr_out_org) | :: | r_org |
velocity radius (original) [m] |
|
| double precision, | intent(in), | dimension(nr_in:nr_out_org+1) | :: | rh_org |
potential radius (original) [m] |
|
| double precision, | intent(in), | dimension(nr_in:nr_out_org,1:nt) | :: | thetad_org |
azimuthal angle from radar (original) [rad] |
|
| double precision, | intent(in), | dimension(nr_in:nr_out_org,1:nt) | :: | Vra_org |
Doppler velocity (original) [m/s] |
|
| integer, | intent(out) | :: | nr_out |
outermost array number in radius (skip) |
||
| integer, | intent(out), | dimension(nr_in:nr_out_org) | :: | nn_grid |
grid number in rearranged each radius |
|
| double precision, | intent(out), | dimension(nr_in:nr_out_org) | :: | r |
velocity radius (skip) [m] |
|
| double precision, | intent(out), | dimension(nr_in:nr_out_org+1) | :: | rh |
potential radius (skip) [m] |
|
| double precision, | intent(out), | dimension(nr_in:nr_out_org,1:nt) | :: | thetad |
azimuthal angle from radar (skip) [rad] |
|
| double precision, | intent(out), | dimension(nr_in:nr_out_org,1:nt) | :: | Vra |
Doppler velocity (skip) [m/s] |
recover the retrieved values from the rearranged to original radii.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nrotmin |
minimum wavenumber for rotational components |
||
| integer, | intent(in) | :: | nrot |
maximum wavenumber for rotational components |
||
| integer, | intent(in) | :: | ndivmin |
minimum wavenumber for divergent components |
||
| integer, | intent(in) | :: | ndiv |
maximum wavenumber for divergent components |
||
| integer, | intent(in) | :: | nr_in |
innermost array number in radius |
||
| integer, | intent(in) | :: | nr_out |
outermost array number in radius (skip) |
||
| integer, | intent(in) | :: | nr_out_org |
outermost array number in radius (orig) |
||
| integer, | intent(in) | :: | nt |
azimuthal array number |
||
| double precision, | intent(in) | :: | undef |
undefined value |
||
| logical, | intent(in), | dimension(nr_in:nr_out_org,1:nt) | :: | undef_grid |
flag of undefined grid (.true. is undef) |
|
| integer, | intent(in), | dimension(nr_in:nr_out_org) | :: | nn_grid |
grid number in rearranged each radius |
|
| double precision, | intent(inout), | dimension(nr_in:nr_out_org,1:nt) | :: | VTtot_rt_t | ||
| double precision, | intent(inout), | dimension(nr_in:nr_out_org,1:nt) | :: | VRtot_rt_t | ||
| double precision, | intent(inout), | dimension(nr_in:nr_out_org,1:nt) | :: | VRT0_rt_t | ||
| double precision, | intent(inout), | dimension(nr_in:nr_out_org,1:nt) | :: | VDR0_rt_t | ||
| double precision, | intent(inout), | dimension(nrotmin:nrot,nr_in:nr_out_org,1:nt) | :: | VRTn_rt_t | ||
| double precision, | intent(inout), | dimension(nrotmin:nrot,nr_in:nr_out_org,1:nt) | :: | VRRn_rt_t | ||
| double precision, | intent(inout), | dimension(ndivmin:ndiv,nr_in:nr_out_org,1:nt) | :: | VDTm_rt_t | ||
| double precision, | intent(inout), | dimension(ndivmin:ndiv,nr_in:nr_out_org,1:nt) | :: | VDRm_rt_t | ||
| double precision, | intent(inout), | dimension(nr_in:nr_out_org,1:nt) | :: | VRT0_GVTD_rt_t | ||
| double precision, | intent(inout), | dimension(nr_in:nr_out_org,1:nt) | :: | VDR0_GVTD_rt_t | ||
| double precision, | intent(inout), | dimension(nrotmin:nrot,nr_in:nr_out_org) | :: | VRTns_r | ||
| double precision, | intent(inout), | dimension(nrotmin:nrot,nr_in:nr_out_org) | :: | VRTnc_r | ||
| double precision, | intent(inout), | dimension(nrotmin:nrot,nr_in:nr_out_org) | :: | VRRns_r | ||
| double precision, | intent(inout), | dimension(nrotmin:nrot,nr_in:nr_out_org) | :: | VRRnc_r | ||
| double precision, | intent(inout), | dimension(nr_in:nr_out_org,1:nt) | :: | Vn_0_rt_t | ||
| double precision, | intent(inout), | dimension(nrotmin:nrot,nr_in:nr_out_org,1:nt) | :: | phin_rt_t | ||
| double precision, | intent(inout), | dimension(nrotmin:nrot,nr_in:nr_out_org,1:nt) | :: | zetan_rt_t | ||
| double precision, | intent(inout), | dimension(nrotmin:nrot,nr_in:nr_out_org) | :: | zetans_r | ||
| double precision, | intent(inout), | dimension(nrotmin:nrot,nr_in:nr_out_org) | :: | zetanc_r |
check missing grids
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | vval(:,:) |
input data |
||
| double precision, | intent(in) | :: | undefv |
undefined value |
||
| logical, | intent(out) | :: | undeflag(size(vval,1),size(vval,2)) |
undefined flag (.true.) |