bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
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) const
 
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 ()
 
bool Has_Dim_NoScale_Field () const
 This file has a field that is a SDS dimension but no dimension scale.
 
void Prepare ()
 

Static Public Member Functions

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

Protected Member Functions

void CheckSDType ()
 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, const std::string &lldimname1, const std::string &lldimname2)
 Create "coordinates", "units" CF attributes.
 
void handle_sds_fakedim_names ()
 
void handle_sds_final_dim_names ()
 Create the final CF-compliant dimension name list for each field.
 
void handle_sds_missing_fields () const
 Add the missing coordinate variables based on the corrected dimension name list.
 
void handle_sds_names (bool &COARDFLAG, std::string &lldimname1, std::string &lldimname2)
 Create the final CF-compliant field name list.
 
void handle_vdata () const
 Handle Vdata.
 
void InsertOrigFieldPath_ReadVgVdata ()
 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)
 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)
 
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)
 The internal function used to obtain the path for hybrid non-lone vdata.
 
void PrepareCERAVGSYN ()
 
void PrepareCERES4IG ()
 
void PrepareCERSAVGID ()
 
void PrepareCERZAVG ()
 Special method to prepare CERES Zonal Average latitude and longitude information.
 
void PrepareMODISARNSS ()
 
void PrepareOBPGL2 ()
 Special method to prepare OBPG Level 2 latitude and longitude information. The latitude and longitude need to be interpolated.
 
void PrepareOBPGL3 ()
 Special method to prepare OBPG Level 3 latitude and longitude information. The latitude and longitude are calculated by using the attributes.
 
void PrepareOTHERHDF ()
 We still provide a hook for other HDF data product although no CF compliant is followed.
 
void PrepareTRMML2_V6 ()
 Latitude and longitude are stored in one array(geolocation). Need to separate.
 
void PrepareTRMML2_V7 ()
 Latitude and longitude are stored in different fields. Need to separate.
 
void PrepareTRMML3A_V6 ()
 Special method to prepare TRMM Level 3A46 latitude and longitude information.
 
void PrepareTRMML3B_V6 ()
 Special method to prepare TRMM Level 3B latitude and longitude information.
 
void PrepareTRMML3C_V6 ()
 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 ()
 Special method to prepare TRMM single grid Level 3 geolocation fields(latitude,longitude,etc) information.
 
void ReadHybridNonLoneVdatas (const File *)
 
void ReadLoneVdatas (File *) const
 Handle non-attribute lone vdatas.
 
void ReadVgattrs (int32 vgroup_id, const char *fullpath)
 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 676 of file HDFSP.h.

Constructor & Destructor Documentation

◆ ~File()

File::~File ( )

Definition at line 108 of file HDFSP.cc.

◆ File()

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

Definition at line 741 of file HDFSP.h.

Member Function Documentation

◆ Check_update_special()

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

Definition at line 791 of file HDFSP.cc.

◆ CheckSDType()

void File::CheckSDType ( )
protected

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

Definition at line 1142 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 3471 of file HDFSP.cc.

◆ getPath()

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

Obtain the path of the file.

Definition at line 715 of file HDFSP.h.

◆ getSD()

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

Public interface to Obtain SD.

Definition at line 721 of file HDFSP.h.

◆ getSPType()

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

Obtain special HDF4 product type.

Definition at line 699 of file HDFSP.h.

◆ getVDATAs()

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

Public interface to Obtain Vdata.

Definition at line 727 of file HDFSP.h.

◆ getVgattrs()

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

Get attributes for all vgroups.

Definition at line 733 of file HDFSP.h.

◆ Handle_AIRS_L23()

void File::Handle_AIRS_L23 ( )

Definition at line 896 of file HDFSP.cc.

◆ handle_sds_coords()

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

Create "coordinates", "units" CF attributes.

Definition at line 3727 of file HDFSP.cc.

◆ handle_sds_fakedim_names()

void File::handle_sds_fakedim_names ( )
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 3399 of file HDFSP.cc.

◆ handle_sds_final_dim_names()

void File::handle_sds_final_dim_names ( )
protected

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

Handle dimension name clashings

Definition at line 3529 of file HDFSP.cc.

◆ handle_sds_missing_fields()

void File::handle_sds_missing_fields ( ) const
protected

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

Definition at line 3491 of file HDFSP.cc.

◆ handle_sds_names()

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

Create the final CF-compliant field name list.

Definition at line 3571 of file HDFSP.cc.

◆ handle_vdata()

void File::handle_vdata ( ) const
protected

Handle Vdata.

Definition at line 3804 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 706 of file HDFSP.h.

◆ InsertOrigFieldPath_ReadVgVdata()

void File::InsertOrigFieldPath_ReadVgVdata ( )
protected

The full path of SDS and Vdata will be obtained.

Definition at line 2529 of file HDFSP.cc.

◆ obtain_path()

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

The internal function used by InsertOrigFieldPath_ReadVgVdata.

Definition at line 2853 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 )
protected

Definition at line 4020 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 3997 of file HDFSP.cc.

◆ obtain_vdata_path()

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

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

Definition at line 3186 of file HDFSP.cc.

◆ Prepare()

void File::Prepare ( )

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 3839 of file HDFSP.cc.

◆ PrepareCERAVGSYN()

void File::PrepareCERAVGSYN ( )
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 5352 of file HDFSP.cc.

◆ PrepareCERES4IG()

void File::PrepareCERES4IG ( )
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 5426 of file HDFSP.cc.

◆ PrepareCERSAVGID()

void File::PrepareCERSAVGID ( )
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 5553 of file HDFSP.cc.

◆ PrepareCERZAVG()

void File::PrepareCERZAVG ( )
protected

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

Definition at line 5687 of file HDFSP.cc.

◆ PrepareMODISARNSS()

void File::PrepareMODISARNSS ( )
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 5737 of file HDFSP.cc.

◆ PrepareOBPGL2()

void File::PrepareOBPGL2 ( )
protected

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

Definition at line 5133 of file HDFSP.cc.

◆ PrepareOBPGL3()

void File::PrepareOBPGL3 ( )
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 5210 of file HDFSP.cc.

◆ PrepareOTHERHDF()

void File::PrepareOTHERHDF ( )
protected

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

Definition at line 5783 of file HDFSP.cc.

◆ PrepareTRMML2_V6()

void File::PrepareTRMML2_V6 ( )
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 4608 of file HDFSP.cc.

◆ PrepareTRMML2_V7()

void File::PrepareTRMML2_V7 ( )
protected

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

Definition at line 4040 of file HDFSP.cc.

◆ PrepareTRMML3A_V6()

void File::PrepareTRMML3A_V6 ( )
protected

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

Definition at line 4863 of file HDFSP.cc.

◆ PrepareTRMML3B_V6()

void File::PrepareTRMML3B_V6 ( )
protected

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

Definition at line 4760 of file HDFSP.cc.

◆ PrepareTRMML3C_V6()

void File::PrepareTRMML3C_V6 ( )
protected

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

Definition at line 5000 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 4463 of file HDFSP.cc.

◆ PrepareTRMML3S_V7()

void File::PrepareTRMML3S_V7 ( )
protected

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

Definition at line 4169 of file HDFSP.cc.

◆ Read()

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

Retrieve SDS and Vdata information from the HDF4 file.

Definition at line 191 of file HDFSP.cc.

◆ Read_Hybrid()

File * File::Read_Hybrid ( const char * path,
int32 sdid,
int32 fileid )
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 234 of file HDFSP.cc.

◆ ReadHybridNonLoneVdatas()

void File::ReadHybridNonLoneVdatas ( const File * file)
protected

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

Definition at line 504 of file HDFSP.cc.

◆ ReadLoneVdatas()

void File::ReadLoneVdatas ( File * file) const
protected

Handle non-attribute lone vdatas.

Definition at line 276 of file HDFSP.cc.

◆ ReadVgattrs()

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

Obtain vgroup attributes.

Definition at line 2476 of file HDFSP.cc.


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