NEDAS.models.noresm.proj module

NEDAS.models.noresm.proj.lonlat2sxy(lon, lat)

convert lon,lat to stereographic plane x,y

NEDAS.models.noresm.proj.sxy2lonlat(sx, sy)

convert stereographic plane x,y to lon,lat

NEDAS.models.noresm.proj.spherdist(lon1, lat1, lon2, lat2)

Calculate distance between (lon1,lat1) and (lon2,lat2)

This function treats the Earth as a perfect sphere, it is not as accurate as pyproj.Geod.inv which takes the ellipse into account. But for the purpose of searching for positions in the domain, this function is accurate enough and faster.

Inputs: lon1, lat1, lon2, lat2: float, degrees Output: dist: float, meters

NEDAS.models.noresm.proj.tri_area(a, b, c)

compute triangle area given edge lengths

NEDAS.models.noresm.proj.pivotp(glon, glat, neighbors, lon, lat, ipiv=0, jpiv=0)

in model glon,glat, find the pivot point for lon,lat

NEDAS.models.noresm.proj.find_grid_index(glon, glat, gx, gy, neighbors, lon, lat, ipiv, jpiv)

convert a point lon,lat to grid space x,y

NEDAS.models.noresm.proj.lonlat2xy(glon, glat, gx, gy, neighbors, lon, lat)[source]

convert from lon,lat to grid space index x,y

NEDAS.models.noresm.proj.xy2lonlat(glon, glat, gx, gy, neighbors, x, y)[source]

convert from grid space index x,y to lon,lat