Soil Water Balance (SWB2)
Loading...
Searching...
No Matches
grid.F90 File Reference

Contains a single module, grid, which provides support for gridded ASCII data file and data structure operations. More...

Go to the source code of this file.

Data Types

interface  grid::pj_init_and_transform
 interface to C code that provides a simplified entry point to PROJ4 capabilities: it has been modified so that all C pointers are kept within the C code; no pointers are returned to fortran More...
type  grid::general_grid_t
type  grid::grid_bounds_t
type  grid::error_message_t
interface  grid::grid_create

Modules

module  grid
 Provides support for input and output of gridded ASCII data, as well as for creation and destruction of grid data structures (defined types).

Functions/Subroutines

subroutine, public grid::grid_set_output_directory_name (sdirname)
type(general_grid_t) function, pointer, public grid::grid_createcomplete (inx, iny, rx0, ry0, rx1, ry1, idatatype)
 Creates a grid of a specified type.
type(general_grid_t) function, pointer, public grid::grid_createsimple (inx, iny, rx0, ry0, rgridcellsize, idatatype)
subroutine, public grid::grid_destroy (pgrd)
type(general_grid_t) function, pointer, public grid::grid_read (sfilename, sfiletype, idatatype)
subroutine, public grid::grid_readexisting (sfilename, sfiletype, pgrd)
type(general_grid_t) function, pointer grid::grid_readarcgrid_fn (sfilename, idatatype)
subroutine grid::grid_readarcgrid_sub (sfilename, pgrd)
type(general_grid_t) function, pointer grid::grid_readsurfergrid_fn (sfilename, idatatype)
subroutine grid::grid_readsurfergrid_sub (sfilename, pgrd)
subroutine, public grid::grid_writegrid (sfilename, pgrd, ioutputformat)
subroutine, public grid::grid_writearcgrid (sfilename, pgrd)
subroutine, public grid::grid_writesurfergrid (sfilename, pgrd)
logical(c_bool) function, public grid::grid_conform (pgrd1, pgrd2, rtolerance)
logical(c_bool) function, public grid::grid_completelycover (pbasegrd, pothergrd, rtolerance)
subroutine grid::grid_lookupcolumn (pgrd, rxval, ibefore, iafter, rfrac)
subroutine grid::grid_lookuprow (pgrd, ryval, ibefore, iafter, rfrac)
subroutine, public grid::grid_transform (pgrd, sfromproj4, stoproj4, rx, ry)
 Call PROJ4 to transform coordinates.
subroutine grid::grid_checkintegergridvalues (pgrd, sfilename)
subroutine, public grid::grid_checkforproj4error (iretval, sfromproj4, stoproj4)
real(c_float) function, public grid::grid_interpolate (pgrd, rxval, ryval)
real(c_float) function grid::grid_searchcolumn (pgrd, rxval, rzval, rnodata)
real(c_float) function grid::grid_lookupreal (pgrd, rxval, ryval)
logical(c_bool) function, public grid::grid_coordinatesfallinsidegrid (pgrd, rx, ry)
logical(c_bool) function, public grid::grid_rowcolfallsinsidegrid (pgrd, irow, icol)
integer(c_int) function, public grid::grid_getgridcolnum (pgrd, rx)
integer(c_int) function, public grid::grid_getgridrownum (pgrd, ry)
integer(c_int) function, dimension(2) grid::grid_getgridcolrownum (pgrd, rx, ry)
subroutine, public grid::grid_set_nodata_value (pgrd, ivalue, fvalue)
real(c_double) function, public grid::grid_getgridx (pgrd, icolumnnumber)
real(c_double) function, public grid::grid_getgridy (pgrd, irownumber)
subroutine, public grid::grid_populatexy (pgrd, rx, ry)
subroutine, public grid::grid_dumpgridextent (pgrd)
integer(c_int) function grid::grid_gridtopoint_int (pgrdfrom, pgrdto, icol, irow)
subroutine, public grid::grid_gridtogrid_int (pgrdfrom, pgrdto, lusemajorityfilter)
subroutine, public grid::grid_gridtogrid_sgl (pgrdfrom, pgrdto)
integer(c_int) function grid::grid_majorityfilter_int (pgrdfrom, itargetcol, itargetrow, inodatavalue, ispread)
real(c_float) function grid::grid_convolve_sgl (pgrdfrom, itargetcol, itargetrow, rkernel, rnodatavalue)

Variables

integer(c_int), parameter, public grid::grid_nodata_int = -9999_c_int
real(c_float), parameter, public grid::grid_nodata_real = -9999._c_float
real(c_double), parameter, public grid::grid_nodata_double = -9999._c_double
integer(c_int), parameter, public grid::grid_datatype_int = DATATYPE_INT
integer(c_int), parameter, public grid::grid_datatype_real = DATATYPE_REAL
integer(c_int), parameter, public grid::grid_datatype_double = DATATYPE_DOUBLE
integer(c_int), parameter, public grid::output_surfer = 0
integer(c_int), parameter, public grid::output_arc = 1
integer(c_int), parameter, public grid::grid_active_cell = 1
integer(c_int), parameter grid::nc_fill_int = GRID_NODATA_INT
real(c_float), parameter grid::nc_fill_float = GRID_NODATA_REAL
real(c_double), parameter grid::nc_fill_double = GRID_NODATA_DOUBLE
type(error_message_t), dimension(49) grid::terrormessage = (/ ERROR_MESSAGE_T("no arguments in initialization list ", -1), ERROR_MESSAGE_T("no options found in 'init' file ", -2), ERROR_MESSAGE_T("no colon in init= string ", -3), ERROR_MESSAGE_T("projection not named ", -4), ERROR_MESSAGE_T("unknown projection id ", -5), ERROR_MESSAGE_T("effective eccentricity = 1. ", -6), ERROR_MESSAGE_T("unknown unit conversion id ", -7), ERROR_MESSAGE_T("invalid boolean param argument ", -8), ERROR_MESSAGE_T("unknown elliptical parameter name ", -9), ERROR_MESSAGE_T("reciprocal flattening (1/f) = 0 ", -10), ERROR_MESSAGE_T("|radius reference latitude| > 90 ", -11), ERROR_MESSAGE_T("squared eccentricity < 0 ", -12), ERROR_MESSAGE_T("major axis or radius = 0 or not given ", -13), ERROR_MESSAGE_T("latitude or longitude exceeded limits ", -14), ERROR_MESSAGE_T("invalid x or y ", -15), ERROR_MESSAGE_T("improperly formed DMS value ", -16), ERROR_MESSAGE_T("non-convergent inverse meridional dist ", -17), ERROR_MESSAGE_T("non-convergent inverse phi2 ", -18), ERROR_MESSAGE_T("acos/asin: |arg| >1.+1e-14 ", -19), ERROR_MESSAGE_T("tolerance condition error ", -20), ERROR_MESSAGE_T("conic lat_1 = -lat_2 ", -21), ERROR_MESSAGE_T("lat_1 >= 90 ", -22), ERROR_MESSAGE_T("lat_1 = 0 ", -23), ERROR_MESSAGE_T("lat_ts >= 90 ", -24), ERROR_MESSAGE_T("no distance between control points ", -25), ERROR_MESSAGE_T("projection not selected to be rotated ", -26), ERROR_MESSAGE_T("W <= 0 or M <= 0 ", -27), ERROR_MESSAGE_T("lsat not in 1-5 range ", -28), ERROR_MESSAGE_T("path not in range ", -29), ERROR_MESSAGE_T("h <= 0 ", -30), ERROR_MESSAGE_T("k <= 0 ", -31), ERROR_MESSAGE_T("lat_0 = 0 or 90 or alpha = 90 ", -32), ERROR_MESSAGE_T("lat_1=lat_2 or lat_1=0 or lat_2=90 ", -33), ERROR_MESSAGE_T("elliptical usage required ", -34), ERROR_MESSAGE_T("invalid UTM zone number ", -35), ERROR_MESSAGE_T("arg(s) out of range for Tcheby eval ", -36), ERROR_MESSAGE_T("failed to find projection to be rotated ", -37), ERROR_MESSAGE_T("failed to load datum shift file ", -38), ERROR_MESSAGE_T("both n ), & m must be spec'd and > 0 ", -39), ERROR_MESSAGE_T("n <= 0, n > 1 or not specified ", -40), ERROR_MESSAGE_T("lat_1 or lat_2 not specified ", -41), ERROR_MESSAGE_T("|lat_1| == |lat_2| ", -42), ERROR_MESSAGE_T("lat_0 is pi/2 from mean lat ", -43), ERROR_MESSAGE_T("unparseable coordinate system definition ", -44), ERROR_MESSAGE_T("geocentric transformation missing z or ellps ", -45), ERROR_MESSAGE_T("unknown prime meridian conversion id ", -46), ERROR_MESSAGE_T("illegal axis orientation combination ", -47), ERROR_MESSAGE_T("point not within available datum shift grids ", -48), ERROR_MESSAGE_T("invalid sweep axis, choose x or y ", -49) /)
integer(c_int), parameter grid::four_cells = 1
integer(c_int), parameter grid::eight_cells = 2
integer(c_int), parameter, private grid::column = 1
integer(c_int), parameter, private grid::row = 2
integer(c_int) grid::lu_temp
integer(c_int) grid::lu_grid
character(len=256) grid::output_grid_directory_name = ""

Detailed Description

Contains a single module, grid, which provides support for gridded ASCII data file and data structure operations.

Definition in file grid.F90.