Public Types | Public Member Functions | Static Public Member Functions | Static Protected Attributes | List of all members
RampdemReader Class Reference

Public Types

enum  dataSet {
  rampdem, bed, icemask_grounded_and_shelves, surface,
  thickness
}
 

Public Member Functions

 RampdemReader ()
 
 ~RampdemReader ()
 

Static Public Member Functions

static RampdemReaderInstance () __attribute__((deprecated))
 Instance generator. More...
 
static Double_t Geoid (Double_t latitude)
 
static Double_t Area (Double_t latitude, RampdemReader::dataSet=rampdem)
 
static void ENtoLonLat (Int_t e_coord, Int_t n_coord, Double_t &lon, Double_t &lat, RampdemReader::dataSet=rampdem)
 
static void LonLattoEN (Double_t lon, Double_t lat, int &e_coord, int &n_coord, RampdemReader::dataSet=rampdem)
 
static void EastingNorthingToEN (Double_t easting, Double_t northing, Int_t &e_coord, Int_t &n_coord, RampdemReader::dataSet=rampdem)
 
static void LonLatToEastingNorthing (Double_t lon, Double_t lat, Double_t &easting, Double_t &northing)
 
static void EastingNorthingToLonLat (Double_t easting, Double_t northing, Double_t &lon, Double_t &lat)
 
static Bool_t isOnContinent (Double_t lon, Double_t lat)
 
static Bool_t isOnIceShelf (Double_t lon, Double_t lat)
 
static Double_t iceThickness (Double_t lon, Double_t lat)
 
static Double_t Surface (Double_t longitude, Double_t latitude)
 
static Double_t SurfaceAboveGeoid (Double_t longitude, Double_t latitude, RampdemReader::dataSet=rampdem)
 
static Double_t SurfaceAboveGeoidRampDem (Double_t longitude, Double_t latitude)
 
static Double_t SurfaceAboveGeoidEN (Double_t Easting, Double_t Northing, RampdemReader::dataSet=rampdem)
 
static Double_t BilinearInterpolatedSurfaceAboveGeoid (Double_t longitude, Double_t latitude, RampdemReader::dataSet=rampdem)
 
static Double_t BilinearInterpolatedSurfaceAboveGeoidEastingNorthing (Double_t easting, Double_t northing, RampdemReader::dataSet=rampdem)
 
static TProfile2D * rampMap (int coarseness_factor, int set_log_scale, UInt_t &xBins, UInt_t &yBins) __attribute__((deprecated))
 
static TProfile2D * rampMapPartial (int coarseness_factor, double centralLon, double centralLat, double rangeMetres, Int_t &xBins, Int_t &yBins, Double_t &xMin, Double_t &xMax, Double_t &yMin, Double_t &yMax) __attribute__((deprecated))
 
static TGaxis * distanceScale (Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax)
 
template<class thing >
static void flipEndian (thing &in)
 
static void getMapCoordinates (double &xMin, double &yMin, double &xMax, double &yMax, RampdemReader::dataSet=rampdem)
 
static TProfile2D * getMap (RampdemReader::dataSet dataSet, int coarseness_factor)
 
static TProfile2D * getMapPartial (RampdemReader::dataSet dataSet, int coarseness, double centralLon, double centralLat, double rangeMetres)
 
static int readRAMPDEM ()
 
static const char * dataSetToAxisTitle (RampdemReader::dataSet dataSet)
 
static void getNumXY (Int_t &numX, Int_t &numY, RampdemReader::dataSet dataSet=rampdem)
 
static TProfile2D * fillThisHist (TProfile2D *theHist, RampdemReader::dataSet dataSet)
 

Static Protected Attributes

static RampdemReaderfgInstance = 0
 Pointer to instance.
 

Detailed Description

Definition at line 29 of file RampdemReader.h.

Collaboration diagram for RampdemReader:
Collaboration graph
[legend]

Constructor & Destructor Documentation

RampdemReader::RampdemReader ( )

Default constructor. This class has been converted so that it works entirely statically You don't need to call this or create an instance... Preserved for backward compatibility.

Definition at line 105 of file RampdemReader.cxx.

RampdemReader::~RampdemReader ( )

Default destructor, not used.

Definition at line 114 of file RampdemReader.cxx.

Member Function Documentation

Double_t RampdemReader::Area ( Double_t  latitude,
RampdemReader::dataSet  dataSet = rampdem 
)
static

Returns the area of one square of the BEDMAP data at a given latitude.

Parameters
latitudeis in degrees
Returns
the area of in metres

Definition at line 458 of file RampdemReader.cxx.

Double_t RampdemReader::BilinearInterpolatedSurfaceAboveGeoid ( Double_t  lon,
Double_t  lat,
RampdemReader::dataSet  dataSet = rampdem 
)
static

Version of SurfaceAboveGeoid which does bilinear interpolation (in easting/northing) between neighouring cells.

Parameters
lonis the longiutde (degrees)
latis the latitude (degrees)
Returns
elevation above geoid in metres

Definition at line 164 of file RampdemReader.cxx.

Double_t RampdemReader::BilinearInterpolatedSurfaceAboveGeoidEastingNorthing ( Double_t  easting,
Double_t  northing,
RampdemReader::dataSet  dataSet = rampdem 
)
static

Version of SurfaceAboveGeoid which does bilinear interpolation (in easting/northing) between neighouring cells.

Parameters
isthe longiutde (degrees)
latis the latitude (degrees)
Returns
elevation above geoid in metres

Definition at line 179 of file RampdemReader.cxx.

const char * RampdemReader::dataSetToAxisTitle ( RampdemReader::dataSet  dataSet)
static

Get z-axis title for any data set

Parameters
dataSetis the data set
Returns
the z-axis title

Definition at line 838 of file RampdemReader.cxx.

void RampdemReader::EastingNorthingToEN ( Double_t  easting,
Double_t  northing,
Int_t &  e_coord,
Int_t &  n_coord,
RampdemReader::dataSet  dataSet = rampdem 
)
static

Converts Easting/northing to RAMPDEM data indices

Parameters
easting
northing
e_coordis the easting coordinate index
n_coordis the the northing coordinate index
dataSetis the data set to get the e/n coordinate of

Definition at line 508 of file RampdemReader.cxx.

void RampdemReader::EastingNorthingToLonLat ( Double_t  easting,
Double_t  northing,
Double_t &  lon,
Double_t &  lat 
)
static

Convert from easting/northing to longitude and latitude

Parameters
eastingin meters
northingin meters
lonis the longitude
latis the latitude

Definition at line 623 of file RampdemReader.cxx.

void RampdemReader::ENtoLonLat ( Int_t  e_coord,
Int_t  n_coord,
Double_t &  lon,
Double_t &  lat,
RampdemReader::dataSet  dataSet = rampdem 
)
static

Takes as input the indicies from a BEDMAP data set, and turns them into latitude and longitude coordinates. Original code by Stephen Hoover.

Parameters
e_coordis the easting coordinate
n_coordis the northing coordinate
lonis the longiude in degrees
latis the latitude in degrees
dataSetpicks the data set to get the coordinates at the specified lat/lon for.

Definition at line 562 of file RampdemReader.cxx.

TProfile2D * RampdemReader::fillThisHist ( TProfile2D *  theHist,
RampdemReader::dataSet  dataSet 
)
static

Function to loop over a any created histogram and fill it with a given data set This won't work unless you created it with the correct limits. (See

Parameters
theHistis the TProfile2D to be filled
dataSetis the selected data set
Returns
the same histogram (theHist)

Definition at line 1026 of file RampdemReader.cxx.

Double_t RampdemReader::Geoid ( Double_t  latitude)
static

Returns the height of the Earth surface geoid in metres.

Parameters
latitudein degrees
Returns
the height of the geoid in metres

Definition at line 311 of file RampdemReader.cxx.

TProfile2D * RampdemReader::getMap ( RampdemReader::dataSet  dataSet,
int  coarseness 
)
static

Creates a lovely new map of Antarctica from the requested data set with the requested coarseness.

Parameters
dataSetis the dataSet
coarsenessis a rebinning factor for X and Y
Returns
the new TProfile2D

Definition at line 1081 of file RampdemReader.cxx.

void RampdemReader::getMapCoordinates ( double &  xMin,
double &  yMin,
double &  xMax,
double &  yMax,
RampdemReader::dataSet  dataSet = rampdem 
)
static

Get the corners of the map (for a given data set)

Parameters
xMinis the minimum easting (metres)
yMinis the minimum northing (metres)
xMaxis the maximum easting (metres)
yMaxis the maximum northing (metres)
dataSetis the data set from which to select the coordinates

Definition at line 742 of file RampdemReader.cxx.

TProfile2D * RampdemReader::getMapPartial ( RampdemReader::dataSet  dataSet,
int  coarseness,
double  centralLon,
double  centralLat,
double  rangeMetres 
)
static

Create a TProfile2D of the continent with the specified data set, centred on the given coordinates.

Parameters
dataSetis the selected data set
coarsenessdownsamples the easting/northing bins
centralLonis the longitude (degrees) on which to centre the histogram
centralLatis the latitude (degrees) on which to centre the histogram
rangeMetresis the distance from the centre to any edge of the histogram
Returns
the created histogram

Definition at line 1124 of file RampdemReader.cxx.

void RampdemReader::getNumXY ( Int_t &  numX,
Int_t &  numY,
RampdemReader::dataSet  dataSet = rampdem 
)
static

Get number of bins in X and Y for any data set

Parameters
numX
numY
dataSet

Definition at line 766 of file RampdemReader.cxx.

Double_t RampdemReader::iceThickness ( Double_t  lon,
Double_t  lat 
)
static

Returns true if a specified latitude or longitude is on an iceshelf ...according to the RampdemReader::icemask_grounding_and_shelves model

Parameters
lonis the longitude (degrees)
latis the latitude (degrees)
Returns
true if on the continent, false otherwise

Definition at line 1248 of file RampdemReader.cxx.

RampdemReader * RampdemReader::Instance ( )
static

Instance generator.

Instance generated. Deprecated.

Returns
pointer to RampdemReader singleton

Definition at line 124 of file RampdemReader.cxx.

Bool_t RampdemReader::isOnContinent ( Double_t  lon,
Double_t  lat 
)
static

Returns true if a specified latitude or longitude is on the continent... ...according to the RampdemReader::surface model

Parameters
lonis the longitude (degrees)
latis the latitude (degrees)
Returns
true if on the continent, false otherwise

Definition at line 1186 of file RampdemReader.cxx.

Bool_t RampdemReader::isOnIceShelf ( Double_t  lon,
Double_t  lat 
)
static

Returns true if a specified latitude or longitude is on an iceshelf ...according to the RampdemReader::icemask_grounding_and_shelves model

Parameters
lonis the longitude (degrees)
latis the latitude (degrees)
Returns
true if on the continent, false otherwise

Definition at line 1215 of file RampdemReader.cxx.

void RampdemReader::LonLatToEastingNorthing ( Double_t  lon,
Double_t  lat,
Double_t &  easting,
Double_t &  northing 
)
static

Convert longitude and latitude to easting and northing using the geoid model

Parameters
lonis the longitude in degrees
latis the latitude in degrees
eastingin meters
northingin meters

(x_max-x_min);

(y_max-y_min);

Definition at line 536 of file RampdemReader.cxx.

void RampdemReader::LonLattoEN ( Double_t  lon,
Double_t  lat,
int &  e_coord,
int &  n_coord,
RampdemReader::dataSet  dataSet = rampdem 
)
static

Takes latitude and longitude (in degrees) and converts to indicies for BEDMAP matricies. Needs a location for the corner of the matrix, as not all the BEDMAP files cover the same area. Code by Stephen Hoover.

Parameters
lonis the longitude in degrees
latis the latitude in degrees
e_coordis the bedmap east coordinate index
n_coordis the bedmap north coordinate index
dataSetis which data set to get the coordinate of

Definition at line 482 of file RampdemReader.cxx.

TProfile2D * RampdemReader::rampMap ( int  coarseness,
int  set_log_scale,
UInt_t &  xBins,
UInt_t &  yBins 
)
static

DEPRECATED. Left for backward compatibility, prefer getMap(RampdemReader::rampdem...)

Parameters
coarsenessdownsamples the easting/northing bins
set_log_scaleconverts heights to log units
xBinsis the number of bins on the x-axis
yBinsis the number of bins on the y-axis
Returns
a histogram of the surface elevation from the RAMPDEM data set.

Definition at line 651 of file RampdemReader.cxx.

TProfile2D * RampdemReader::rampMapPartial ( int  coarseness,
double  centralLon,
double  centralLat,
double  rangeMetres,
Int_t &  xBins,
Int_t &  yBins,
Double_t &  xMin,
Double_t &  xMax,
Double_t &  yMin,
Double_t &  yMax 
)
static

DEPRECATED. Left for backward compatibility, prefer getMapPartial(RampdemReader::rampdem...)

Parameters
coarsenessdownsamples the easting/northing bins
centralLonis the latitude (degrees) on which to centre the histogram
centralLatis the longitude (degrees) on which to centre the historam
rangeMetresis the extent of the histogram edges from the centre point (metres)
xBinsis the number of bins on the x-axis
yBinsis the number of bins on the y-axis
xMinis the lower limit of the x-axis
xMaxis the upper limit of the x-axis
yMinis the lower limit of the y-axis
yMaxis the upper limit of the y-axis
Returns
a histogram of the surface elevation from the RAMPDEM data set in the specified region.

Definition at line 694 of file RampdemReader.cxx.

int RampdemReader::readRAMPDEM ( )
static

Function to read in the original RAMPDEM data. This function is called by getDataIfNeeded, as the RAMPDEM elevation data files have a different format from the BEDMAP2 data

Returns
greater than zero if reading/parsing files fails for some reason.

Definition at line 326 of file RampdemReader.cxx.

Double_t RampdemReader::Surface ( Double_t  lon,
Double_t  lat 
)
static

Returns the height of the Antarctic surface above the centre of the Earth.

Parameters
lonis the longitude (degrees)
latis the latitude (degrees)
Returns
height of the Antarctic surface above the geoid.

Definition at line 148 of file RampdemReader.cxx.

Double_t RampdemReader::SurfaceAboveGeoid ( Double_t  lon,
Double_t  lat,
RampdemReader::dataSet  dataSet = rampdem 
)
static

Returns the elevation above the geoid of the surface of the top of the ice (or bare ground if no ice) in meters, at a location specified by a latitude and longitude (in degrees).

Parameters
lonis the longiutde (degrees)
latis the latitude (degrees)
Returns
elevation above geoid in metres

Definition at line 249 of file RampdemReader.cxx.

Double_t RampdemReader::SurfaceAboveGeoidEN ( Double_t  Easting,
Double_t  Northing,
RampdemReader::dataSet  dataSet = rampdem 
)
static

Returns the elevation above the geoid of the surface of the top of the ice (or bare ground if no ice) in meters, at a location specified by a latitude and longitude (in degrees).

Parameters
Eastingis easting (m)
Northingis northing (m)
Returns
elevation above geoid in metres

Definition at line 265 of file RampdemReader.cxx.


The documentation for this class was generated from the following files: