Public Member Functions | Static Public Attributes

CLOUDSATFileData Class Reference

Inheritance diagram for CLOUDSATFileData:
Inheritance graph
[legend]
Collaboration diagram for CLOUDSATFileData:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CLOUDSATFileData (const string &name, const string &mode="r")
 constructor
virtual ~CLOUDSATFileData ()
 destructor
void load_geolocation_data ()
 read the geolocation data (latitude, longitude and time) This method is used to make the search of the indexes of a (lat,lon,time) point faster.
void free_geolocation_data ()
 free eventually loaded geolocation data If the geolocation data are not loaded, doesn't do anything
const bool contain_location (const float &lat, const float &lon, const double &tolerance=0.01)
 check if this file has eventually data coincident with (lat,lon) Actually, it only tests if (lat,lon) is contained in the data's bounding rectangle.
const bool contain_data (const float &lat, const float &lon, const double &time, const double &colocation_tolerance=0.01)
 check if the file has possible (lat,lon) coincidence
const float get_nearest_point_distance (const float &lat, const float &lon, const float coloc_tolerance=CLOUDSATFileData::colocation_tolerance)
 compute the distance to (lat,lon) of the nearest point in the data If coloc_tolerance is given, it will compute only the distance of the points that have a distance to ( lat, lon ) inferior to coloc_tolerance
string get_product () const
 access to the product name
string get_version () const
 access to the version of the product
const bool get_index (const float &lat, const float &lon, int &nearest_pix_idx, const float colocation_tolerance=0.01)
 find the index of the nearest point to (lat,lon) in the data. If (lat,lon) is not found or out of the colocalisation_frame, returned indexes are [-1,-1]
virtual void get_vindex (vector< vector< int > > &v_index, const float &lat, const float &lon, const float colocation_tolerance=0.01)
 build the list of indices of pixels that are in colocation tolerance, sorted by increasing distance to (lat,lon) If (lat,lon) is not found or out of the colocalisation_frame, returns an empty vector
const int get_nb_geo_points ()
 retrieve the number of (lat,lon) pixels in the file
virtual void load_v_pixel ()
 load the list data pixels
virtual void close_data_file ()
 closes the file.
virtual void open_data_file ()
 opens the file.
virtual void get_pixel_coord (const vector< int > &ipix, float &lat, float &lon, double &time)
 retrieve the coordinates of a pixel using its index

Static Public Attributes

static const int nb_vbins = 125
static const int nb_profile_max = 40000
static const int nb_layers = 5

Detailed Description

Author:
Nicolas PASCAL reading of CLOUSAT files

Constructor & Destructor Documentation

CLOUDSATFileData::CLOUDSATFileData ( const string &  name,
const string &  mode = "r" 
)

constructor

Parameters:
name the filename
mode opening mode. only "r" at this time

Member Function Documentation

const bool CLOUDSATFileData::contain_data ( const float &  lat,
const float &  lon,
const double &  time,
const double &  colocation_tolerance = 0.01 
) [virtual]

check if the file has possible (lat,lon) coincidence

Warning:
it's an EVENTUAL coincidence. That is not a proof !!!
Parameters:
lat latitude
lon longitude
time time
colocation_tolerance the acceptable bias (in km or degrees. Supposed to be in, a plane approximation) between [lat,lon] and the nearest data point.
Returns:
true if can eventually contain a coincidence with the point.
Warning:
at this time always true. I don't have a good way to do it

Reimplemented from FileData.

References contain_location(), and FileData::contain_time().

const bool CLOUDSATFileData::contain_location ( const float &  lat,
const float &  lon,
const double &  tolerance = 0.01 
) [virtual]

check if this file has eventually data coincident with (lat,lon) Actually, it only tests if (lat,lon) is contained in the data's bounding rectangle.

Parameters:
lat the latitude of the event
lon the longitude of the event
tolerance acceptable bias between the nearest point in the data and the given (lat,lon) point
Returns:
true if a point in the data has been found in the colocation frame

Reimplemented from FileData.

References get_index().

Referenced by contain_data().

const bool CLOUDSATFileData::get_index ( const float &  lat,
const float &  lon,
int &  nearest_pix_idx,
const float  colocation_tolerance = 0.01 
)

find the index of the nearest point to (lat,lon) in the data. If (lat,lon) is not found or out of the colocalisation_frame, returned indexes are [-1,-1]

Parameters:
lat the latitude
lon the longitude
nearest_pix_idx the index of the nearest measure. -1 if no coincidence found.
colocation_tolerance the acceptable bias (in km or degrees. Supposed to be in, a plane approximation) between [lat,lon] and the nearest data point.
Returns:
true if the coincidence has been found

References free_geolocation_data(), SatelliteFileData::is_geolocation_data_loaded(), SatelliteFileData::lat_data, load_geolocation_data(), SatelliteFileData::lon_data, SatelliteFileData::time_data, and SatelliteFileData::v_pixel.

Referenced by contain_location(), and get_nearest_point_distance().

const int CLOUDSATFileData::get_nb_geo_points (  )  [inline]

retrieve the number of (lat,lon) pixels in the file

Returns:
the number of (lat,lon) pixels
const float CLOUDSATFileData::get_nearest_point_distance ( const float &  lat,
const float &  lon,
const float  coloc_tolerance = CLOUDSATFileData::colocation_tolerance 
)

compute the distance to (lat,lon) of the nearest point in the data If coloc_tolerance is given, it will compute only the distance of the points that have a distance to ( lat, lon ) inferior to coloc_tolerance

Parameters:
lat the latitude
lon the longitude
coloc_tolerance the -/+ maximal tolerance for 2 points considered as colocated
Returns:
the distance to the nearest point, or -1 if no point in the colocalisation frame has been found.

References free_geolocation_data(), get_index(), SatelliteFileData::is_geolocation_data_loaded(), SatelliteFileData::lat_data, load_geolocation_data(), and SatelliteFileData::lon_data.

virtual void CLOUDSATFileData::get_pixel_coord ( const vector< int > &  ipix,
float &  lat,
float &  lon,
double &  time 
) [inline, virtual]

retrieve the coordinates of a pixel using its index

Parameters:
ipix [IN] index of the pixel
lat [OUT] latitude of the pixel
lon [OUT] longitude of the pixel
time [OUT] timestamp of the pixel

References SatelliteFileData::is_geolocation_data_loaded(), SatelliteFileData::lat_data, load_geolocation_data(), SatelliteFileData::lon_data, and SatelliteFileData::time_data.

string CLOUDSATFileData::get_product (  )  const [inline]

access to the product name

Returns:
the product name
string CLOUDSATFileData::get_version (  )  const [inline]

access to the version of the product

Returns:
the version of the product
virtual void CLOUDSATFileData::get_vindex ( vector< vector< int > > &  v_index,
const float &  lat,
const float &  lon,
const float  colocation_tolerance = 0.01 
) [inline, virtual]

build the list of indices of pixels that are in colocation tolerance, sorted by increasing distance to (lat,lon) If (lat,lon) is not found or out of the colocalisation_frame, returns an empty vector

Parameters:
lat the latitude
lon the longitude
colocation_tolerance the acceptable bias (in km or degrees. Supposed to be in, a plane approximation) between [lat,lon] and the nearest data point.
Returns:
the list of indices of pixels

Member Data Documentation

const int CLOUDSATFileData::nb_layers = 5 [static]

Maximum number of layers for a CLOUDSAT 2B-GEOPROF-LIDAR product

const int CLOUDSATFileData::nb_profile_max = 40000 [static]

Maximum number of profiles for a CLOUDSAT orbit

const int CLOUDSATFileData::nb_vbins = 125 [static]

Number of vertical bins of a CLOUDSAT profile (fixed)


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