bes  Updated for version 3.20.6
HDFSP::File Class Reference

#include <HDFSP.h>

Collaboration diagram for HDFSP::File:
Collaboration graph

Public Member Functions

bool Check_update_special (const std::string &gridname) throw (Exception)
 
const std::string & getPath () const
 Obtain the path of the file. More...
 
SDgetSD () const
 Public interface to Obtain SD. More...
 
SPType getSPType () const
 Obtain special HDF4 product type. More...
 
const std::vector< VDATA * > & getVDATAs () const
 Public interface to Obtain Vdata. More...
 
const std::vector< AttrContainer * > & getVgattrs () const
 Get attributes for all vgroups. More...
 
void Handle_AIRS_L23 () throw (Exception)
 
bool Has_Dim_NoScale_Field () const
 This file has a field that is a SDS dimension but no dimension scale. More...
 
void Prepare () throw (Exception)
 

Static Public Member Functions

static FileRead (const char *path, int32 sdid, int32 fileid) throw (Exception)
 Retrieve SDS and Vdata information from the HDF4 file. More...
 
static FileRead_Hybrid (const char *path, int32 sdid, int32 fileid) throw (Exception)
 

Protected Member Functions

void CheckSDType () throw (Exception)
 This method will check if the HDF4 file is one of TRMM or OBPG products we supported. More...
 
void create_sds_dim_name_list ()
 Create the new dimension name set and the dimension name to size map. More...
 
 File (const char *hdf4file_path)
 
void handle_sds_coords (bool &COARDFLAG, std::string &lldimname1, std::string &lldimname2) throw (Exception)
 Create "coordinates", "units" CF attributes. More...
 
void handle_sds_fakedim_names () throw (Exception)
 
void handle_sds_final_dim_names () throw (Exception)
 Create the final CF-compliant dimension name list for each field. More...
 
void handle_sds_missing_fields ()
 Add the missing coordinate variables based on the corrected dimension name list. More...
 
void handle_sds_names (bool &COARDFLAG, std::string &lldimname1, std::string &lldimname2) throw (Exception)
 Create the final CF-compliant field name list. More...
 
void handle_vdata () throw (Exception)
 Handle Vdata. More...
 
void InsertOrigFieldPath_ReadVgVdata () throw (Exception)
 The full path of SDS and Vdata will be obtained. More...
 
void obtain_path (int32 file_id, int32 sd_id, char *full_path, int32 pobj_ref) throw (Exception)
 The internal function used by InsertOrigFieldPath_ReadVgVdata. More...
 
bool Obtain_TRMM_V7_latlon_name (const SDField *sdfield, const int latsize, const int lonsize, std::string &latname, std::string &lonname) throw (Exception)
 
void Obtain_TRMML3S_V7_latlon_size (int &latsize, int &lonsize)
 void Obtain_TRMML3S_V7_latlon_size(int &latsize, int&lonsize) throw(Exception); More...
 
void obtain_vdata_path (int32 file_id, char *full_path, int32 pobj_ref) throw (Exception)
 The internal function used to obtain the path for hybrid non-lone vdata. More...
 
void PrepareCERAVGSYN () throw (Exception)
 
void PrepareCERES4IG () throw (Exception)
 
void PrepareCERSAVGID () throw (Exception)
 
void PrepareCERZAVG () throw (Exception)
 Special method to prepare CERES Zonal Average latitude and longitude information. More...
 
void PrepareMODISARNSS () throw (Exception)
 
void PrepareOBPGL2 () throw (Exception)
 Special method to prepare OBPG Level 2 latitude and longitude information. The latitude and longitude need to be interpolated. More...
 
void PrepareOBPGL3 () throw (Exception)
 Special method to prepare OBPG Level 3 latitude and longitude information. The latitude and longitude are calculated by using the attributes. More...
 
void PrepareOTHERHDF () throw (Exception)
 We still provide a hook for other HDF data product although no CF compliant is followed. More...
 
void PrepareTRMML2_V6 () throw (Exception)
 Latitude and longitude are stored in one array(geolocation). Need to separate. More...
 
void PrepareTRMML2_V7 () throw (Exception)
 Latitude and longitude are stored in different fields. Need to separate. More...
 
void PrepareTRMML3A_V6 () throw (Exception)
 Special method to prepare TRMM Level 3A46 latitude and longitude information. More...
 
void PrepareTRMML3B_V6 () throw (Exception)
 Special method to prepare TRMM Level 3B latitude and longitude information. More...
 
void PrepareTRMML3C_V6 () throw (Exception)
 Special method to prepare TRMM Level 3 CSH latitude,longitude and Height information. More...
 
void PrepareTRMML3M_V7 ()
 Special method to prepare TRMM multiple grid Level 3 geolocation fields(latitude,longitude,etc) information. More...
 
void PrepareTRMML3S_V7 () throw (Exception)
 Special method to prepare TRMM single grid Level 3 geolocation fields(latitude,longitude,etc) information. More...
 
void ReadHybridNonLoneVdatas (File *) throw (Exception)
 
void ReadLoneVdatas (File *) throw (Exception)
 Handle non-attribute lone vdatas. More...
 
void ReadVgattrs (int32 vgroup_id, char *fullpath) throw (Exception)
 Obtain vgroup attributes. More...
 

Protected Attributes

std::string path
 The absolute path of the file. More...
 
SDsd
 Pointer to the SD instance. There is only one SD instance in an HDF4 file. More...
 
std::vector< VDATA * > vds
 Vdata objects in this file. More...
 
std::vector< AttrContainer * > vg_attrs
 Vgroup attribute information. See the description of the class AttrContainer. More...
 

Detailed Description

This class retrieves all information from an HDF4 file. It is a container for SDS and Vdata.

Definition at line 726 of file HDFSP.h.

Member Function Documentation

◆ CheckSDType()

void File::CheckSDType ( )
throw (Exception
)
protected

This method will check if the HDF4 file is one of TRMM or OBPG products we supported.

Definition at line 1290 of file HDFSP.cc.

◆ create_sds_dim_name_list()

void File::create_sds_dim_name_list ( )
protected

Create the new dimension name set and the dimension name to size map.

Definition at line 3716 of file HDFSP.cc.

◆ getPath()

const std::string& HDFSP::File::getPath ( ) const
inline

Obtain the path of the file.

Definition at line 765 of file HDFSP.h.

◆ getSD()

SD* HDFSP::File::getSD ( ) const
inline

Public interface to Obtain SD.

Definition at line 771 of file HDFSP.h.

◆ getSPType()

SPType HDFSP::File::getSPType ( ) const
inline

Obtain special HDF4 product type.

Definition at line 749 of file HDFSP.h.

◆ getVDATAs()

const std::vector< VDATA * >& HDFSP::File::getVDATAs ( ) const
inline

Public interface to Obtain Vdata.

Definition at line 777 of file HDFSP.h.

◆ getVgattrs()

const std::vector<AttrContainer *>& HDFSP::File::getVgattrs ( ) const
inline

Get attributes for all vgroups.

Definition at line 783 of file HDFSP.h.

◆ handle_sds_coords()

void File::handle_sds_coords ( bool &  COARDFLAG,
std::string &  lldimname1,
std::string &  lldimname2 
)
throw (Exception
)
protected

Create "coordinates", "units" CF attributes.

Definition at line 4008 of file HDFSP.cc.

◆ handle_sds_fakedim_names()

void File::handle_sds_fakedim_names ( )
throw (Exception
)
protected

Handle SDS fakedim names: make the dimensions with the same dimension size share the same dimension name. In this way, we can reduce many fakedims.

Definition at line 3641 of file HDFSP.cc.

◆ handle_sds_final_dim_names()

void File::handle_sds_final_dim_names ( )
throw (Exception
)
protected

Create the final CF-compliant dimension name list for each field.

Handle dimension name clashings

Definition at line 3775 of file HDFSP.cc.

◆ handle_sds_missing_fields()

void File::handle_sds_missing_fields ( )
protected

Add the missing coordinate variables based on the corrected dimension name list.

Definition at line 3739 of file HDFSP.cc.

◆ handle_sds_names()

void File::handle_sds_names ( bool &  COARDFLAG,
std::string &  lldimname1,
std::string &  lldimname2 
)
throw (Exception
)
protected

Create the final CF-compliant field name list.

Definition at line 3823 of file HDFSP.cc.

◆ handle_vdata()

void File::handle_vdata ( )
throw (Exception
)
protected

Handle Vdata.

Definition at line 4092 of file HDFSP.cc.

◆ Has_Dim_NoScale_Field()

bool HDFSP::File::Has_Dim_NoScale_Field ( ) const
inline

This file has a field that is a SDS dimension but no dimension scale.

Definition at line 756 of file HDFSP.h.

◆ InsertOrigFieldPath_ReadVgVdata()

void File::InsertOrigFieldPath_ReadVgVdata ( )
throw (Exception
)
protected

The full path of SDS and Vdata will be obtained.

Definition at line 2747 of file HDFSP.cc.

◆ obtain_path()

void File::obtain_path ( int32  file_id,
int32  sd_id,
char *  full_path,
int32  pobj_ref 
)
throw (Exception
)
protected

The internal function used by InsertOrigFieldPath_ReadVgVdata.

Definition at line 3085 of file HDFSP.cc.

◆ Obtain_TRMML3S_V7_latlon_size()

void File::Obtain_TRMML3S_V7_latlon_size ( int &  latsize,
int &  lonsize 
)
protected

void Obtain_TRMML3S_V7_latlon_size(int &latsize, int&lonsize) throw(Exception);

Definition at line 4304 of file HDFSP.cc.

◆ obtain_vdata_path()

void File::obtain_vdata_path ( int32  file_id,
char *  full_path,
int32  pobj_ref 
)
throw (Exception
)
protected

The internal function used to obtain the path for hybrid non-lone vdata.

Definition at line 3422 of file HDFSP.cc.

◆ Prepare()

void File::Prepare ( )
throw (Exception
)

The main step to make HDF4 SDS objects CF-complaint. All dimension(coordinate variables) information need to be ready. All special arrangements need to be done in this step.

Definition at line 4144 of file HDFSP.cc.

◆ PrepareCERAVGSYN()

void File::PrepareCERAVGSYN ( )
throw (Exception
)
protected

Special method to prepare CERES AVG (CER_AVG_???) and CERES SYN(CER_SYN_???) latitude and longitude information. Latitude and longitude are provided; some redundant CO-Latitude and longitude are removed from the final DDS.

Definition at line 5830 of file HDFSP.cc.

◆ PrepareCERES4IG()

void File::PrepareCERES4IG ( )
throw (Exception
)
protected

Special method to prepare CERES ES4 (CER_ES4_???) and CERES ISCCP GEO(CER_ISCCP__???GEO) latitude and longitude information. Essentially the lat/lon need to be condensed to 1-D for the geographic projection.

Definition at line 5917 of file HDFSP.cc.

◆ PrepareCERSAVGID()

void File::PrepareCERSAVGID ( )
throw (Exception
)
protected

Special method to prepare CERES SAVG (CER_SAVG_???) and CERES ISCCP DAYLIKE(CER_ISCCP__???DAYLIKE) latitude and longitude information. Essentially nested CERES 2-d lat/lon need to be provided. https://eosweb.larc.nasa.gov/sites/default/files/project/ceres/quality_summaries/srbavg_ed2d/nestedgrid.pdf

Definition at line 6057 of file HDFSP.cc.

◆ PrepareCERZAVG()

void File::PrepareCERZAVG ( )
throw (Exception
)
protected

Special method to prepare CERES Zonal Average latitude and longitude information.

Definition at line 6202 of file HDFSP.cc.

◆ PrepareMODISARNSS()

void File::PrepareMODISARNSS ( )
throw (Exception
)
protected

MODISARNSS is a special MODIS product saved as pure HDF4 files. Dimension names of different fields need to be changed to be consistent with lat/lon.

Definition at line 6253 of file HDFSP.cc.

◆ PrepareOBPGL2()

void File::PrepareOBPGL2 ( )
throw (Exception
)
protected

Special method to prepare OBPG Level 2 latitude and longitude information. The latitude and longitude need to be interpolated.

Definition at line 5586 of file HDFSP.cc.

◆ PrepareOBPGL3()

void File::PrepareOBPGL3 ( )
throw (Exception
)
protected

Special method to prepare OBPG Level 3 latitude and longitude information. The latitude and longitude are calculated by using the attributes.

Definition at line 5671 of file HDFSP.cc.

◆ PrepareOTHERHDF()

void File::PrepareOTHERHDF ( )
throw (Exception
)
protected

We still provide a hook for other HDF data product although no CF compliant is followed.

Definition at line 6305 of file HDFSP.cc.

◆ PrepareTRMML2_V6()

void File::PrepareTRMML2_V6 ( )
throw (Exception
)
protected

Latitude and longitude are stored in one array(geolocation). Need to separate.

Special method to prepare TRMM Level 2 latitude and longitude information. Latitude and longitude are stored in one array(geolocation). Need to separate.

Definition at line 4992 of file HDFSP.cc.

◆ PrepareTRMML2_V7()

void File::PrepareTRMML2_V7 ( )
throw (Exception
)
protected

Latitude and longitude are stored in different fields. Need to separate.

Definition at line 4354 of file HDFSP.cc.

◆ PrepareTRMML3A_V6()

void File::PrepareTRMML3A_V6 ( )
throw (Exception
)
protected

Special method to prepare TRMM Level 3A46 latitude and longitude information.

Definition at line 5257 of file HDFSP.cc.

◆ PrepareTRMML3B_V6()

void File::PrepareTRMML3B_V6 ( )
throw (Exception
)
protected

Special method to prepare TRMM Level 3B latitude and longitude information.

Definition at line 5149 of file HDFSP.cc.

◆ PrepareTRMML3C_V6()

void File::PrepareTRMML3C_V6 ( )
throw (Exception
)
protected

Special method to prepare TRMM Level 3 CSH latitude,longitude and Height information.

Definition at line 5427 of file HDFSP.cc.

◆ PrepareTRMML3M_V7()

void File::PrepareTRMML3M_V7 ( )
protected

Special method to prepare TRMM multiple grid Level 3 geolocation fields(latitude,longitude,etc) information.

Definition at line 4840 of file HDFSP.cc.

◆ PrepareTRMML3S_V7()

void File::PrepareTRMML3S_V7 ( )
throw (Exception
)
protected

Special method to prepare TRMM single grid Level 3 geolocation fields(latitude,longitude,etc) information.

Definition at line 4504 of file HDFSP.cc.

◆ Read()

File * File::Read ( const char *  path,
int32  sdid,
int32  fileid 
)
throw (Exception
)
static

Retrieve SDS and Vdata information from the HDF4 file.

Definition at line 202 of file HDFSP.cc.

◆ Read_Hybrid()

File * File::Read_Hybrid ( const char *  path,
int32  sdid,
int32  fileid 
)
throw (Exception
)
static

Retrieve SDS and Vdata information from the hybrid HDF-EOS file. Currently we only support the access of additional SDS objects.

Definition at line 257 of file HDFSP.cc.

◆ ReadHybridNonLoneVdatas()

void File::ReadHybridNonLoneVdatas ( File file)
throw (Exception
)
protected

Handle non-attribute non-lone vdatas. Note: this function is only used for handling hybrid Vdata functions.

Definition at line 553 of file HDFSP.cc.

◆ ReadLoneVdatas()

void File::ReadLoneVdatas ( File file)
throw (Exception
)
protected

Handle non-attribute lone vdatas.

Definition at line 314 of file HDFSP.cc.

◆ ReadVgattrs()

void File::ReadVgattrs ( int32  vgroup_id,
char *  fullpath 
)
throw (Exception
)
protected

Obtain vgroup attributes.

Definition at line 2693 of file HDFSP.cc.

Member Data Documentation

◆ path

std::string HDFSP::File::path
protected

The absolute path of the file.

Definition at line 798 of file HDFSP.h.

◆ sd

SD* HDFSP::File::sd
protected

Pointer to the SD instance. There is only one SD instance in an HDF4 file.

Definition at line 801 of file HDFSP.h.

◆ vds

std::vector< VDATA * > HDFSP::File::vds
protected

Vdata objects in this file.

Definition at line 804 of file HDFSP.h.

◆ vg_attrs

std::vector<AttrContainer *> HDFSP::File::vg_attrs
protected

Vgroup attribute information. See the description of the class AttrContainer.

Definition at line 807 of file HDFSP.h.


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