version 1.16, 2020/06/30 22:38:53
|
version 1.17, 2021/05/24 22:17:58
|
|
|
| |
// Flags to indicate which keyword will be recalculated | // Flags to indicate which keyword will be recalculated |
int meanvflosflag = (strstr(keylist,"USFLUXLOS") != NULL); | int meanvflosflag = (strstr(keylist,"USFLUXLOS") != NULL); |
int meanglosflag = (strstr(keylist,"MEANGBZLOS") != NULL); |
int meanglosflag = (strstr(keylist,"MEANGBZLOS") != NULL) |
int meanvfflag = (strstr(keylist,"USFLUX") != NULL); | int meanvfflag = (strstr(keylist,"USFLUX") != NULL); |
int totpotflag = (strstr(keylist,"TOTPOT") != NULL); | int totpotflag = (strstr(keylist,"TOTPOT") != NULL); |
int meangamflag = (strstr(keylist,"MEANGAM") != NULL); | int meangamflag = (strstr(keylist,"MEANGAM") != NULL); |
|
|
/***** USFLUX, Example Function 17 *************************************/ | /***** USFLUX, Example Function 17 *************************************/ |
if (meanvflosflag) | if (meanvflosflag) |
{ | { |
// Compute unsigned flux |
if (computeAbsFlux_los(los, dims, &(swKeys_ptr->absFlux_los), &(swKeys_ptr->mean_vf_los), |
if (computeAbsFlux_los(los, dims, &absFlux, &mean_vf, |
&(swKeys_ptr->count_mask_los), bitmask, cdelt1, rsun_ref, rsun_obs)) |
&count_mask, bitmask, cdelt1, rsun_ref, rsun_obs)) |
|
{ | { |
mean_vf = DRMS_MISSING_FLOAT; |
absFlux_los = DRMS_MISSING_FLOAT; // If fail, fill in NaN |
count_mask = DRMS_MISSING_INT; |
mean_vf_los = DRMS_MISSING_FLOAT; |
|
count_mask_los = DRMS_MISSING_INT; |
} | } |
| |
drms_setkey_float(sharpoutrec, "USFLUX", mean_vf); |
drms_setkey_float(sharpoutrec, "USFLUXL", mean_vf_los); |
drms_setkey_float(sharpoutrec, "CMASK", count_mask); |
drms_setkey_float(sharpoutrec, "CMASKL", count_mask_los); |
| |
drms_setkey_float(sharpceaoutrec, "USFLUX", mean_vf); |
drms_setkey_float(sharpceaoutrec, "USFLUXL", mean_vf_los); |
drms_setkey_float(sharpceaoutrec, "CMASK", count_mask); |
drms_setkey_float(sharpceaoutrec, "CMASKL", count_mask_los); |
} | } |
| |
/***** MEANGBZ, Example Function 18 ************************************/ | /***** MEANGBZ, Example Function 18 ************************************/ |
|
|
} | } |
| |
// Set sharp keys | // Set sharp keys |
drms_setkey_float(sharpoutrec, "MEANGBZ", mean_derivative_los); |
drms_setkey_float(sharpoutrec, "MEANGBL", mean_derivative_los); |
| |
// Set sharp cea keys | // Set sharp cea keys |
drms_setkey_float(sharpceaoutrec, "MEANGBZ", mean_derivative_los); |
drms_setkey_float(sharpceaoutrec, "MEANGBL", mean_derivative_los); |
} | } |
| |
/******************************* END FLAGS **********************************/ | /******************************* END FLAGS **********************************/ |