grid_tools  1.8.0
All Data Structures Namespaces Files Functions Variables Pages
pesg.f90 File Reference

Routines to perform ESG regional grid mappings. More...

Go to the source code of this file.

Data Types

interface  pesg::bestesg_geo
 
interface  pesg::bestesg_map
 
interface  pesg::gaulegh
 
interface  pesg::get_edges
 
interface  pesg::get_meanq
 
interface  pesg::get_qofv
 
interface  pesg::get_qx
 
interface  pesg::gtoxm_ak_dd
 
interface  pesg::gtoxm_ak_rr
 
interface  pesg::guessak_geo
 
interface  pesg::guessak_map
 
interface  pesg::hgrid_ak
 
interface  pesg::hgrid_ak_dc
 
interface  pesg::hgrid_ak_dd
 
interface  pesg::hgrid_ak_rc
 
interface  pesg::hgrid_ak_rr
 
interface  pesg::xctoxm_ak
 
interface  pesg::xctoxs
 
interface  pesg::xmtog_ak_dd
 
interface  pesg::xmtog_ak_rr
 
interface  pesg::xmtoxc_ak
 
interface  pesg::xmtoxt
 
interface  pesg::xstoxc
 
interface  pesg::xstoxt
 
interface  pesg::xttoxm
 
interface  pesg::xttoxs
 
interface  pesg::zmtozt
 
interface  pesg::zttozm
 

Modules

module  pesg
 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.
 

Functions/Subroutines

subroutine, public pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::get_qofvd (lam, v2, v3, v1d, v2d, v3d, v4d, qd)
 Like get_qofv, but for (only) the 2-vector derivatives of Q. More...
 
subroutine pesg::get_qsofvs (n, lam, v1s, v2s, v3s, v4s, qs)
 General util to convert value. More...
 
subroutine pesg::get_qx (j0, v1, v2, v3, v4)
 From a jacobian matrix, j0, get a sufficient set of v. More...
 
subroutine pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::xctoxm_ak (a, k, xc, xm, ff)
 Inverse mapping of xmtoxc_ak. More...
 
subroutine pesg::xctoxs (xc, xs)
 Inverse of xstoxc. More...
 
subroutine pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::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 pesg::xmtoxc_vak1 (ak, xm, xc, xcd, xc1, xcd1, ff)
 Like xmtoxc_vak, _ak, but also return derivatives wrt ak. More...
 
subroutine pesg::xmtoxt (a, xm, xt, xtd, ff)
 Like zmtozt, but for 2-vector xm and xt, and 2*2 diagonal Jacobian xtd. More...
 
subroutine pesg::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 pesg::xstoxc (xs, xc, xcd)
 Standard transformation from polar stereographic map coordinates, xs, to cartesian, xc, assuming the projection axis is polar. More...
 
subroutine pesg::xstoxc1 (xs, xc, xcd, xcdd)
 Standard transformation from polar stereographic map coordinates, xs, to cartesian, xc, assuming the projection axis is polar. More...
 
subroutine pesg::xstoxt (k, xs, xt, ff)
 Inverse of xttoxs. More...
 
subroutine pesg::xttoxm (a, xt, xm, ff)
 Inverse of xmtoxt. More...
 
subroutine pesg::xttoxs (k, xt, xs, xsd, ff)
 Scaled gnomonic plane xt to standard stereographic plane xs. More...
 
subroutine pesg::xttoxs1 (k, xt, xs, xsd, xsdd, xs1, xsd1, ff)
 Like xttoxs, but also, return the derivatives, wrt K, of xs and xsd. More...
 
subroutine pesg::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 pesg::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 pesg::zttozm (a, zt, zm, ff)
 Inverse of zmtozt. More...
 

Detailed Description

Routines to perform ESG regional grid mappings.

Author
R. J. Purser
Date
May 2020

Definition in file pesg.f90.