Skip to content

Commit

Permalink
CDAT Migration - Update run script output directory to NERSC public w…
Browse files Browse the repository at this point in the history
…ebserver (#793)
  • Loading branch information
tomvothecoder committed Aug 21, 2024
1 parent d1a6acd commit ea9e871
Show file tree
Hide file tree
Showing 7 changed files with 1,300 additions and 13 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from auxiliary_tools.cdat_regression_testing.base_run_script import run_set

SET_NAME = "lat_lon"
SET_DIR = "792-lat-lon"
CFG_PATH: str | None = None
MULTIPROCESSING = True

run_set(SET_NAME, SET_DIR, CFG_PATH, MULTIPROCESSING)
9 changes: 6 additions & 3 deletions auxiliary_tools/cdat_regression_testing/base_run_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from e3sm_diags.run import runner

# The location where results will be stored based on your branch changes.
BASE_RESULTS_DIR = "/global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/"
BASE_RESULTS_DIR = "/global/cfs/cdirs/e3sm/www/cdat-migration-fy24/"


class MachinePaths(TypedDict):
Expand All @@ -46,7 +46,7 @@ class MachinePaths(TypedDict):


def run_set(
set_name: str,
set_name: str | List[str],
set_dir: str,
cfg_path: str | None = None,
multiprocessing: bool = True,
Expand Down Expand Up @@ -154,7 +154,10 @@ def run_set(
mp_param.test_start_yr = "0051"
mp_param.test_end_yr = "0060"

runner.sets_to_run = [set_name]
if isinstance(set_name, str):
runner.sets_to_run = [set_name]
else:
runner.sets_to_run = set_name

runner.run_diags(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"SET_NAME = \"cosp_histogram\"\n",
"SET_DIR = \"660-cosp-histogram\"\n",
"\n",
"DEV_PATH = f\"/global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/{SET_DIR}/{SET_NAME}/**\"\n",
"MAIN_PATH = f\"/global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/main/{SET_NAME}/**\"\n",
"DEV_PATH = f\"/global/cfs/cdirs/e3sm/www/cdat-migration-fy24/{SET_DIR}/{SET_NAME}/**\"\n",
"MAIN_PATH = f\"/global/cfs/cdirs/e3sm/www/cdat-migration-fy24/main/{SET_NAME}/**\"\n",
"\n",
"DEV_GLOB = sorted(glob.glob(DEV_PATH + \"/*.json\"))\n",
"MAIN_GLOB = sorted(glob.glob(MAIN_PATH + \"/*.json\"))\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"SET_NAME = \"\"\n",
"SET_DIR = \"\"\n",
"\n",
"DEV_PATH = f\"/global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/{SET_DIR}/{SET_NAME}/**\"\n",
"MAIN_PATH = f\"/global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/main/{SET_NAME}/**\"\n",
"DEV_PATH = f\"/global/cfs/cdirs/e3sm/www/cdat-migration-fy24/{SET_DIR}/{SET_NAME}/**\"\n",
"MAIN_PATH = f\"/global/cfs/cdirs/e3sm/www/cdat-migration-fy24/main/{SET_NAME}/**\"\n",
"\n",
"DEV_GLOB = sorted(glob.glob(DEV_PATH + \"/*.nc\"))\n",
"MAIN_GLOB = sorted(glob.glob(MAIN_PATH + \"/*.nc\"))\n",
Expand Down
12 changes: 6 additions & 6 deletions auxiliary_tools/cdat_regression_testing/template_run_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
"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. Run this script as a Python module
- `auxiliary_tools` is not included in `setup.py`, so `-m` is required
to run the script as a Python module
- Command: python -m auxiliary_tools.cdat_regression_testing.<ISSUE>-<SET_NAME>.<SCRIPT-NAME>
- Example: python -m auxiliary_tools.cdat_regression_testing.660_cosp_histogram.run_script
7. Make a copy of the CDAT regression testing notebook in the same directory
7. Run `chown -R o=rx <SET_DIR>` to allow public access to viewer outputs on the NERSC webserver
- Example: `chown -R o=rx /global/cfs/cdirs/e3sm/www/cdat-migration-fy24/654-zonal_mean_xy`
- https://portal.nersc.gov/project/e3sm/cdat-migration-fy24/
8. Make a copy of the CDAT regression testing notebook in the same directory
as this script and follow the instructions there to start testing.
8. <OPTIONAL> Update `CFG_PATH` to a custom cfg file to debug specific variables.
9. <OPTIONAL> Update `CFG_PATH` to a custom cfg file to debug specific variables.
- It is useful to create a custom cfg based on the default diags to debug
specific variables that are running into problems.
- For example, copy `zonal_mean_xy_model_vs_model.cfg` into the same directory
Expand All @@ -36,7 +36,7 @@
# Example: "lat_lon"
SET_NAME = ""
# TODO: Update SET_DIR to <ISSUE-SET_NAME>. This string gets appended
# to the base results_dir, "/global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/".
# to the base results_dir, "/global/cfs/cdirs/e3sm/www/cdat-migration-fy24/".
# Example: "671-lat-lon"
SET_DIR = ""

Expand Down

0 comments on commit ea9e871

Please sign in to comment.