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

Revert "Feature 345 develop gha node20" #350

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
pytest test_utils.py
pytest test_validate_mv_python.py
pytest test_future_warnings.py
pytest test_sl1l2.py
coverage run -m pytest test_agg_eclv.py test_agg_stats_and_boot.py test_agg_stats_with_groups.py test_calc_difficulty_index.py test_convert_lon_indices.py test_event_equalize.py test_event_equalize_against_values.py test_lon_360_to_180.py test_statistics.py test_tost_paired.py test_utils.py test_future_warnings.py
coverage html

Expand Down
171 changes: 0 additions & 171 deletions docs/Users_Guide/difficulty_index.rst

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion docs/Users_Guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ National Center for Atmospheric Research (NCAR) is sponsored by NSF.

installation
vertical_interpolation
difficulty_index
release-notes

**Indices and tables**
Expand Down
36 changes: 17 additions & 19 deletions docs/Users_Guide/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,33 @@ METcalcpy Release Notes
=======================


METcalcpy Velsion 3.0.0-beta2 release notes (20231114)
------------------------------------------------------
METcalcpy Version 2.1.0 release notes (20230728)
----------------------------------------------------

.. dropdown:: New Functionality

.. dropdown:: Enhancements

.. dropdown:: Internal

* Change second person references to third (`#315 <https://github.com/dtcenter/METcalcpy/issues/315>`_)
* Enhanced documentation for Difficulty index (`#332 <https://github.com/dtcenter/METcalcpy/issues/332>`_)

.. dropdown:: Bugfixes

* Add missing reliability statistics (`#330 <https://github.com/dtcenter/METcalcpy/issues/330>`_)

METcalcpy Version 3.0.0-beta1 release notes (20230915)
------------------------------------------------------

.. dropdown:: New Functionality
* **Convert plot_tcmpr.R calculations to Python** (`#189 <https://github.com/dtcenter/METcalcpy/issues/189>`_)

.. dropdown:: Enhancements

* **Upgrade to using Python 3.10.4** (`#270 <https://github.com/dtcenter/METcalcpy/issues/270>`_)
* Enhance the Release Notes by adding dropdown menus(`#292 <https://github.com/dtcenter/METcalcpy/issues/292>`_)
* **Updated Analysis tools to handle TC-RMW functionality** (`#308 <https://github.com/dtcenter/METcalcpy/issues/308>`_)

.. dropdown:: Internal

.. dropdown:: Bugfixes
* Add 'License.txt' to the METcalcpy repo (`#279 <https://github.com/dtcenter/METcalcpy/issues/279>`_)
* Update cloud python to 3.10(`#170 <https://github.com/dtcenter/METcalcpy/issues/170>`_)
* Update cloud python to 3.8(`#169 <https://github.com/dtcenter/METcalcpy/issues/169>`_)
* Changed Project to Cycle assignment in github(`#301 <https://github.com/dtcenter/METcalcpy/issues/301>`_)
* Partial completion of logging for STIGS(`#46 <https://github.com/dtcenter/METplus-internal/issues/46>`_)

* Remove reset_index from various calculations (`#322 <https://github.com/dtcenter/METcalcpy/issues/322>`_)
.. dropdown:: Bugfixes

* **Remaining reference to ARIMA in utils.py compute_std_err_from_median_variance_inflation_factor()** (`#254 <https://github.com/dtcenter/METcalcpy/issues/254>`_)
* **Replace frame.append method to pandas.concat in agg_stat.py** (`#296 <https://github.com/dtcenter/METcalcpy/issues/296>`_)
* **Fixed Ratio Derived curve not generating** (`#302 <https://github.com/dtcenter/METcalcpy/issues/302>`_)
* **Fixed PSTD_ROC_AUC calculation** (`#306 <https://github.com/dtcenter/METcalcpy/issues/306>`_)

METcalcpy Upgrade Instructions
==============================
Expand Down
20 changes: 8 additions & 12 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
===========================
###########################
METcalcpy version |version|
===========================
###########################

Developed by the `Developmental Testbed Center <https://dtcenter.org/>`_,
Boulder, CO

.. image:: _static/METplus_banner_photo_web.png

History
-------
**History**


The Model Evaluation Tools (MET) were developed by the Developmental Testbed
Center (DTC) and released in January 2008. The goal of the tools was to
Expand Down Expand Up @@ -37,8 +37,7 @@ diagnostics capability for NOAA's UFS and a component of NCAR's SIMA
modeling frameworks. It is being actively developed by NCAR, ESRL, EMC
and is open to community contributions.

METplus Concept
---------------
**METplus Concept**

METplus is the overarching, or umbrella, repository and hence framework for
the Unified Forecast System verification capability. It is intended to be
Expand Down Expand Up @@ -77,8 +76,7 @@ was developed because CESM is comprised of a number of different components
that are developed and managed independently. Each component also may have
additional "external" dependencies that need to be maintained independently.

Acronyms
--------
**Acronyms**

* **MET** - Model Evaluation Tools
* **DTC** - Developmental Testbed Center
Expand All @@ -95,8 +93,7 @@ Acronyms
* **GSD** - Global Systems Division


Authors
-------
**Authors**

Many authors, listed below in alphabetical order, have contributed to the documentation of METplus.
To cite this documentation in publications, please refer to the METcalcpy User's Guide :ref:`Citation Instructions<citations>`.
Expand Down Expand Up @@ -124,8 +121,7 @@ To cite this documentation in publications, please refer to the METcalcpy User's



Indices
=======
**Indices**

* :ref:`genindex`
* :ref:`modindex`
Expand Down
2 changes: 1 addition & 1 deletion docs/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__="3.0.0-beta3"
__version__="2.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## METcalcpy
##
proc ModulesHelp { } {
puts stderr "Sets up the paths and environment variables to use the METcalcpy-3.0.0.
puts stderr "Sets up the paths and environment variables to use the METcalcpy-2.1.0.
*** For help see the official MET webpage at http://www.dtcenter.org/met/users ***"
}

Expand All @@ -12,4 +12,4 @@ module load intel
module use /apps/dev/modulefiles/
module load ve/evs/2.0

prepend-path PYTHONPATH /apps/sw_review/emc/METcalcpy/3.0.0
prepend-path PYTHONPATH /apps/sw_review/emc/METcalcpy/2.1.0
8 changes: 7 additions & 1 deletion metcalcpy/util/pstd_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ def calculate_pstd_brier(input_data, columns_names):
t_table = df_pct_perm['n_i'].sum()
o_bar_table = df_pct_perm['oy_i'].sum() / t_table
o_bar = input_data[0, get_column_index_by_name(columns_names, 'o_bar')]

t_table.reset_index(inplace=True, drop=True)

reliability = calc_reliability(t_table, df_pct_perm)
resolution = calc_resolution(t_table, df_pct_perm, o_bar)
uncertainty = calc_uncertainty(o_bar_table)

brier = reliability - resolution + uncertainty
result = round_half_up(brier, PRECISION)
except (TypeError, ZeroDivisionError, Warning, ValueError, AttributeError):
except (TypeError, ZeroDivisionError, Warning, ValueError):
result = None
warnings.filterwarnings('ignore')
return result
Expand All @@ -72,6 +75,8 @@ def calculate_pstd_bss_smpl(input_data, columns_names):
t_table = df_pct_perm['n_i'].sum()
o_bar_table = df_pct_perm['oy_i'].sum() / t_table
o_bar = input_data[0, get_column_index_by_name(columns_names, 'o_bar')]

t_table.reset_index(inplace=True, drop=True)
reliability = calc_reliability(t_table, df_pct_perm)
resolution = calc_resolution(t_table, df_pct_perm, o_bar)
uncertainty = calc_uncertainty(o_bar_table)
Expand Down Expand Up @@ -156,6 +161,7 @@ def calculate_pstd_resolution(input_data, columns_names):
df_pct_perm = _calc_common_stats(columns_names, input_data)
o_bar = input_data[0, get_column_index_by_name(columns_names, 'o_bar')]
t_table = df_pct_perm['n_i'].sum()
t_table.reset_index(inplace=True, drop=True)
resolution = calc_resolution(t_table, df_pct_perm, o_bar)
result = round_half_up(resolution, PRECISION)
except (TypeError, ZeroDivisionError, Warning, ValueError):
Expand Down
3 changes: 0 additions & 3 deletions metcalcpy/util/sl1l2_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,13 +524,10 @@ def calculate_bcmse(input_data, columns_names, aggregation=False):
"""
warnings.filterwarnings('error')
try:

mse = calculate_mse(input_data, columns_names, aggregation)
me = calculate_me(input_data, columns_names, aggregation)
result = mse - me ** 2
result = round_half_up(result, PRECISION)
if result < 0:
return 0.
except (TypeError, Warning):
result = None
warnings.filterwarnings('ignore')
Expand Down
9 changes: 1 addition & 8 deletions metcalcpy/util/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,14 +691,7 @@ def equalize_axis_data(fix_vals_keys, fix_vals_permuted, params, input_data, axi

for fcst_var, fcst_var_stats in fcst_var_val.items():
series_data_for_ee = pd.DataFrame()
fcst_var_stats_current = fcst_var_stats
# if the data comes from agg_stat workflow it doesn't contain statistics values.
# They will be calculated later. In this case The code should not loop over all
# requested statistics but instead should do it only ones to avoid data multiplication
if 'stat_name' not in input_data.keys():
fcst_var_stats_current = [fcst_var_stats[0]]

for fcst_var_stat in fcst_var_stats_current:
for fcst_var_stat in fcst_var_stats:
# for each series for the specified axis
if len(params['series_val_' + axis]) == 0:
series_data_for_ee = input_data
Expand Down
Loading