Merge branch 'ohd_14.4.1' of ssh://vlab.ncep.noaa.gov:29418/AWIPS2_Dev_Baseline into master_14.4.1
Former-commit-id:429e0abfd6
[formerlyff74566cda
] [formerly66dd6987a1
[formerly c1bcd2a0db42c30d447a54ed185fc33d875628b3]] Former-commit-id:66dd6987a1
Former-commit-id:bd5c416c7c
This commit is contained in:
commit
255948188a
10 changed files with 68 additions and 26 deletions
|
@ -1 +1 @@
|
||||||
b0ccb6afd656a3d8b4e26247bfa669f5f9e31291
|
cb98ce7da536d5c8a5ab8d6562c9f787734e3ea4
|
|
@ -1 +1 @@
|
||||||
b0ccb6afd656a3d8b4e26247bfa669f5f9e31291
|
cb98ce7da536d5c8a5ab8d6562c9f787734e3ea4
|
|
@ -71,6 +71,7 @@
|
||||||
* Date Developer Action
|
* Date Developer Action
|
||||||
* 08/16/2007 Guoxian Zhou first version
|
* 08/16/2007 Guoxian Zhou first version
|
||||||
* 07/2013 JingtaoD dual pol
|
* 07/2013 JingtaoD dual pol
|
||||||
|
* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
static double ** origLocBias = NULL;
|
static double ** origLocBias = NULL;
|
||||||
|
@ -102,7 +103,8 @@ int applyLocalBias(const time_t tRunTime ,
|
||||||
struct tm * pRunTime = NULL ;
|
struct tm * pRunTime = NULL ;
|
||||||
|
|
||||||
static int first = 0;
|
static int first = 0;
|
||||||
char prefix[10] = {'\0'};
|
|
||||||
|
char prefix[20] = {'\0'};
|
||||||
|
|
||||||
int i, j ;
|
int i, j ;
|
||||||
|
|
||||||
|
@ -128,7 +130,7 @@ int applyLocalBias(const time_t tRunTime ,
|
||||||
{
|
{
|
||||||
strcpy(prefix, "LOCBIASDP");
|
strcpy(prefix, "LOCBIASDP");
|
||||||
sprintf ( message , "STATUS: using dual pol local bias.") ;
|
sprintf ( message , "STATUS: using dual pol local bias.") ;
|
||||||
printMessage( message );
|
hpe_fieldgen_printMessage( message );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -138,7 +140,7 @@ int applyLocalBias(const time_t tRunTime ,
|
||||||
{
|
{
|
||||||
sprintf ( message , "WARNING: token \"%s\" not available"
|
sprintf ( message , "WARNING: token \"%s\" not available"
|
||||||
" - using mean field bias.", LOCBIAS_DIR_TOKEN) ;
|
" - using mean field bias.", LOCBIAS_DIR_TOKEN) ;
|
||||||
printMessage( message );
|
hpe_fieldgen_printMessage( message );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -147,7 +149,7 @@ int applyLocalBias(const time_t tRunTime ,
|
||||||
{
|
{
|
||||||
strcpy(prefix, "LOCBIAS");
|
strcpy(prefix, "LOCBIAS");
|
||||||
sprintf ( message , "STATUS: using single pol local bias.") ;
|
sprintf ( message , "STATUS: using single pol local bias.") ;
|
||||||
printMessage( message );
|
hpe_fieldgen_printMessage( message );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +163,7 @@ int applyLocalBias(const time_t tRunTime ,
|
||||||
"%Y%m%d%H", pRunTime);
|
"%Y%m%d%H", pRunTime);
|
||||||
|
|
||||||
sprintf(fileName, "%s/%s%sz", localBiasDir, prefix, strDateTime );
|
sprintf(fileName, "%s/%s%sz", localBiasDir, prefix, strDateTime );
|
||||||
sprintf(message, "STATUS: local bias file name is %s.", fileName);
|
sprintf(message, "STATUS: in apply_local_bias-local bias file name is %s.", fileName);
|
||||||
hpe_fieldgen_printMessage( message );
|
hpe_fieldgen_printMessage( message );
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
* MODIFICATION HISTORY:
|
* MODIFICATION HISTORY:
|
||||||
* DATE PROGRAMMER DESCRIPTION/REASON
|
* DATE PROGRAMMER DESCRIPTION/REASON
|
||||||
* 07/2013 JingtaoD add prototypes for dual pol proudcts DSA/DPR
|
* 07/2013 JingtaoD add prototypes for dual pol proudcts DSA/DPR
|
||||||
|
* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
|
||||||
|
* update wrtodb_HPERadarResult()
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -742,6 +744,7 @@ void read_daabiasdyn(const char *radar_id,
|
||||||
void wrtodb_HPERadarResult(const char * hpe_productname,
|
void wrtodb_HPERadarResult(const char * hpe_productname,
|
||||||
const char * producttime,
|
const char * producttime,
|
||||||
const empe_params_struct * pEMPEParams,
|
const empe_params_struct * pEMPEParams,
|
||||||
const int radar_data_source);
|
const int radar_data_source,
|
||||||
|
const int nobias_flag);
|
||||||
|
|
||||||
#endif /* #ifndef MPE_FIELDGEN_H */
|
#endif /* #ifndef MPE_FIELDGEN_H */
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
* Jul. 2001 R. Fulton added mxpra limiting of projected rates
|
* Jul. 2001 R. Fulton added mxpra limiting of projected rates
|
||||||
* Aug. 11, 2006 Shucai Guan finish conversion to C Language
|
* Aug. 11, 2006 Shucai Guan finish conversion to C Language
|
||||||
* Mar., 2008 Guoxian Zhou finish first operational version
|
* Mar., 2008 Guoxian Zhou finish first operational version
|
||||||
*
|
* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
static void writeGrib(char * fileName, char * procFlag)
|
static void writeGrib(char * fileName, char * procFlag)
|
||||||
|
@ -175,6 +175,7 @@ void project(const geo_data_struct * pGeoData, const char * mosaicID,
|
||||||
int i, j, iprj, isFilled;
|
int i, j, iprj, isFilled;
|
||||||
|
|
||||||
long irc;
|
long irc;
|
||||||
|
int nobias_flag;
|
||||||
|
|
||||||
int origRowSize = pGeoData->num_rows;
|
int origRowSize = pGeoData->num_rows;
|
||||||
int origColSize = pGeoData->num_cols;
|
int origColSize = pGeoData->num_cols;
|
||||||
|
@ -508,11 +509,13 @@ void project(const geo_data_struct * pGeoData, const char * mosaicID,
|
||||||
|
|
||||||
if (strstr(mosaicID, "BDHR") != NULL)
|
if (strstr(mosaicID, "BDHR") != NULL)
|
||||||
{
|
{
|
||||||
|
nobias_flag = 0;
|
||||||
sprintf(procFlag, "%s%02d ", biasedRateFilePrefix, k * 15);
|
sprintf(procFlag, "%s%02d ", biasedRateFilePrefix, k * 15);
|
||||||
sprintf(fileName, "%sM%d%sz", biasedRateFilePrefix, k * 15,
|
sprintf(fileName, "%sM%d%sz", biasedRateFilePrefix, k * 15,
|
||||||
strDateTime);
|
strDateTime);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
nobias_flag = 1;
|
||||||
sprintf(procFlag, "%s%02d ", rateFilePrefix, k * 15);
|
sprintf(procFlag, "%s%02d ", rateFilePrefix, k * 15);
|
||||||
sprintf(fileName, "%sM%d%sz", rateFilePrefix, k * 15,
|
sprintf(fileName, "%sM%d%sz", rateFilePrefix, k * 15,
|
||||||
strDateTime);
|
strDateTime);
|
||||||
|
@ -587,8 +590,10 @@ void project(const geo_data_struct * pGeoData, const char * mosaicID,
|
||||||
|
|
||||||
sprintf ( message , "\nSTATUS: In Project, insert/update 1km mosaic nowcast into HPERadarResult table");
|
sprintf ( message , "\nSTATUS: In Project, insert/update 1km mosaic nowcast into HPERadarResult table");
|
||||||
printLogMessage( message );
|
printLogMessage( message );
|
||||||
|
sprintf ( message, "nobias flag is %d", nobias_flag);
|
||||||
|
printLogMessage( message );
|
||||||
|
|
||||||
wrtodb_HPERadarResult(fileName, prdDateTime, pEMPEParams, radar_data_source);
|
wrtodb_HPERadarResult(fileName, prdDateTime, pEMPEParams, radar_data_source, nobias_flag);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -636,10 +641,12 @@ void project(const geo_data_struct * pGeoData, const char * mosaicID,
|
||||||
{
|
{
|
||||||
if (strstr(mosaicID, "BDHR") != NULL)
|
if (strstr(mosaicID, "BDHR") != NULL)
|
||||||
{
|
{
|
||||||
|
nobias_flag = 0;
|
||||||
sprintf(procFlag, "rfcwide ");
|
sprintf(procFlag, "rfcwide ");
|
||||||
sprintf(fileName, "%s4kmH%sz", biasedAccFilePrefix, strDateTime);
|
sprintf(fileName, "%s4kmH%sz", biasedAccFilePrefix, strDateTime);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
nobias_flag = 1;
|
||||||
sprintf(procFlag, "rfcwide ");
|
sprintf(procFlag, "rfcwide ");
|
||||||
sprintf(fileName, "%s4kmH%sz", accFilePrefix, strDateTime);
|
sprintf(fileName, "%s4kmH%sz", accFilePrefix, strDateTime);
|
||||||
}
|
}
|
||||||
|
@ -662,7 +669,7 @@ void project(const geo_data_struct * pGeoData, const char * mosaicID,
|
||||||
sprintf ( message , "\nSTATUS: In Project, insert/update 4km mosaic nowcast into HPERadarResult table");
|
sprintf ( message , "\nSTATUS: In Project, insert/update 4km mosaic nowcast into HPERadarResult table");
|
||||||
printLogMessage( message );
|
printLogMessage( message );
|
||||||
|
|
||||||
wrtodb_HPERadarResult(fileName, prdDateTime, pEMPEParams, radar_data_source);
|
wrtodb_HPERadarResult(fileName, prdDateTime, pEMPEParams, radar_data_source, nobias_flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -683,10 +690,12 @@ void project(const geo_data_struct * pGeoData, const char * mosaicID,
|
||||||
|
|
||||||
if (strstr(mosaicID, "BDHR") != NULL)
|
if (strstr(mosaicID, "BDHR") != NULL)
|
||||||
{
|
{
|
||||||
|
nobias_flag = 0;
|
||||||
sprintf(procFlag, "BTP1H ");
|
sprintf(procFlag, "BTP1H ");
|
||||||
sprintf(fileName, "%sH%sz", biasedAccFilePrefix, strDateTime);
|
sprintf(fileName, "%sH%sz", biasedAccFilePrefix, strDateTime);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
nobias_flag = 1;
|
||||||
sprintf(procFlag, "TP1H ");
|
sprintf(procFlag, "TP1H ");
|
||||||
sprintf(fileName, "%sH%sz", accFilePrefix, strDateTime);
|
sprintf(fileName, "%sH%sz", accFilePrefix, strDateTime);
|
||||||
}
|
}
|
||||||
|
@ -760,7 +769,7 @@ void project(const geo_data_struct * pGeoData, const char * mosaicID,
|
||||||
sprintf ( message , "\nSTATUS: In Project, insert/update 1km mosaic nowcast into HPERadarResult table");
|
sprintf ( message , "\nSTATUS: In Project, insert/update 1km mosaic nowcast into HPERadarResult table");
|
||||||
printLogMessage( message );
|
printLogMessage( message );
|
||||||
|
|
||||||
wrtodb_HPERadarResult(fileName, prdDateTime, pEMPEParams, radar_data_source);
|
wrtodb_HPERadarResult(fileName, prdDateTime, pEMPEParams, radar_data_source, nobias_flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
* Date Developer Action
|
* Date Developer Action
|
||||||
* 10/24/2006 Guoxian Zhou Modified from run_bmosaic.c
|
* 10/24/2006 Guoxian Zhou Modified from run_bmosaic.c
|
||||||
* 07/2013 JingtaoD dual pol
|
* 07/2013 JingtaoD dual pol
|
||||||
|
* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
static double ** Mosaic = NULL;
|
static double ** Mosaic = NULL;
|
||||||
|
@ -114,9 +115,14 @@ void runBDHRMosaic(const run_date_struct * pRunDate ,
|
||||||
static int first = 1 ;
|
static int first = 1 ;
|
||||||
struct tm * pRunTime = NULL ;
|
struct tm * pRunTime = NULL ;
|
||||||
long int irc ;
|
long int irc ;
|
||||||
|
int nobias_flag;
|
||||||
|
|
||||||
|
/*for BDHR product, there is bias applied */
|
||||||
|
nobias_flag = 0;
|
||||||
|
|
||||||
int status = 0 ;
|
int status = 0 ;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* strDateTime string should be in format: yyyymmddHHMM
|
* strDateTime string should be in format: yyyymmddHHMM
|
||||||
*/
|
*/
|
||||||
|
@ -235,7 +241,7 @@ void runBDHRMosaic(const run_date_struct * pRunDate ,
|
||||||
sprintf ( message , "\nSTATUS: In BDHRMOSAIC, insert/update HPERadarResult table");
|
sprintf ( message , "\nSTATUS: In BDHRMOSAIC, insert/update HPERadarResult table");
|
||||||
printLogMessage( message );
|
printLogMessage( message );
|
||||||
|
|
||||||
wrtodb_HPERadarResult(fileName, prdDateTime, pEMPEParams, dualpol_used);
|
wrtodb_HPERadarResult(fileName, prdDateTime, pEMPEParams, dualpol_used, nobias_flag);
|
||||||
|
|
||||||
|
|
||||||
sprintf ( message , "\nSTATUS: In BDHRMOSAIC, complete insert/update HPERadarResult table");
|
sprintf ( message , "\nSTATUS: In BDHRMOSAIC, complete insert/update HPERadarResult table");
|
||||||
|
|
|
@ -74,9 +74,10 @@
|
||||||
* Date Developer Action
|
* Date Developer Action
|
||||||
* 8/13/2006 Guoxian Zhou Build operational version
|
* 8/13/2006 Guoxian Zhou Build operational version
|
||||||
* 07/2013 Jingtao Deng Modify for adding dual pol producat DPR
|
* 07/2013 Jingtao Deng Modify for adding dual pol producat DPR
|
||||||
* first try to find the DPR product from dprradar
|
* first try to find the DPR product from dprradar
|
||||||
* table and calculate the rain rate. if
|
* table and calculate the rain rate. if
|
||||||
* not able to get DPR product, then use DHR product
|
* not able to get DPR product, then use DHR product
|
||||||
|
* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
extern short ** radarMiscBins ;
|
extern short ** radarMiscBins ;
|
||||||
|
@ -164,6 +165,10 @@ void runDHRMosaic(const run_date_struct * pRunDate,
|
||||||
int dualpol_meanbias_flag[MAX_RADAR_NUM];
|
int dualpol_meanbias_flag[MAX_RADAR_NUM];
|
||||||
int sp_meanbias_flag[MAX_RADAR_NUM];
|
int sp_meanbias_flag[MAX_RADAR_NUM];
|
||||||
int dualpol_data_avail[MAX_RADAR_NUM];
|
int dualpol_data_avail[MAX_RADAR_NUM];
|
||||||
|
int nobias_flag;
|
||||||
|
|
||||||
|
/* for DHR product, there is no bias applied */
|
||||||
|
nobias_flag = 1;
|
||||||
|
|
||||||
/* initialize no dualpol MFB and no dual pol product avialble for each radar */
|
/* initialize no dualpol MFB and no dual pol product avialble for each radar */
|
||||||
for (i = 0; i < MAX_RADAR_NUM; i++)
|
for (i = 0; i < MAX_RADAR_NUM; i++)
|
||||||
|
@ -652,7 +657,7 @@ void runDHRMosaic(const run_date_struct * pRunDate,
|
||||||
sprintf ( message , "\nSTATUS: In DHRMOSAIC, insert/update HPERadarResult table");
|
sprintf ( message , "\nSTATUS: In DHRMOSAIC, insert/update HPERadarResult table");
|
||||||
printLogMessage( message );
|
printLogMessage( message );
|
||||||
|
|
||||||
wrtodb_HPERadarResult(dhrmosaic_fileName, prdDateTime, pEMPEParams, dualpol_used);
|
wrtodb_HPERadarResult(dhrmosaic_fileName, prdDateTime, pEMPEParams, dualpol_used, nobias_flag);
|
||||||
|
|
||||||
sprintf ( message , "\nSTATUS: In DHRMOSAIC, complete insert/update HPERadarResult table");
|
sprintf ( message , "\nSTATUS: In DHRMOSAIC, complete insert/update HPERadarResult table");
|
||||||
printLogMessage( message );
|
printLogMessage( message );
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
* April 2005 Guoxian Zhou converted to C Language
|
* April 2005 Guoxian Zhou converted to C Language
|
||||||
* 10/05/2006 Guoxian Zhou Modified for empe version
|
* 10/05/2006 Guoxian Zhou Modified for empe version
|
||||||
* 08/08/2007 Guoxian Zhou add option to use local bias data
|
* 08/08/2007 Guoxian Zhou add option to use local bias data
|
||||||
*
|
* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
extern int dualpol_used;
|
extern int dualpol_used;
|
||||||
|
|
||||||
|
@ -113,9 +113,13 @@ void runEBMosaic(const run_date_struct * pRunDate ,
|
||||||
static int first = 1 ;
|
static int first = 1 ;
|
||||||
struct tm * pRunTime = NULL ;
|
struct tm * pRunTime = NULL ;
|
||||||
long int irc ;
|
long int irc ;
|
||||||
|
int nobias_flag;
|
||||||
|
|
||||||
int status = 0 ;
|
int status = 0 ;
|
||||||
|
|
||||||
|
/* for EBMOSAIC, there is bias applied */
|
||||||
|
nobias_flag = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* strDateTime string should be in format: yyyymmddHHMM
|
* strDateTime string should be in format: yyyymmddHHMM
|
||||||
*/
|
*/
|
||||||
|
@ -225,7 +229,7 @@ void runEBMosaic(const run_date_struct * pRunDate ,
|
||||||
sprintf ( message , "\nSTATUS: In EBMOSAIC, insert/update HPERadarResult table");
|
sprintf ( message , "\nSTATUS: In EBMOSAIC, insert/update HPERadarResult table");
|
||||||
printLogMessage( message );
|
printLogMessage( message );
|
||||||
|
|
||||||
wrtodb_HPERadarResult(fileName, prdDateTime, pEMPEParams, dualpol_used);
|
wrtodb_HPERadarResult(fileName, prdDateTime, pEMPEParams, dualpol_used, nobias_flag);
|
||||||
|
|
||||||
sprintf ( message , "\nSTATUS: In EBMOSAIC, complete insert/update HPERadarResult table");
|
sprintf ( message , "\nSTATUS: In EBMOSAIC, complete insert/update HPERadarResult table");
|
||||||
printLogMessage( message );
|
printLogMessage( message );
|
||||||
|
|
|
@ -81,6 +81,7 @@
|
||||||
* first try to find the DSA product from dsaradar
|
* first try to find the DSA product from dsaradar
|
||||||
* table and calculate the 1 hour precipitation. if
|
* table and calculate the 1 hour precipitation. if
|
||||||
* not able to get DSA product, then use DSP product
|
* not able to get DSA product, then use DSP product
|
||||||
|
* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
extern short ** radarMiscBins ;
|
extern short ** radarMiscBins ;
|
||||||
|
@ -195,6 +196,10 @@ void runERMosaic(const run_date_struct * pRunDate,
|
||||||
int dualpol_meanbias_flag[MAX_RADAR_NUM];
|
int dualpol_meanbias_flag[MAX_RADAR_NUM];
|
||||||
int sp_meanbias_flag[MAX_RADAR_NUM];
|
int sp_meanbias_flag[MAX_RADAR_NUM];
|
||||||
int dualpol_data_avail[MAX_RADAR_NUM];
|
int dualpol_data_avail[MAX_RADAR_NUM];
|
||||||
|
int nobias_flag;
|
||||||
|
|
||||||
|
/*ERMOSAIC product has no bias applied */
|
||||||
|
nobias_flag = 1;
|
||||||
|
|
||||||
/* initialize no dualpol MFB and no dual pol product avialble for each radar */
|
/* initialize no dualpol MFB and no dual pol product avialble for each radar */
|
||||||
for (i = 0; i < MAX_RADAR_NUM; i++)
|
for (i = 0; i < MAX_RADAR_NUM; i++)
|
||||||
|
@ -970,7 +975,7 @@ void runERMosaic(const run_date_struct * pRunDate,
|
||||||
printLogMessage( message );
|
printLogMessage( message );
|
||||||
|
|
||||||
if(blnMosaic[ermosaic] == 1)
|
if(blnMosaic[ermosaic] == 1)
|
||||||
wrtodb_HPERadarResult(ermosaic_fileName, prdDateTime, pEMPEParams, dualpol_used);
|
wrtodb_HPERadarResult(ermosaic_fileName, prdDateTime, pEMPEParams, dualpol_used, nobias_flag);
|
||||||
|
|
||||||
sprintf ( message , "\nSTATUS: In ERMOSAIC, complete insert/update HPERadarResult table");
|
sprintf ( message , "\nSTATUS: In ERMOSAIC, complete insert/update HPERadarResult table");
|
||||||
printLogMessage( message );
|
printLogMessage( message );
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
* MACHINE:
|
* MACHINE:
|
||||||
* MODIFICATION HISTORY:
|
* MODIFICATION HISTORY:
|
||||||
* MODULE # DATE PROGRAMMER DESCRIPTION/REASON
|
* MODULE # DATE PROGRAMMER DESCRIPTION/REASON
|
||||||
*
|
* 02/2015 JingtaoD A2 OB14.4.1 DR#17123 - HPE Bias Source field
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -55,19 +55,20 @@
|
||||||
void wrtodb_HPERadarResult(const char * hpe_productname,
|
void wrtodb_HPERadarResult(const char * hpe_productname,
|
||||||
const char * producttime,
|
const char * producttime,
|
||||||
const empe_params_struct * pEMPEParams,
|
const empe_params_struct * pEMPEParams,
|
||||||
const int radar_data_source)
|
const int radar_data_source,
|
||||||
|
const int nobias_flag)
|
||||||
{
|
{
|
||||||
|
|
||||||
HPERadarResult hperadarresult_struct;
|
HPERadarResult hperadarresult_struct;
|
||||||
|
|
||||||
const char * HPE_BIAS_SOURCE_TOKEN = "hpe_bias_source";
|
const char * HPE_BIAS_SOURCE_TOKEN = "hpe_bias_source";
|
||||||
static int first = 1 ;
|
static int first = 0 ;
|
||||||
static char bias_source[6] = "RFC"; // RFC or LOCAL, default to RFC
|
static char bias_source[6] = "RFC"; // RFC or LOCAL, default to RFC
|
||||||
char strTokenValue[6] = {'\0'} ;
|
char strTokenValue[6] = {'\0'} ;
|
||||||
|
|
||||||
/* retrieve token HPE_BIAS_SOURCE_TOKEN, it can be LOCAL or RFC */
|
/* retrieve token HPE_BIAS_SOURCE_TOKEN, it can be LOCAL or RFC */
|
||||||
|
|
||||||
if(first == 1)
|
if(first == 0)
|
||||||
{
|
{
|
||||||
if(hpe_fieldgen_getAppsDefaults(HPE_BIAS_SOURCE_TOKEN, strTokenValue) != -1)
|
if(hpe_fieldgen_getAppsDefaults(HPE_BIAS_SOURCE_TOKEN, strTokenValue) != -1)
|
||||||
{
|
{
|
||||||
|
@ -97,12 +98,19 @@ void wrtodb_HPERadarResult(const char * hpe_productname,
|
||||||
hpe_fieldgen_printMessage( message );
|
hpe_fieldgen_printMessage( message );
|
||||||
}
|
}
|
||||||
|
|
||||||
first = 0;
|
first = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Initialize the product name. and assign value */
|
/* Initialize the product name. and assign value */
|
||||||
/*hperadarresult_struct.hpe_productname [ PRESET_DESCR_LEN + 1 ] = '\0';*/
|
/*hperadarresult_struct.hpe_productname [ PRESET_DESCR_LEN + 1 ] = '\0';*/
|
||||||
strncpy(hperadarresult_struct.hpe_productname, hpe_productname, PRESET_DESCR_LEN);
|
strncpy(hperadarresult_struct.hpe_productname, hpe_productname, PRESET_DESCR_LEN);
|
||||||
|
sprintf ( message, "STATUS: the hpe productname is %s", hpe_productname);
|
||||||
|
hpe_fieldgen_printMessage( message );
|
||||||
|
|
||||||
|
sprintf ( message, "STATUS: the nobias_flag is %d", nobias_flag);
|
||||||
|
hpe_fieldgen_printMessage( message );
|
||||||
|
|
||||||
/* assign producttime */
|
/* assign producttime */
|
||||||
yearsec_ansi_to_dt(producttime, &hperadarresult_struct.producttime);
|
yearsec_ansi_to_dt(producttime, &hperadarresult_struct.producttime);
|
||||||
|
@ -114,7 +122,7 @@ void wrtodb_HPERadarResult(const char * hpe_productname,
|
||||||
/* Initialize the bias source . and assign value */
|
/* Initialize the bias source . and assign value */
|
||||||
hperadarresult_struct.bias_source[BIAS_LEN + 1] = '\0';
|
hperadarresult_struct.bias_source[BIAS_LEN + 1] = '\0';
|
||||||
|
|
||||||
if (pEMPEParams->blnMeanFieldBias == 0 && pEMPEParams->blnDHRMeanFieldBias == 0)
|
if (nobias_flag == 1)
|
||||||
strcpy(hperadarresult_struct.bias_source, "NO BIAS");
|
strcpy(hperadarresult_struct.bias_source, "NO BIAS");
|
||||||
else //EBMOSAIC or BDHRMOSAIC
|
else //EBMOSAIC or BDHRMOSAIC
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue