Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record and Use Theta levels for the plot function and a few enhancements #16

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

delphinedobler
Copy link

Records and uses saved theta levels in plots in case of multiple calibration series. Additionally makes a few plots enhancements.

  • modify calculate_piecewisefit.m
    
    • 4.1 Record theta levels
  • modify plt_diagnostics_ow.m
    
    • 4.1 Use of theta levels from those now saved during calculate_piecewisefit function call removing lines with unused parameters (also corrects graph 2 and 4)
    • 4.2 For graph 6 and 8: Change indexes names by a more explicit terminology: usage of iseq, istep, ilevel, iplot instead of i,j,k ... Remove unused parameter lines. These changes were not marked done for the sake of lisibility
    • 4.3 graph format as a configuration parameters
    • 4.4 Enhance Graph 3: curate legend content, split title in two lines, add a grid, position the legend outside the graph.
    • 4.5 Automalically set graph 5 y-axis limits from selected thetas and set the upper bound to 14°C.

DD (2024/08/01) creation
If la_wmo_boxes_file is removed, automatically recreate it from climatology repository (useful when changing climatology version).
auto-creation of output directories if they do not exist already.
Includes:
3.1 - Performance: save boxes_id from get_region_ow and recompute the index to provide as input to retr_region_ow
3.2 - Performance: Inside retr_region_ow, save loaded data, and at each following profile, reload only new boxes and delete unused.
3.3 - Performance: Inside map_data_grid, comment calculation of vdataerror as this is never used afterwards.
correct la_bhist_Z after CC validation tests
@cabanesc
Copy link
Contributor

Thanks Delphine,
I have tested with float wmo=6902865, splitting the time series at cycle 80.

Here are the figures that have changes between intitial execution (left) and 4.5 run (right)

Figure 1
image

Figure 3
image

Figure 5
image

Figure 6
image

Suggested changes:

  1. For compatibility with the previous version, graph_format = 'eps' should be kept as the default value
    l 37: graph_format = 'eps' ; % 'png' or 'eps'

  2. l 302 & l 322 : change the position of the legend, add a box

legend([p1 p2 p3],{'2 x cal error','1 x cal error','1-1 profile fit'}, 'Location', 'Southoutside','Orientation','horizontal');
box on
  1. l 407 : change ceil(max(TEMP)) by ceil(max(TEMP,[ ],'all'))

fl.yaxes = [floor(min(tlevels,[],'all')) ceil(max(tlevels,[],'all')) ceil(max(TEMP,[],'all'))];

account for Cecile Cabanes comments
@delphinedobler
Copy link
Author

Thanks Cécile for your comments. I've updated the Pull Request accordingly. Let me know if everything is fine now.

@cabanesc
Copy link
Contributor

For Figure 5, if the upper most stable theta level is, say, around 12°C, and the lower most stable theta level is around 4°C (e.g. in NE Atlantic), then I would expect that most of the figure to be squeezed into the lower panel.
So it could be (~l 407 ):
fl.yaxes = [floor(min(min(TEMP,[],'all'),2)) ceil(min(max(tlevels,[],'all'),5)) ceil(min(max(TEMP,[],'all'),20))];

This ensure that the bottom panel is always a zoom on the deepest levels.
What do you think?

The change should also be made for figure 7 (~l.664)

fl.axes modified with respect to CC's comment
@delphinedobler
Copy link
Author

I think this is a good idea; I've updated the code as suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants