grid_tools
1.11.0
|
Suite of routines to perform the 2-parameter family of Extended Schmidt Gnomonic (ESG) regional grid mappings, and to optimize the the two parameters, A and K, of those mappings for a given rectangular domain's principal (median) semi-arcs with respect to a domain-averaged measure of distortion. More...
Data Types | |
interface | bestesg_geo |
interface | bestesg_map |
interface | gaulegh |
interface | get_edges |
interface | get_meanq |
interface | get_qofv |
interface | get_qx |
interface | gtoxm_ak_dd |
interface | gtoxm_ak_rr |
interface | guessak_geo |
interface | guessak_map |
interface | hgrid_ak |
interface | hgrid_ak_dc |
interface | hgrid_ak_dd |
interface | hgrid_ak_rc |
interface | hgrid_ak_rr |
interface | xctoxm_ak |
interface | xctoxs |
interface | xmtog_ak_dd |
interface | xmtog_ak_rr |
interface | xmtoxc_ak |
interface | xmtoxt |
interface | xstoxc |
interface | xstoxt |
interface | xttoxm |
interface | xttoxs |
interface | zmtozt |
interface | zttozm |
Functions/Subroutines | |
subroutine, public | bestesg_geo (lam, garcx, garcy, a, k, marcx, marcy, q, ff) |
Get the best Extended Schmidt Gnomonic parameter, (a,k), for the given geographical half-spans, garcx and garcy, as well as the corresponding map-space half-spans, garcx and garcy (in degrees) and the quality diagnostic, Q(lam) for this optimal parameter choice. More... | |
subroutine, public | bestesg_map (lam, marcx, marcy, a, k, garcx, garcy, q, ff) |
Get the best Extended Schmidt Gnomonic parameter, (a,k), for the given map-coordinate half-spans, marcx and marcy, as well as the corresponding geographical half-spans, garcx and garcy (in degrees) and the quality diagnostic, Q(lam) for this optimal parameter choice. More... | |
subroutine | gaulegh (m, x, w) |
This Gauss-Legendre quadrature integrates exactly any even polynomial up to degree m*4-2 in the half-interval [0,1]. More... | |
subroutine, public | get_edges (arcx, arcy, edgex, edgey) |
For angles (degrees) of the arcs spanning the halfwidths between the region's center and its x and y edges, get the two cartesian vectors that represent the locations of these edge midpoints in the positive x and y directions. More... | |
subroutine | get_meanqd (ngh, lam, xg, wg, ak, ma, q, qdak, qdma, ga, gadak, gadma, ff) |
For a parameter vector, ak and a map-space domain-parameter vector, ma, return the lambda-parameterized quality diagnostic, Q, and the geographic domain-parameter vector ga. More... | |
subroutine | get_meanqs (n, ngh, lam, xg, wg, aks, mas, qs, ff) |
Like getmeanqd, except for n different values, aks, of ak and n different values, mas of ma, and without any of the derivatives. More... | |
subroutine | get_qofv (lam, v1, v2, v3, v4, q) |
The quadratic quantity Q depends linearly on v1 and v4 (which are already quadratic diagnostics of EL) and quadratically on v2 and v3 (which are linear diagnostics of EL). More... | |
subroutine | get_qofvd (lam, v2, v3, v1d, v2d, v3d, v4d, qd) |
Like get_qofv, but for (only) the 2-vector derivatives of Q. More... | |
subroutine | get_qsofvs (n, lam, v1s, v2s, v3s, v4s, qs) |
General util to convert value. More... | |
subroutine | get_qx (j0, v1, v2, v3, v4) |
From a jacobian matrix, j0, get a sufficient set of v. More... | |
subroutine | get_qxd (j0, j0d, v1, v2, v3, v4, v1d, v2d, v3d, v4d) |
From a jacobian matrix, j0, and its derivative, j0d, get a sufficient set of v. More... | |
subroutine | gtoxm_ak_dd_g (A, K, pdlat, pdlon, pdazi, delx, dely, dlat, dlon, xm, ff) |
Like gtoxm_ak_rr_g, except lat, lon, azimuth, are expressed in degrees. More... | |
subroutine | gtoxm_ak_dd_m (A, K, pdlat, pdlon, pdazi, dlat, dlon, xm, ff) |
Like gtoxm_ak_rr_m, except lat, lon, azimuth, are expressed in degrees. More... | |
subroutine | gtoxm_ak_rr_g (A, K, plat, plon, pazi, delx, dely, lat, lon, xm, ff) |
Given the map specification (angles in radians), the grid spacing (in map-space units) and the sample lat-lon (in radian), return the the image in map space in a 2-vector in grid units. More... | |
subroutine | gtoxm_ak_rr_m (A, K, plat, plon, pazi, lat, lon, xm, ff) |
Given the map specification (angles in radians), the grid spacing (in map-space units) and the sample lat-lon (in radian), return the the image in map space in a 2-vector in grid units. More... | |
subroutine | guessak_geo (asp, arc, ak) |
Given an aspect ratio, asp<=1, and major semi-axis, arc, in geographical (degree) units measured along the rectangle's median, return a first guess for the parameter vector, ak, approximately optimal for the domain of the given dimensions. More... | |
subroutine | guessak_map (asp, tmarcx, ak) |
Given an aspect ratio, asp<=1, and major semi-axis, arc, in map-space nondimensional units, return a first guess for the parameter vector, ak, approximately optimal for the domain of the given dimensions. More... | |
subroutine, public | hgrid_ak (lx, ly, nx, ny, a, k, plat, plon, pazi, re, delxre, delyre, glat, glon, garea, ff) |
Like hgrid_ak_rr_c except the argument list includes the earth radius, re, and this is used to express the map-space grid increments in the dimensional units, delxre, delyre on entry, and to express the grid cell areas, garea, in dimensional units upon return. More... | |
subroutine | hgrid_ak_c (lx, ly, nx, ny, a, k, plat, plon, pazi, re, delxre, delyre, glat, glon, garea, dx, dy, dangle_dx, dangle_dy, ff) |
Like hgrid_ak_rr_c except the argument list includes the earth radius, re, and this is used to express the map-space grid increments in the dimensional units, delxre, delyre on entry, and to express the grid cell areas, garea, and the x- and y- grid steps, dx and dy, in dimensional units upon return. More... | |
subroutine, public | hgrid_ak_dc (lx, ly, nx, ny, a, k, pdlat, pdlon, pdazi, delx, dely, xc, xcd, garea, ff) |
Use a and k as the parameters of an Extended Schmidt-transformed Gnomonic (ESG) mapping centered at (pdlat,pdlon) and twisted about this center by an azimuth angle of pdazi counterclockwise (these angles in degrees). More... | |
subroutine, public | hgrid_ak_dd (lx, ly, nx, ny, a, k, pdlat, pdlon, pdazi, delx, dely, gdlat, gdlon, garea, ff) |
Use a and k as the parameters of an Extended Schmidt-transformed Gnomonic (ESG) mapping centered at (pdlat,pdlon) and twisted about this center by an azimuth angle of pdazi counterclockwise (these angles in degrees). More... | |
subroutine | hgrid_ak_dd_c (lx, ly, nx, ny, a, k, pdlat, pdlon, pdazi, delx, dely, gdlat, gdlon, garea, dx, dy, dangle_dx, dangle_dy, ff) |
Like hgrid_ak_rr_c, except all the angle arguments (but not delx,dely) are in degrees instead of radians. More... | |
subroutine, public | hgrid_ak_rc (lx, ly, nx, ny, A, K, plat, plon, pazi, delx, dely, xc, xcd, garea, ff) |
Use a and k as the parameters of an Extended Schmidt-transformed Gnomonic (ESG) mapping centered at (plat,plon) and twisted about this center by an azimuth angle of pazi counterclockwise (these angles in radians). More... | |
subroutine, public | hgrid_ak_rr (lx, ly, nx, ny, A, K, plat, plon, pazi, delx, dely, glat, glon, garea, ff) |
Use a and k as the parameters of an Extended Schmidt-transformed Gnomonic (ESG) mapping centered at (plat,plon) and twisted about this center by an azimuth angle of pazi counterclockwise (these angles in radians). More... | |
subroutine | hgrid_ak_rr_c (lx, ly, nx, ny, a, k, plat, plon, pazi, delx, dely, glat, glon, garea, dx, dy, angle_dx, angle_dy, ff) |
Use a and k as the parameters of an extended Schmidt-transformed gnomonic (ESG) mapping centered at (plat,plon) and twisted about this center by an azimuth angle of pazi counterclockwise (these angles in radians). More... | |
subroutine, public | xctoxm_ak (a, k, xc, xm, ff) |
Inverse mapping of xmtoxc_ak. More... | |
subroutine | xctoxs (xc, xs) |
Inverse of xstoxc. More... | |
subroutine | xmtog_ak_dd_g (A, K, pdlat, pdlon, pdazi, delx, dely, xm, dlat, dlon, ff) |
Like xmtog_ak_rr_g, except lat, lon, azimuth, are expressed in degrees. More... | |
subroutine | xmtog_ak_dd_m (A, K, pdlat, pdlon, pdazi, xm, dlat, dlon, ff) |
Like xmtog_ak_rr_m, except lat, lon, azimuth, are expressed in degrees. More... | |
subroutine | xmtog_ak_rr_g (A, K, plat, plon, pazi, delx, dely, xm, lat, lon, ff) |
For an ESG map with parameters, (A,K), and geographical orientation, given by plon,plat,pazi (radians), and given a point in grid-space units as the 2-vector, xm, return the geographical coordinates, lat, lon, (radians) of this point. More... | |
subroutine | xmtog_ak_rr_m (A, K, plat, plon, pazi, xm, lat, lon, ff) |
Given the ESG map specified by parameters (A,K) and geographical center and orientation, plat,plon,pazi (radians), and a position, in map-space coordinates given by the 2-vector, xm, return the geographical coordinates, lat and lon (radians). More... | |
subroutine, public | xmtoxc_ak (a, k, xm, xc, xcd, ff) |
Assuming the A-K parameterization of the Extended Schmidt-transformed Gnomonic (ESG) mapping, and given a map-space 2-vector, xm, find the corresponding cartesian unit 3-vector and its derivative wrt xm, jacobian matrix, xcd. More... | |
subroutine | xmtoxc_vak (ak, xm, xc, xcd, ff) |
Assuming the vector AK parameterization of the Extended Schmidt-transformed Gnomonic (ESG) mapping with parameter vector, and given a map-space 2-vector, xm, find the corresponding cartesian unit 3-vector and its derivative wrt xm, the Jacobian matrix, xcd. More... | |
subroutine | xmtoxc_vak1 (ak, xm, xc, xcd, xc1, xcd1, ff) |
Like xmtoxc_vak, _ak, but also return derivatives wrt ak. More... | |
subroutine | xmtoxt (a, xm, xt, xtd, ff) |
Like zmtozt, but for 2-vector xm and xt, and 2*2 diagonal Jacobian xtd. More... | |
subroutine | xmtoxt1 (a, xm, xt, xtd, xt1, xtd1, ff) |
Like zmtozt1, but for 2-vector xm and xt, and 2*2 diagonal Jacobian xtd Also, the derivatives, wrt a, of these quantities. More... | |
subroutine | xstoxc (xs, xc, xcd) |
Standard transformation from polar stereographic map coordinates, xs, to cartesian, xc, assuming the projection axis is polar. More... | |
subroutine | xstoxc1 (xs, xc, xcd, xcdd) |
Standard transformation from polar stereographic map coordinates, xs, to cartesian, xc, assuming the projection axis is polar. More... | |
subroutine | xstoxt (k, xs, xt, ff) |
Inverse of xttoxs. More... | |
subroutine | xttoxm (a, xt, xm, ff) |
Inverse of xmtoxt. More... | |
subroutine | xttoxs (k, xt, xs, xsd, ff) |
Scaled gnomonic plane xt to standard stereographic plane xs. More... | |
subroutine | xttoxs1 (k, xt, xs, xsd, xsdd, xs1, xsd1, ff) |
Like xttoxs, but also, return the derivatives, wrt K, of xs and xsd. More... | |
subroutine | zmtozt (a, zm, zt, ztd, ff) |
Evaluate the function, zt = tan(sqrt(A)*z)/sqrt(A), and its derivative, ztd, for positive and negative A and for the limiting case, A –> 0. More... | |
subroutine | zmtozt1 (a, zm, zt, ztd, zt1, ztd1, ff) |
Like zmtozt, but also, get the derivative with respect to a, zt1 of zt, and ztd1 of ztd. More... | |
subroutine | zttozm (a, zt, zm, ff) |
Inverse of zmtozt. More... | |
Suite of routines to perform the 2-parameter family of Extended Schmidt Gnomonic (ESG) regional grid mappings, and to optimize the the two parameters, A and K, of those mappings for a given rectangular domain's principal (median) semi-arcs with respect to a domain-averaged measure of distortion.
This criterion is itself endowed with a parameter, lam (for "lambda" in [0,1) ) which gives weight to additional weight areal inhomogeneities instead of treating all distortion components equally.
subroutine, public pesg::bestesg_geo | ( | real(dp), intent(in) | lam, |
real(dp), intent(in) | garcx, | ||
real(dp), intent(in) | garcy, | ||
real(dp), intent(out) | a, | ||
real(dp), intent(out) | k, | ||
real(dp), intent(out) | marcx, | ||
real(dp), intent(out) | marcy, | ||
real(dp), intent(out) | q, | ||
logical, intent(out) | ff | ||
) |
Get the best Extended Schmidt Gnomonic parameter, (a,k), for the given geographical half-spans, garcx and garcy, as well as the corresponding map-space half-spans, garcx and garcy (in degrees) and the quality diagnostic, Q(lam) for this optimal parameter choice.
If this process fails for any reason, the failure is alerted by a raised flag, FF, and the other output arguments must then be taken to be meaningless.
The diagnostic Q measures the variance over the domain of a local measure of grid distortion. A logarithmic measure of local grid deformation is give by L=log(J^t.J)/2, where J is the mapping Jacobian matrix, dX/dx, where X is the cartesian unit 3-vector representation of the image of the mapping of the map-coordinate 2-vector, x. The Frobenius squared-norm, Trace(L*L), of L is the basis for the simplest (lam=0) definition of the variance of L, but (Trace(L))**2 is another. Here, we weight both contributions, by lam and (1-lam) respectively, with 0 <= lam <1, to compute the variance Q(lam,a,k), and search for the (a,k) that minimizes this Q.
The domain averages are computed by double Gauss-Legendre quadrature (i.e., in both the x and y directions), but restricted to a mere quadrant of the domain (since bilateral symmetry pertains across both domain medians, yielding a domain mean L that is strictly diagonal.
[in] | lam | |
[in] | garcx | map-space half-spans |
[in] | garcy | map-space half-spans |
[out] | a | Extended Schmidt Gnomonic parameter |
[out] | k | Extended Schmidt Gnomonic parameter |
[out] | marcx | |
[out] | marcy | |
[out] | q | |
[out] | ff | failure flag |
Definition at line 903 of file pesg.f90.
References pietc::ms18, pietc::ms36, pietc::ms54, pietc::ms72, pietc::o5, pietc::s18, pietc::s36, pietc::s54, pietc::s72, and pietc::u5.
subroutine, public pesg::bestesg_map | ( | real(dp), intent(in) | lam, |
real(dp), intent(in) | marcx, | ||
real(dp), intent(in) | marcy, | ||
real(dp), intent(out) | a, | ||
real(dp), intent(out) | k, | ||
real(dp), intent(out) | garcx, | ||
real(dp), intent(out) | garcy, | ||
real(dp), intent(out) | q, | ||
logical, intent(out) | ff | ||
) |
Get the best Extended Schmidt Gnomonic parameter, (a,k), for the given map-coordinate half-spans, marcx and marcy, as well as the corresponding geographical half-spans, garcx and garcy (in degrees) and the quality diagnostic, Q(lam) for this optimal parameter choice.
If this process fails for any reason, the failure is alerted by a raised flag, FF, and the other output arguments must then be taken to be meaningless.
The diagnostic Q measures the variance over the domain of a local measure of grid distortion. A logarithmic measure of local grid deformation is give by L=log(J^t.J)/2, where J is the mapping Jacobian matrix, dX/dx, where X is the cartesian unit 3-vector representation of the image of the mapping of the map-coordinate 2-vector, x. The Frobenius squared-norm, Trace(L*L), of L is the basis for the simplest (lam=0) definition of the variance of L, but (Trace(L))**2 is another. Here, we weight both contributions, by lam and (1-lam) respectively, with 0 <= lam <1, to compute the variance Q(lam,a,k), and search for the (a,k) that minimizes this Q.
The domain averages are computed by double Gauss-Legendre quadrature (i.e., in both the x and y directions), but restricted to a mere quadrant of the domain (since bilateral symmetry pertains across both domain medians, yielding a domain mean L that is strictly diagonal.
[in] | lam | |
[in] | marcx | map-coordinate half-spans |
[in] | marcy | map-coordinate half-spans |
[out] | a | Extended Schmidt Gnomonic parameter |
[out] | k | Extended Schmidt Gnomonic parameter |
[out] | garcx | geographical half-spans |
[out] | garcy | geographical half-spans |
[out] | q | |
[out] | ff | failure flag |
Definition at line 1073 of file pesg.f90.
References pietc::ms18, pietc::ms36, pietc::ms54, pietc::ms72, pietc::o5, pietc::s18, pietc::s36, pietc::s54, pietc::s72, and pietc::u5.
|
private |
This Gauss-Legendre quadrature integrates exactly any even polynomial up to degree m*4-2 in the half-interval [0,1].
This code is liberally adapted from the algorithm given in Press et al., Numerical Recipes.
m | number of nodes in half-interval |
x | nodes and weights |
w | nodes and weights |
Definition at line 1852 of file pesg.f90.
References pietc::pih, pietc::u0, pietc::u1, and pietc::u2.
subroutine, public pesg::get_edges | ( | real(dp), intent(in) | arcx, |
real(dp), intent(in) | arcy, | ||
real(dp), dimension(3), intent(out) | edgex, | ||
real(dp), dimension(3), intent(out) | edgey | ||
) |
For angles (degrees) of the arcs spanning the halfwidths between the region's center and its x and y edges, get the two cartesian vectors that represent the locations of these edge midpoints in the positive x and y directions.
[in] | arcx | Center-relative angle (degrees) of edge midpoint in +x |
[in] | arcy | Center-relative angle (degrees) of edge midpoint in +y |
[out] | edgex | region's +x edge midpoint as cartesian unit 3-vector |
[out] | edgey | region's +y edge midpoint as cartesian unit 3-vector |
Definition at line 489 of file pesg.f90.
References pietc::dtor, and pietc::u0.
subroutine pesg::get_meanqd | ( | integer(spi), intent(in) | ngh, |
real(dp), intent(in) | lam, | ||
real(dp), dimension(ngh), intent(in) | xg, | ||
real(dp), dimension(ngh), intent(in) | wg, | ||
real(dp), dimension(2), intent(in) | ak, | ||
real(dp), dimension(2), intent(in) | ma, | ||
real(dp), intent(out) | q, | ||
real(dp), dimension(2), intent(out) | qdak, | ||
real(dp), dimension(2), intent(out) | qdma, | ||
real(dp), dimension(2), intent(out) | ga, | ||
real(dp), dimension(2,2), intent(out) | gadak, | ||
real(dp), dimension(2,2), intent(out) | gadma, | ||
logical, intent(out) | ff | ||
) |
For a parameter vector, ak and a map-space domain-parameter vector, ma, return the lambda-parameterized quality diagnostic, Q, and the geographic domain-parameter vector ga.
Lambda is given by lam <1. Also, return the derivatives, qdak and qdma, of Q wrt ak and ma, and the derivatives gadak and gadma, of ga wrt ak and ma.
The domain averages of Q are accurately computed by bi-Gauss-Legendre quadrature over the positive quadrant of the domain (exploiting the symmetry) of the four constituent terms, v1, v2, v3, v4, from which the mean Q is computed using a quadratic formula of these constituents. The number of Gauss points in eaxh half-interval is ngh, and the nodes themselves are, in proportion to the half-interval, at xg. the normalized gauss weights are wg.
If a failure occurs, colmputations cease immediately and a failure flag, FF, is raised on return.
[in] | ngh | |
[in] | lam | Lambda |
[in] | xg | |
[in] | wg | |
[in] | ak | parameter vector |
[in] | ma | map-space domain-parameter vector |
[out] | q | lambda-parameterized quality diagnostic |
[out] | qdak | derivatives value |
[out] | qdma | derivatives value |
[out] | ga | geographic domain-parameter vector |
[out] | gadak | |
[out] | gadma | |
[out] | ff | error flag |
Definition at line 604 of file pesg.f90.
References pietc::rtod, and pietc::u0.
|
private |
|
private |
The quadratic quantity Q depends linearly on v1 and v4 (which are already quadratic diagnostics of EL) and quadratically on v2 and v3 (which are linear diagnostics of EL).
EL = (1/2)log(G), where G=J^T.J, J the jacobian.
[in] | lam | |
[in] | v1 | quadratic diagnostics of EL |
[in] | v2 | linear diagnostics of EL |
[in] | v3 | linear diagnostics of EL |
[in] | v4 | quadratic diagnostics of EL |
[out] | q | quadratic quantity |
Definition at line 729 of file pesg.f90.
References pietc::u1.
|
private |
|
private |
|
private |
From a jacobian matrix, j0, get a sufficient set of v.
. diagnostics such that, from averages of these v, we can later compute the collective variance of Q(lam) that they imply for any choice of the "lambda" parameter, lam. Note that v1 and v4 are quadratic diagnostics of EL, while v2 and v3 are linear.
[in] | j0 | jacobian matrix |
[out] | v1 | quadratic diagnostics of EL |
[out] | v2 | linear diagnostics of EL |
[out] | v3 | linear diagnostics of EL |
[out] | v4 | quadratic diagnostics of EL |
subroutine pesg::get_qxd | ( | real(dp), dimension(3,2), intent(in) | j0, |
real(dp), dimension(3,2,2), intent(in) | j0d, | ||
real(dp), intent(out) | v1, | ||
real(dp), intent(out) | v2, | ||
real(dp), intent(out) | v3, | ||
real(dp), intent(out) | v4, | ||
real(dp), dimension(2), intent(out) | v1d, | ||
real(dp), dimension(2), intent(out) | v2d, | ||
real(dp), dimension(2), intent(out) | v3d, | ||
real(dp), dimension(2), intent(out) | v4d | ||
) |
From a jacobian matrix, j0, and its derivative, j0d, get a sufficient set of v.
. diagnostics such that, from average of these diagnostics, we can later compute the collective variance of Q and its derivative.
[in] | j0 | jacobian matrix |
[in] | j0d | derivative of j0 |
[in] | v1 | |
[in] | v2 | |
[in] | v3 | |
[in] | v4 | |
[in] | v1d | |
[in] | v2d | |
[in] | v3d | |
[in] | v4d |
|
private |
Like gtoxm_ak_rr_g, except lat, lon, azimuth, are expressed in degrees.
[in] | a | parameter of the ESG mapping |
[in] | k | parameter of the ESG mapping |
[in] | pdlat | degrees latitude defining mapping projection center |
[in] | pdlon | degrees longitude defining mapping projection center |
[in] | pdazi | Azimuth of mapping orientation at its center |
[in] | delx | central x-spacing of the grid in radians |
[in] | dely | central y-spacing of the grid in radians |
[in] | dlat | degrees latitude of a point to be mapped |
[in] | dlon | degrees longitude of a point to be mapped |
[out] | xm | 2-vector image of the point in center-relative grid units |
[out] | ff | failure flag |
Definition at line 1984 of file pesg.f90.
References pietc::dtor, and gtoxm_ak_rr_g().
|
private |
Like gtoxm_ak_rr_m, except lat, lon, azimuth, are expressed in degrees.
[in] | a | parameter of the ESG mapping |
[in] | k | parameter of the ESG mapping |
[in] | pdlat | degrees latitude defining mapping center |
[in] | pdlon | degrees longitude defining mapping center |
[in] | pdazi | Azimuth of mapping orientation at its center |
[in] | dlat | degrees latitude of point to be mapped |
[in] | dlon | degrees longitude of point to be mapped |
[out] | xm | 2-vector center-relative map space image of the point |
[out] | ff | failure flag |
Definition at line 1955 of file pesg.f90.
References pietc::dtor, and gtoxm_ak_rr_m().
subroutine pesg::gtoxm_ak_rr_g | ( | real(dp), intent(in) | A, |
real(dp), intent(in) | K, | ||
real(dp), intent(in) | plat, | ||
real(dp), intent(in) | plon, | ||
real(dp), intent(in) | pazi, | ||
real(dp), intent(in) | delx, | ||
real(dp), intent(in) | dely, | ||
real(dp), intent(in) | lat, | ||
real(dp), intent(in) | lon, | ||
real(dp), dimension(2), intent(out) | xm, | ||
logical, intent(out) | ff | ||
) |
Given the map specification (angles in radians), the grid spacing (in map-space units) and the sample lat-lon (in radian), return the the image in map space in a 2-vector in grid units.
If the transformation is invalid, return a .true. failure flag.
[in] | a | parameter of the ESG mapping |
[in] | k | parameter of the ESG mapping |
[in] | plat | radians latitude defining mapping projection center |
[in] | plon | radians longitude defining mapping projection center |
[in] | pazi | Azimuth of mapping orientation at its center |
[in] | delx | central x-spacing of the grid in radians |
[in] | dely | central y-spacing of the grid in radians |
[in] | lat | radians latitude of a point to be mapped |
[in] | lon | radians longitude of a point to be mapped |
[out] | xm | 2-vector map space image in center-relative grid units |
[out] | ff | failure flag |
Definition at line 1933 of file pesg.f90.
References gtoxm_ak_rr_m().
Referenced by gtoxm_ak_dd_g().
|
private |
Given the map specification (angles in radians), the grid spacing (in map-space units) and the sample lat-lon (in radian), return the the image in map space in a 2-vector in grid units.
If the transformation is invalid, return a .true. failure flag.
[in] | a | parameters of an ESG mapping |
[in] | k | parameters of an ESG mapping |
[in] | plat | radians latitude defining mapping projection center |
[in] | plon | radians longitude defining mapping projection center |
[in] | pazi | Aximuth of mapping orientation at its center |
[in] | lat | radians latitude of a point to be mapped |
[in] | lon | radians longitude of a point to be mapped |
[out] | xm | 2-vector center-relative map-space image of mapped point |
[out] | ff | failure flag |
Definition at line 1888 of file pesg.f90.
References pietc::u0, and pietc::u1.
Referenced by gtoxm_ak_dd_m(), and gtoxm_ak_rr_g().
|
private |
Given an aspect ratio, asp<=1, and major semi-axis, arc, in geographical (degree) units measured along the rectangle's median, return a first guess for the parameter vector, ak, approximately optimal for the domain of the given dimensions.
asp | aspect ratio of intended domain |
arc | major semi-axis angle in degrees for intended domain |
ak | first guess of the parameter vector |
|
private |
Given an aspect ratio, asp<=1, and major semi-axis, arc, in map-space nondimensional units, return a first guess for the parameter vector, ak, approximately optimal for the domain of the given dimensions.
[in] | asp | aspect ratio |
[in] | tmarcx | |
[out] | ak | first guess for the parameter vector |
Definition at line 791 of file pesg.f90.
References pietc::rtod.
subroutine, public pesg::hgrid_ak | ( | integer(spi), intent(in) | lx, |
integer(spi), intent(in) | ly, | ||
integer(spi), intent(in) | nx, | ||
integer(spi), intent(in) | ny, | ||
real(dp), intent(in) | a, | ||
real(dp), intent(in) | k, | ||
real(dp), intent(in) | plat, | ||
real(dp), intent(in) | plon, | ||
real(dp), intent(in) | pazi, | ||
real(dp), intent(in) | re, | ||
real(dp), intent(in) | delxre, | ||
real(dp), intent(in) | delyre, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny ), intent(out) | glat, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny ), intent(out) | glon, | ||
real(dp), dimension(lx:lx+nx-1,ly:ly+ny-1), intent(out) | garea, | ||
logical, intent(out) | ff | ||
) |
Like hgrid_ak_rr_c except the argument list includes the earth radius, re, and this is used to express the map-space grid increments in the dimensional units, delxre, delyre on entry, and to express the grid cell areas, garea, in dimensional units upon return.
The gridded lats and lons, glat and glon, remain in radians.
[in] | lx | center-relative x grid index for left edge of the domain |
[in] | ly | center-relative y grid index for lower edge of the domain |
[in] | nx | numbers of the grid spaces in x |
[in] | ny | numbers of the grid spaces in y |
[in] | a | parameters of an ESG mapping |
[in] | k | parameters of an ESG mapping |
[in] | plat | radians latitude of the projection center of the mapping |
[in] | plon | radians longitude of the projection center of the mapping |
[in] | pazi | Azimuth of map orientation at its center |
[in] | re | earth radius |
[in] | delxre | map-space grid increments in the dimensional units |
[in] | delyre | map-space grid increments in the dimensional units |
[out] | glat | grid points for latitude |
[out] | glon | grid points for longitude |
[out] | garea | array of grid-cell areas in dimensional units |
[out] | ff | failure flag |
|
private |
Like hgrid_ak_rr_c except the argument list includes the earth radius, re, and this is used to express the map-space grid increments in the dimensional units, delxre, delyre on entry, and to express the grid cell areas, garea, and the x- and y- grid steps, dx and dy, in dimensional units upon return.
The gridded lats and lons, glat and glon, remain in radians. Also, in order for the argument list to remain compatible with an earlier version of this routine, the relative rotations of the steps, dangle_dx and dangle_dy, are returned as degrees instead of radians (all other angles in the argument list, i.e., plat,plon,pazi,glat,glon, remain radians).
[in] | lx | center-relative x grid index for left edge of the domain |
[in] | ly | center-relative y grid index for lower edge of the domain |
[in] | nx | number of grid spaces in x |
[in] | ny | number of grid spaces in y |
[in] | a | Extended Schmidt Gnomonic parameter |
[in] | k | Extended Schmidt Gnomonic parameter |
[in] | plat | latitude of projection center of the mapping (radians) |
[in] | plon | longitude of projection center of the mapping (radians) |
[in] | pazi | Azimuth of map orientation at its center (radians) |
[in] | re | earth radius in dimensional length units |
[in] | delxre | map-space grid increments in the dimensional units |
[in] | delyre | map-space grid increments in the dimensional units |
[out] | glat | gridded lats (radians) |
[out] | glon | gridded lons (radians) |
[out] | garea | grid cell areas in dimensional units |
[out] | dx | x- grid steps in dimensional units |
[out] | dy | y- grid steps in dimensional units |
[out] | dangle_dx | azimuth rotations of the steps dx (in degrees) |
[out] | dangle_dy | azimuth rotations of the steps dy (in degrees) |
[out] | ff | failure flag |
Definition at line 1818 of file pesg.f90.
References hgrid_ak_rr_c(), and pietc::rtod.
subroutine, public pesg::hgrid_ak_dc | ( | integer(spi), intent(in) | lx, |
integer(spi), intent(in) | ly, | ||
integer(spi), intent(in) | nx, | ||
integer(spi), intent(in) | ny, | ||
real(dp), intent(in) | a, | ||
real(dp), intent(in) | k, | ||
real(dp), intent(in) | pdlat, | ||
real(dp), intent(in) | pdlon, | ||
real(dp), intent(in) | pdazi, | ||
real(dp), intent(in) | delx, | ||
real(dp), intent(in) | dely, | ||
real(dp), dimension(3, lx:lx+nx ,ly:ly+ny ), intent(out) | xc, | ||
real(dp), dimension(3,2,lx:lx+nx ,ly:ly+ny ), intent(out) | xcd, | ||
real(dp), dimension( lx:lx+nx-1,ly:ly+ny-1), intent(out) | garea, | ||
logical, intent(out) | ff | ||
) |
Use a and k as the parameters of an Extended Schmidt-transformed Gnomonic (ESG) mapping centered at (pdlat,pdlon) and twisted about this center by an azimuth angle of pdazi counterclockwise (these angles in degrees).
Like hgrid_ak_rx, return the grid points' cartesians xc and Jacobian matrices, xcd. Garea, the area of each grid cell, is also returned as in hgrid_ak_rx, and a failure flag, ff, raised when a failure occurs anywhere in these calculations.
[in] | lx | center-relative x grid index for left edge of the domain |
[in] | ly | center-relative y grid index for lower edge of the domain |
[in] | nx | numbers of the grid spaces in x |
[in] | ny | numbers of the grid spaces in y |
[in] | a | parameters of an ESG mapping |
[in] | k | parameters of an ESG mapping |
[in] | pdlat | degrees latitude of the projection center of the mapping |
[in] | pdlon | degrees longitude of the projection center of the mapping |
[in] | pdazi | azimuth of the orientation of the mapping at its center |
[in] | delx | central x-spacing of the grid in radians |
[in] | dely | central y-spacing of the grid in radians |
[out] | xc | grid points' earth-centered unit cartesians |
[out] | xcd | Jacobian matrices, d(xc)/d(xm) |
[out] | garea | array of grid-cell areas (steradians) |
[out] | ff | failure flag |
Definition at line 1724 of file pesg.f90.
References pietc::dtor.
subroutine, public pesg::hgrid_ak_dd | ( | integer(spi), intent(in) | lx, |
integer(spi), intent(in) | ly, | ||
integer(spi), intent(in) | nx, | ||
integer(spi), intent(in) | ny, | ||
real(dp), intent(in) | a, | ||
real(dp), intent(in) | k, | ||
real(dp), intent(in) | pdlat, | ||
real(dp), intent(in) | pdlon, | ||
real(dp), intent(in) | pdazi, | ||
real(dp), intent(in) | delx, | ||
real(dp), intent(in) | dely, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny ), intent(out) | gdlat, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny ), intent(out) | gdlon, | ||
real(dp), dimension(lx:lx+nx-1,ly:ly+ny-1), intent(out) | garea, | ||
logical, intent(out) | ff | ||
) |
Use a and k as the parameters of an Extended Schmidt-transformed Gnomonic (ESG) mapping centered at (pdlat,pdlon) and twisted about this center by an azimuth angle of pdazi counterclockwise (these angles in degrees).
Like hgrid_ak_rr, return the grid points' lats and lons, except that here the angles are returned in degrees. Garea, the area of each grid cell, is returned as in hgrid_ak_rr, and a failure flag, ff, raised when a failure occurs anywhere in these calculations.
[in] | lx | center-relative x grid index for left edge of the domain |
[in] | ly | center-relative y grid index for lower edge of the domain |
[in] | nx | number of the grid spaces in x |
[in] | ny | number of the grid spaces in y |
[in] | a | parameter of an ESG mapping |
[in] | k | parameter of an ESG mapping |
[in] | pdlat | degrees latitude of the projection center of mapping |
[in] | pdlon | degrees longitude of the projection center of mapping |
[in] | pdazi | degrees azimuth of orientation of mapping at its center |
[in] | delx | central x-spacing of the grid (in radians) |
[in] | dely | central y-spacing of the grid (in radians) |
[out] | gdlat | array of grid point latitudes (in degrees) |
[out] | gdlon | array of grid point longitudes (in dgrees) |
[out] | garea | array of grid cell areas (in steradians) |
[out] | ff | failure flag |
Definition at line 1630 of file pesg.f90.
References pietc::dtor, and pietc::rtod.
|
private |
Like hgrid_ak_rr_c, except all the angle arguments (but not delx,dely) are in degrees instead of radians.
[in] | lx | center-relative x grid index for left edge of the domain |
[in] | ly | center-relative y grid index for lower edge of the domain |
[in] | nx | numbers of the grid spaces in x |
[in] | ny | numbers of the grid spaces in y |
[in] | a | parameters of an ESG mapping |
[in] | k | parameters of an ESG mapping |
[in] | pdlat | latitude defining projection center of the mapping |
[in] | pdlon | longitude defining projection center of the mapping |
[in] | pdazi | azimuth of the orientation of the mapping at its center |
[in] | delx | central x-spacing of the grid (in radians) |
[in] | dely | central y-spacing of the grid (in radians) |
[out] | gdlat | array of grid point degree-latitudes |
[out] | gdlon | array of grid point degree-longitudes |
[out] | garea | array of grid-cell areas (steradians) |
[out] | dx | step sizes of the grid-cell edges in x (earth radius=1 unit) |
[out] | dy | step sizes of the grid-cell edges in y (earth radius=1 unit) |
[out] | dangle_dx | azimuth rotation of the x grid steps, dx (degrees) |
[out] | dangle_dy | azimuth rotation of the y grid steps, dy (degrees) |
[out] | ff | failure flag |
Definition at line 1673 of file pesg.f90.
References pietc::dtor, hgrid_ak_rr_c(), and pietc::rtod.
subroutine, public pesg::hgrid_ak_rc | ( | integer(spi), intent(in) | lx, |
integer(spi), intent(in) | ly, | ||
integer(spi), intent(in) | nx, | ||
integer(spi), intent(in) | ny, | ||
real(dp), intent(in) | A, | ||
real(dp), intent(in) | K, | ||
real(dp), intent(in) | plat, | ||
real(dp), intent(in) | plon, | ||
real(dp), intent(in) | pazi, | ||
real(dp), intent(in) | delx, | ||
real(dp), intent(in) | dely, | ||
real(dp), dimension(3, lx:lx+nx ,ly:ly+ny ), intent(out) | xc, | ||
real(dp), dimension(3,2,lx:lx+nx ,ly:ly+ny ), intent(out) | xcd, | ||
real(dp), dimension( lx:lx+nx-1,ly:ly+ny-1), intent(out) | garea, | ||
logical, intent(out) | ff | ||
) |
Use a and k as the parameters of an Extended Schmidt-transformed Gnomonic (ESG) mapping centered at (plat,plon) and twisted about this center by an azimuth angle of pazi counterclockwise (these angles in radians).
Assume the radius of the earth is unity, and using the central mapping point as the coordinate origin, set up the grid with central x-spacing delx and y-spacing dely. The grid index location of the left-lower corner of the domain is (lx,ly) (typically both NEGATIVE). The numbers of the grid spaces in x and y directions are nx and ny. (Note that, for a centered rectangular grid lx and ly are negative and, in magnitude, half the values of nx and ny respectively.) Return the unit cartesian vectors xc of the grid points and their jacobian matrices xcd wrt the map coordinates, and return a rectangular array, garea, of dimensions nx-1 by ny-1, that contains the areas of each of the grid cells
If all goes well, return a lowered failure flag, ff=.false. . But if, for some reason, it is not possible to complete this task, return the raised failure flag, ff=.TRUE. .
lx | center-relative x grid index for left edge of the domain |
ly | center-relative y grid index for lower edge of the domain |
nx | numbers of the grid spaces in x |
ny | numbers of the grid spaces in y |
a | parameters of the ESG mapping centered at (plat,plon) |
k | parameters of the ESG mapping centered at (plat,plon) |
plat | latitude of the projection center of the mapping (radians) |
plon | longitude of the projection center of the mapping (radians) |
pazi | azimuth of orientation of mapping at its center |
delx | central x-spacing of the grid (in radians) |
dely | central y-spacing of the grid (in radians) |
xc | Earth-centered unit cartesian 3-vectors at each grid point |
xcd | Jacobian matrices, d(xc)/d(xm), at each grid point |
garea | rectangular array of grid-cell areas (steradians) |
ff | failure flag |
subroutine, public pesg::hgrid_ak_rr | ( | integer(spi), intent(in) | lx, |
integer(spi), intent(in) | ly, | ||
integer(spi), intent(in) | nx, | ||
integer(spi), intent(in) | ny, | ||
real(dp), intent(in) | A, | ||
real(dp), intent(in) | K, | ||
real(dp), intent(in) | plat, | ||
real(dp), intent(in) | plon, | ||
real(dp), intent(in) | pazi, | ||
real(dp), intent(in) | delx, | ||
real(dp), intent(in) | dely, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny ), intent(out) | glat, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny ), intent(out) | glon, | ||
real(dp), dimension(lx:lx+nx-1,ly:ly+ny-1), intent(out) | garea, | ||
logical, intent(out) | ff | ||
) |
Use a and k as the parameters of an Extended Schmidt-transformed Gnomonic (ESG) mapping centered at (plat,plon) and twisted about this center by an azimuth angle of pazi counterclockwise (these angles in radians).
Assume the radius of the earth is unity, and using the central mapping point as the coordinate origin, set up the grid with central x-spacing delx and y-spacing dely. The grid index location of the left-lower corner of the domain is (lx,ly) (typically both NEGATIVE). The numbers of the grid spaces in x and y directions are nx and ny. (Note that, for a centered rectangular grid lx and ly are negative and, in magnitude, half the values of nx and ny respectively.) Return the latitude and longitude, in radians again, of the grid points thus defined in the arrays, glat and glon, and return a rectangular array, garea, of dimensions nx-1 by ny-1, that contains the areas of each of the grid cells
If all goes well, return a lowered failure flag, ff=.false. . But if, for some reason, it is not possible to complete this task, return the raised failure flag, ff=.TRUE. .
[in] | lx | center-relative grid index in x of left edge of the domain |
[in] | ly | center-relative grid index in y of lower edge of the domain |
[in] | nx | number of grid spaces in x |
[in] | ny | number of grid spaces in y |
[in] | A | parameter of the ESG mapping centered at (plat,plon) |
[in] | K | parameter of the ESG mapping centered at (plat,plon) |
[in] | plat | latitude of projection center of mapping (radians) |
[in] | plon | longitude of projection center of mapping (radians) |
[in] | pazi | azimuth of orientation of mapping at its center |
[in] | delx | central x-spacing of the grid (radians) |
[in] | dely | central y-spacing of the grid (radians) |
[out] | glat | grid points' latitudes |
[out] | glon | grid points' longitudes |
[out] | garea | array of grid-cell areas (steradians) |
[out] | ff | failure flag |
subroutine pesg::hgrid_ak_rr_c | ( | integer(spi), intent(in) | lx, |
integer(spi), intent(in) | ly, | ||
integer(spi), intent(in) | nx, | ||
integer(spi), intent(in) | ny, | ||
real(dp), intent(in) | a, | ||
real(dp), intent(in) | k, | ||
real(dp), intent(in) | plat, | ||
real(dp), intent(in) | plon, | ||
real(dp), intent(in) | pazi, | ||
real(dp), intent(in) | delx, | ||
real(dp), intent(in) | dely, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny ), intent(out) | glat, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny ), intent(out) | glon, | ||
real(dp), dimension(lx:lx+nx-1,ly:ly+ny-1), intent(out) | garea, | ||
real(dp), dimension(lx:lx+nx-1,ly:ly+ny ), intent(out) | dx, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny-1), intent(out) | dy, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny ), intent(out) | angle_dx, | ||
real(dp), dimension(lx:lx+nx ,ly:ly+ny ), intent(out) | angle_dy, | ||
logical, intent(out) | ff | ||
) |
Use a and k as the parameters of an extended Schmidt-transformed gnomonic (ESG) mapping centered at (plat,plon) and twisted about this center by an azimuth angle of pazi counterclockwise (these angles in radians).
Using the central mapping point as the coordinate origin, set up the grid with central x-spacing delx and y-spacing dely in nondimensional units, (i.e., as if the earth had unit radius) and with the location of the left- lower corner of the grid at center-relative grid index pair, (lx,ly) and with the number of the grid spaces in x and y directions given by nx and ny. (Note that, for a centered rectangular grid lx and ly are negative and, in magnitude, half the values of nx and ny respectively.) Return the latitude and longitude, again, in radians, of the grid pts thus defined in the arrays, glat and glon; return a rectangular array, garea, of dimensions nx-1 by ny-1, that contains the areas of each of the grid cells in nondimensional "steradian" units.
In this version, these grid cell areas are computed by 2D integrating the scalar jacobian of the transformation, using a 4th-order centered scheme. The estimated grid steps, dx and dy, are returned at the grid cell edges, using the same 4th-order scheme to integrate the 1D projected jacobian. The angles, relative to local east and north, are returned respectively as angle_dx and angle_dy at grid cell corners, in radians counterclockwise.
if all goes well, return a .FALSE. failure flag, ff. If, for some reason, it is not possible to complete this task, return the failure flag as .TRUE.
[in] | lx | center-relative x grid index for left edge of the domain |
[in] | ly | center-relative y grid index for lower edge of the domain |
[in] | nx | numbers of the grid spaces in x |
[in] | ny | numbers of the grid spaces in y |
[in] | a | Extended Schmidt Gnomonic parameter |
[in] | k | Extended Schmidt Gnomonic parameter |
[in] | plat | latitude of the projection center of the mapping (radians) |
[in] | plon | longitude of the projection center of the mapping (radians) |
[in] | pazi | azimuth of the orientation of the mapping at its center |
[in] | delx | central x-spacing of the grid (radians) |
[in] | dely | central y-spacing of the grid (radians) |
[out] | glat | grid points' latitudes (radians) |
[out] | glon | grid points' longitudes (radians) |
[out] | garea | array of grid-cell areas (steradians) |
[out] | dx | grid steps in x at grid cell edges (radians) |
[out] | dy | grid steps in y at grid cell edges (radians) |
[out] | angle_dx | x angles relative to local east (radians) |
[out] | angle_dy | y angles relative to local north (radians) |
[out] | ff | failure flag |
Definition at line 1338 of file pesg.f90.
References pietc::u0, and pietc::u1.
Referenced by hgrid_ak_c(), and hgrid_ak_dd_c().
subroutine, public pesg::xctoxm_ak | ( | real(dp), intent(in) | a, |
real(dp), intent(in) | k, | ||
real(dp), dimension(3), intent(in) | xc, | ||
real(dp), dimension(2), intent(out) | xm, | ||
logical, intent(out) | ff | ||
) |
Inverse mapping of xmtoxc_ak.
That is, go from given cartesian unit 3-vector, xc, to map coordinate 2-vector xm (or return a raised failure flag, FF, if the attempt fails).
[in] | a | ESG mapping parameter for line spacing profile |
[in] | k | ESG mapping parameter for Gauss curvature in Schmidt mapping |
[in] | xc | Earth-centered cartesian unit 3-vector |
[out] | xm | 2-vector map coordinate |
[out] | ff | Failure flag |
Definition at line 466 of file pesg.f90.
References pietc::f.
|
private |
subroutine pesg::xmtog_ak_dd_g | ( | real(dp), intent(in) | A, |
real(dp), intent(in) | K, | ||
real(dp), intent(in) | pdlat, | ||
real(dp), intent(in) | pdlon, | ||
real(dp), intent(in) | pdazi, | ||
real(dp), intent(in) | delx, | ||
real(dp), intent(in) | dely, | ||
real(dp), dimension(2), intent(in) | xm, | ||
real(dp), intent(out) | dlat, | ||
real(dp), intent(out) | dlon, | ||
logical, intent(out) | ff | ||
) |
Like xmtog_ak_rr_g, except lat, lon, azimuth, are expressed in degrees.
[in] | a | parameters of an ESG mapping |
[in] | k | parameters of an ESG mapping |
[in] | pdlat | degrees latitude of projection center of the mapping |
[in] | pdlon | degrees longitude of projection center of the mapping |
[in] | pdazi | Azimuth of the mapping orientation about its center |
[in] | delx | central x-spacing of the grid in radians |
[in] | dely | central y-spacing of the grid in radians |
[in] | xm | map coordinates, in grid units, of a point to be mapped |
[out] | dlat | degrees latitude of the point |
[out] | dlon | degrees longitude of the point |
[out] | ff | failure flag |
Definition at line 2118 of file pesg.f90.
References pietc::dtor, pietc::rtod, and xmtog_ak_rr_m().
|
private |
Like xmtog_ak_rr_m, except lat, lon, azimuth, are expressed in degrees.
[in] | a | parameters of the ESG mapping |
[in] | k | parameters of the ESG mapping |
[in] | pdlat | degrees latitude of the projection center of the mapping |
[in] | pdlon | degrees longitude of the projection center of the mapping |
[in] | pdazi | Azimuth of the orientation of the mapping at its center |
[in] | xm | map space 2-vector coordinates of a point |
[out] | dlat | degrees latitude of the point |
[out] | dlon | degrees longitude of the point |
[out] | ff | failure flag |
Definition at line 2087 of file pesg.f90.
References pietc::dtor, pietc::rtod, and xmtog_ak_rr_m().
subroutine pesg::xmtog_ak_rr_g | ( | real(dp), intent(in) | A, |
real(dp), intent(in) | K, | ||
real(dp), intent(in) | plat, | ||
real(dp), intent(in) | plon, | ||
real(dp), intent(in) | pazi, | ||
real(dp), intent(in) | delx, | ||
real(dp), intent(in) | dely, | ||
real(dp), dimension(2), intent(in) | xm, | ||
real(dp), intent(out) | lat, | ||
real(dp), intent(out) | lon, | ||
logical, intent(out) | ff | ||
) |
For an ESG map with parameters, (A,K), and geographical orientation, given by plon,plat,pazi (radians), and given a point in grid-space units as the 2-vector, xm, return the geographical coordinates, lat, lon, (radians) of this point.
If instead the transformation is invalid for any reason, then return the raised failure flag, FF=.true.
[in] | a | parameters of the ESG mapping |
[in] | k | parameters of the ESG mapping |
[in] | plat | radians latitude of the projection center of the mapping |
[in] | plon | radians longitude of the projection center of the mapping |
[in] | pazi | Azimuth of the orientation of the mapping at its center |
[in] | delx | central x-spacing of the grid in radians |
[in] | dely | central y-spacing grid point in radians |
[in] | xm | grid-space 2-vector coordinates of a point to be mapped |
[out] | lat | radians latitude of the point |
[out] | lon | radians longitude of the point |
[out] | ff | failure flag |
Definition at line 2063 of file pesg.f90.
References xmtog_ak_rr_m().
|
private |
Given the ESG map specified by parameters (A,K) and geographical center and orientation, plat,plon,pazi (radians), and a position, in map-space coordinates given by the 2-vector, xm, return the geographical coordinates, lat and lon (radians).
If the transformation is invalid for any reason, return instead with a raised failure flag, FF= .true.
[in] | a | parameter of an ESG mapping |
[in] | k | parameter of an ESG mapping |
[in] | plat | radians latitude of the projection center of the mapping |
[in] | plon | radians longitude of the projection center of the mapping |
[in] | pazi | Azimuth of orientation of the mapping at its center |
[in] | xm | center-relative 2-vector map space coordinates of a point |
[out] | lat | radians latitude of the point |
[out] | lon | radians longitude of the point |
[out] | ff | failure flag |
Definition at line 2015 of file pesg.f90.
References pietc::u0, and pietc::u1.
Referenced by xmtog_ak_dd_g(), xmtog_ak_dd_m(), and xmtog_ak_rr_g().
subroutine, public pesg::xmtoxc_ak | ( | real(dp), intent(in) | a, |
real(dp), intent(in) | k, | ||
real(dp), dimension(2), intent(in) | xm, | ||
real(dp), dimension(3), intent(out) | xc, | ||
real(dp), dimension(3,2), intent(out) | xcd, | ||
logical, intent(out) | ff | ||
) |
Assuming the A-K parameterization of the Extended Schmidt-transformed Gnomonic (ESG) mapping, and given a map-space 2-vector, xm, find the corresponding cartesian unit 3-vector and its derivative wrt xm, jacobian matrix, xcd.
If for any reason the mapping cannot be done, return a raised failure flag, FF.
[in] | a | ESG mapping parameter for line spacing profile |
[in] | k | ESG mapping parameter for Gauss curvature in Schmidt mapping |
[in] | xm | map-space 2-vector |
[out] | xc | Earth-centered cartesian unit 3-vector |
[out] | xcd | Jacobian matrix, d(xc)/d(xm) |
[out] | ff | Failure flag |
subroutine pesg::xmtoxc_vak | ( | real(dp), dimension(2), intent(in) | ak, |
real(dp), dimension(2), intent(in) | xm, | ||
real(dp), dimension(3), intent(out) | xc, | ||
real(dp), dimension(3,2), intent(out) | xcd, | ||
logical, intent(out) | ff | ||
) |
Assuming the vector AK parameterization of the Extended Schmidt-transformed Gnomonic (ESG) mapping with parameter vector, and given a map-space 2-vector, xm, find the corresponding cartesian unit 3-vector and its derivative wrt xm, the Jacobian matrix, xcd.
If for any reason the mapping cannot be done, return a raised failure flag,z FF.
[in] | ak | 2-vector parameterization of the ESG mapping |
[in] | xm | 2-vector of map plane coordinates |
[out] | xc | Earth-centered cartesian unit 3-vector |
[out] | xcd | Jacobian, d(xc)/d(xm) |
[out] | ff | Failure flag |
|
private |
Like xmtoxc_vak, _ak, but also return derivatives wrt ak.
[in] | ak | 2-vector parameterization of the ESG mapping |
[in] | xm | 2-vector of map plane coordinates |
[out] | xc | Earth-centered cartesian unit 3-vector |
[out] | xcd | Jacobian of xc wrt xm, d(xc)/d(xm) |
[out] | xc1 | Partial derivatives wrt ak of xc, d(xc)/d(ak) |
[out] | xcd1 | Second derivative wrt xm and ak of xc, d^2(xc)/(d(xm)d(ak)) |
[out] | ff | Failure flag |
|
private |
Like zmtozt, but for 2-vector xm and xt, and 2*2 diagonal Jacobian xtd.
[in] | a | Mapping parameter controlling grid line spacing profile |
[in] | xm | Vector value of map coordinates |
[out] | xt | Vector value of gnomonic plane coordinates |
[out] | xtd | 2*2 diagonal Jacobian, d(xt)/d(xm) |
[out] | ff | Failure flag |
Definition at line 254 of file pesg.f90.
References pietc::u0.
|
private |
Like zmtozt1, but for 2-vector xm and xt, and 2*2 diagonal Jacobian xtd Also, the derivatives, wrt a, of these quantities.
[in] | a | Mapping parameter controlling grid line spacing profile |
[in] | xm | Vector value of map plane coordinates |
[out] | xt | Vector value of gnomonic plane coordinates |
[out] | xtd | 2*2 diagonal Jacobian, d(xt)/d(xm) |
[out] | xt1 | Derivative wrt a of xt, d(xt)/da |
[out] | xtd1 | Derivative wrt a of Jacobian xtd, d^2(xt)/(d(xm)da) |
[out] | ff | Failure flag |
Definition at line 276 of file pesg.f90.
References pietc::u0, and zmtozt1().
Referenced by xmtoxc_vak1().
|
private |
Standard transformation from polar stereographic map coordinates, xs, to cartesian, xc, assuming the projection axis is polar.
xcd=d(xc)/d(xs) is the jacobian matrix, encoding distortion and metric.
[in] | xs | Stereographic map coordinates |
[out] | xc | Cartesian earth-centered 3-vector |
[out] | xcd | Value of jacobian matrix, encoding distortion and metric |
subroutine pesg::xstoxc1 | ( | real(dp), dimension(2), intent(in) | xs, |
real(dp), dimension(3), intent(out) | xc, | ||
real(dp), dimension(3,2), intent(out) | xcd, | ||
real(dp), dimension(3,2,2), intent(out) | xcdd | ||
) |
Standard transformation from polar stereographic map coordinates, xs, to cartesian, xc, assuming the projection axis is polar.
xcd=d(xc)/d(xs) is the jacobian matrix, encoding distortion and metric. xcdd is the further derivative, wrt xs, of xcd.
[in] | xs | Stereographic map coordinates |
[out] | xc | Cartesian earth-centered 3-vector |
[out] | xcd | Jacobian matrix, encoding distortion and metric |
[out] | xcdd | Further derivative, wrt xs, of xcd |
subroutine pesg::xstoxt | ( | real(dp), intent(in) | k, |
real(dp), dimension(2), intent(in) | xs, | ||
real(dp), dimension(2), intent(out) | xt, | ||
logical, intent(out) | ff | ||
) |
subroutine pesg::xttoxm | ( | real(dp), intent(in) | a, |
real(dp), dimension(2), intent(in) | xt, | ||
real(dp), dimension(2), intent(out) | xm, | ||
logical, intent(out) | ff | ||
) |
|
private |
subroutine pesg::xttoxs1 | ( | real(dp), intent(in) | k, |
real(dp), dimension(2), intent(in) | xt, | ||
real(dp), dimension(2), intent(out) | xs, | ||
real(dp), dimension(2,2), intent(out) | xsd, | ||
real(dp), dimension(2,2,2), intent(out) | xsdd, | ||
real(dp), dimension(2), intent(out) | xs1, | ||
real(dp), dimension(2,2), intent(out) | xsd1, | ||
logical, intent(out) | ff | ||
) |
Like xttoxs, but also, return the derivatives, wrt K, of xs and xsd.
[in] | k | Gaussian curvature parameter of the Schmidt mapping |
[in] | xt | Scaled gnomonic plane |
[out] | xs | Standard stereographic plane |
[out] | xsd | Jacobian matrix, d(xs)/d(xt) |
[out] | xsdd | Second partial derivatives, d^2(xs)/(d(xt)d(xt)) |
[out] | xs1 | Derivative of xs wrt mapping parameter, d(xs)/dk |
[out] | xsd1 | Derivative of Jacobian wrt k: d^2(xs)/(d(xt)dk) |
[out] | ff | Failure flag |
Definition at line 193 of file pesg.f90.
References pietc::o2, pietc::u0, pietc::u1, and pietc::u2.
Referenced by xmtoxc_vak1().
|
private |
Evaluate the function, zt = tan(sqrt(A)*z)/sqrt(A), and its derivative, ztd, for positive and negative A and for the limiting case, A –> 0.
[in] | a | Mapping parameter controlling grid line spacing profile |
[in] | zm | Scalar value of single map plane coordinate |
[out] | zt | Scalar value of single gnomonic plane coordinate |
[out] | ztd | Derivative of gnomonic coordinate, d(zt)/d(zm) |
[out] | ff | Failure flag |
Definition at line 323 of file pesg.f90.
References pietc::f, pietc::pih, pietc::u0, and pietc::u1.
|
private |
Like zmtozt, but also, get the derivative with respect to a, zt1 of zt, and ztd1 of ztd.
[in] | a | Mapping parameter controlling grid line spacing profile |
[in] | zm | Single map plane coordinate |
[in] | zt | Single gnomonic plane coordinate |
[in] | ztd | Derivative wrt zm of zt, d(zt)/d(zm) |
[in] | zt1 | Derivative wrt a of zt, d(zt)/da |
[in] | ztd1 | Derivative wrt a of ztd, d^2(zt)/(d(zm)da) |
[in] | ff | Failure flag |
Definition at line 348 of file pesg.f90.
References pietc::o3.
Referenced by xmtoxt1().
|
private |