C# Class Madingley.EnviroData

Imports environmental data from ASCII and NetCDF files
Currently assumes that cells are evenly spaced in latitude and longitude
Exibir arquivo Open project: Madingley/C-sharp-version-of-Madingley

Public Methods

Method Description
EnviroData ( string dataName, string dataResolution, double latMin, double lonMin, double latMax, double lonMax, double cellSize, EnvironmentalDataSource FetchClimateDataSource ) : System

Overloaded constructor to fetch climate information from the cloud using FetchClimate

EnviroData ( string dataName, string dataResolution, double latMin, double lonMin, double latMax, double lonMax, double cellSize, List cellList, EnvironmentalDataSource FetchClimateDataSource ) : System

Overloaded constructor to fetch climate information from the cloud using FetchClimate for specific locations

EnviroData ( string fileName, string dataName, string dataType, string dataResolution, string units ) : System

Constructor for EnviroData

GetValue ( double lat, double lon, uint timeInterval, System.Boolean &missingValue ) : double

A method to extract the value of an environmental variable from the grid cell closest to a specified latitude and longitude

GetValue ( double lat, double lon, uint timeInterval, System.Boolean &missingValue, double latCellSize, double lonCellSize ) : double

A method to extract the area weighted value of an environmental variable from the envirodata cells overlapped by the cell specified by lat and lon

Private Methods

Method Description
EnvironmentListFromNetCDF ( Microsoft.Research.Science.Data.DataSet internalData, string dataName, bool latInverted, bool longInverted ) : void

Reads in two-dimensional environmental data from a NetCDF and stores them in the array of values within this instance of EnviroData

EnvironmentListFromNetCDF3D ( Microsoft.Research.Science.Data.DataSet internalData, string dataName, bool latInverted, bool longInverted ) : void

Reads in three-dimensional environmental data from a NetCDF and stores them in the array of values within this instance of EnviroData

Method Details

EnviroData() public method

Overloaded constructor to fetch climate information from the cloud using FetchClimate
public EnviroData ( string dataName, string dataResolution, double latMin, double lonMin, double latMax, double lonMax, double cellSize, EnvironmentalDataSource FetchClimateDataSource ) : System
dataName string Name of the the climate variable to be fetched
dataResolution string Time resolution requested
latMin double Bottom latitude
lonMin double Leftmost longitude
latMax double Maximum latitude
lonMax double Maximum longitude
cellSize double Size of each grid cell
FetchClimateDataSource EnvironmentalDataSource Data source from which to fetch environmental data
return System

EnviroData() public method

Overloaded constructor to fetch climate information from the cloud using FetchClimate for specific locations
public EnviroData ( string dataName, string dataResolution, double latMin, double lonMin, double latMax, double lonMax, double cellSize, List cellList, EnvironmentalDataSource FetchClimateDataSource ) : System
dataName string Name of the the climate variable to be fetched
dataResolution string Time resolution requested
latMin double Bottom latitude
lonMin double Leftmost longitude
latMax double Maximum latitude
lonMax double Maximum longitude
cellSize double Size of each grid cell
cellList List List of cells to be fetched
FetchClimateDataSource EnvironmentalDataSource Data source from which to fetch environmental data
return System

EnviroData() public method

Constructor for EnviroData
public EnviroData ( string fileName, string dataName, string dataType, string dataResolution, string units ) : System
fileName string Filename (including extension)
dataName string The name of the variable that contains the data within the specified file
dataType string Type of data, nc = NetCDF, ascii = ESRI ASCII)
dataResolution string The temporal resolution of the environmental variable
units string The units of the data
return System

GetValue() public method

A method to extract the value of an environmental variable from the grid cell closest to a specified latitude and longitude
public GetValue ( double lat, double lon, uint timeInterval, System.Boolean &missingValue ) : double
lat double Latitude to get value from
lon double Longitude to get value from
timeInterval uint The time interval to get the value from (i.e. the month, or 0 for yearly variables)
missingValue System.Boolean Boolean to indicate whether the returned value is a missing value
return double

GetValue() public method

A method to extract the area weighted value of an environmental variable from the envirodata cells overlapped by the cell specified by lat and lon
public GetValue ( double lat, double lon, uint timeInterval, System.Boolean &missingValue, double latCellSize, double lonCellSize ) : double
lat double Bottom latitude of cell to get value from
lon double Leftmost longitude of cell to get value from
timeInterval uint The time interval to get the value from (i.e. the month, or 0 for yearly variables)
missingValue System.Boolean Boolean to indicate whether the returned value is a missing value
latCellSize double The latitudinal size of cells in the model grid
lonCellSize double The longitudinal size of cells in the model grid
return double