bes Updated for version 3.20.13
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.
 
SDgetSD () const
 Public interface to Obtain SD.
 
SPType getSPType () const
 Obtain special HDF4 product type.
 
const std::vector< VDATA * > & getVDATAs () const
 Public interface to Obtain Vdata.
 
const std::vector< AttrContainer * > & getVgattrs () const
 Get attributes for all vgroups.
 
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.
 
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.
 
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.
 
void create_sds_dim_name_list ()
 Create the new dimension name set and the dimension name to size map.
 
 File (const char *hdf4file_path)
 
void handle_sds_coords (bool &COARDFLAG, std::string &lldimname1, std::string &lldimname2) throw (Exception)
 Create "coordinates", "units" CF attributes.
 
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.
 
void handle_sds_missing_fields ()
 Add the missing coordinate variables based on the corrected dimension name list.
 
void handle_sds_names (bool &COARDFLAG, std::string &lldimname1, std::string &lldimname2) throw (Exception)
 Create the final CF-compliant field name list.
 
void handle_vdata () throw (Exception)
 Handle Vdata.
 
void InsertOrigFieldPath_ReadVgVdata () throw (Exception)
 The full path of SDS and Vdata will be obtained.
 
void obtain_path (int32 file_id, int32 sd_id, char *full_path, int32 pobj_ref) throw (Exception)
 The internal function used by InsertOrigFieldPath_ReadVgVdata.
 
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);
 
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.
 
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.
 
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.
 
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.
 
void PrepareOTHERHDF () throw (Exception)
 We still provide a hook for other HDF data product although no CF compliant is followed.
 
void PrepareTRMML2_V6 () throw (Exception)
 Latitude and longitude are stored in one array(geolocation). Need to separate.
 
void PrepareTRMML2_V7 () throw (Exception)
 Latitude and longitude are stored in different fields. Need to separate.
 
void PrepareTRMML3A_V6 () throw (Exception)
 Special method to prepare TRMM Level 3A46 latitude and longitude information.
 
void PrepareTRMML3B_V6 () throw (Exception)
 Special method to prepare TRMM Level 3B latitude and longitude information.
 
void PrepareTRMML3C_V6 () throw (Exception)
 Special method to prepare TRMM Level 3 CSH latitude,longitude and Height information.
 
void PrepareTRMML3M_V7 ()
 Special method to prepare TRMM multiple grid Level 3 geolocation fields(latitude,longitude,etc) information.
 
void PrepareTRMML3S_V7 () throw (Exception)
 Special method to prepare TRMM single grid Level 3 geolocation fields(latitude,longitude,etc) information.
 
void ReadHybridNonLoneVdatas (File *) throw (Exception)
 
void ReadLoneVdatas (File *) throw (Exception)
 Handle non-attribute lone vdatas.
 
void ReadVgattrs (int32 vgroup_id, const char *fullpath) throw (Exception)
 Obtain vgroup attributes.
 

Detailed Description

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

Definition at line 718 of file HDFSP.h.

Constructor & Destructor Documentation

◆ ~File()

File::~File ( )

Definition at line 107 of file HDFSP.cc.

◆ File()

HDFSP::File::File ( const char *  hdf4file_path)
inlineexplicitprotected

Definition at line 783 of file HDFSP.h.

Member Function Documentation

◆ Check_update_special()

bool File::Check_update_special ( const std::string &  gridname)
throw (Exception
)

Definition at line 886 of file HDFSP.cc.

◆ 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 1283 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 3664 of file HDFSP.cc.

◆ getPath()

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

Obtain the path of the file.

Definition at line 757 of file HDFSP.h.

◆ getSD()

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

Public interface to Obtain SD.

Definition at line 763 of file HDFSP.h.

◆ getSPType()

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

Obtain special HDF4 product type.

Definition at line 741 of file HDFSP.h.

◆ getVDATAs()

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

Public interface to Obtain Vdata.

Definition at line 769 of file HDFSP.h.

◆ getVgattrs()

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

Get attributes for all vgroups.

Definition at line 775 of file HDFSP.h.

◆ Handle_AIRS_L23()

void File::Handle_AIRS_L23 ( )
throw (Exception
)

Definition at line 1019 of file HDFSP.cc.

◆ 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 3953 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 3592 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 3720 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 3684 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 3768 of file HDFSP.cc.

◆ handle_vdata()

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

Handle Vdata.

Definition at line 4037 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 748 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 2708 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 3033 of file HDFSP.cc.

◆ Obtain_TRMM_V7_latlon_name()

bool File::Obtain_TRMM_V7_latlon_name ( const SDField sdfield,
const int  latsize,
const int  lonsize,
std::string &  latname,
std::string &  lonname 
)
throw (Exception
)
protected

Definition at line 4275 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 4249 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 3372 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 4089 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 5775 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 5862 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 6002 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 6147 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 6198 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 5531 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 5616 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 6250 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 4937 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 4299 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 5202 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 5094 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 5372 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 4785 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 4449 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 208 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 263 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 564 of file HDFSP.cc.

◆ ReadLoneVdatas()

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

Handle non-attribute lone vdatas.

Definition at line 329 of file HDFSP.cc.

◆ ReadVgattrs()

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

Obtain vgroup attributes.

Definition at line 2654 of file HDFSP.cc.


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