Sub module for GVTDX procedures.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real, | public, | parameter | :: | pi | = | 3.14159265e0 |
Pi for real |
| real, | public, | parameter | :: | radius | = | 6.371e6 |
polar radius of the Earth (m) |
| complex, | public, | parameter | :: | img | = | (0.0, 1.0) |
Imaginary unit for real |
| double precision, | public, | parameter | :: | pi_dp | = | 3.14159265358979d0 |
Pi for double |
| double precision, | public, | parameter | :: | radius_dp | = | 6.371d6 |
polar radius of the Earth (m) |
| double precision, | public, | parameter | :: | omega_dp | = | 7.2918933286303412732d-5 |
rotational angular velocity of Earth (s-1) |
| complex(kind=kind(0d0)), | public, | parameter | :: | img_cdp | = | (0.0d0, 1.0d0) |
Imaginary unit for double |
Calculate a line integral (actually, sum for arguments)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nr |
Radial grid number |
||
| double precision, | intent(in) | :: | rdh(nr+1) |
R-coordinate [m] |
||
| double precision, | intent(in) | :: | gkrr(nr+1) |
Green function |
||
| double precision, | intent(in) | :: | div_r(nr+1) |
Integral of gkrr |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
Calculation of the Green function:
nval
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | rc |
Source radius |
||
| double precision, | intent(in) | :: | r |
Non-source radius |
||
| integer, | intent(in) | :: | nval |
Order number |
Check missing value in "val"
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in), | dimension(:,:) | :: | val |
Input |
|
| double precision, | intent(in) | :: | undef |
Undefined value |
Check missing value in "val"
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in), | dimension(:) | :: | val |
Input |
|
| double precision, | intent(in) | :: | undef |
Undefined value |
calculate arc distance between two points on the sphere
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | lon1 |
longitude1 (rad) |
||
| double precision, | intent(in) | :: | lat1 |
latitude1 (rad) |
||
| double precision, | intent(in) | :: | lon2 |
longitude2 (rad) |
||
| double precision, | intent(in) | :: | lat2 |
latitude2 (rad) |
||
| logical, | intent(in), | optional | :: | forcef |
truncating flag for numerical error, default = .false. (no truncating) |
count the line in the fname
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | fname |
counting the file name |
||
| integer, | intent(in), | optional | :: | funit |
file unit (default: 11) |
convert char to float
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | cval |
char |
Producing vortex structure with rmax, vmax, and umax
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | r(:) |
radius [m] |
||
| double precision, | intent(in) | :: | t(:) |
azimuthal angle [rad] |
||
| double precision, | intent(in) | :: | rmax |
radius of maximum tangential wind speed [m] |
||
| double precision, | intent(in) | :: | vmax |
maximum tangential wind speed [m s-1] |
||
| double precision, | intent(in) | :: | c1u |
coefficient 1 for radial wind [s-1] |
||
| double precision, | intent(in) | :: | c2u |
coefficient 2 for radial wind [s-1] |
||
| double precision, | intent(out) | :: | Vt(size(r),size(t)) |
Profile of tangential wind |
||
| double precision, | intent(out) | :: | Vr(size(r),size(t)) |
Profile of radial wind |
||
| double precision, | intent(in), | optional | :: | Vt_pert(:) |
perturbations of tangential wind [m s-1] |
|
| double precision, | intent(in), | optional | :: | Vr_pert(:) |
perturbations of radial wind [m s-1] |
|
| double precision, | intent(in), | optional | :: | Vt_pert_ang(:) |
angles of tangential wind [rad] |
|
| double precision, | intent(in), | optional | :: | Vr_pert_ang(:) |
angles of radial wind [rad] |
|
| logical, | intent(in), | optional | :: | ropt |
option for radial variation of perturbation Vt and Vr |
|
| logical, | intent(in), | optional | :: | dopt |
option for divergent components of perturbation Vt and Vr |
|
| double precision, | intent(out), | optional | :: | Vt_0(:) |
Radial profile of axisymmetric Vt [m s-1] |
|
| double precision, | intent(out), | optional | :: | Vr_0(:) |
Radial profile of axisymmetric Vr [m s-1] |
|
| double precision, | intent(out), | optional | :: | Uxm(2) |
Azimuthal averaged X-wind of wavenumber-1 component [m s-1] |
|
| double precision, | intent(out), | optional | :: | Vym(2) |
Azimuthal averaged Y-wind of wavenumber-1 component [m s-1] |
|
| logical, | intent(in), | optional | :: | flag_disp |
Producing vortex structure with rmax, vmax, and umax in Lee et al. (2006)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | r(:) |
radius [m] |
||
| double precision, | intent(in) | :: | t(:) |
azimuthal angle [rad] |
||
| double precision, | intent(in) | :: | rmax |
radius of maximum tangential wind speed [m] |
||
| double precision, | intent(in) | :: | zmax |
constant vorticity in the eye [s-1] |
||
| double precision, | intent(in) | :: | epsr |
distance of epsilon for WN2 [m] |
||
| double precision, | intent(in) | :: | Vt_pert_ang |
angles of tangential wind [rad] |
||
| double precision, | intent(out) | :: | Vt(size(r),size(t)) |
Profile of tangential wind |
||
| double precision, | intent(out) | :: | Vr(size(r),size(t)) |
Profile of radial wind |
Convert Vt and Vr to Vx and Vy on R-T coordinates
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | r(:) |
R-coordinate [m] |
||
| double precision, | intent(in) | :: | t(:) |
T-coordinate [rad] |
||
| double precision, | intent(in) | :: | Vt(size(r),size(t)) |
tangential wind component on R-T coordinates |
||
| double precision, | intent(in) | :: | Vr(size(r),size(t)) |
radial wind component on R-T coordinates |
||
| double precision, | intent(out) | :: | Vx(size(r),size(t)) |
X-component of wind on R-T coordinates |
||
| double precision, | intent(out) | :: | Vy(size(r),size(t)) |
Y-component of wind on R-T coordinates |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
Convert Vx and Vy to Vr and Vt on R-T coordinates
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | r(:) |
R-coordinate [m] |
||
| double precision, | intent(in) | :: | t(:) |
T-coordinate [rad] |
||
| double precision, | intent(in) | :: | Vx(size(r),size(t)) |
X-component of wind on R-T coordinates |
||
| double precision, | intent(in) | :: | Vy(size(r),size(t)) |
Y-component of wind on R-T coordinates |
||
| double precision, | intent(out) | :: | Vt(size(r),size(t)) |
tangential wind component on R-T coordinates |
||
| double precision, | intent(out) | :: | Vr(size(r),size(t)) |
radial wind component on R-T coordinates |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
Convert Vx and Vy to Vr and Vt on X-Y coordinates
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
X-coordinate [m] |
||
| double precision, | intent(in) | :: | y(:) |
Y-coordinate [m] |
||
| double precision, | intent(in) | :: | xc |
X component of the center [m] |
||
| double precision, | intent(in) | :: | yc |
Y component of the center [m] |
||
| double precision, | intent(in) | :: | Vx(size(x),size(y)) |
X-component of wind on X-Y coordinates |
||
| double precision, | intent(in) | :: | Vy(size(x),size(y)) |
Y-component of wind on X-Y coordinates |
||
| double precision, | intent(out) | :: | Vt(size(x),size(y)) |
tangential wind component on X-Y coordinates |
||
| double precision, | intent(out) | :: | Vr(size(x),size(y)) |
radial wind component on X-Y coordinates |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
Calculate Vx and Vy to Vd along with radar beams on X-Y coodinates
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
X-coordinate |
||
| double precision, | intent(in) | :: | y(:) |
Y-coordinate |
||
| double precision, | intent(in) | :: | rax |
X-coodinate of radar location |
||
| double precision, | intent(in) | :: | ray |
Y-coodinate of radar location |
||
| double precision, | intent(in) | :: | Vx(size(x),size(y)) |
X-component of wind on X-Y coordinates |
||
| double precision, | intent(in) | :: | Vy(size(x),size(y)) |
Y-component of wind on X-Y coordinates |
||
| double precision, | intent(out) | :: | Vraxy(size(x),size(y)) |
velocity along with beam on X-Y coordinates |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
Convert Vt and Vr to Vx and Vy on R-T coordinates
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | r(:) |
R-coordinate [m] |
||
| double precision, | intent(in) | :: | t(:) |
T-coordinate [rad] |
||
| double precision, | intent(in) | :: | td(size(r),size(t)) |
radar azimuthal angle on R-T coordinate [rad] |
||
| double precision, | intent(in) | :: | Vt(size(r),size(t)) |
tangential wind component on R-T coordinates |
||
| double precision, | intent(in) | :: | Vr(size(r),size(t)) |
radial wind component on R-T coordinates |
||
| double precision, | intent(out) | :: | Vra(size(r),size(t)) |
Velocity along beam on R-T coordinates |
||
| double precision, | intent(in), | optional | :: | undef |
undefined value |
Calculation of rotation and divergence from radial and tangential winds
divr =
curl =
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | r(:) |
radius [m] |
||
| double precision, | intent(in) | :: | t(:) |
angle [rad] |
||
| double precision, | intent(in) | :: | ur(size(r),size(t)) |
Ur [m/s] |
||
| double precision, | intent(in) | :: | vt(size(r),size(t)) |
Vt [m/s] |
||
| double precision, | intent(out) | :: | divr(size(r),size(t)) |
divergence [1/s] |
||
| double precision, | intent(out) | :: | curl(size(r),size(t)) |
rotation [1/s] |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
Rotate horizontal winds in the east-west and north-south directions to the storm-relative direction.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | thetad_tc |
Angle of the direction from the radar to the storm center [rad] |
||
| double precision, | intent(inout) | :: | Vx(:,:) |
Horizontal wind component in the east-west direction [m/s] |
||
| double precision, | intent(inout) | :: | Vy(size(Vx,1),size(Vx,2)) |
Horizontal wind component in the north-south direction [m/s] |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
Convert double to real
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | ival(:) |
Input |
||
| real, | intent(out) | :: | oval(size(ival)) |
Output |
Convert double to real
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | ival(:,:) |
Input |
||
| real, | intent(out) | :: | oval(size(ival,1),size(ival,2)) |
Output |
convert double to real
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | ival(:,:,:) |
input array |
||
| real, | intent(out) | :: | oval(size(ival,1),size(ival,2),size(ival,3)) |
output array |
convert real to double
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(in) | :: | ival(:,:) |
input array |
||
| double precision, | intent(out) | :: | oval(size(ival,1),size(ival,2)) |
output array |
Calculation of sum for 1D variable
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | val(:) |
input |
||
| double precision, | intent(out) | :: | res |
output |
||
| double precision, | intent(in), | optional | :: | undef |
add ival
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(inout) | :: | ioval(:,:) |
Base value |
||
| double precision, | intent(in) | :: | ival(size(ioval,1),size(ioval,2)) |
added |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
add ival
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(inout) | :: | ioval(:,:,:) |
Base value |
||
| double precision, | intent(in) | :: | ival(size(ioval,1),size(ioval,2),size(ioval,3)) |
added |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
subtract ival
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(inout) | :: | ioval(:,:) |
Base value |
||
| double precision, | intent(in) | :: | ival(size(ioval,1),size(ioval,2)) |
Subtracted |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
subtract ival
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(inout) | :: | ioval(:,:) |
Base value |
||
| real, | intent(in) | :: | ival(size(ioval,1),size(ioval,2)) |
Subtracted value |
||
| real, | intent(in), | optional | :: | undef |
Undefined value |
Rearrange 3d variable to 2d variable (k,i,j -> i*j,k)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | val3d(:,:,:) |
Input |
||
| double precision, | intent(out) | :: | val2d(size(val3d,2)*size(val3d,3),size(val3d,1)) |
Output |
Rearrange 2d variable to 1d variable (i,j -> i*j)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | val2d(:,:) |
Input |
||
| double precision, | intent(out) | :: | val1d(size(val2d,1)*size(val2d,2)) |
Output |
Display the maximum of the array val
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(in) | :: | val(:,:) |
Input 1 |
||
| real, | intent(in), | optional | :: | undef |
Undefined value |
|
| character(len=*), | intent(out), | optional | :: | cout |
Maximum value by character |
|
| real, | intent(out), | optional | :: | vout |
Maximum value by float |
Display the maximum of the difference between val1 and val2
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | val1(:,:) |
Input 1 |
||
| double precision, | intent(in) | :: | val2(size(val1,1),size(val1,2)) |
Input 2 |
||
| double precision, | intent(in), | optional | :: | undef |
Undefined value |
|
| character(len=*), | intent(out), | optional | :: | cout |
Maximum value by character |
|
| real, | intent(out), | optional | :: | vout |
Maximum value by float |
Standard output for message
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | message |
output message |
||
| character(len=*), | intent(in) | :: | routine_name |
called routine name |
||
| integer, | intent(in) | :: | mtype |
message type 0: message, -1: error, 1: warning |
Gauss-Jordan method with fully pivotting (from STPK)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | c(size(d),size(d)) |
Square matrix (array is the first elements) |
||
| double precision, | intent(in) | :: | d(:) |
Vector |
||
| double precision, | intent(inout) | :: | x(size(d)) |
Vector for unknown variables |
Calculate the inverse "xx" for the matrix "ax" (from STPK)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | ax(:,:) |
Input matrix |
||
| double precision, | intent(inout) | :: | xx(size(ax,1),size(ax,2)) |
Inverse |
Convert the Cartesian grid to polar grid with the origin of the storm center (from STPK) The procedure: (1) Define the given polar grid (r-theta) on the Cartesian grid (2) Search the 4 nearest points on the Cartesian grid (x-y) for each polar grid point (3) Performing the bilinear interpolation of the 4 values defined on the Cartesian grid to the polar grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
X-coordinate on the Cartesian grid |
||
| double precision, | intent(in) | :: | y(:) |
Y-coordinate on the Cartesian grid |
||
| double precision, | intent(in) | :: | xc |
X-component of the storm center |
||
| double precision, | intent(in) | :: | yc |
Y-component of the storm center |
||
| double precision, | intent(in) | :: | u(size(x),size(y)) |
Values defined on the Cartesian grid |
||
| double precision, | intent(in) | :: | r(:) |
R-coordinate on the polar grid with the origin (xc, yc). |
||
| double precision, | intent(in) | :: | theta(:) |
theta-coordinate of the polar grid with the origin (xc, yc) [rad] |
||
| double precision, | intent(out) | :: | v(size(r),size(theta)) |
Values converted to the polar grid |
||
| double precision, | intent(in), | optional | :: | undef |
Missing value for the outside of the polar grid area (default: -999.0) |
|
| double precision, | intent(in), | optional | :: | undefg |
Missing value for the inside of the polar grid area (default: -999.0) |
|
| logical, | intent(in), | optional | :: | stdopt |
Display debug messages. (default: .false. == No display) |
Convert polar grid with the origin of the storm center to the Cartesian grid (from STPK) The procedure: (1) Define the given Cartesian grid (x-y) on the polar grid (2) Search the 4 nearest points on the polar grid for each Cartesian grid point (3) Performing the bilinear interpolation of the 4 values defined on the polar grid to the Cartesian grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | r(:) |
R-coordinate on the polar grid with the origin (xc, yc). |
||
| double precision, | intent(in) | :: | theta(:) |
theta-coordinate of the polar grid with the origin (xc, yc) [rad] |
||
| double precision, | intent(in) | :: | v(size(r),size(theta)) |
Values defined on the polar grid |
||
| double precision, | intent(in) | :: | x(:) |
X-coordinate on the Cartesian grid |
||
| double precision, | intent(in) | :: | y(:) |
Y-coordinate on the Cartesian grid |
||
| double precision, | intent(in) | :: | xc |
X-component of the storm center |
||
| double precision, | intent(in) | :: | yc |
Y-component of the storm center |
||
| double precision, | intent(out) | :: | u(size(x),size(y)) |
Values converted to the Cartesian grid |
||
| double precision, | intent(in), | optional | :: | undef |
Missing value for the outside of the Cartesian grid area (default: -999.0) |
|
| double precision, | intent(in), | optional | :: | undefg |
Missing value for the inside of the Cartesian grid area (default: -999.0) |
|
| logical, | intent(in), | optional | :: | stdopt |
Display debug messages. (default: .false. == No display) |
Average x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
Input data |
||
| double precision, | intent(inout) | :: | ave |
Output mean value |
||
| double precision, | intent(in), | optional | :: | error |
Missing value |
|
| integer, | intent(inout), | optional | :: | nc |
Number of sampling data without error |
Floor function for the real grid points (from STPK)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
X-coordinate |
||
| double precision, | intent(in) | :: | y(:) |
Y-coordinate |
||
| double precision, | intent(in) | :: | pointx |
The X point in real |
||
| double precision, | intent(in) | :: | pointy |
The Y point in real |
||
| integer, | intent(out) | :: | i |
floor(pointx) |
||
| integer, | intent(out) | :: | j |
floor(pointy) |
||
| integer, | intent(in), | optional | :: | undeff |
In case of (x(1)>pointx or y(1)>pointy), the value returned to i and j (default = 0) |
|
| logical, | intent(in), | optional | :: | stdopt |
Display debug messages (default = .false. = Not display) |
Floor function for the real grid points (from STPK)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
X-coordinate |
||
| double precision, | intent(in) | :: | point |
The X point in real |
||
| integer, | intent(out) | :: | i |
floor(pointx) |
||
| integer, | intent(in), | optional | :: | undeff |
In case of (x(1)>pointx or y(1)>pointy), the value returned to i and j (default = 0) |
|
| logical, | intent(in), | optional | :: | stdopt |
Display debug messages (default = .false. = Not display) |
Convert the Cartesian (x-y) grid to the polar (r-t) grid (from STPK)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x |
X-coordinate [m] |
||
| double precision, | intent(in) | :: | y |
Y-coordinate [m] |
||
| double precision, | intent(in) | :: | xc |
X-coordinate of the center on the polar grid |
||
| double precision, | intent(in) | :: | yc |
Y-coordinate of the center on the polar grid |
||
| double precision, | intent(out) | :: | r |
Radius [m] |
||
| double precision, | intent(out) | :: | t |
Angle [rad] |
Convert the polar grid (r-t) to the Cartesian (x-y) grid (from STPK)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | r |
Radius [m] |
||
| double precision, | intent(in) | :: | t |
Angle [rad] |
||
| double precision, | intent(out) | :: | x |
X-coordinate [m] |
||
| double precision, | intent(out) | :: | y |
Y-coordinate [m] |
Perform bilinear interpolation to the "point" on the Cartesian (x-y) grid (from STPK)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(2) |
The nearest west and east points for "point" |
||
| double precision, | intent(in) | :: | y(2) |
The nearest south and north points for "point" |
||
| double precision, | intent(in) | :: | z(2,2) |
Values defined at (x,y). z(1,1) at x(1), y(1) z(1,2) at x(1), y(2) z(2,1) at x(2), y(1) z(2,2) at x(2), y(2) |
||
| double precision, | intent(in) | :: | point(2) |
The target point for the interpolation |
||
| double precision, | intent(out) | :: | val |
Interpolated value |
Perform linear interpolation to the "point" on the Cartesian (x) grid (from STPK)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(2) |
The nearest west and east points for "point" |
||
| double precision, | intent(in) | :: | y(2) |
Values defined at x. y(1) at x(1) y(2) at x(2) |
||
| double precision, | intent(in) | :: | point |
The target point for the interpolation |
||
| double precision, | intent(out) | :: | val |
Interpolated value |
Automatic interpolation for 2d data (continuous running of interpolation_2d)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
reference grid 1 |
||
| double precision, | intent(in) | :: | y(:) |
reference grid 2 |
||
| double precision, | intent(in) | :: | r(:) |
target grid 1 |
||
| double precision, | intent(in) | :: | q(:) |
target grid 2 |
||
| double precision, | intent(in) | :: | u(size(x),size(y)) |
reference data |
||
| double precision, | intent(inout) | :: | v(size(r),size(q)) |
interpolated data |
||
| double precision, | intent(in), | optional | :: | undef |
undefined value |
|
| logical, | intent(in), | optional | :: | stdopt |
Display debug messages. (default: .false. == No display) |
continuous running of interpo_search_1d
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
gradual increasing array |
||
| double precision, | intent(in) | :: | point(:) |
searching points |
||
| integer, | intent(inout) | :: | i(size(point)) |
floor for each "point" |
||
| integer, | intent(in), | optional | :: | undeff |
In case of (x(1)>pointx), the value returned to i (default = 0) |
|
| logical, | intent(in), | optional | :: | stdopt |
Display debug messages. (default: .false. == No display) |
continuous running of auto_interpo_search_1d
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
gradual increasing array 1 |
||
| double precision, | intent(in) | :: | y(:) |
gradual increasing array 2 |
||
| double precision, | intent(in) | :: | pointx(:) |
searching points for x |
||
| double precision, | intent(in) | :: | pointy(:) |
searching points for y |
||
| integer, | intent(inout) | :: | i(size(pointx)) |
floor for pointx |
||
| integer, | intent(inout) | :: | j(size(pointy)) |
floor for pointy |
||
| integer, | intent(in), | optional | :: | undeff |
In case of (x(1)>pointx or y(1)>pointy), the value returned to i and j (default = 0) |
|
| logical, | intent(in), | optional | :: | stdopt |
探索範囲が見つからない旨の標準出力を表示させないようにする. |
Get the max value (from STPK)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | var(:) |
Searched array |
||
| double precision, | intent(inout) | :: | mamv |
Max value in var |
||
| double precision, | intent(in), | optional | :: | undef |
undefined value |
Calculate RMSE of x for the "true_val" (from STPK)
Definition: RMSE
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
sampling data |
||
| double precision, | intent(in) | :: | true_val |
reference data |
||
| double precision, | intent(out) | :: | anor |
RMSE |
||
| double precision, | intent(in), | optional | :: | undef |
missing value |
calculate radial and azimuthal location at (lon1,lat1) on the polar coordinate with the center of (lon0,lat0)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | lon0 |
the center longitude (rad) |
||
| double precision, | intent(in) | :: | lat0 |
the center latitude (rad) |
||
| double precision, | intent(in) | :: | lon1 |
target longitude (rad) |
||
| double precision, | intent(in) | :: | lat1 |
target latitude (rad) |
||
| double precision, | intent(inout) | :: | r |
radial distance (m) |
||
| double precision, | intent(inout) | :: | theta |
azimuthal angle (rad) |
calculate (lon,lat) from radial and azimuthal grid (r,theta) on the polar coordinate with the origin of (lon0,lat0)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | r |
radial distance from (lon0,lat0) (m) |
||
| double precision, | intent(in) | :: | theta |
azimuthal angle from (lon0,lat0) (rad) |
||
| double precision, | intent(in) | :: | lon0 |
longitude of the center on the polar coordinate (rad) |
||
| double precision, | intent(in) | :: | lat0 |
latitude of the center on the polar coordinate (rad) |
||
| double precision, | intent(inout) | :: | lon |
target longitude (rad) |
||
| double precision, | intent(inout) | :: | lat |
target latitude (rad) |
read ASCII file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | fname |
file name in reading |
||
| integer, | intent(in) | :: | nx |
column number for fname |
||
| integer, | intent(in) | :: | ny |
line number for fname |
||
| character(len=*), | intent(out) | :: | val(nx,ny) |
read data |
||
| integer, | intent(in), | optional | :: | skip |
line number for skipping from the head |
|
| character(len=*), | intent(in), | optional | :: | forma |
Fortran format in reading |
|
| integer, | intent(in), | optional | :: | funit |
file unit |
read float data from 4-byte unformatted binary
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | file_name |
file name |
||
| integer, | intent(in) | :: | nx |
data number in x |
||
| integer, | intent(in) | :: | ny |
data number in y |
||
| integer, | intent(in) | :: | rec_num |
record number for reading data |
||
| real, | intent(out) | :: | var(nx,ny) | |||
| integer, | intent(in), | optional | :: | offset |
offset in reading |
|
| integer, | intent(in), | optional | :: | funit |
file unit |
read float data from 4-byte unformatted binary
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | file_name |
file name |
||
| integer, | intent(in) | :: | nx |
data number in x |
||
| integer, | intent(in) | :: | ny |
data number in y |
||
| integer, | intent(in) | :: | nz |
data number in z |
||
| integer, | intent(in) | :: | rec_num |
record number for reading data |
||
| real, | intent(out) | :: | var(nx,ny,nz) | |||
| integer, | intent(in), | optional | :: | offset |
offset in reading |
|
| integer, | intent(in), | optional | :: | funit |
file unit |
write float data from 4-byte unformatted binary
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | file_name |
file name |
||
| integer, | intent(in) | :: | nx |
data number in x |
||
| integer, | intent(in) | :: | ny |
data number in y |
||
| integer, | intent(in) | :: | nz |
data number in z |
||
| integer, | intent(in) | :: | rec_num |
record number for reading data |
||
| real, | intent(in) | :: | var(nx,ny,nz) |
output data |
||
| character(len=*), | intent(in), | optional | :: | mode |
option for output |
|
| integer, | intent(in), | optional | :: | funit |
file unit |
write float data from 4-byte unformatted binary
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | file_name |
file name |
||
| integer, | intent(in) | :: | nx |
data number in x |
||
| integer, | intent(in) | :: | ny |
data number in y |
||
| integer, | intent(in) | :: | rec_num |
record number for reading data |
||
| real, | intent(in) | :: | var(nx,ny) |
output data |
||
| character(len=*), | intent(in), | optional | :: | mode |
option for output |
|
| integer, | intent(in), | optional | :: | funit |
file unit |
Calculate gradient of "u" in one dimension based on the 2nd order central differential approximation:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
Axis point |
||
| double precision, | intent(in) | :: | u(size(x)) |
Target variable |
||
| double precision, | intent(out) | :: | dudx(size(x)) |
du/dx |
||
| double precision, | intent(in) | :: | undef |
undefined dudxue |
Calculate gradient of "u" in two dimensions based on the 2nd order central differential approximation:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | x(:) |
Axis point 1 |
||
| double precision, | intent(in) | :: | y(:) |
Axis point 2 |
||
| double precision, | intent(in) | :: | u(size(x),size(y)) | |||
| double precision, | intent(out) | :: | dudx(size(x),size(y)) | |||
| double precision, | intent(out) | :: | dudy(size(x),size(y)) | |||
| double precision, | intent(in), | optional | :: | undef |