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

Demo8 extremes update #1013

Merged
merged 2 commits into from
Jan 1, 2024
Merged

Demo8 extremes update #1013

merged 2 commits into from
Jan 1, 2024

Conversation

lee1043
Copy link
Contributor

@lee1043 lee1043 commented Dec 23, 2023

  • Reduced number of lines (in cell [3])
  • Clean up notebook
  • Result from latest rerun

@lee1043
Copy link
Contributor Author

lee1043 commented Dec 23, 2023

@acordonez Thank you for resolving the issues for the extreme PR. I was able to make Demo8 notebook run it through.

I opened this PR for a few edits in the Demo8 notebook and also for some questions.

  1. Compared to the original notebook, I see the numbers in JSON are slightly different, and the plot colorbar range is different (in the original 0 to 20, while in my notebook, 0 to 30). Do you consider they are close enough?

  2. There are a lot of warning messages, curious if there is a way to reduce or mute them if they are not critical.

@lee1043 lee1043 self-assigned this Dec 23, 2023
@lee1043 lee1043 added the demo label Dec 23, 2023
@lee1043 lee1043 changed the title Demo8 update Demo8 extremes update Dec 23, 2023
@lee1043 lee1043 added this to the 1.3 milestone Dec 23, 2023
@lee1043 lee1043 marked this pull request as ready for review December 23, 2023 18:45
@acordonez
Copy link
Collaborator

@acordonez Thank you for resolving the issues for the extreme PR. I was able to make Demo8 notebook run it through.

I opened this PR for a few edits in the Demo8 notebook and also for some questions.

1. Compared to the [original notebook](https://github.com/PCMDI/pcmdi_metrics/blob/534_ao_extremes/doc/jupyter/Demo/Demo_8_extremes.ipynb), I see the numbers in JSON are slightly different, and the plot colorbar range is different (in the original 0 to 20, while in my notebook, 0 to 30). Do you consider they are close enough?

2. There are a lot of warning messages, curious if there is a way to reduce or mute them if they are not critical.

Regarding 1., the figure looks pretty similar to me once you account for the change in the colorbar. Unfortunately I don't think the various fits and solvers used to get the return values are guaranteed to produce stable results, but I'll look into this some more.

@acordonez
Copy link
Collaborator

@acordonez Thank you for resolving the issues for the extreme PR. I was able to make Demo8 notebook run it through.

I opened this PR for a few edits in the Demo8 notebook and also for some questions.

1. Compared to the [original notebook](https://github.com/PCMDI/pcmdi_metrics/blob/534_ao_extremes/doc/jupyter/Demo/Demo_8_extremes.ipynb), I see the numbers in JSON are slightly different, and the plot colorbar range is different (in the original 0 to 20, while in my notebook, 0 to 30). Do you consider they are close enough?

2. There are a lot of warning messages, curious if there is a way to reduce or mute them if they are not critical.

Regarding 2., I've tried a couple of ways to suppress warnings in the Jupyter notebook but have not been successful. I've tried the warnings module and the %%capture cell magic, but in both cases I still see all the warnings.

Warnings:
Screenshot 2023-12-27 at 12 46 15 PM

%%capture:
Screenshot 2023-12-27 at 12 46 22 PM

I'm reluctant to turn off all the warnings within the driver itself, as they are flagging real instances where the GEV fit is failing for one reason or another. Do you have any other suggestions?

@acordonez
Copy link
Collaborator

Regarding Q2, I've also tried redirecting output to a text file, but still get the warnings live:

Screenshot 2023-12-27 at 1 13 11 PM

@acordonez
Copy link
Collaborator

Here's the return value results I got for the first test run in the Demo, and I'm getting slightly different results from you and from my original run - not much matches after the decimal point. It wasn't unusual for me to get different results when I was testing the code on single timeseries, so I'm not surprised.

{
  "GISS-E2-H": {
    "r6i1p1": {
      "Rx1day": {
        "land": {
          "mean": {
            "ANN": 13.624667116247734,
            "DJF": 9.135238348527835,
            "JJA": 9.695412307925825,
            "MAM": 9.4947603968054,
            "SON": 10.085489430018676
          },
          "std_xy": {
            "ANN": 5.84894894720064,
            "DJF": 6.01362496906134,
            "JJA": 5.727293357791019,
            "MAM": 5.823173294700789,
            "SON": 4.879856373306809
          }
        }
      },
      "Rx5day": {
        "land": {
          "mean": {
            "ANN": 8.612030197868712,
            "DJF": 5.639787497943132,
            "JJA": 6.327905351825952,
            "MAM": 5.881106639945075,
            "SON": 6.422801996975585
          },
          "std_xy": {
            "ANN": 4.350543642971108,
            "DJF": 4.133318652361083,
            "JJA": 4.293765096254575,
            "MAM": 3.970500853809765,
            "SON": 3.6944120761563717
          }
        }
      }
    }
  }
}

@lee1043
Copy link
Contributor Author

lee1043 commented Jan 1, 2024

@acordonez thank you for the comments. I think we can be confident merging this if differences are only at decimal point level.

@lee1043 lee1043 merged commit 1b139e4 into 534_ao_extremes Jan 1, 2024
2 checks passed
@lee1043 lee1043 deleted the 534_ao_extremes_jl-review branch January 1, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants