ocssw
V2022
|
nccmp.c
Go to the documentation of this file.
414 fprintf(stderr, "DIFFER : VARIABLE \"%s\" IS MISSING ATTRIBUTE WITH NAME \"%s\" IN FILE \"%s\"\n", varname, name, opts->file1);
424 fprintf(stderr, "DIFFER : VARIABLE \"%s\" IS MISSING ATTRIBUTE WITH NAME \"%s\" IN FILE \"%s\"\n", varname, name, opts->file2);
435 fprintf(stderr, "DIFFER : TYPES : ATTRIBUTE : %s : VARIABLE : %s : %s <> %s\n", name, varname, typestr1, typestr2);
447 fprintf(stderr, "DIFFER : LENGTHS : ATTRIBUTE : %s : VARIABLE : %s : %lu <> %lu : VALUES : ", name, varname, (unsigned long)lenp1, (unsigned long)lenp2);
752 fprintf(stderr, "DIFFER : LENGTHS OF RECORDS : %s (%d) <> %s (%d)\n", name1, (int)nrec1, name2, (int)nrec2);
945 status = excludevars(ncid1, ncid2, opts->cmpvarlist, opts->ncmpvarlist, opts->excludelist, opts->nexclude);
1111 fprintf(stderr, "DIFFER : NAME OF GLOBAL ATTRIBUTE : %s : GLOBAL ATTRIBUTE DOESN'T EXIST IN \"%s\"\n", name1, opts->file2);
1121 fprintf(stderr, "DIFFER : GLOBAL ATTRIBUTE TYPES : %s : %s <> %s\n", name1, typestr1, typestr2);
1131 fprintf(stderr, "DIFFER : LENGTHS OF GLOBAL ATTRIBUTE : %s : %lu <> %lu : VALUES : %s <> %s\n", name1,
1143 fprintf(stderr, "DIFFER : VALUES OF GLOBAL ATTRIBUTE : %s : %s <> %s\n", name1, typestr1, typestr2);
1180 fprintf(stderr, "DIFFER : NAME OF GLOBAL ATTRIBUTE : %s : GLOBAL ATTRIBUTE DOESN'T EXIST IN %s\n", name2, opts->file1);
1190 fprintf(stderr, "DIFFER : GLOBAL ATTRIBUTE TYPE : %s : %s <> %s\n", name1, typestr1, typestr2);
1201 fprintf(stderr, "DIFFER : LENGTHS OF GLOBAL ATTRIBUTE : %s : %lu <> %lu : VALUES : ", name1, (unsigned long)len1, (unsigned long)len2);
1232 fprintf(stderr, "DIFFER : VALUES OF GLOBAL ATTRIBUTE : %s : %s <> %s\n", name1, typestr1, typestr2);
1250 int i, j, j1, j2, status, ncstatus, dimid1, dimid2, tmp1, tmp2, attid1, attid2, natts1, natts2;
1252 char name1[NC_MAX_NAME], name2[NC_MAX_NAME], recname1[NC_MAX_NAME], recname2[NC_MAX_NAME], typestr1[1024], typestr2[1024];
1304 fprintf(stderr, "DIFFER : NAME : DIMENSION : %s : DIMENSION DOESN'T EXIST IN \"%s\"\n", name1, opts->file2);
1339 fprintf(stderr, "DIFFER : NAME : VARIABLE : %s : VARIABLE DOESN'T EXIST IN \"%s\"\n", opts->cmpvarlist[i], opts->file1);
1349 fprintf(stderr, "DIFFER : NAME : VARIABLE : %s : VARIABLE DOESN'T EXIST IN \"%s\"\n", opts->cmpvarlist[i], opts->file2);
1360 fprintf(stderr, "DIFFER : TYPES : VARIABLE : %s : %s <> %s\n", opts->cmpvarlist[i], typestr1, typestr2);
1369 fprintf(stderr, "DIFFER : NUMBER : DIMENSIONS : VARIABLE : %s : %d <> %d\n", opts->cmpvarlist[i], ndims1, ndims2);
1398 /*printf("DEBUG : %d : %s, %s, %s\n", __LINE__, opts->cmpvarlist[i], dims1[dimid1].name, dims2[dimid2].name);*/
1401 fprintf(stderr, "DIFFER : DIMENSION NAMES FOR VARIABLE %s : %s <> %s\n", opts->cmpvarlist[i], dims1[dimid1].name, dims2[dimid2].name);
1413 fprintf(stderr, "DIFFER : VARIABLE : %s : DIMENSION %s IS RECORD IN FILE \"%s\" BUT NOT IN \"%s\"\n", vars1[j1].name, dims1[dimid1].name, opts->file1, opts->file2);
1420 fprintf(stderr, "DIFFER : VARIABLE : %s : DIMENSION %s IS RECORD IN FILE \"%s\" BUT NOT IN \"%s\"\n", vars1[j1].name, dims2[dimid2].name, opts->file2, opts->file1);
1464 if (instringlist(opts->excludeattlist, name1, opts->nexcludeatt) || instringlist(processedatts, name1, NC_MAX_VARS))
1471 ncstatus = cmpatt(ncid1, ncid2, vars1[j1].varid, vars2[j2].varid, name1, vars1[j1].name, opts);
1482 fprintf(stderr, "Failed to query variable %s attribute in file \"%s\"\n", vars2[j2].name, opts->file2);
1503 ncstatus = cmpatt(ncid1, ncid2, vars1[j1].varid, vars2[j2].varid, name2, vars2[j2].name, opts);
1511 fprintf(stderr, "DIFFER : NUMBER OF ATTRIBUTES : VARIABLE : %s : %d <> %d\n", opts->cmpvarlist[i], natts1, natts2);
1597 for(p1 = in1, p2 = in2; (fabs(*p1 - *p2)< FLT_EPSILON) || ((fabs(*p1 - m1)< FLT_EPSILON) && (fabs(*p2 - m2)< FLT_EPSILON)); ++p1, ++p2)
1609 for(p1 = in1, p2 = in2; (fabs(*p1 - *p2)< DBL_EPSILON) || ((fabs(*p1 - m1)< DBL_EPSILON) && (fabs(*p2 - m2)< DBL_EPSILON)); ++p1, ++p2)
1666 fprintf(stderr, "DIFFER : SIZE OF VARIABLE \"%s\" : %d <> %d\n", name, (int)v1->len, (int)v2->len);
1713 /* printf("start = %d %d %d %d, count = %d %d %d %d\n", (int)start[0], (int)start[1], (int)start[2], (int)start[3], (int)count[0], (int)count[1], (int)count[2], (int)count[3]); */ \
1724 printf("nitems = %d, rec = %d, P1[%d] = %g, P2[%d] = %g\n", nitems, rec, i, P1[i], i, P2[i]); \
1842 fprintf(stderr, "DIFFER : Failed to find variable \"%s\" in file \"%s\".\n", name, opts->file1);
1852 fprintf(stderr, "DIFFER : Failed to find variable \"%s\" in file \"%s\".\n", name, opts->file2);
1892 /* todo: make cmpvar and cmpvartol same function to re-use code immediately above; just use conditional to choose CMP_VAR or CMP_VARTOL macro. */
1898 /* printf("start = %d %d %d %d, count = %d %d %d %d\n", (int)start[0], (int)start[1], (int)start[2], (int)start[3], (int)count[0], (int)count[1], (int)count[2], (int)count[3]); */ \
1905 printf("nitems = %d, rec = %d, P1[%d] = %g, P2[%d] = %g\n", nitems, rec, i, P1[i], i, P2[i]); \
1914 if (opts->abstolerance ? (absdelta > opts->tolerance) : (double)absdelta*100./(fabs((double)P1[i]) > fabs((double)P2[i]) ? fabs((double)P1[i]) : fabs((double)P2[i])) > opts->tolerance) \
1941 fprintf(stderr, message, v1->name, idxstr, value1str, value2str, (double)absdelta*100./(fabs((double)P1[i]) > fabs((double)P2[i]) ? fabs((double)P1[i]) : fabs((double)P2[i])) ); \
1985 }
2006 }
2123 fprintf(stderr, "DIFFER : Failed to find variable \"%s\" in file \"%s\".\n", opts->cmpvarlist[i], opts->file1);
2135 fprintf(stderr, "DIFFER : Failed to find variable \"%s\" in file \"%s\".\n", opts->cmpvarlist[i], opts->file2);
2146 fprintf(stderr, "DIFFER : SIZE OF VARIABLE \"%s\" : %d <> %d\n", opts->cmpvarlist[i], (int) vars1[idx1].len, (int) vars2[idx2].len);
2159 fprintf(stderr, "DIFFER : TYPE OF VARIABLE \"%s\" : %s <> %s\n", opts->cmpvarlist[i], str1, str2);
2202 }
int cmpvar(char *name, int rec, nccmpopts *opts, int ncid1, int ncid2)
Definition: nccmp.c:1619
int strlistsd(char **list1, char **list2, char **listdiff, int n1, int n2, int nsd)
Definition: strlist.c:198
int cmpatt(int ncid1, int ncid2, int varid1, int varid2, char *name, char *varname, nccmpopts *opts)
Definition: nccmp.c:402
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
Definition: CMakeLists.txt:7
void getidxstr_fortran(varstruct *var, size_t *start, int curidx, char *out)
Definition: nccmp.c:57
float f1(float x)
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed as required for compatibility with version of the SDP toolkit Corrected test output file names to end in out
Definition: HISTORY.txt:422
void getvarinfo(int ncid, varstruct *vars, int *nvars, int verbose)
Definition: nccmp.c:865
int excludevars(int ncid1, int ncid2, char **finallist, int nfinal, char **excludelist, int nexclude)
Definition: nccmp.c:176
#define BROADCAST_MISSING(T)
float f2(float y)
int cmpvartol(char *name, int rec, nccmpopts *opts, int ncid1, int ncid2)
Definition: nccmp.c:1801
int nccmpdatarecvartol(int ncid1, int ncid2, char *varname, nccmpopts *opts, size_t recstart, size_t recend)
Definition: nccmp.c:1985
void prettyprintatt(int ncid, char *varname, int varid, char *name, char *str)
Definition: nccmp.c:270
off_t cmp_double_missing(double *in1, double *in2, double m1, double m2)
Definition: nccmp.c:1607
#define CMP_VARTOL(TYPE, NCFUNTYPE, ncid1, ncid2, P1, P2, M)
int nccmpdatarecvar(int ncid1, int ncid2, char *varname, nccmpopts *opts, size_t recstart, size_t recend)
Definition: nccmp.c:2006
int appendstringtolist(char ***list, const char *string, int *nitems)
Definition: strlist.c:152
off_t cmp_text_missing(char *in1, char *in2, char m1, char m2)
Definition: nccmp.c:1547
int cmpattval(int nc1, int nc2, int varid1, int varid2, char *name, int len, nc_type type)
Definition: nccmp.c:503
instead the metadata field ProcessingEnvinronment is filled in from the output of a call to the POSIX compliant function uname from within the L1B code A small bug in L1B_Tables an incorrect comparison of RVS coefficients for TEBs to RVS coefficients for RSBs was being made This was replaced with a comparison between TEB coefficients This error never resulted in an incorrect RVS correction but did lead to recalculating the coefficients for each detector in a thermal band even if the coefficients were the same for all detectors To reduce to overall size of the reflective LUT HDF fill values were eliminated from all LUTs previously dimensioned where and where NUM_TIMES is the number of time dependent table pieces In Preprocess a small error where the trailing dropped scan counter was incremented when the leading dropped scan counter should have been was fixed This counter is internal only and is not yet used for any chiefly to casting of were added to make it LINUX compatible Output of code run on LINUX machines displays differences of at most scaled sector incalculable values of the Emissive calibration factor and incalculable values of SV or BB averages was moved outside the loop over frames in Emissive_Cal c since none of these quantities are frame dependent Initialization of b1 and XMS values in Preprocess c routine Process_OBCENG_Emiss was moved inside the detector loops The code was altered so that if up to five scans are dropped between the leading middle or middle trailing the leading or trailing granule will still be used in emissive calibration to form a cross granule average QA bits and are set for a gap between the leading middle and middle trailing granules respectively This may in rare instances lead to a change in emissive calibration coefficients for scans at the beginning or end of a granule A small bug in the Band correction algorithm was corrected an uncertainty value was being checked against an upper bound whereas the proper quantity to be checked was the corresponding which is the product of the Band radiance times the ratio of the Band to Band scaling factors times the LUT correction value for that detector In addition a new LUT which allows for a frame offset with regard to the Band radiance was added A LUT which switches the correction off or on was also added Changes which do not affect scientific output of the the pixel is flagged with the newly created flag and the number of pixels for which this occurs is counted in the QA_common table The array of b1s in Preprocess c was being initialized to outside the loop over which meant that if b1 could not be the value of b1 from the previous band for that scan detector combination was used The initialization was moved inside the band loop Minor code changes were made to eliminate compiler warnings when the code is compiled in bit mode Temperature equations were upgraded to be MODIS AQUA or MODIS TERRA specific and temperature conversion coefficients for AQUA were MOD_PR02 will not cease execution if the value of this parameter is not but will print a message
Definition: HISTORY.txt:644
void broadcast_missing(nc_type var_type, nc_type att_type, missing_struct *values)
Definition: nccmp.c:799
subroutine diff(x, conec, n, dconecno, dn, dconecmk, units, u, inno, i, outno, o, input, deriv)
Definition: ffnet.f:205
Definition: nccmp.h:62
#define CMP_VAR(TYPE, NCFUNTYPE, ncid1, ncid2, P1, P2, M)
int isinvarstructlist(char *name, varstruct *vars, int nvars)
Definition: nccmp.c:917
instead the metadata field ProcessingEnvinronment is filled in from the output of a call to the POSIX compliant function uname from within the L1B code A small bug in L1B_Tables an incorrect comparison of RVS coefficients for TEBs to RVS coefficients for RSBs was being made This was replaced with a comparison between TEB coefficients This error never resulted in an incorrect RVS correction but did lead to recalculating the coefficients for each detector in a thermal band even if the coefficients were the same for all detectors To reduce to overall size of the reflective LUT HDF fill values were eliminated from all LUTs previously dimensioned where and where NUM_TIMES is the number of time dependent table pieces In Preprocess a small error where the trailing dropped scan counter was incremented when the leading dropped scan counter should have been was fixed This counter is internal only and is not yet used for any chiefly to casting of were added to make it LINUX compatible Output of code run on LINUX machines displays differences of at most scaled sector incalculable values of the Emissive calibration factor b1
Definition: HISTORY.txt:576
off_t cmp_byte_missing(int8_t *in1, int8_t *in2, int8_t m1, int8_t m2)
Definition: nccmp.c:1559
HISTORY txt for MOD_PR01(step one of PGE01) History follows the following convention needed due to new Aqua ReprocessingActual and the expected LUT revision number from PCF Changed to use PGE version for ProductionHistory Added Archive including ProcessingEnvironment Corrected handling of bad to resovle GSFcd02514 Changed to check staged LUT revision number versus the expected LUT revision number from thereby resolving defect report MODxl02056 This change also avoids the memory access violation reported in MODur00039 Changed the way output arrays were initialized with fill values
Definition: HISTORY.txt:162
an array had not been initialized Several spelling and grammar corrections were which is read from the appropriate MCF the above metadata values were hard coded A problem calculating the average background DN for SWIR bands when the moon is in the space view port was corrected The new algorithm used to calculate the average background DN for all reflective bands when the moon is in the space view port is now the same as the algorithm employed by the thermal bands For non SWIR changes in the averages are typically less than Also for non SWIR the black body DNs remain a backup in case the SV DNs are not available For SWIR the changes in computed averages were larger because the old which used the black body suffered from contamination by the micron leak As a consequence of the if SV DNs are not available for the SWIR the EV pixels will not be the granule time is used to identify the appropriate tables within the set given for one LUT the first two or last two tables respectively will be used for the interpolation If there is only one LUT in the set of it will be treated as a constant LUT The manner in which Earth View data is checked for saturation was changed Previously the raw Earth View DNs and Space View DNs were checked against the lookup table values contained in the table dn_sat The change made is to check the raw Earth and Space View DNs to be sure they are less than the maximum saturation value and to check the Space View subtracted Earth View dns against a set of values contained in the new lookup table dn_sat_ev The metadata configuration and ASSOCIATEDINSTRUMENTSHORTNAME from the MOD02HKM product The same metatdata with extensions and were removed from the MOD021KM and MOD02OBC products ASSOCIATEDSENSORSHORTNAME was set to MODIS in all products These changes are reflected in new File Specification which users may consult for exact the pow functions were eliminated in Emissive_Cal and Emissive bands replaced by more efficient code Other calculations throughout the code were also made more efficient Aside from a few round off there was no difference to the product The CPU time decreased by about for a day case and for a night case A minor bug in calculating the uncertainty index for emissive bands was corrected The frame the required RAM for each execution is MB on the DEC ALPHA and MB on the SGI Octane v2
Definition: HISTORY.txt:728
off_t cmp_short_missing(short *in1, short *in2, short m1, short m2)
Definition: nccmp.c:1571
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed as required for compatibility with version of the SDP toolkit Corrected test output file names to end in per delivery and then split off a new MYD_PR03 pcf file for Aqua Added AssociatedPlatformInstrumentSensor to the inventory metadata in MOD01 mcf and MOD03 mcf Created new versions named MYD01 mcf and MYD03 where AssociatedPlatformShortName is rather than Terra The program itself has been changed to read the Satellite Instrument validate it against the input L1A and LUT and to use it determine the correct files to retrieve the ephemeris and attitude data from Changed to produce a LocalGranuleID starting with MYD03 if run on Aqua data Added the Scan Type file attribute to the Geolocation copied from the L1A and attitude_angels to radians rather than degrees The accumulation of Cumulated gflags was moved from GEO_validate_earth_location c to GEO_locate_one_scan c
Definition: HISTORY.txt:464
int strlistu(char **list1, char **list2, char **listunion, int n1, int n2, int nu)
Definition: strlist.c:171
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
off_t cmp_float_missing(float *in1, float *in2, float m1, float m2)
Definition: nccmp.c:1595