The Intermediate Complexity Atmospheric Research model (ICAR)
A computationally efficient atmospheric model for downscaling.
 All Classes Files Functions Variables
Public Member Functions | Private Member Functions | List of all members
geo Module Reference


Module provides geographic interpolation procedures Various functions used for spatial interpolation from low-res forcing grid to high-res model grid. More...

Public Member Functions

subroutine, public geo_lut (hi, lo)
 

Compute the geographic look up table from LOw resolution grid to HIgh resolution grid More...

 
subroutine, public geo_interp (fieldout, fieldin, geolut, boundary_only)
 

Interpolate fieldout to fieldin using geolut. if boundary_only is true, call boundary_interpolate instead loops over y,z,x but geolut is only defined over x,y (for now) More...

 
subroutine, public geo_interp2d (fieldout, fieldin, geolut)
 

Interpolate fieldout to fieldin using geolut. More...

 

Private Member Functions

real function, dimension(4) bilin_weights (yi, y, xi, x)
 

Calculate the weights to use for bilinear interpolation between surrounding points x, y to position xi,yi More...

 
integer function minxw (xw, longrid, xpos, ypos, lon)
 

Find the minimum next step size in the x direction xw=minxw(xw,lolon,xc,yc,lon) More...

 
integer function minyw (yw, latgrid, xpos, ypos, lat)
 

Find the minimum next step size in the y direction yw = minyw(yw,lolat,xc,yc,lat) More...

 
type(position) function find_location (lo, lat, lon, lastpos)
 

Find a location lat,lon in lolat,lon grids Assumes that the lat/lon grids are semi-regular (dx/dy aren't constant but they are nearly so) Calculates dx/dy at the middle of the lat/lon grids, then calculates the location of lat,lon input point using those coordinates. Next proceeds to calculate a new position based on the dx/dy at that position until the new position is within 1 gridcell of the current position Once that "within 1" position is found, search all cells in a 3x3 grid for the minimum distance return a position datatype that includes the found x/y location More...

 
type(fourpos) function find_surrounding (lo, lat, lon, pos, nx, ny)
 

Given a closest position, return the 4 points surrounding the lat/lon position in lolat/lon More...

 
subroutine boundary_interpolate (fieldout, fieldin, geolut)
 

Interpolate boundaries of fieldout to fieldin using geolut More...

 

Detailed Description


Module provides geographic interpolation procedures Various functions used for spatial interpolation from low-res forcing grid to high-res model grid.

  Entry points: 
      geo_LUT     : creates a geographic look uptable to convert one
                    grid to another
      geo_interp  : interpolates from one grid to another and
                    loops over the third dimension
      geo_interp2d: interpolates from one grid to another
 
Author
Ethan Gutmann (gutma.nosp@m.nn@u.nosp@m.car.e.nosp@m.du)

Member Function/Subroutine Documentation

real function, dimension(4) geo::bilin_weights ( real, intent(in)  yi,
real, dimension(0:3), intent(in)  y,
real, intent(in)  xi,
real, dimension(0:3), intent(in)  x 
)
private


Calculate the weights to use for bilinear interpolation between surrounding points x, y to position xi,yi


Here is the caller graph for this function:

subroutine geo::boundary_interpolate ( real, dimension(:,:,:), intent(inout)  fieldout,
real, dimension(:,:,:), intent(in)  fieldin,
type(geo_look_up_table), intent(in)  geolut 
)
private


Interpolate boundaries of fieldout to fieldin using geolut


Here is the caller graph for this function:

type(position) function geo::find_location ( class(interpolable_type), intent(inout)  lo,
real, intent(in)  lat,
real, intent(in)  lon,
type(position), intent(in)  lastpos 
)
private


Find a location lat,lon in lolat,lon grids Assumes that the lat/lon grids are semi-regular (dx/dy aren't constant but they are nearly so) Calculates dx/dy at the middle of the lat/lon grids, then calculates the location of lat,lon input point using those coordinates. Next proceeds to calculate a new position based on the dx/dy at that position until the new position is within 1 gridcell of the current position Once that "within 1" position is found, search all cells in a 3x3 grid for the minimum distance return a position datatype that includes the found x/y location

currently tries up to three methods to find the location 1) assume relatively even dxdy and compute location (iterate a <20times) 2) use a log(n) search (divide and conquer) also iterate <20times) a) if 1 or 2 are approximately successful: search a small region around the "best" point to find the real best point 3) in the diabolical case where 1 and 2 fail (rare) just search every single location (n^2) Could add a 2.5) downhill search algorithm...


Here is the call graph for this function:

Here is the caller graph for this function:

type(fourpos) function geo::find_surrounding ( class(interpolable_type), intent(in)  lo,
real, intent(in)  lat,
real, intent(in)  lon,
type(position), intent(in)  pos,
integer, intent(in)  nx,
integer, intent(in)  ny 
)
private


Given a closest position, return the 4 points surrounding the lat/lon position in lolat/lon


Here is the caller graph for this function:

subroutine, public geo::geo_interp ( real, dimension(:,:,:), intent(inout)  fieldout,
real, dimension(:,:,:), intent(in)  fieldin,
type(geo_look_up_table), intent(in)  geolut,
logical, intent(in)  boundary_only 
)


Interpolate fieldout to fieldin using geolut. if boundary_only is true, call boundary_interpolate instead loops over y,z,x but geolut is only defined over x,y (for now)


Here is the call graph for this function:

Here is the caller graph for this function:

subroutine, public geo::geo_interp2d ( real, dimension(:,:), intent(inout)  fieldout,
real, dimension(:,:), intent(in)  fieldin,
type(geo_look_up_table), intent(in)  geolut 
)


Interpolate fieldout to fieldin using geolut.


Here is the caller graph for this function:

subroutine, public geo::geo_lut ( class(interpolable_type), intent(in)  hi,
class(interpolable_type), intent(inout)  lo 
)


Compute the geographic look up table from LOw resolution grid to HIgh resolution grid


Here is the call graph for this function:

Here is the caller graph for this function:

integer function geo::minxw ( integer, intent(in)  xw,
real, dimension(:,:), intent(in)  longrid,
integer, intent(in)  xpos,
integer, intent(in)  ypos,
real, intent(in)  lon 
)
private


Find the minimum next step size in the x direction xw=minxw(xw,lolon,xc,yc,lon)


Here is the caller graph for this function:

integer function geo::minyw ( integer, intent(in)  yw,
real, dimension(:,:), intent(in)  latgrid,
integer, intent(in)  xpos,
integer, intent(in)  ypos,
real, intent(in)  lat 
)
private


Find the minimum next step size in the y direction yw = minyw(yw,lolat,xc,yc,lat)


Here is the caller graph for this function:


The documentation for this module was generated from the following file: