The Intermediate Complexity Atmospheric Research model (ICAR)
A computationally efficient atmospheric model for downscaling.
|
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... | |
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
|
private |
Calculate the weights to use for bilinear interpolation between surrounding points x, y to position xi,yi
|
private |
Interpolate boundaries of fieldout to fieldin using geolut
|
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...
|
private |
Given a closest position, return the 4 points surrounding the lat/lon position in lolat/lon
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)
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.
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
|
private |
Find the minimum next step size in the x direction xw=minxw(xw,lolon,xc,yc,lon)
|
private |
Find the minimum next step size in the y direction yw = minyw(yw,lolat,xc,yc,lat)