ocssw
V2022
|
l2bin.cpp
Go to the documentation of this file.
120 void addPixelToBin(int32_t ifile, int32_t ipixl, uint64_t bin, bool is_l2_flags_defined = true, double areaFrac = 1.0)
266 f32 = l2_str[ifile].l2_data[l2_iprod][ipixl * l2_str[ifile].thirdDim[l2_iprod] + thirdDimId[l3_iprod]]; // probably the best way is to pass wavelength
303 f32 = l2_str[ifile].l2_data[l2_iprod][ipixl * l2_str[ifile].thirdDim[l2_iprod] + thirdDimId[l3_iprod]];
657 bg::append(pixelPoly.outer(), Point_t(l2_str[ifile].lon2[ipixl + 1], l2_str[ifile].lat2[ipixl + 1]));
658 bg::append(pixelPoly.outer(), Point_t(l2_str[ifile].lon1[ipixl + 1], l2_str[ifile].lat1[ipixl + 1]));
823 boost::split(output_pairs_l2_l3_names,std::string(input.output_product_names),boost::is_any_of(","));
835 printf("-E- Arguments \"composite_prod\" and \"area_weighting\" are incompatable. Do not set both.\n");
890 set_mapper(input.files[ifile], products_requested, products_requested_separated,input.output_wavelengths);
916 status = openL2(input.files[ifile].c_str(), products_requested_l3_temp.c_str(), &l2_str[ifile]);
970 set_prodname_3d_to_l2(prodparam, l2_str[0], l2_prodname, l3_prodname, thirdDimId, min_value, max_value);
Definition: L3Shape.h:18
void setupflags(char *flagdef, char *flaguse, uint32_t *flagusemask, uint32_t *required, int *status, int32_t *BITS)
Definition: setupflags.c:7
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
void addPixelToBin(int32_t ifile, int32_t ipixl, uint64_t bin, bool is_l2_flags_defined=true, double areaFrac=1.0)
Definition: l2bin.cpp:120
virtual void constrainRowCol(int32_t &row, int32_t &col) const =0
virtual int64_t latlon2bin(double lat, double lon) const =0
Definition: meta_l3b.h:15
int instrumentPlatform2SensorId(const char *instrument, const char *platform)
Definition: sensorInfo.c:405
const std::string & get_platform() const
Definition: get_geospatial.hpp:54
virtual int32_t getNumCols(int32_t row) const =0
Definition: L3ShapeIsine.h:16
These are used to scale the SD before writing it to the HDF4 file The default is and which means the product is not scaled at all Since the product is usually stored as a float inside of this is a way to write the float out as a integer l2prod min
Definition: HOWTO_Add_a_product.txt:76
int defineBinList64_nc(int32_t deflate, int32_t grpid)
Definition: ncdfbin_utils.c:99
*********************************************HISTORY FILE for MOD_PR02AQUA **Version ****Point of no algorithm change is made in this so the and when the blackbody temperature is above a threshold Since the LWIR FPA temperature oscillates on orbit
Definition: HISTORY.txt:106
real(single), dimension(:,:), allocatable longitude
Definition: core_arrays.f90:150
bool getBinsFromRow(double lat, double lon, T &pixelPoly, std::map< uint64_t, double > &areas)
Definition: l2bin.cpp:453
int defineBinData_nc(int32_t deflate, int32_t grpid, int32_t nprods, char **prodnames)
Definition: ncdfbin_utils.c:179
bg::model::point< double, 2, bg::cs::geographic< bg::degree > > Point_t
Definition: l2bin.cpp:102
void get_datadays(time_t starttime, float equatorialCrossingTime, DL dateLineCrossed, float west, float east, int32_t *dataday0, int32_t *dataday1)
Definition: get_dataday.cpp:65
int l2bin_input(int argc, char **argv, instr *input, const char *prog, const char *version)
Definition: l2bin_input.cpp:354
real(single), dimension(:,:), allocatable latitude
Definition: core_arrays.f90:149
int writeBinIndex_nc(int32_t grpid, int32_t n_write, const void *data)
Definition: ncdfbin_utils.c:358
virtual int32_t lat2row(double lat) const =0
virtual void rowcol2bounds(int32_t row, int32_t col, double &north, double &south, double &east, double &west) const =0
u5 which has been done in the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT production Changes from v6 which may affect scientific output
Definition: HISTORY.txt:186
int32_t readL2(l2_prod *l2_str, int32_t ifile, int32_t recnum, int32_t iprod, unsigned char *scan_in_rowgroup)
Definition: readL2scan.c:1336
bool skip_DL(float lon, int side, int night_flag, time_t end_day, time_t beg_day)
checks if lon should be skipped
Definition: l2bin.cpp:692
Definition: ncdfbin_utils.h:9
int64_t get_beg_ext(int32_t n_bins_write, int64_t *binnum_data, int64_t *basebin, int32_t nrows, int64_t *beg, int32_t *ext)
Definition: get_beg_ext.c:83
int writeBinList_nc(int32_t grpid, int32_t nbins_to_write, const void *data)
Definition: ncdfbin_utils.c:158
Definition: ncdfbin_utils.h:25
int setlinebuf(FILE *stream)
virtual void latlon2rowcol(double lat, double lon, int32_t &row, int32_t &col) const =0
std::multimap< std::string, netCDF::NcVar > find_variables_geo_physical(const std::string &nc_path, std::string &prod_list)
Definition: find_variable.cpp:29
bool binIntersectsPixel(int32_t row, int32_t col, Box_t &pixelBox, double &areaFrac)
Definition: l2bin.cpp:377
Definition: get_geospatial.hpp:11
int32_t openL2(const char *fname, const char *plist, l2_prod *l2_str)
Definition: readL2scan.c:316
char * strdup(const char *)
void getBins(int32_t ifile, int32_t ipixl, std::map< uint64_t, double > &areas)
Definition: l2bin.cpp:492
virtual int64_t getBaseBin(int32_t row) const =0
int defineBinIndex_nc(int32_t deflate, int32_t grpid)
Definition: ncdfbin_utils.c:251
int32_t resolve2binRows(const char *resolve)
convert l2bin style resolve string to number line in L3bin file
Definition: resolution_utils.cpp:145
bg::model::point< double, 2, bg::cs::spherical_equatorial< bg::degree > > Point_t
Definition: get_dataday.cpp:23
virtual void bin2latlon(int64_t bin, double &lat, double &lon)
Definition: L3Shape.cpp:99
void set_prodname_3d_to_l2(const std::vector< std::string > &prodparam, l2_prod &l2_str, std::vector< std::string > &l2_prodname, std::vector< std::string > &l3_prodname, std::vector< int32_t > &thirdDimId, std::vector< float > &min_value, std::vector< float > &max_value)
Definition: expand3D.cpp:383
const std::string & get_instrument() const
Definition: get_geospatial.hpp:58
Definition: ncdfbin_utils.h:32
virtual int64_t rowcol2bin(int32_t row, int32_t col) const =0
int writeQuality_nc(int32_t grpid, int32_t nbins_to_write, const void *data)
Definition: ncdfbin_utils.c:396
int writeBinData_nc(int32_t grpid, int32_t nbins_to_write, int32_t iprod, const void *data)
Definition: ncdfbin_utils.c:231
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned resolving bug report Corrected to filter out Aqua attitude records with missing status helping resolve bug MOD_PR03 will still correctly write scan and pixel data that does not depend upon the start time
Definition: HISTORY.txt:248
u5 which has been done in the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT production Changes from v6 which may affect scientific the sector rotation may actually occur during one of the scans earlier than the one where it is first reported As a the b1 values are about the LOCALGRANULEID metadata should have an extension NRT It is requested to identify the NRT to fill pixels affected by dead subframes with a special value Output the metadata of noisy and dead subframe Dead Subframe EV and Detector Quality Flag2 Removed the function call of Fill_Dead_Detector_SI to stop interpolating SI values for dead but also for all downstream products for science test only Changes from v5 which will affect scientific to conform to MODIS requirements Removed the Mixed option from the ScanType in the code because the L1A Scan Type is never Mixed Changed for ANSI C compliance and comments to better document the fact that when the HDF_EOS metadata is stricly the and products are off by and in the track respectively Corrected some misspelling of RCS swir_oob_sending_detector to the Reflective LUTs to enable the SWIR OOB correction detector so that if any of the sending detectors becomes noisy or non near by good detectors from the same sending band can be specified as the substitute in the new look up table Code change for adding an additional dimension of mirror side to the Band_21_b1 LUT to separate the coefficient of the two mirror sides for just like other thermal emissive so that the L1B code can calibrate Band scan to scan with mirror side dependency which leads better calibration result Changes which do not affect scientific when the EV data are not provided in this Crosstalk Correction will not be performed to the Band calibration data Changes which do not affect scientific and BB_500m in L1A Logic was added to turn off the or to spatial aggregation processes and the EV_250m_Aggr1km_RefSB and EV_500m_Aggr1km_RefSB fields were set to fill values when SDSs EV_250m and EV_500m are absent in L1A file Logic was added to skip the processing and turn off the output of the L1B QKM and HKM EV data when EV_250m and EV_500m are absent from L1A In this the new process avoids accessing and reading the and L1A EV skips and writing to the L1B and EV omits reading and subsampling SDSs from geolocation file and writing them to the L1B and omits writing metadata to L1B and EV and skips closing the L1A and L1B EV and SDSs Logic was added to turn off the L1B OBC output when the high resolution OBC SDSs are absent from L1A This is accomplished by skipping the openning the writing of metadata and the closing of the L1B OBC hdf which is Bit in the scan by scan bit QA has been changed Until now
Definition: HISTORY.txt:361
void copy(double **aout, double **ain, int n)
virtual double row2lat(int32_t row) const =0
Definition: dfutils.h:28
int defineBinIndex64_nc(int32_t deflate, int32_t grpid)
Definition: ncdfbin_utils.c:304
int write_l3b_meta_netcdf4(idDS ds_id, meta_l3bType *meta_l3b, int write64bit)
Definition: write_l3b_meta.c:164
int32_t getL3units(l2_prod *l2_str, int32_t ifile, char *l3b_prodname, char *units)
Definition: readL2scan.c:2346
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
Definition: ncdfbin_utils.h:17
void set_mapper(const std::string &input_file_name, std::string &products_requested, std::vector< std::string > &products_requested_separated, const std::string &requested_wavelengths)
readL2, openL2 uses the maps from this module. If the module is not initialized, the function read an...
Definition: expand3D.cpp:235
int32_t get_l2prod_index(const l2_prod &l2, const char *prodname)
Definition: l2bin.cpp:109