CEMPD / VERDI

This is the repo for the VERDI project, written in java.
GNU General Public License v3.0
17 stars 13 forks source link

Invalid saved configuration #251

Closed cwsimmon closed 3 years ago

cwsimmon commented 3 years ago

Reported by Russ Bullock

After creating a tile plot, I configured the color map scale to run from 280 to 320. I saved this configuration and closed the plot. I created the theta tile plot once again, loaded the previously saved configuration and correctly got the same plot I closed previously. The default setting for the numeric format for contour values shown in the legend is “-2.3f”. I then configured the color map to change the legend number format to “-2.1f” and got a good plot. I then saved this second configuration and closed the plot. When I tile plot theta again and load this second saved configuration, the plot has incorrect color contour values in the legend. The second configuration file has a spurious added level to the color scale with a value of “0.0”. This is not just a problem with MPAS output data. The same error occurs for other data sources. Essentially, a saved configuration will be invalid if it is a numeric format modification of a previously saved configuration. This bug was noted in previous version of Verdi. Multiple modifications of the color map scale work OK.

yadongxuEPA commented 3 years ago

To Reproduce Steps to reproduce the behavior:

  1. Load the 2-meter temperature data file "t2m_only.nc" into verdi and create tile plot of "t2m" variable.
  2. On the top menu bar, go to Configure >> Configure Plot >> Color map to create a customized color map scale from 280 to 320, keep the "Number Format" not changed at -2.3f. Click "OK" to apply the customized color map.
  3. Go to Configure >> Save Configuration to save the current configuration.
  4. Create another tile plot and use Configure >> Load Configuration to load the configuration file saved in Step 3.
  5. Compare the color maps created in Step 2 and Step 4. These two maps should be the same.
  6. Go to Configure >> Configure Plot >> Color map to create another customized color map scale from 280 to 320. This time change the "Number Format" from "-2.3f" to "-2.1f". Click "OK" to the apply the customized color map. You should see the decimal places of the color map legend have changed to 1 decimal place.
  7. Go to Configure >> Save Configuration to save the new configuration.
  8. Create one more tile plot and use Configure >> Load Configuration to load the configuration file saved in Step 7.
  9. Compare the color maps created in Step 6 and Step 8. These two maps should be the same.

Expected behavior The configuration of the tile plot should be able to be saved and reused in another tile plot. The color maps should be displayed correctly and consistently.

Tested with VERDI_2.1_linux64_20210707.tar.gz and confirmed that the issue has not resolved. Changed the "Number Format" to "-2.1f" and applied to the tile plot. Shown as below. issue_251_VERDI_testing_change_number_format_07072021

Loaded the saved configuration to another tile plot and found that an added level "0.0" to the color scale. Shown as below: issue_251_VERDI_testing_after_load_config_2_07072021

yadongxuEPA commented 3 years ago

Retested with VERDI_2.1_linux64_20210809.tar.gz and confirmed that the issue has not resolved. Changed the "Number Format" to "-2.1f" and customized a color map to the tile plot, shown as below. issue_251_VERDI_testing_1_20210809 Saved the above customized configuration and loaded it to another tile plot, found that the color map configuration was changed, shown as below: issue_251_VERDI_testing_2_20210809

yadongxuEPA commented 3 years ago

Retested with VERDI_2.1_linux64_20210906.tar.gz & VERDI_2.1_win64_20210906.zip & VERDI_2.1_linux64_20210920.tar.gz , confirmed that the issue has resolved. Saved the customized configuration (with the number format changed to 2.1f), then loaded into a tile plot, found that the color map configuration was consistent with the previous one. issue_251_VERDI_testing_1_20210906