MPAS-Dev / MPAS-Tools

MPAS Tools Repository
Other
37 stars 63 forks source link

Update plot_maps.py for landice plotting #504

Closed trhille closed 1 year ago

trhille commented 1 year ago

This merge provides several updates for the landice tool plot_maps.py:

  1. It adds the ability for the user to define the range of values plotted using the new --vmin and --vmax arguments.
  2. It adds reasonable bounds on velocities for plotting purposes.
  3. It provides the ability to plot mesh variables that have no time dimension, such as gridSpacing, areaCell, etc.
trhille commented 1 year ago

Testing

Two fields, both with color ranges set automatically. bedTopography has a time dimension, gridSpacing does not. plot_maps -r $CFS/piscees/MALI_input_files/AIS_4to20km_r01/AIS_4to20km_r01_20220907_Bedmap2_surface.nc -v bedTopography,gridSpacing

image

Now manually setting color bar limits for gridSpacing, but allowing the code to automatically determine a reasonable range for bedTopography: plot_maps -r $CFS/piscees/MALI_input_files/AIS_4to20km_r01/AIS_4to20km_r01_20220907_Bedmap2_surface.nc -v bedTopography,gridSpacing --vmin None,0.e3 --vmax None,2.e4

image

Using internally calculated lower limit for speeds, while setting the upper limit manually: plot_maps -r $CFS/piscees/MALI_input_files/AIS_4to20km_r01/AIS_4to20km_r01_20220907_Bedmap2_surface.nc -v observedSpeed -l True --vmax 2.5 image

xylar commented 1 year ago

Don't worry about the failing tests. They're nothing to do with you. They're something I've tried to get fixed on conda-forge but I'm having trouble getting a response.

trhille commented 1 year ago

@matthewhoffman, thanks for the review! I addressed your requested changes in 02119d7.