Skip to content

Commit

Permalink
Update regressiong testing notebook and script
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvothecoder committed Jan 24, 2024
1 parent a89b68f commit befd28a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
{
"cell_type": "code",
"execution_count": 72,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -59,14 +59,33 @@
")\n",
"import xarray as xr\n",
"\n",
"# TODO: Update DEV_RESULTS and MAIN_RESULTS to your diagnostic sets.\n",
"DEV_PATH = \"/global/cfs/cdirs/e3sm/www/vo13/cdat-migration-test/660-cosp-histogram/cosp_histogram/cosp_histogram/model_vs_model\"\n",
"MAIN_PATH = \"/global/cfs/cdirs/e3sm/www/vo13/cdat-migration-test/main-cosp-histogram/cosp_histogram/cosp_histogram/model_vs_model\"\n",
"DEV_PATH = \" /global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/660-cosp-histogram\"\n",
"MAIN_PATH = \" /global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/main\"\n",
"\n",
"DEV_GLOB = sorted(glob.glob(DEV_PATH + \"/*.nc\"))\n",
"MAIN_GLOB = sorted(glob.glob(MAIN_PATH + \"/*.nc\"))"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"DEV_GLOB"
]
},
{
"cell_type": "code",
"execution_count": 73,
Expand Down Expand Up @@ -1634,7 +1653,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"meridional_mean_2d", "annual_cycle_zonal_mean", "enso_diags", "qbo",
"area_mean_time_series", "diurnal_cycle", "streamflow", "arm_diags",
"tc_analysis", "aerosol_aeronet", "aerosol_budget", "mp_partition",
6.
6. Run this script
- Make sure to run this command on NERSC perlmutter cpu:
`salloc --nodes 1 --qos interactive --time 01:00:00 --constraint cpu --account=e3sm
Expand All @@ -24,29 +25,14 @@

SET_NAME = "cosp_histogram"
SET_DIR = "660-cosp-histogram"
SAVE_NETCDF = True

run_set(SET_NAME, SET_DIR)
run_set(SET_NAME, SET_DIR, save_netcdf=SAVE_NETCDF)


"""Remaining issues 1-23-24
2024-01-23 15:39:21,094 [INFO]: cosp_histogram_driver.py(run_diag:49) >> Variable: COSP_HISTOGRAM_MODIS
2024-01-23 15:39:46,948 [ERROR]: core_parameter.py(_run_diag:331) >> Error in e3sm_diags.driver.cosp_histogram_driver
Traceback (most recent call last):
File "/global/homes/v/vo13/E3SM-Project/e3sm_diags/e3sm_diags/parameter/core_parameter.py", line 328, in _run_diag
single_result = module.run_diag(self)
File "/global/homes/v/vo13/E3SM-Project/e3sm_diags/e3sm_diags/driver/cosp_histogram_driver.py", line 55, in run_diag
ds_test = test_ds.get_climo_dataset(var_key, season)
File "/global/homes/v/vo13/E3SM-Project/e3sm_diags/e3sm_diags/driver/utils/dataset_xr.py", line 365, in get_climo_dataset
ds = self._get_climo_dataset(season)
File "/global/homes/v/vo13/E3SM-Project/e3sm_diags/e3sm_diags/driver/utils/dataset_xr.py", line 397, in _get_climo_dataset
ds = self._get_dataset_with_derived_climo_var(ds)
File "/global/homes/v/vo13/E3SM-Project/e3sm_diags/e3sm_diags/driver/utils/dataset_xr.py", line 638, in _get_dataset_with_derived_climo_var
ds_final = self._get_dataset_with_derivation_func(
File "/global/homes/v/vo13/E3SM-Project/e3sm_diags/e3sm_diags/driver/utils/dataset_xr.py", line 831, in _get_dataset_with_derivation_func
ds_final = func(*func_args)
File "/global/homes/v/vo13/E3SM-Project/e3sm_diags/e3sm_diags/derivations/formulas_cosp.py", line 111, in cosp_histogram_standardize
prs = _get_cloud_axis(var, "prs")
File "/global/homes/v/vo13/E3SM-Project/e3sm_diags/e3sm_diags/derivations/formulas_cosp.py", line 202, in _get_cloud_axis
raise KeyError(
KeyError: "The 'prs' axis is not in the 'CLMODIS' to standardize the cosp histogram."
"""
# %%
import xcdat as xc

ds = xc.open_dataset(
"/global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/660-cosp-histogram/cosp_histogram/MISR-COSP/MISRCOSP-COSP_HISTOGRAM_MISR-ANN-global_output.nc"
)

0 comments on commit befd28a

Please sign in to comment.