ocssw
V2022
|
nccmp.cpp
Go to the documentation of this file.
104 for (p1 = in1, p2 = in2; (*p1 == *p2) || ((*p1 == m1) && (*p2 == m2)) || (std::isnan(*p1) && std::isnan(*p2)); ++p1, ++p2)
126 template <typename T> int cmp_var(int ncid1, int ncid2, nccmpopts* opts, int rec, size_t *odomax,
149 /* 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]); */ \
197 //printf("%d nitems=%d, cmplen=%d, diff=%d do_missing=%d\n", __LINE__, nitems, cmplen, diff, opts->missing);
213 template <typename T> int cmp_vartol(int ncid1, int ncid2, nccmpopts* opts, int rec, size_t *odomax,
222 string message("DIFFER : VARIABLE : %s%s : POSITION : %s : VALUES : %s <> %s : PERCENT : %g\n");
237 /* 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]); */ \
258 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) \
285 fprintf(stdout, message.c_str(), getGroupPath(), v1->name, idxstr, value1str, value2str, (double) absdelta * 100. / (fabs((double) P1[i]) > fabs((double) P2[i]) ? fabs((double) P1[i]) : fabs((double) P2[i])));
301 template <typename T> int cmp_var_ut(int ncid1, int ncid2, nccmpopts* opts, int rec, size_t *odomax,
324 /* 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]); */ \
372 //printf("%d nitems=%d, cmplen=%d, diff=%d do_missing=%d\n", __LINE__, nitems, cmplen, diff, opts->missing);
388 template <typename T> int cmp_vartol_ut(void *P1, void *P2, int offset1, int offset2, int size1, int size2, char* name, nccmpopts* opts, int rec, size_t *odomax,
397 string message("DIFFER : VARIABLE : %s%s(%s) : POSITION : %s : VALUES : %s <> %s : PERCENT : %g\n");
421 if (opts->abstolerance ? (absdelta > opts->tolerance) : (double) absdelta * 100. / (fabs((double) value1) > fabs((double) value2) ? fabs((double) value1) : fabs((double) value2)) > opts->tolerance) \
446 fprintf(stdout, message.c_str(), getGroupPath(), v1->name, name, idxstr, value1str, value2str, (double) absdelta * 100. / (fabs((double) value1) > fabs((double) value2) ? fabs((double) value1) : fabs((double) value2)));
615 fprintf(stderr, "ERROR : QUERYING ATTRIBUTE \"%s\" FOR VARIABLE \"%s%s\"\n", name, getGroupPath(), varname);
827 fprintf(stdout, "DIFFER : VARIABLE \"%s%s\" IS MISSING ATTRIBUTE WITH NAME \"%s\" IN FILE \"%s\"\n", getGroupPath(), varname, name, opts->file1);
836 fprintf(stdout, "DIFFER : VARIABLE \"%s%s\" IS MISSING ATTRIBUTE WITH NAME \"%s\" IN FILE \"%s\"\n", getGroupPath(), varname, name, opts->file2);
846 fprintf(stdout, "DIFFER : TYPES : ATTRIBUTE : %s : VARIABLE : %s%s : %s <> %s\n", name, getGroupPath(), varname, typestr1, typestr2);
858 fprintf(stdout, "DIFFER : LENGTHS : ATTRIBUTE : %s : VARIABLE : %s%s : %lu <> %lu : VALUES : ", name, getGroupPath(), varname, (unsigned long) lenp1, (unsigned long) lenp2);
888 fprintf(stdout, "DIFFER : VARIABLE : %s%s : ATTRIBUTE : %s : VALUES : ", getGroupPath(), varname, name);
1325 fprintf(stdout, "DIFFER : LENGTHS OF RECORDS : %s (%d) <> %s (%d)\n", name1, (int) nrec1, name2, (int) nrec2);
1475 status = nc_get_att_ulonglong(ncid, var->varid, attname, (unsigned long long *)&var->missing.ul);
1497 nccmp_user_type_t* getvarinfo(int ncid, varstruct* vars, int* nvars, int verbose, int *nuser_types) {
1620 status = excludevars(ncid1, ncid2, opts->cmpvarlist, opts->ncmpvarlist, opts->excludelist, opts->nexclude);
1788 fprintf(stdout, "DIFFER : NAME OF GLOBAL ATTRIBUTE : %s : GLOBAL ATTRIBUTE DOESN'T EXIST IN \"%s\"\n", name1, opts->file2);
1799 fprintf(stdout, "DIFFER : GLOBAL ATTRIBUTE TYPES : %s : %s <> %s\n", name1, typestr1, typestr2);
1810 fprintf(stdout, "DIFFER : LENGTHS OF GLOBAL ATTRIBUTE : %s : %lu <> %lu : VALUES : %s <> %s\n", name1,
1823 fprintf(stdout, "DIFFER : VALUES OF GLOBAL ATTRIBUTE : %s : %s <> %s\n", name1, typestr1, typestr2);
1863 fprintf(stdout, "DIFFER : NAME OF GLOBAL ATTRIBUTE : %s : GLOBAL ATTRIBUTE DOESN'T EXIST IN %s\n", name2, opts->file1);
1874 fprintf(stdout, "DIFFER : GLOBAL ATTRIBUTE TYPE : %s : %s <> %s\n", name1, typestr1, typestr2);
1886 fprintf(stdout, "DIFFER : LENGTHS OF GLOBAL ATTRIBUTE : %s : %lu <> %lu : VALUES : ", name1, (unsigned long) len1, (unsigned long) len2);
1919 fprintf(stdout, "DIFFER : VALUES OF GLOBAL ATTRIBUTE : %s : %s <> %s\n", name1, typestr1, typestr2);
1938 int i, j, j1, j2, status, ncstatus, dimid1, dimid2, tmp1, tmp2, attid1, attid2, natts1, natts2;
1940 char name1[NC_MAX_NAME], name2[NC_MAX_NAME], recname1[NC_MAX_NAME], recname2[NC_MAX_NAME], typestr1[1024], typestr2[1024];
1993 fprintf(stdout, "DIFFER : NAME : DIMENSION : %s : DIMENSION DOESN'T EXIST IN \"%s\"\n", name1, opts->file2);
2031 fprintf(stdout, "DIFFER : NAME : VARIABLE : %s%s : VARIABLE DOESN'T EXIST IN \"%s\"\n", getGroupPath(), opts->cmpvarlist[i], opts->file1);
2042 fprintf(stdout, "DIFFER : NAME : VARIABLE : %s%s : VARIABLE DOESN'T EXIST IN \"%s\"\n", getGroupPath(), opts->cmpvarlist[i], opts->file2);
2054 fprintf(stdout, "DIFFER : TYPES : VARIABLE : %s%s : %s <> %s\n", getGroupPath(), opts->cmpvarlist[i], typestr1, typestr2);
2064 fprintf(stdout, "DIFFER : NUMBER : DIMENSIONS : VARIABLE : %s%s : %d <> %d\n", getGroupPath(), opts->cmpvarlist[i], ndims1, ndims2);
2094 /*printf("DEBUG : %d : %s, %s, %s\n", __LINE__, opts->cmpvarlist[i], dims1[dimid1].name, dims2[dimid2].name);*/
2097 fprintf(stdout, "DIFFER : DIMENSION NAMES FOR VARIABLE %s%s : %s <> %s\n", getGroupPath(), opts->cmpvarlist[i], dims1[dimid1].name, dims2[dimid2].name);
2110 fprintf(stdout, "DIFFER : VARIABLE : %s%s : DIMENSION %s IS RECORD IN FILE \"%s\" BUT NOT IN \"%s\"\n", getGroupPath(), vars1[j1].name, dims1[dimid1].name, opts->file1, opts->file2);
2118 fprintf(stdout, "DIFFER : VARIABLE : %s%s : DIMENSION %s IS RECORD IN FILE \"%s\" BUT NOT IN \"%s\"\n", getGroupPath(), vars1[j1].name, dims2[dimid2].name, opts->file2, opts->file1);
2164 if (instringlist(opts->excludeattlist, name1, opts->nexcludeatt) || instringlist(processedatts, name1, NC_MAX_VARS))
2171 ncstatus = cmpatt(ncid1, ncid2, vars1[j1].varid, vars2[j2].varid, name1, vars1[j1].name, opts);
2183 fprintf(stderr, "Failed to query variable %s%s attribute in file \"%s\"\n", getGroupPath(), vars2[j2].name, opts->file2);
2205 ncstatus = cmpatt(ncid1, ncid2, vars1[j1].varid, vars2[j2].varid, name2, vars2[j2].name, opts);
2214 fprintf(stdout, "DIFFER : NUMBER OF ATTRIBUTES : VARIABLE : %s%s : %d <> %d\n", getGroupPath(), opts->cmpvarlist[i], natts1, natts2);
2249 int cmpvar(char* name, int rec, nccmpopts* opts, int ncid1, int ncid2, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2) {
2269 fprintf(stdout, "DIFFER : SIZE OF VARIABLE \"%s%s\" : %d <> %d\n", getGroupPath(), name, (int) v1->len, (int) v2->len);
2327 //cmp_var<int8_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.b, v2->missing.b);
2329 diffstatus = cmp_vartol<int8_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2334 // cmp_var<char>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.c, v2->missing.c);
2336 diffstatus = cmp_vartol<char>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2341 // cmp_var<short>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.s, v2->missing.s);
2343 diffstatus = cmp_vartol<short>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2348 // cmp_var<short>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.s, v2->missing.s);
2350 diffstatus = cmp_vartol<uint16_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2355 // cmp_var<short>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.s, v2->missing.s);
2357 diffstatus = cmp_vartol<uint8_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2363 diffstatus = cmp_vartol<int>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.i, v2->missing.i);
2369 diffstatus = cmp_vartol<uint>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ui, v2->missing.ui);
2375 diffstatus = cmp_vartol<long>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.l, v2->missing.l);
2381 diffstatus = cmp_vartol<uint64_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ul, v2->missing.ul);
2388 diffstatus = cmp_vartol<float>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2393 diffstatus = cmp_vartol<float>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2401 diffstatus = cmp_var<double>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.d, v2->missing.d);
2406 diffstatus = cmp_vartol<double>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.d, v2->missing.d);
2425 data1 = (unsigned char *) malloc(sizeof (unsigned char)*user_types1[ut_nidx1].size * (nitems + 1));
2426 data2 = (unsigned char *) malloc(sizeof (unsigned char)*user_types2[ut_nidx2].size * (nitems + 1));
2440 //cmp_var<int8_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.b, v2->missing.b);
2442 diffstatus = cmp_vartol_ut<int8_t>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.b, v2->missing.b);
2447 // cmp_var<char>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.c, v2->missing.c);
2449 diffstatus = cmp_vartol_ut<char>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.c, v2->missing.c);
2454 // cmp_var<short>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.s, v2->missing.s);
2456 diffstatus = cmp_vartol<short>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.s, v2->missing.s);
2461 // cmp_var<short>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.s, v2->missing.s);
2463 diffstatus = cmp_vartol<uint16_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.us, v2->missing.us);
2468 // cmp_var<short>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.s, v2->missing.s);
2470 diffstatus = cmp_vartol_ut<uint8_t>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ub, v2->missing.ub);
2476 diffstatus = cmp_vartol_ut<int>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.i, v2->missing.i);
2482 diffstatus = cmp_vartol_ut<uint>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ui, v2->missing.ui);
2488 diffstatus = cmp_vartol_ut<long>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.l, v2->missing.l);
2494 diffstatus = cmp_vartol_ut<uint64_t>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ul, v2->missing.ul);
2501 diffstatus = cmp_vartol_ut<float>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2506 diffstatus = cmp_vartol_ut<float>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2514 diffstatus = cmp_vartol_ut<double>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.d, v2->missing.d);
2519 diffstatus = cmp_vartol_ut<double>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.d, v2->missing.d);
2530 printf("INFO: Increase NC_MAX_TYPES > %d to avoid this message. \n", user_types1[ut_nidx1].fields[i].type_id);
2547 int cmpvartol(char* name, int rec, nccmpopts* opts, int ncid1, int ncid2, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2) {
2560 printf("INFO: Comparing data for variable \"%s%s\" at record %d.\n", getGroupPath(), name, (int) rec);
2570 fprintf(stdout, "DIFFER : Failed to find variable \"%s%s\" in file \"%s\".\n", getGroupPath(), name, opts->file1);
2580 fprintf(stdout, "DIFFER : Failed to find variable \"%s%s\" in file \"%s\".\n", getGroupPath(), name, opts->file2);
2592 fprintf(stdout, "DIFFER : SIZE OF VARIABLE \"%s%s\" : %d <> %d\n", getGroupPath(), name, (int) v1->len, (int) v2->len);
2628 /* todo: make cmpvar and cmpvartol same function to re-use code immediately above; just use conditional to choose CMP_VAR or CMP_VARTOL macro. */
2634 diffstatus = cmp_vartol<int8_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.b, v2->missing.b);
2639 diffstatus = cmp_vartol<uint8_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ub, v2->missing.ub);
2644 diffstatus = cmp_vartol<char>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.c, v2->missing.c);
2649 diffstatus = cmp_vartol<short>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.s, v2->missing.s);
2654 diffstatus = cmp_vartol<uint16_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.us, v2->missing.us);
2659 diffstatus = cmp_vartol<int>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.i, v2->missing.i);
2664 diffstatus = cmp_vartol<uint>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ui, v2->missing.ui);
2669 diffstatus = cmp_vartol<long>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.l, v2->missing.l);
2674 diffstatus = cmp_vartol<uint64_t>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ul, v2->missing.ul);
2679 diffstatus = cmp_vartol<float>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2684 diffstatus = cmp_vartol<double>(ncid1, ncid2, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.d, v2->missing.d);
2701 data1 = (unsigned char *) malloc(sizeof (unsigned char)*user_types1[ut_nidx1].size * (nitems + 1));
2702 data2 = (unsigned char *) malloc(sizeof (unsigned char)*user_types2[ut_nidx2].size * (nitems + 1));
2717 diffstatus = cmp_vartol_ut<int8_t>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.b, v2->missing.b);
2723 diffstatus = cmp_vartol_ut<uint8_t>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ub, v2->missing.ub);
2729 diffstatus = cmp_vartol_ut<char>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.c, v2->missing.c);
2734 diffstatus = cmp_vartol_ut<short>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.s, v2->missing.s);
2739 diffstatus = cmp_vartol_ut<uint16_t>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.us, v2->missing.us);
2744 diffstatus = cmp_vartol_ut<int>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.i, v2->missing.i);
2749 diffstatus = cmp_vartol_ut<uint>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ui, v2->missing.ui);
2754 diffstatus = cmp_vartol_ut<long>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.l, v2->missing.l);
2759 diffstatus = cmp_vartol_ut<uint64_t>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.ul, v2->missing.ul);
2764 diffstatus = cmp_vartol_ut<float>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.f, v2->missing.f);
2769 diffstatus = cmp_vartol_ut<double>(data1, data2, offset1, offset2, size1, size2, user_types1[ut_nidx1].fields[i].name, opts, rec, odomax, nitems, count, start, v1, v2, v1->missing.d, v2->missing.d);
2778 printf("INFO: Increase NC_MAX_TYPES > %d to avoid this message. \n", user_types1[ut_nidx1].fields[i].type_id);
2793 size_t recstart, size_t recend, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2) {
2798 cmpstatus = cmpvartol(varname, recstart, opts, ncid1, ncid2, user_types1, user_types2) || status;
2814 size_t recstart, size_t recend, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2) {
2833 int nccmpdatatol(int ncid1, int ncid2, nccmpopts* opts, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2) {
2864 cmpstatus = nccmpdatarecvartol(ncid1, ncid2, opts->cmpvarlist[i], opts, 0, nrec1 - 1, user_types1, user_types2);
2892 int nccmpdata(nccmpopts* opts, int ncid1, int ncid2, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2) {
2931 fprintf(stdout, "DIFFER : Failed to find variable \"%s%s\" in file \"%s\".\n", getGroupPath(), opts->cmpvarlist[i], opts->file1);
2943 fprintf(stdout, "DIFFER : Failed to find variable \"%s%s\" in file \"%s\".\n", getGroupPath(), opts->cmpvarlist[i], opts->file2);
2954 fprintf(stdout, "DIFFER : SIZE OF VARIABLE \"%s%s\" : %d <> %d\n", getGroupPath(), opts->cmpvarlist[i], (int) vars1[idx1].len, (int) vars2[idx2].len);
2967 fprintf(stdout, "DIFFER : TYPE OF VARIABLE \"%s%s\" : %s <> %s\n", getGroupPath(), opts->cmpvarlist[i], str1, str2);
2984 cmpstatus = nccmpdatarecvar(ncid1, ncid2, opts->cmpvarlist[i], opts, 0, nrec1 - 1, user_types1, user_types2);
3148 printf("DIFFER : GROUP : %s%s : Does not exist in file 2\n", getGroupPath(), groupNames1[i].c_str());
3164 printf("DIFFER : GROUP : %s%s : Does not exist in file 1\n", getGroupPath(), groupNames2[i].c_str());
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 index(0-based) was previously being used the frame number(1-based) should have been used. There were only a few minor changes to the uncertainty index(maximum of 1 digit). 3. Some inefficient arrays(Sigma_RVS_norm_sq) were eliminated and some code lines in Preprocess_L1A_Data were moved into Process_OBCEng_Emiss. There were no changes to the product. Required RAM was reduced by 20 MB. Now
int cmp_vartol_ut(void *P1, void *P2, int offset1, int offset2, int size1, int size2, char *name, nccmpopts *opts, int rec, size_t *odomax, off_t nitems, size_t *count, size_t *start, varstruct *v1, varstruct *v2, T M1, T M2)
Definition: nccmp.cpp:388
int cmp_var_ut(int ncid1, int ncid2, nccmpopts *opts, int rec, size_t *odomax, off_t nitems, size_t *count, size_t *start, varstruct *v1, varstruct *v2, T M1, T M2)
Definition: nccmp.cpp:301
int strlistsd(char **list1, char **list2, char **listdiff, int n1, int n2, int nsd)
Definition: strlist.c:198
float f1(float x)
void freevarinfo(int nuser_types, nccmp_user_type_t *comp_types)
Definition: nccmp.cpp:1576
int cmpvar(char *name, int rec, nccmpopts *opts, int ncid1, int ncid2, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2)
Definition: nccmp.cpp:2249
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
nccmp_user_type_t * getvarinfo(int ncid, varstruct *vars, int *nvars, int verbose, int *nuser_types)
Definition: nccmp.cpp:1497
int excludevars(int ncid1, int ncid2, char **finallist, int nfinal, char **excludelist, int nexclude)
Definition: nccmp.cpp:495
int nccmpdatarecvartol(int ncid1, int ncid2, char *varname, nccmpopts *opts, size_t recstart, size_t recend, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2)
Definition: nccmp.cpp:2792
int nccmpdatarecvar(int ncid1, int ncid2, char *varname, nccmpopts *opts, size_t recstart, size_t recend, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2)
Definition: nccmp.cpp:2813
float f2(float y)
void getidxstr(varstruct *var, size_t *start, int curidx, char *out)
Definition: nccmp.cpp:464
int nccmpdatatol(int ncid1, int ncid2, nccmpopts *opts, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2)
Definition: nccmp.cpp:2833
int cmpattval(int nc1, int nc2, int varid1, int varid2, char *name, int len, nc_type type)
Definition: nccmp.cpp:916
list(APPEND LIBS ${NETCDF_LIBRARIES}) find_package(GSL REQUIRED) include_directories($
Definition: CMakeLists.txt:8
int cmpatt(int ncid1, int ncid2, int varid1, int varid2, char *name, char *varname, nccmpopts *opts)
Definition: nccmp.cpp:816
void getidxstr_fortran(varstruct *var, size_t *start, int curidx, char *out)
Definition: nccmp.cpp:480
void prettyprintatt(int ncid, char *varname, int varid, char *name, char *str)
Definition: nccmp.cpp:589
int nccmpdata(nccmpopts *opts, int ncid1, int ncid2, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2)
Definition: nccmp.cpp:2892
void getgroupinfo(int ncid, vector< string > names, GROUP_NODE *groups)
Definition: nccmp.cpp:1335
int appendstringtolist(char ***list, const char *string, int *nitems)
Definition: strlist.c:152
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
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 fields
Definition: HISTORY.txt:400
int cmpvartol(char *name, int rec, nccmpopts *opts, int ncid1, int ncid2, nccmp_user_type_t *user_types1, nccmp_user_type_t *user_types2)
Definition: nccmp.cpp:2547
Definition: nccmp_user_type.h:13
subroutine diff(x, conec, n, dconecno, dn, dconecmk, units, u, inno, i, outno, o, input, deriv)
Definition: ffnet.f:205
nccmp_user_type_t * nccmp_load_group_usertype_array(int group_id, int *nuser_types)
Definition: nccmp_user_type.c:15
Definition: nccmp.h:62
#define BROADCAST_MISSING(T)
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
int isinvarstructlist(char *name, varstruct *vars, int nvars)
Definition: nccmp.cpp:1590
Definition: names.f90:1
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
int cmp_var(int ncid1, int ncid2, nccmpopts *opts, int rec, size_t *odomax, off_t nitems, size_t *count, size_t *start, varstruct *v1, varstruct *v2, T M1, T M2)
Definition: nccmp.cpp:126
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
char get_missing(int ncid, varstruct *var, const char *attname)
Definition: nccmp.cpp:1432
void broadcast_missing(nc_type var_type, nc_type att_type, missing_struct *values)
Definition: nccmp.cpp:1388
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
Definition: aerosol.c:136
int cmp_vartol(int ncid1, int ncid2, nccmpopts *opts, int rec, size_t *odomax, off_t nitems, size_t *count, size_t *start, varstruct *v1, varstruct *v2, T M1, T M2)
Definition: nccmp.cpp:213