#include <caliopfiledata.h>
Public Types | |
enum | ProductType { CAL_LID_UNDEFINED, CAL_LID_L1, CAL_LID_L2_333mCLay, CAL_LID_L2_01kmCLay, CAL_LID_L2_05kmCLay, CAL_LID_L2_05kmALay, CAL_LID_L2_40kmAPro, CAL_LID_L2_05kmCPro, CAL_LID_L2_VFM } |
Public Member Functions | |
virtual bool | is_viewing_directions_data_loaded () |
build the pixels viewing directions, as a segment from satellite position to viewed pixel center. All positions are stored in Earth Center Rotating carthesian coordinates. For directionnal products (L1), a pixel is identified by the 3 indices : [irow, icolum, idirection]. For non directionnal ones, only [irow, icolum] is used | |
virtual void | load_viewing_directions_data () |
load the data requested for computing the viewing directions | |
virtual void | free_viewing_directions_data () |
free the data requested for computing the viewing directions | |
virtual void | get_viewing_directions (const vector< int > &ipix, vector< Observation > &v_obs) |
constucts the viewing directions observations for the given profile | |
CALIOPFileData (const string &_name=string(""), const string &mode=string("r")) | |
~CALIOPFileData () | |
const int | get_level () const |
void | set_lat_lon_index_max () |
const int * | get_lat_lon_index_max () const |
const bool | is_day () const |
const int | get_nb_geo_points () const |
int | get_nb_layer () const |
const bool | get_index (const float &lat, const float &lon, int &nearest_pix_idx, const float colocation_tolerance=CALIOPFileData::colocation_tolerance) |
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=CALIOPFileData::colocation_tolerance) |
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 float | get_nearest_point_distance (const float &lat, const float &lon, const float coloc_tolerance=CALIOPFileData::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 | |
const bool | contain_location (const float &lat, const float &lon, const double &tolerance=CALIOPFileData::colocation_tolerance) |
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=CALIOPFileData::colocation_tolerance) |
check if the file has possible (lat,lon) coincidence | |
void | load_geolocation_data () |
read the geolocations data and put it in memory 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 | |
const bool | is_geolocation_data_loaded () const |
check if the geolocation data have been already loaded | |
virtual void | load_v_pixel () |
build the lines of sight for all pixels, from satellite position to viewed pixel center. All positions arez gieven in Earth Center Rotating carthesian coordinates | |
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 | |
const float | get_resolution () const |
accessor to the product horizontal resolution | |
virtual string | get_product () |
Static Public Member Functions | |
static bool | is_same_orbit (const CALIOPFileData *fd1, const CALIOPFileData *fd2) |
check if 2 CALIOP files contain data of the same half-orbit. It compares the end of the files' names. The purpose of this method is to be used as a binary predicate for the STL search algorithms | |
template<class T > | |
static const T | get_calipso_fill_value (const string &typecode) |
static const float32 * | get_cal_lid_l2_vfm_altitude () |
accessor to the altitude vector in CALIOP L2 VFM product | |
static const float32 * | get_cal_lid_l2_05kmcpro_altitude () |
accessor to the altitude vector in CALIOP L2 05km CPro product | |
Static Public Attributes | |
static const int | nb_cloud_layer = 10 |
static const int | nb_lidar_surface_elevation = 8 |
static const int | nb_aerosol_layer = 8 |
static const int | nb_vbins = 583 |
static const int | nb_vfm_bins = 5515 |
static const int | nb_vfm_samples_per_profile = 545 |
static const int | nb_meteo_level = 33 |
static const int | nb_05kmcpro_bins = 345 |
static const float32 | meteo_level_altitude [] |
static const float32 | cal_lid_l2_vfm_altitude [] |
static const float32 | cal_lid_l2_vfm_altitude_ud [] |
static const float32 | cal_lid_l2_05kmCPro_altitude [] |
static const float | colocation_tolerance = 0.01 |
Protected Member Functions | |
void | set_lat_lon_min_max () |
Manages the opening, reading and accessing to data of a CALIOP file ( CALIPSO LIDAR ) To see a more detailed documentation about this class, please refer to the HDFFileData class for all inherited methods.
You will find some examples on how to do some useful actions (loading an sds array...), in the HDFFileData class documentation.
defines the possible types of CALIOP products
CALIOPFileData::CALIOPFileData | ( | const string & | _name = string("") , |
|
const string & | mode = string("r") | |||
) |
Constructor
_name | the name of the file to open | |
mode | the opening mode. Only 'r' (reading) is supported at this time |
CALIOPFileData::~CALIOPFileData | ( | ) |
Destructor
References free_geolocation_data(), HDFFileData::free_hdf_file(), and HDFFileData::free_hdf_metadata().
const bool CALIOPFileData::contain_data | ( | const float & | lat, | |
const float & | lon, | |||
const double & | time, | |||
const double & | colocation_tolerance = CALIOPFileData::colocation_tolerance | |||
) | [virtual] |
check if the file has possible (lat,lon) coincidence
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. |
Reimplemented from FileData.
References contain_location(), and FileData::contain_time().
const bool CALIOPFileData::contain_location | ( | const float & | lat, | |
const float & | lon, | |||
const double & | tolerance = CALIOPFileData::colocation_tolerance | |||
) | [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.
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 |
Reimplemented from FileData.
References get_index().
Referenced by contain_data().
static const float32* CALIOPFileData::get_cal_lid_l2_05kmcpro_altitude | ( | ) | [inline, static] |
accessor to the altitude vector in CALIOP L2 05km CPro product
References cal_lid_l2_05kmCPro_altitude.
static const float32* CALIOPFileData::get_cal_lid_l2_vfm_altitude | ( | ) | [inline, static] |
accessor to the altitude vector in CALIOP L2 VFM product
References cal_lid_l2_vfm_altitude.
const T CALIOPFileData::get_calipso_fill_value | ( | const string & | typecode | ) | [static] |
return the fill value defined for the different data type as defined in the CALIPSO specification
typecode | "float", "int8" ... |
const bool CALIOPFileData::get_index | ( | const float & | lat, | |
const float & | lon, | |||
int & | nearest_pix_idx, | |||
const float | colocation_tolerance = CALIOPFileData::colocation_tolerance | |||
) |
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]
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. |
References free_geolocation_data(), get_nb_geo_points(), is_geolocation_data_loaded(), SatelliteFileData::lat_data, load_geolocation_data(), and SatelliteFileData::lon_data.
Referenced by contain_location(), and get_nearest_point_distance().
const int* CALIOPFileData::get_lat_lon_index_max | ( | ) | const [inline] |
access to the higher usable indexes of the "Latitude" and "Longitude" sds. In other words, it returns the size of those sds arrays, diminuted of 1. Ex : if the sds "Latitude" has a size of (287,3), it will return [286,2]
Referenced by get_nb_geo_points().
const int CALIOPFileData::get_level | ( | ) | const [inline] |
read the level of the file
const int CALIOPFileData::get_nb_geo_points | ( | ) | const |
access the number of different shot times of the file.
References get_lat_lon_index_max().
Referenced by get_index(), load_geolocation_data(), load_v_pixel(), and set_lat_lon_min_max().
int CALIOPFileData::get_nb_layer | ( | ) | const [inline] |
access to the accessible number of LIDAR echos layers.
const float CALIOPFileData::get_nearest_point_distance | ( | const float & | lat, | |
const float & | lon, | |||
const float | coloc_tolerance = CALIOPFileData::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
lat | the latitude | |
lon | the longitude | |
coloc_tolerance | the -/+ maximal tolerance for 2 points considered as colocated |
References free_geolocation_data(), get_index(), is_geolocation_data_loaded(), SatelliteFileData::lat_data, load_geolocation_data(), and SatelliteFileData::lon_data.
virtual void CALIOPFileData::get_pixel_coord | ( | const vector< int > & | ipix, | |
float & | lat, | |||
float & | lon, | |||
double & | time | |||
) | [inline, virtual] |
retrieve the coordinates of a pixel using its index
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 is_geolocation_data_loaded(), SatelliteFileData::lat_data, load_geolocation_data(), SatelliteFileData::lon_data, and SatelliteFileData::time_data.
const float CALIOPFileData::get_resolution | ( | ) | const [inline] |
accessor to the product horizontal resolution
void CALIOPFileData::get_viewing_directions | ( | const vector< int > & | ipix, | |
vector< Observation > & | v_obs | |||
) | [virtual] |
constucts the viewing directions observations for the given profile
ipix | 1D profile indice | |
v_obs | vector of observation(s) |
Reimplemented from FileData.
References SatelliteFileData::lat_data, SatelliteFileData::lon_data, Carthesian::Point3D::set(), Geodetic::Point3D::set(), SatelliteFileData::time_data, and Geodetic::Point3D::to_carthesian().
void CALIOPFileData::get_vindex | ( | vector< vector< int > > & | v_index, | |
const float & | lat, | |||
const float & | lon, | |||
const float | colocation_tolerance = CALIOPFileData::colocation_tolerance | |||
) | [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
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. |
References SatelliteFileData::v_pixel.
const bool CALIOPFileData::is_day | ( | ) | const |
wether the file contains day or night data
static bool CALIOPFileData::is_same_orbit | ( | const CALIOPFileData * | fd1, | |
const CALIOPFileData * | fd2 | |||
) | [inline, static] |
check if 2 CALIOP files contain data of the same half-orbit. It compares the end of the files' names. The purpose of this method is to be used as a binary predicate for the STL search algorithms
fd1 | first CALIOP file | |
fd2 | first CALIOP file |
References FileData::get_name().
bool CALIOPFileData::is_viewing_directions_data_loaded | ( | ) | [virtual] |
build the pixels viewing directions, as a segment from satellite position to viewed pixel center. All positions are stored in Earth Center Rotating carthesian coordinates. For directionnal products (L1), a pixel is identified by the 3 indices : [irow, icolum, idirection]. For non directionnal ones, only [irow, icolum] is used
test if the data requested for computing the viewing directions has been loaded
Reimplemented from FileData.
void CALIOPFileData::load_v_pixel | ( | ) | [virtual] |
build the lines of sight for all pixels, from satellite position to viewed pixel center. All positions arez gieven in Earth Center Rotating carthesian coordinates
free the pixels lines of sight, if set load the list data pixels
References get_nb_geo_points(), SatelliteFileData::lat_data, SatelliteFileData::lon_data, and SatelliteFileData::v_pixel.
Referenced by load_geolocation_data().
void CALIOPFileData::set_lat_lon_min_max | ( | ) | [protected] |
set the mininimal and maximal values of latitude and longitude
References free_geolocation_data(), get_nb_geo_points(), HDFFileMetaData::get_value(), is_geolocation_data_loaded(), SatelliteFileData::lat_data, load_geolocation_data(), SatelliteFileData::lon_data, and HDFFileData::metadata.
const float32 CALIOPFileData::cal_lid_l2_05kmCPro_altitude [static] |
altitudes of the bins in the CAL_LID L2 05kmCPro products
Referenced by get_cal_lid_l2_05kmcpro_altitude().
const float32 CALIOPFileData::cal_lid_l2_vfm_altitude [static] |
altitudes of the bins of the CALIOP L2 VFM profiles in km, from down to up. Each value is the mean altitude of the bin ( ie: ( top_bin_alt - base_bin_alt ) / 2 )
Referenced by get_cal_lid_l2_vfm_altitude().
const float32 CALIOPFileData::cal_lid_l2_vfm_altitude_ud [static] |
altitudes of the bins of the CALIOP L2 VFM profiles in km, from up to down
const float32 CALIOPFileData::meteo_level_altitude [static] |
{39.855, 38.055, 35.955, 33.855, 32.055, 30.015, 28.035, 26.055, 24.075, 21.915, 19.995, 19.035, 18.015, 16.995, 15.975, 15.015, 13.995, 12.975, 12.015, 10.995, 9.975, 9.015, 8.01, 6.99, 6.0, 5.01, 3.99, 3.0, 2.01, 0.99, 0.0, -0.945, -1.845}
Altitudes of each level in the meteo profiles data. To be rigourous, those levels shall be loaded while reading the data (they are available in the VD named "Met_Data_Altitudes" ) but, at the time this comment is written, they are constant
const int CALIOPFileData::nb_05kmcpro_bins = 345 [static] |
number of bins in cloud profile products ( CPro )
const int CALIOPFileData::nb_aerosol_layer = 8 [static] |
number of lidar layers of aerosol products
const int CALIOPFileData::nb_cloud_layer = 10 [static] |
number of lidar layers of cloud products
const int CALIOPFileData::nb_lidar_surface_elevation = 8 [static] |
number surface elevation data for one profile
const int CALIOPFileData::nb_meteo_level = 33 [static] |
number of meteo levels (pressure and temperature) in L1 files
const int CALIOPFileData::nb_vbins = 583 [static] |
number of vertical bins for L1 products (583)
const int CALIOPFileData::nb_vfm_bins = 5515 [static] |
number of vertical feature masks for L2 VFM products
const int CALIOPFileData::nb_vfm_samples_per_profile = 545 [static] |
number of vsamples per profile for L2 VFM products