dtcenter / MET

Model Evaluation Tools
https://dtcenter.org/community-code/model-evaluation-tools-met
Apache License 2.0
74 stars 22 forks source link

The unit test for pb2nc took too long #867

Closed dwfncar closed 6 years ago

dwfncar commented 6 years ago

The overall unit test took more than 1 hour. It would be nice to adjust unit test for pb2nc. One option would be more aggressive filtering.


The longest one took more than 20 minutes and the longest one except pb2nc is 146.950 seconds with tc_dland_HALF_DEG.


Here are execution time for each test case:


from unit_pb2nc.xml:
1317.525 pb2nc_GDAS_mask_grid_G212_var_id
1317.157 pb2nc_GDAS_mask_grid_G212
968.793 pb2nc_NDAS_var_all
253.350 pb2nc_NDAS_mask_grid_data_cfg
253.473 pb2nc_NDAS_mask_poly_conus
253.157 pb2nc_NDAS_mask_poly_conus_var
249.960 pb2nc_NDAS_mask_sid_file
249.734 pb2nc_NDAS_var
249.384 pb2nc_NDAS_mask_sid_list


not from unit_pb2nc.xml:
434.982 pb2nc_ndas_lead_0
427.684 pb2nc_ndas_lead_48
414.452 pb2nc_ndas_lead_24
413.589 pb2nc_ndas_lead_36
389.945 pb2nc_ndas_lead_12
233.340 test_all_pb2nc


[MET-867] created by hsoh

dwfncar commented 6 years ago

pb2nc_GDAS_mask_grid_G212_var_id was replaced with pb2nc_NDAS_mask_poly_conus_var_id.
    TEST: pb2nc_NDAS_mask_poly_conus_var_id - pass - 253.056 sec (was 1317.525). Saved 18 minutes. by hsoh

dwfncar commented 6 years ago

The unit test a year ago:
CALLING: /d3/projects/MET/MET_regression/NB20161117/test_rev3987/perl/unit.pl /d3/projects/MET/MET_regression/NB20161117/test_rev3987/xml/unit_pb2nc.xml


TEST: pb2nc_GDAS_mask_grid_G212 - pass - 342.806 sec
TEST: pb2nc_NDAS_mask_poly_conus - pass - 66.979 sec


==> It took 4 times longer after increasing the buffer for vertical level from 255 to 1023. by hsoh

dwfncar commented 6 years ago

Modify logic of setting the buffer size (discussed with John).
Check contents of obs_bufrvar and ignore the standard 6 variables and the derived variables beginning with "D". If 0 vars are left, use the small buffer. If 1 or more vars are left, use the big buffer.


If level_range.end from config. file is bigger than 255, use the bigger buffer.


The default is changed to use_var_id, so removed three test cases (-vars, -all, and -use_var_id options) by hsoh