ARM-DOE / ACT

Atmospheric data Community Toolkit - A python based toolkit for exploring and analyzing time series atmospheric datasets
https://ARM-DOE.github.io/ACT/
Other
138 stars 35 forks source link

improving the function of the current skew-T plot #606

Closed Aifang-Zhou closed 1 year ago

Aifang-Zhou commented 1 year ago

I am working on the VAP SondePram. We'd like to display the values of CAPE/CIN/LCL/LFC/LNB on the skew-T plot, and these values are supposed to reflect the calculation results of the VAP. Could you improve the skew-T display so that we can realize this function? Please let me know if you need any information.

AdamTheisen commented 1 year ago

Thanks for the issue @Aifang-Zhou! We might want to think about this in 2 ways

First Option: Provide a keyword to add these variables using MetPy/Sonde Stability function in ACT Second Option: Allow the user to pass in a dictionary of keys and values to display in a set area that would be populated with the first option.

Additionally, I wonder if we could further improve the Skew-T plots with the option to add a hodograph?

@mgrover1 @zssherman any thoughts here?

zssherman commented 1 year ago

@AdamTheisen I think either way should be fine, whichever is easier for the user to input those fields.

AdamTheisen commented 1 year ago

Putting this here for the record. We could follow this layout and then under the hodograph, we can add results from the stability retrieval or have the option for the user to pass in a dictionary of info to display.

https://unidata.github.io/python-training/workshop/Skew_T/skewt-and-hodograph/

AdamTheisen commented 1 year ago

I would like this to stay open to get feedback from @Aifang-Zhou and plan for future improvements with the Skew-T display. While we didn't update the plotting future, the example below shows how you could format it to add the text yourself.

https://arm-doe.github.io/ACT/source/auto_examples/plotting/plot_skewt_with_text.html#sphx-glr-source-auto-examples-plotting-plot-skewt-with-text-py

zssherman commented 1 year ago

I'm like, I don't remember closing this one lol, but remembered that the 'closes issue' in a pr merge closes it

Aifang-Zhou commented 1 year ago

Thank you, @AdamTheisen and @zssherman, for the feedback and the example!

May I ask you a question about the title of skewt plots?

Suppose I use the data from "sondewnpn.b1" to create a skewt plot, and use data from "sonparam" to display the texts, then the title of the skewt plot is like "sondewnpn.b1 on mm/dd/yy". Since the plot is supposed to be created by VAP SONDEPARAM, we want to change the title to "sondeparam.c1 on mm/dd/yy". Is there a function I can call to do this?

zssherman commented 1 year ago

@Aifang-Zhou No worries, and you can override and set your own title with the set_title parameter in the plotting function. If your looking to mimic the title creation but with the vap datastream, can always plug in this to set_title: set_title = ' '.join(["sondeparam.c1", field, 'on', dt_utils.numpy_to_arm_date(ds.time.values[0]),]) I believe should work.

AdamTheisen commented 1 year ago

@Aifang-Zhou @zssherman beat me to it but here's an example using both options (u/v and spd/dir). Note, that the plot_from_spd_and_dir doesn't have all the keywords defined in the documentation but it will pass any of the keywords to plot_from_u_and_v that a user defines.

skewt.plot_from_u_and_v('u_wind', 'v_wind', 'pres', 'tdry', 'dp', set_title='Your Title')
skewt.plot_from_spd_and_dir('wspd', 'deg', 'pres', 'tdry', 'dp', set_title='Your Title')
Aifang-Zhou commented 1 year ago

Thank you, @AdamTheisen and @zssherman ! All the information is really helpful!!

AdamTheisen commented 1 year ago

I think I have someone on an enhanced Skew-T plot that I will be adding as a new display option. The user will be able to supply their own data for the lower right area or use the ACT function to calculate. Feedback welcomed!

image
AdamTheisen commented 1 year ago

@Aifang-Zhou if you have any questions on using the new functionality that was added to create the above, please let me know. There is an "overwrite_data" keyword so that you could pass in your own.