diff --git a/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/core/regrid.py b/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/core/regrid.py index 1b4a5713..1a09ddf5 100755 --- a/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/core/regrid.py +++ b/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/core/regrid.py @@ -11353,11 +11353,11 @@ def check_regrid_status( [force_count, wrf_hydro_geo_meta.ny_local_elem], np.float32 ) elif config_options.grid_type == "hydrofabric": - input_forcings.regridded_forcings1 = np.empty( - [force_count, wrf_hydro_geo_meta.ny_local], np.float32 + input_forcings.regridded_forcings1 = np.full( + [force_count, wrf_hydro_geo_meta.ny_local], np.nan,dtype=np.float32 #NOTE changed to np.full to be deterministic for unit tests. ) - input_forcings.regridded_forcings2 = np.empty( - [force_count, wrf_hydro_geo_meta.ny_local], np.float32 + input_forcings.regridded_forcings2 = np.full( + [force_count, wrf_hydro_geo_meta.ny_local], np.nan,dtype=np.float32 #NOTE changed to np.full to be deterministic for unit tests. ) if mpi_config.rank == 0: diff --git a/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/core/suppPrecipMod.py b/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/core/suppPrecipMod.py index a8132f83..5d99be03 100755 --- a/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/core/suppPrecipMod.py +++ b/NextGen_Forcings_Engine_BMI/NextGen_Forcings_Engine/core/suppPrecipMod.py @@ -373,11 +373,12 @@ def initDict(ConfigOptions, GeoMetaWrfHydro): ) elif ConfigOptions.grid_type == "hydrofabric": # Initialize the local final grid of values - InputDict[supp_pcp_key].final_supp_precip = np.empty( - [GeoMetaWrfHydro.ny_local], np.float64 + # NOTE changed from np.empty to np.full for determinism of test data. + InputDict[supp_pcp_key].final_supp_precip = np.full( + [GeoMetaWrfHydro.ny_local], np.nan, dtype=np.float64 ) - InputDict[supp_pcp_key].regridded_mask = np.empty( - [GeoMetaWrfHydro.ny_local], np.float32 + InputDict[supp_pcp_key].regridded_mask = np.full( + [GeoMetaWrfHydro.ny_local], np.nan, dtype=np.float32 ) InputDict[supp_pcp_key].userCycleOffset = ConfigOptions.supp_input_offsets[ diff --git a/pytest.ini b/pytest.ini index c8e37039..6764d302 100644 --- a/pytest.ini +++ b/pytest.ini @@ -8,4 +8,5 @@ testpaths = tests/esmf_regrid tests/geomod tests/input_forcing + tests/ana tests/bmi_model diff --git a/tests/README.md b/tests/README.md index bbc75603..45d748d5 100644 --- a/tests/README.md +++ b/tests/README.md @@ -34,37 +34,16 @@ The test suite is organized into the following modules: - **`esmf_regrid/`** - Tests for ESMF regridding functionality - **`geomod/`** - Tests for geomod components - **`input_forcing/`** - Tests for input forcing data processing +- **`supp_precip/`** - Tests for supp precip data processing - **`bmi_model/`** - Tests for the BMI model lifecycle +- **`config_options/`** - Tests config options - **`test_utils.py`** - Shared test utilities and fixtures - **`conftest.py`** - Pytest configuration and shared fixtures -## Prerequisites -### Setup requirements: - 1. Create the forcing config.yml files using RTE. - 2. Enter the RTE devcontainer. - -### Required Dependencies - -The test suite requires Python 3.11 or higher. Install the package with test dependencies inside of the `dev container`: - -```bash -# From the repository root directory -pip install -e ".[develop]" -``` - -Or install pytest directly inside of the `dev container`: - -```bash -pip install pytest -``` - -### Additional Requirements - -Ensure all main package dependencies are installed inside of the `dev container` (this typically should happen when the `dev container` is built): - -```bash -pip install -e . -``` +## Prerequisite Steps + 1. Clone the nwm-rte repository + 2. Build a Docker image using nwm-rte. + 3. Enter a Dev Container using nwm-rte. ## Running Tests @@ -91,9 +70,21 @@ Multiple processors: ( cd src/ngen-forcing && mpirun -n 2 pytest tests/geomod) Single processor: ( cd src/ngen-forcing && pytest tests/input_forcing) Multiple processors: ( cd src/ngen-forcing && mpirun -n 2 pytest tests/input_forcing) +# Supp precip tests +Single processor: ( cd src/ngen-forcing && pytest tests/supp_precip) +Multiple processors: ( cd src/ngen-forcing && mpirun -n 2 pytest tests/supp_precip) + +# Analysis and Assimilation tests +Single processor: ( cd src/ngen-forcing && pytest tests/ana ) +Multiple processors: ( cd src/ngen-forcing && mpirun -n 2 pytest tests/ana ) + # BMI model tests Single processor: ( cd src/ngen-forcing && pytest tests/bmi_model) Multiple processors: ( cd src/ngen-forcing && mpirun -n 2 pytest tests/bmi_model) + +# config options tests +Single processor: ( cd src/ngen-forcing && pytest tests/config_options) +Multiple processors: ( cd src/ngen-forcing && mpirun -n 2 pytest tests/config_options) ``` Create new test output data (creates expected outputs for subsequent tests) @@ -110,9 +101,21 @@ Multiple processors: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED Single processor: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true pytest tests/input_forcing) Multiple processors: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true mpirun -n 2 pytest tests/input_forcing) +# Supp precip tests +Single processor: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true pytest tests/supp_precip) +Multiple processors: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true mpirun -n 2 pytest tests/supp_precip) + +# Analysis and Assimilation tests +Single processor: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true pytest tests/ana ) +Multiple processors: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true mpirun -n 2 pytest tests/ana ) + # BMI model tests Single processor: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true pytest tests/bmi_model) Multiple processors: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true mpirun -n 2 pytest tests/bmi_model) + +# config_options tests +Single processor: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true pytest tests/config_options) +Multiple processors: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true mpirun -n 2 pytest tests/config_options) ``` In the rare case where you want to create new `expected` data and run the tests using `old` variable names use the following for `Input Forcing Tests`: @@ -120,6 +123,11 @@ In the rare case where you want to create new `expected` data and run the tests # Input forcing tests Single processor: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true pytest tests/input_forcing --map_old_to_new_var_names False) Multiple processors: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true mpirun -n 2 pytest tests/input_forcing --map_old_to_new_var_names False) + +# Supp precip tests +Single processor: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true pytest tests/supp_precip --map_old_to_new_var_names False) +Multiple processors: ( cd src/ngen-forcing && FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA=true mpirun -n 2 pytest tests/supp_precip --map_old_to_new_var_names False) + ``` ## Test Configuration @@ -130,34 +138,12 @@ The test suite is configured via `pytest.ini` at the repository root: - **Verbosity**: Full trace with verbose output (`-vv`) - **Test paths**: Pre-configured to discover tests in `esmf_regrid`, `geomod`, `input_forcing`, and `bmi_model` - ## Test Data Test data is stored in the `test_data/` directory. Tests may reference files from this location for input data and expected results validation. -## Writing New Tests +## Writing New Tests or Updating Expected Results Files -When adding new tests: - -1. Place test files in the appropriate subdirectory -2. Name test files with the `test_*.py` prefix -3. Name test functions with the `test_*` prefix -4. Use fixtures from `conftest.py` for common setup -5. Place test data files in `test_data/` with descriptive names - -Example test structure: - -```python -import pytest - -def test_my_feature(): - """Test description.""" - # Arrange - input_data = ... - - # Act - result = function_under_test(input_data) - - # Assert - assert result == expected_output -``` +When adding new tests, use the OS env var `FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA` +to have your new test automatically write new "expected" data to `tests/test_data/expected_results/`, +then commit those files to the repository. See above for example calls. diff --git a/tests/ana/test_ana.py b/tests/ana/test_ana.py new file mode 100644 index 00000000..872f8e71 --- /dev/null +++ b/tests/ana/test_ana.py @@ -0,0 +1,49 @@ +import importlib.util +import logging +import os + +import pytest + +### Load import tests.test_utils as test_utils, referring explicitly to its path. +### This explicit load is necessary since March 2026 versions of ngen which introduced /ngen-app/ngen/extern/topoflow-glacier/tests +spec = importlib.util.spec_from_file_location( + "tests.test_utils", os.path.abspath("tests/test_utils.py") +) +test_utils = importlib.util.module_from_spec(spec) +spec.loader.exec_module(test_utils) + +consts = test_utils.test_consts +configs = test_utils.test_config_classes + + +TEST_CONFIGS = [ + configs.TestConfig_AnA( + config_file=consts.FORECAST_FORCING_CONFIG_FILE__ANA_CONUS, + keys_to_check=(), + keys_to_exclude=consts.KEYS_TO_EXCLUDE, + grid_type=consts.GRID_TYPE, + test_file_name_prefix="ana_standard_conus", + ), +] + + +@pytest.mark.parametrize("bmi_forcing_fixture_ana", TEST_CONFIGS, indirect=True) +def test_input_forcing( + bmi_forcing_fixture_ana: test_utils.BMIForcingFixture_AnA, # pyright: ignore +) -> None: + """Pytest function for testing Analysis and Assimilation.""" + ### Total number of timesteps needs to be at least 3, since the 1st and 2nd behaves differently than the others, + ### e.g. see `if config_options.current_output_step == 1` throughout the code and the regridded_forcings1 vs regridded_forcings2 weighting. + total_timesteps = 3 + + fixt = bmi_forcing_fixture_ana + # fixt.after_intitialization_check() # NOTE this is disabled because with -n 2, there are attrs initialized to arbitrary values. + for i in range(total_timesteps): + logging.info("Starting bmi_model.update()...") + fixt.bmi_model.update() + fixt.after_bmi_model_update( + current_output_step=i + 1, + ) + logging.info("Starting bmi_model.finalize()...") + fixt.bmi_model.finalize() + fixt.after_finalize() diff --git a/tests/bmi_model/test_bmi_model.py b/tests/bmi_model/test_bmi_model.py index d38efd92..85e388fb 100644 --- a/tests/bmi_model/test_bmi_model.py +++ b/tests/bmi_model/test_bmi_model.py @@ -11,37 +11,30 @@ test_utils = importlib.util.module_from_spec(spec) spec.loader.exec_module(test_utils) +consts = test_utils.test_consts +configs = test_utils.test_config_classes -### This disables a LOG call which was causing a crash at ioMod.py: LOG.debug(f"Wgrib2 command: {Wgrib2Cmd}", True) -os.environ["MFE_SILENT"] = "true" +TEST_CONFIGS = [ + configs.TestConfig_BmiModel( + config_file=consts.RETRO_FORCING_CONFIG_FILE__AORC_CONUS, + keys_to_check=(), + keys_to_exclude=tuple( + set(consts.KEYS_TO_EXCLUDE) | {"d_program_init", "geogrid", "scratch_dir"} + ), + grid_type=consts.GRID_TYPE, + test_file_name_prefix="bmi_model", + ), +] -RETRO_FORCING_CONFIG_FILE__AORC_CONUS = ( - "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/aorc_config.yml" -) -COMPOSITE_KEYS_TO_CHECK = () -GRID_TYPE = "hydrofabric" # ["gridded","hydrofabric","unstructured"] -### Drop non-deterministic values (random IDs, timestamps, hashed paths) -KEYS_TO_EXCLUDE = ("uid64", "d_program_init", "geogrid", "scratch_dir") - - -@pytest.mark.parametrize( - "bmi_forcing_fixture_bmi_model", - [ - ( - RETRO_FORCING_CONFIG_FILE__AORC_CONUS, - COMPOSITE_KEYS_TO_CHECK, - KEYS_TO_EXCLUDE, - GRID_TYPE, - ) - ], - indirect=True, -) + +@pytest.mark.parametrize("bmi_forcing_fixture_bmi_model", TEST_CONFIGS, indirect=True) def test_bmi_model( bmi_forcing_fixture_bmi_model: test_utils.BMIForcingFixture_BmiModel, # pyright: ignore ) -> None: """Pytest function for testing BMI model functionality.""" - ### Total number of timesteps needs to be at least 2, since the 1st one behaves differently than the others, e.g. see `if config_options.current_output_step == 1` throughout the code. + ### Total number of timesteps needs to be at least 3, since the 1st and 2nd behaves differently than the others, + ### e.g. see `if config_options.current_output_step == 1` throughout the code and the regridded_forcings1 vs regridded_forcings2 weighting. total_timesteps = 3 fixt = bmi_forcing_fixture_bmi_model diff --git a/tests/config_options/test_config_options.py b/tests/config_options/test_config_options.py new file mode 100644 index 00000000..530edee9 --- /dev/null +++ b/tests/config_options/test_config_options.py @@ -0,0 +1,56 @@ +import importlib.util +import os + +import pytest + +### Load import tests.test_utils as test_utils, referring explicitly to its path. +### This explicit load is necessary since March 2026 versions of ngen which introduced /ngen-app/ngen/extern/topoflow-glacier/tests +spec = importlib.util.spec_from_file_location( + "tests.test_utils", os.path.abspath("tests/test_utils.py") +) +test_utils = importlib.util.module_from_spec(spec) +spec.loader.exec_module(test_utils) + +consts = test_utils.test_consts +configs = test_utils.test_config_classes + +TEST_FILE_NAME_PREFIX = "config_options" + +TEST_CONFIGS = [ + configs.TestConfig_ConfigOptions( + config_file=consts.RETRO_FORCING_CONFIG_FILE__AORC_CONUS, + keys_to_check=consts.COMPOSITE_KEYS_TO_CHECK, + keys_to_exclude=tuple( + set(consts.KEYS_TO_EXCLUDE) | {"d_program_init", "geogrid", "scratch_dir"} + ), + grid_type=consts.GRID_TYPE, + test_file_name_prefix=TEST_FILE_NAME_PREFIX, + ), +] + + +@pytest.mark.parametrize( + "bmi_forcing_fixture_configoptions", TEST_CONFIGS, indirect=True +) +def test_geomod( + bmi_forcing_fixture_configoptions: test_utils.BMIForcingFixture_GeoMod, # pyright: ignore +) -> None: + """Pytest function for testing ConfigOptions functionality.""" + ### Total number of timesteps needs to be at least 3, since the 1st and 2nd behaves differently than the others, + ### e.g. see `if config_options.current_output_step == 1` throughout the code and the regridded_forcings1 vs regridded_forcings2 weighting. + total_timesteps = 3 + + fixt = bmi_forcing_fixture_configoptions + if len(fixt.input_forcing_mod) != 1: + raise ValueError( + f"Expected 1 key for input_forcing_mod, got {len(fixt.input_forcing_mod)}: {list(fixt.input_forcing_mod.keys())}" + ) + + fixt.after_intitialization_check() + for i in range(total_timesteps): + fixt.bmi_model.update() + fixt.after_bmi_model_update( + current_output_step=i + 1, + ) + fixt.bmi_model.finalize() + fixt.after_finalize() diff --git a/tests/conftest.py b/tests/conftest.py index 35728bcc..5f76ca03 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,208 +1,150 @@ """Conventional pytest file conftest.py. Automatically discovered and implicitly imported by pytest.""" import pytest +from test_config_classes import ( + TestConfig_AnA, + TestConfig_Base, + TestConfig_BmiModel, + TestConfig_ConfigOptions, + TestConfig_GeoMod, + TestConfig_InputForcing, + TestConfig_Regrid, + TestConfig_SuppPrecip, +) from test_utils import ( - BMIForcingFixture, + BMIForcingFixture_AnA, BMIForcingFixture_BmiModel, + BMIForcingFixture_ConfigOptions, BMIForcingFixture_GeoMod, BMIForcingFixture_InputForcing, BMIForcingFixture_Regrid, -) - -from NextGen_Forcings_Engine_BMI.NextGen_Forcings_Engine.bmi_model import ( - BMIMODEL, - NWMv3_Forcing_Engine_BMI_model, + BMIForcingFixture_SuppPrecip, ) -@pytest.fixture -def bmi_forcing_fixture(request) -> BMIForcingFixture: - """Construct minimal class of classes for running BMI forcing. +def pytest_addoption(parser): + """Add command line options to pytest.""" + parser.addoption( + "--map_old_to_new_var_names", + action="store", + help="Argument to specify if old variables names should be mapped to new variable names.", + ) - Constructor for minimal class of classes for running BMI forcing. - For example usage, see: tests/esmf_regrid/test_esmf_regrid.test_regrid. +def update_cfg_with_cli_inputs(cfg: TestConfig_Base, request) -> None: + """Update the test config in-place using values passed from CLI. Args: - request: A built-in convention for pytest.fixture. It may be passed from @pytest.mark.parametrize usage elsewhere. - + cfg: An instance of a test config. + request: pytest convention. May be passed from @pytest.mark.parametrize. """ - (config_file,) = request.param - bmi_model = NWMv3_Forcing_Engine_BMI_model() - bmi_model.initialize_with_params( - config_file=config_file, - b_date=None, - geogrid=None, - output_path=None, - ) - return BMIForcingFixture(bmi_model=bmi_model) + map_old_to_new_var_names = request.config.getoption("--map_old_to_new_var_names") + if map_old_to_new_var_names is not None: + if map_old_to_new_var_names == "True" or map_old_to_new_var_names is True: + map_old_to_new_var_names = True + elif map_old_to_new_var_names == "False" or map_old_to_new_var_names is False: + map_old_to_new_var_names = False + else: + raise ValueError( + f"Unexpected value for arg: map_old_to_new_var_names. Expected True or False; received: {map_old_to_new_var_names}" + ) + cfg.map_old_to_new_var_names = map_old_to_new_var_names @pytest.fixture -def bmi_forcing_fixture_regrid( - request, -) -> BMIForcingFixture_Regrid: - """Construct minimal class of callas for running forcing ESMF regrid functions. - - Constructor for minimal class of classes for running forcing ESMF regrid functions. - For example usage, see: tests/esmf_regrid/test_esmf_regrid.test_regrid. +def bmi_forcing_fixture_regrid(request) -> BMIForcingFixture_Regrid: + """Construct class for tests of ESMF regrid functions. + For example usage, see: tests/esmf_regrid/test_esmf_regrid.py. Args: request: A built-in convention for pytest.fixture. It may be passed from @pytest.mark.parametrize usage elsewhere. - """ - ( - regrid_func, - config_file, - force_key, - extra_attrs, - regrid_arrays_to_trim_extra_elements, - keys_to_check, - keys_to_exclude, - grid_type, - ) = request.param - - bmi_model = BMIMODEL[grid_type]() - bmi_model.initialize_with_params( - config_file=config_file, - b_date=None, - geogrid=None, - output_path=None, - ) - return BMIForcingFixture_Regrid( - bmi_model=bmi_model, - regrid_func=regrid_func, - force_key=force_key, - keys_to_exclude=keys_to_exclude, - extra_attrs=extra_attrs, - regrid_arrays_to_trim_extra_elements=regrid_arrays_to_trim_extra_elements, - keys_to_check=keys_to_check, - ) + cfg = request.param + assert isinstance(cfg, TestConfig_Regrid) + update_cfg_with_cli_inputs(cfg, request) + return BMIForcingFixture_Regrid(cfg) @pytest.fixture -def bmi_forcing_fixture_geomod( - request, -) -> BMIForcingFixture_GeoMod: - """Construct minimal class of classes for running forcing GeoMod. +def bmi_forcing_fixture_geomod(request) -> BMIForcingFixture_GeoMod: + """Construct class for tests of GeoMod. + For example usage, see: tests/geomod/test_geomod.py. + + Args: + request: A built-in convention for pytest.fixture. It may be passed from @pytest.mark.parametrize usage elsewhere. + """ + cfg = request.param + assert isinstance(cfg, TestConfig_GeoMod) + update_cfg_with_cli_inputs(cfg, request) + return BMIForcingFixture_GeoMod(cfg) - Constructor for minimal class of classes for running forcing GeoMod. - For example usage, see: tests/geomod/test_geomod.test_geomod. +@pytest.fixture +def bmi_forcing_fixture_configoptions(request) -> BMIForcingFixture_ConfigOptions: + """Construct class for tests of ConfigOptions. + For example usage, see: tests/config_options/test_config_options.py. Args: request: A built-in convention for pytest.fixture. It may be passed from @pytest.mark.parametrize usage elsewhere. - """ - ( - config_file, - keys_to_check, - keys_to_exclude, - grid_type, - ) = request.param - - bmi_model = BMIMODEL[grid_type]() - bmi_model.initialize_with_params( - config_file=config_file, - b_date=None, - geogrid=None, - output_path=None, - ) - return BMIForcingFixture_GeoMod( - bmi_model=bmi_model, - keys_to_check=keys_to_check, - keys_to_exclude=keys_to_exclude, - ) + cfg = request.param + assert isinstance(cfg, TestConfig_ConfigOptions) + update_cfg_with_cli_inputs(cfg, request) + return BMIForcingFixture_ConfigOptions(cfg) -def pytest_addoption(parser): - """Add command line options to pytest.""" - parser.addoption( - "--map_old_to_new_var_names", - action="store", - default=True, - help="Argument to specify if old variables names should be mapped to new variable names.", - ) +@pytest.fixture +def bmi_forcing_fixture_input_forcing(request) -> BMIForcingFixture_InputForcing: + """Construct class for tests of input_forcing. + For example usage, see: tests/input_forcing/test_input_forcing.py. + + Args: + request: A built-in convention for pytest.fixture. It may be passed from @pytest.mark.parametrize usage elsewhere. + """ + cfg = request.param + assert isinstance(cfg, TestConfig_InputForcing) + update_cfg_with_cli_inputs(cfg, request) + return BMIForcingFixture_InputForcing(cfg) @pytest.fixture -def bmi_forcing_fixture_input_forcing( - request, -) -> BMIForcingFixture_InputForcing: - """Construct minimal class of class for running forcing input_forcing. +def bmi_forcing_fixture_supp_precip(request) -> BMIForcingFixture_SuppPrecip: + """Construct class for tests of supp_precip. + For example usage, see: tests/supp_precip/test_supp_precip.py. + + Args: + request: A built-in convention for pytest.fixture. It may be passed from @pytest.mark.parametrize usage elsewhere. + """ + cfg = request.param + assert isinstance(cfg, TestConfig_SuppPrecip) + update_cfg_with_cli_inputs(cfg, request) + return BMIForcingFixture_SuppPrecip(cfg) - Constructor for minimal class of classes for running forcing input_forcing. - For example usage, see: tests/forcing_input/test_forcing_input.test_forcing_input. +@pytest.fixture +def bmi_forcing_fixture_ana(request) -> BMIForcingFixture_AnA: + """Construct class for tests of Analysis and Assimilation. + For example usage, see: tests/ana/test_ana.py. Args: request: A built-in convention for pytest.fixture. It may be passed from @pytest.mark.parametrize usage elsewhere. - """ - ( - config_file, - keys_to_check, - keys_to_exclude, - grid_type, - force_key, - ) = request.param - - bmi_model = BMIMODEL[grid_type]() - bmi_model.initialize_with_params( - config_file=config_file, - b_date=None, - geogrid=None, - output_path=None, - ) - map_old_to_new_var_names = request.config.getoption("--map_old_to_new_var_names") - if map_old_to_new_var_names == "True" or map_old_to_new_var_names is True: - map_old_to_new_var_names = True - elif map_old_to_new_var_names == "False" or map_old_to_new_var_names is False: - map_old_to_new_var_names = False - else: - raise ValueError( - f"Unexpected value for arg: map_old_to_new_var_names. Expected True or False; recieved: {map_old_to_new_var_names}" - ) - - return BMIForcingFixture_InputForcing( - bmi_model=bmi_model, - keys_to_check=keys_to_check, - keys_to_exclude=keys_to_exclude, - force_key=force_key, - map_old_to_new_var_names=map_old_to_new_var_names, - ) + cfg = request.param + assert isinstance(cfg, TestConfig_AnA) + update_cfg_with_cli_inputs(cfg, request) + return BMIForcingFixture_AnA(cfg) @pytest.fixture -def bmi_forcing_fixture_bmi_model( - request, -) -> BMIForcingFixture_BmiModel: - """Construct minimal class of classes for running BMI model tests. +def bmi_forcing_fixture_bmi_model(request) -> BMIForcingFixture_BmiModel: + """Construct class for running BMI model tests. + For example usage, see: tests/bmi_model/test_bmi_model.py. Constructor for minimal class of classes for running BMI model tests. - For example usage, see: tests/bmi_model/test_bmi_model.test_bmi_model. - Args: - request: A built-in convention for pytest.fixture. It may be passed from - @pytest.mark.parametrize usage elsewhere. - + request: A built-in convention for pytest.fixture. It may be passed from @pytest.mark.parametrize usage elsewhere. """ - ( - config_file, - keys_to_check, - keys_to_exclude, - grid_type, - ) = request.param - - bmi_model = BMIMODEL[grid_type]() - bmi_model.initialize_with_params( - config_file=config_file, - b_date=None, - geogrid=None, - output_path=None, - ) - return BMIForcingFixture_BmiModel( - bmi_model=bmi_model, - keys_to_check=keys_to_check, - keys_to_exclude=keys_to_exclude, - ) + cfg = request.param + assert isinstance(cfg, TestConfig_BmiModel) + update_cfg_with_cli_inputs(cfg, request) + return BMIForcingFixture_BmiModel(cfg) diff --git a/tests/esmf_regrid/test_esmf_regrid.py b/tests/esmf_regrid/test_esmf_regrid.py index f747f933..b58776c6 100644 --- a/tests/esmf_regrid/test_esmf_regrid.py +++ b/tests/esmf_regrid/test_esmf_regrid.py @@ -1,5 +1,4 @@ import importlib.util -import logging import os import pytest @@ -18,18 +17,15 @@ test_utils = importlib.util.module_from_spec(spec) spec.loader.exec_module(test_utils) -ClassAttrFetcher = test_utils.ClassAttrFetcher +consts = test_utils.test_consts +configs = test_utils.test_config_classes + +TEST_FILE_NAME_PREFIX = "" ### This disables a LOG call which was causing a crash at ioMod.py: LOG.debug(f"Wgrib2 command: {Wgrib2Cmd}", True) os.environ["MFE_SILENT"] = "true" -RETRO_FORCING_CONFIG_FILE__AORC_CONUS = ( - "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/aorc_config.yml" -) -FORECAST_FORCING_CONFIG_FILE__SHORT_RANGE_CONUS = "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/short_range_config.yml" - - ### These are output arrays which can contain extra unused elements which need to be removed during an equality check. REGRID_ARRAYS_TO_TRIM_EXTRA_ELEMENTS: tuple[str] = ( "regridded_forcings1", @@ -61,51 +57,54 @@ ### While the InputForcings class instance is the primary source of test results data, ### this is used to add supplemental attributes to the results data, ### for example "element_ids" (for hydrofabric discretization, these are catchment IDs). -EXTRA_ATTRS: tuple[ClassAttrFetcher] = (ClassAttrFetcher("geo_meta", "element_ids"),) +EXTRA_ATTRS = [ + test_utils.ClassAttrFetcher("geo_meta", "element_ids"), +] -COMPOSITE_KEYS_TO_CHECK: tuple[str] = REGRID_KEYS_TO_CHECK + tuple( +COMPOSITE_KEYS_TO_CHECK__REGRID: tuple[str] = REGRID_KEYS_TO_CHECK + tuple( _.results_key_name for _ in EXTRA_ATTRS ) -GRID_TYPE = "hydrofabric" # ["gridded","hydrofabric","unstructured"] -KEYS_TO_EXCLUDE = ("uid64",) - - -@pytest.mark.parametrize( - "bmi_forcing_fixture_regrid", - [ - ( - regrid_aorc_aws, - RETRO_FORCING_CONFIG_FILE__AORC_CONUS, - 12, - EXTRA_ATTRS, - REGRID_ARRAYS_TO_TRIM_EXTRA_ELEMENTS, - COMPOSITE_KEYS_TO_CHECK, - KEYS_TO_EXCLUDE, - GRID_TYPE, - ), - ( - regrid_conus_hrrr, - FORECAST_FORCING_CONFIG_FILE__SHORT_RANGE_CONUS, - 5, - EXTRA_ATTRS, - REGRID_ARRAYS_TO_TRIM_EXTRA_ELEMENTS, - COMPOSITE_KEYS_TO_CHECK, - KEYS_TO_EXCLUDE, - GRID_TYPE, - ), - ( - regrid_conus_rap, - FORECAST_FORCING_CONFIG_FILE__SHORT_RANGE_CONUS, - 6, - EXTRA_ATTRS, - REGRID_ARRAYS_TO_TRIM_EXTRA_ELEMENTS, - COMPOSITE_KEYS_TO_CHECK, - KEYS_TO_EXCLUDE, - GRID_TYPE, - ), - ], - indirect=True, -) + + +CONFIG_KWARGS_COMMON = { + "extra_attrs": EXTRA_ATTRS, + "regrid_arrays_to_trim_extra_elements": REGRID_ARRAYS_TO_TRIM_EXTRA_ELEMENTS, + "keys_to_check": COMPOSITE_KEYS_TO_CHECK__REGRID, + "keys_to_exclude": consts.KEYS_TO_EXCLUDE, + "grid_type": consts.GRID_TYPE, + "test_file_name_prefix": TEST_FILE_NAME_PREFIX, +} + + +TEST_CONFIGS = [ + configs.TestConfig_Regrid( + **CONFIG_KWARGS_COMMON + | { + "regrid_func": regrid_aorc_aws, + "force_key": 12, + "config_file": consts.RETRO_FORCING_CONFIG_FILE__AORC_CONUS, + } + ), + configs.TestConfig_Regrid( + **CONFIG_KWARGS_COMMON + | { + "regrid_func": regrid_conus_hrrr, + "force_key": 5, + "config_file": consts.FORECAST_FORCING_CONFIG_FILE__SHORT_RANGE_CONUS, + } + ), + configs.TestConfig_Regrid( + **CONFIG_KWARGS_COMMON + | { + "regrid_func": regrid_conus_rap, + "force_key": 6, + "config_file": consts.FORECAST_FORCING_CONFIG_FILE__SHORT_RANGE_CONUS, + } + ), +] + + +@pytest.mark.parametrize("bmi_forcing_fixture_regrid", TEST_CONFIGS, indirect=True) def test_regrid( bmi_forcing_fixture_regrid: test_utils.BMIForcingFixture_Regrid, # pyright: ignore ) -> None: @@ -115,7 +114,8 @@ def test_regrid( 2. Hydrofabric discretization, HRRR and RAP forcing (individually), CONUS domain. NOTE ^^^ this has been tested for the above conditions only ^^^ """ - ### Total number of timesteps needs to be at least 2, since the 1st one behaves differently than the others, e.g. see `if config_options.current_output_step == 1` throughout the code. + ### Total number of timesteps needs to be at least 3, since the 1st and 2nd behaves differently than the others, + ### e.g. see `if config_options.current_output_step == 1` throughout the code and the regridded_forcings1 vs regridded_forcings2 weighting. total_timesteps = 3 fixt = bmi_forcing_fixture_regrid diff --git a/tests/geomod/test_geomod.py b/tests/geomod/test_geomod.py index 85004048..a001c6d3 100644 --- a/tests/geomod/test_geomod.py +++ b/tests/geomod/test_geomod.py @@ -11,37 +11,32 @@ test_utils = importlib.util.module_from_spec(spec) spec.loader.exec_module(test_utils) +consts = test_utils.test_consts +configs = test_utils.test_config_classes -### This disables a LOG call which was causing a crash at ioMod.py: LOG.debug(f"Wgrib2 command: {Wgrib2Cmd}", True) -os.environ["MFE_SILENT"] = "true" +TEST_FILE_NAME_PREFIX = "geomod" -RETRO_FORCING_CONFIG_FILE__AORC_CONUS = ( - "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/aorc_config.yml" -) -FORECAST_FORCING_CONFIG_FILE__SHORT_RANGE_CONUS = "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/short_range_config.yml" -COMPOSITE_KEYS_TO_CHECK = () -GRID_TYPE = "hydrofabric" # ["gridded","hydrofabric","unstructured"] -KEYS_TO_EXCLUDE = ("uid64",) - - -@pytest.mark.parametrize( - "bmi_forcing_fixture_geomod", - [ - ( - RETRO_FORCING_CONFIG_FILE__AORC_CONUS, - COMPOSITE_KEYS_TO_CHECK, - KEYS_TO_EXCLUDE, - GRID_TYPE, - ) - ], - indirect=True, -) +TEST_CONFIGS = [ + configs.TestConfig_GeoMod( + config_file=consts.RETRO_FORCING_CONFIG_FILE__AORC_CONUS, + keys_to_check=consts.COMPOSITE_KEYS_TO_CHECK, + keys_to_exclude=tuple( + set(consts.KEYS_TO_EXCLUDE) | {"config_options", "mpi_config"} + ), + grid_type=consts.GRID_TYPE, + test_file_name_prefix=TEST_FILE_NAME_PREFIX, + ), +] + + +@pytest.mark.parametrize("bmi_forcing_fixture_geomod", TEST_CONFIGS, indirect=True) def test_geomod( bmi_forcing_fixture_geomod: test_utils.BMIForcingFixture_GeoMod, # pyright: ignore ) -> None: """Pytest function for testing GeoMod functionality.""" - ### Total number of timesteps needs to be at least 2, since the 1st one behaves differently than the others, e.g. see `if config_options.current_output_step == 1` throughout the code. + ### Total number of timesteps needs to be at least 3, since the 1st and 2nd behaves differently than the others, + ### e.g. see `if config_options.current_output_step == 1` throughout the code and the regridded_forcings1 vs regridded_forcings2 weighting. total_timesteps = 3 fixt = bmi_forcing_fixture_geomod diff --git a/tests/input_forcing/test_input_forcing.py b/tests/input_forcing/test_input_forcing.py index 481e5225..d4d5b05f 100644 --- a/tests/input_forcing/test_input_forcing.py +++ b/tests/input_forcing/test_input_forcing.py @@ -11,38 +11,35 @@ test_utils = importlib.util.module_from_spec(spec) spec.loader.exec_module(test_utils) +consts = test_utils.test_consts +configs = test_utils.test_config_classes -### This disables a LOG call which was causing a crash at ioMod.py: LOG.debug(f"Wgrib2 command: {Wgrib2Cmd}", True) -os.environ["MFE_SILENT"] = "true" +TEST_FILE_NAME_PREFIX = "input_forcing" -RETRO_FORCING_CONFIG_FILE__AORC_CONUS = ( - "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/aorc_config.yml" -) -FORECAST_FORCING_CONFIG_FILE__SHORT_RANGE_CONUS = "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/short_range_config.yml" -COMPOSITE_KEYS_TO_CHECK = () -GRID_TYPE = "hydrofabric" # ["gridded","hydrofabric","unstructured"] -KEYS_TO_EXCLUDE = ("uid64",) +TEST_CONFIGS = [ + configs.TestConfig_InputForcing( + config_file=consts.RETRO_FORCING_CONFIG_FILE__AORC_CONUS, + keys_to_check=consts.COMPOSITE_KEYS_TO_CHECK, + keys_to_exclude=tuple( + set(consts.KEYS_TO_EXCLUDE) | {"config_options", "geo_meta", "mpi_config"} + ), + grid_type=consts.GRID_TYPE, + force_key=12, + test_file_name_prefix=TEST_FILE_NAME_PREFIX, + ), +] @pytest.mark.parametrize( - "bmi_forcing_fixture_input_forcing", - [ - ( - RETRO_FORCING_CONFIG_FILE__AORC_CONUS, - COMPOSITE_KEYS_TO_CHECK, - KEYS_TO_EXCLUDE, - GRID_TYPE, - 12, - ) - ], - indirect=True, + "bmi_forcing_fixture_input_forcing", TEST_CONFIGS, indirect=True ) def test_input_forcing( bmi_forcing_fixture_input_forcing: test_utils.BMIForcingFixture_InputForcing, # pyright: ignore ) -> None: """Pytest function for testing InputForcing functionality.""" - ### Total number of timesteps needs to be at least 2, since the 1st one behaves differently than the others, e.g. see `if config_options.current_output_step == 1` throughout the code. + ### Total number of timesteps needs to be at least 3, since the 1st and 2nd behaves differently than the others, + ### e.g. see `if config_options.current_output_step == 1` throughout the code and the regridded_forcings1 vs regridded_forcings2 weighting. total_timesteps = 3 fixt = bmi_forcing_fixture_input_forcing diff --git a/tests/supp_precip/test_supp_precip.py b/tests/supp_precip/test_supp_precip.py new file mode 100644 index 00000000..64bc2198 --- /dev/null +++ b/tests/supp_precip/test_supp_precip.py @@ -0,0 +1,57 @@ +import importlib.util +import os + +import pytest + +### Load import tests.test_utils as test_utils, referring explicitly to its path. +### This explicit load is necessary since March 2026 versions of ngen which introduced /ngen-app/ngen/extern/topoflow-glacier/tests +spec = importlib.util.spec_from_file_location( + "tests.test_utils", os.path.abspath("tests/test_utils.py") +) +test_utils = importlib.util.module_from_spec(spec) +spec.loader.exec_module(test_utils) + +consts = test_utils.test_consts +configs = test_utils.test_config_classes + +TEST_FILE_NAME_PREFIX = "supp_precip" + +### This disables a LOG call which was causing a crash at ioMod.py: LOG.debug(f"Wgrib2 command: {Wgrib2Cmd}", True) +os.environ["MFE_SILENT"] = "true" + +TEST_CONFIGS = [ + configs.TestConfig_SuppPrecip( + config_file=consts.FORECAST_FORCING_CONFIG_FILE__SHORT_RANGE_PR, + keys_to_check=consts.COMPOSITE_KEYS_TO_CHECK, + keys_to_exclude=tuple( + set(consts.KEYS_TO_EXCLUDE) | {"config_options", "geo_meta", "mpi_config"} + ), + grid_type=consts.GRID_TYPE, + force_key=15, + test_file_name_prefix=TEST_FILE_NAME_PREFIX, + ), +] + + +@pytest.mark.parametrize("bmi_forcing_fixture_supp_precip", TEST_CONFIGS, indirect=True) +def test_supp_precip( + bmi_forcing_fixture_supp_precip: test_utils.BMIForcingFixture_SuppPrecip, # pyright: ignore +) -> None: + """Pytest function for testing SuppPrecip functionality.""" + ### Total number of timesteps needs to be at least 2, since the 1st one behaves differently than the others, e.g. see `if config_options.current_output_step == 1` throughout the code. + total_timesteps = 3 + + fixt = bmi_forcing_fixture_supp_precip + if len(fixt.input_forcing_mod) != 1: + raise ValueError( + f"Expected 1 key for input_forcing_mod, got {len(fixt.input_forcing_mod)}: {list(fixt.input_forcing_mod.keys())}" + ) + + fixt.after_intitialization_check() + for i in range(total_timesteps): + fixt.bmi_model.update() + fixt.after_bmi_model_update( + current_output_step=i + 1, + ) + fixt.bmi_model.finalize() + fixt.after_finalize() diff --git a/tests/test_config_classes.py b/tests/test_config_classes.py new file mode 100644 index 00000000..b296993a --- /dev/null +++ b/tests/test_config_classes.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +import typing +from dataclasses import dataclass + +if typing.TYPE_CHECKING: + from test_utils import ClassAttrFetcher + + +@dataclass(kw_only=True) +class TestConfig_Base: + """Configuration base class for tests. + + Args: + test_file_name_prefix: Affects the test data results file names (expected and actual) + config_file: Forcing configuration file, e.g. "ngen-forcing/tests/test_data/configs/standard_ana_config.yml" + keys_to_check: The keys to check + keys_to_exclude: The keys to exclude from the test results json and from equality checks, for example because they contain non-deterministic values or values that are not relevant to the test. + grid_type: e.g. "hydrofabric" + map_old_to_new_var_names: Whether to map old variable names to new variable names in the expected results data, which is needed when updating the test expected outputs dataset but should be false for regular test runs. + Note: this is overridden by a CLI arg. See `pytest_addoption` in `conftest.py` for details. + """ + + test_file_name_prefix: str + config_file: str + keys_to_check: tuple[str] + keys_to_exclude: tuple[str] + grid_type: str + map_old_to_new_var_names: bool = True + + +@dataclass(kw_only=True) +class TestConfig_GeoMod(TestConfig_Base): + """Configuration class for GeoMod Tests""" + + +@dataclass(kw_only=True) +class TestConfig_ConfigOptions(TestConfig_Base): + """Configuration class for ConfigOptions Tests""" + + +@dataclass(kw_only=True) +class TestConfig_InputForcing(TestConfig_Base): + """Configuration class for InputForcing Tests. + + Args: + force_key: Force key to check (often associated with a particular source dataset) + """ + + force_key: int + + +@dataclass(kw_only=True) +class TestConfig_SuppPrecip(TestConfig_Base): + """Configuration class for SuppPrecip Tests. + + Args: + force_key: Force key to check (often associated with a particular source dataset) + """ + + force_key: int + + +@dataclass(kw_only=True) +class TestConfig_Regrid(TestConfig_Base): + """Configuration class for Regrid Tests. + + Args: + force_key: Should agree with the regrid function being tested, e.g. see ginputfunc.forcing_map + regrid_func: The regrid function that is being tested. + extra_attrs: These are extra attributes to be added to the test results JSON, to supplement the primary InputForcings attributes. + regrid_arrays_to_trim_extra_elements: These are output arrays which can contain extra unused elements which need to be removed during an equality check. + """ + + force_key: int + regrid_func: typing.Callable + extra_attrs: list[ClassAttrFetcher] + regrid_arrays_to_trim_extra_elements: tuple[str] + + +@dataclass(kw_only=True) +class TestConfig_AnA(TestConfig_Base): + """Configuration class for Analysis and Assimilation tests.""" + + +@dataclass(kw_only=True) +class TestConfig_BmiModel(TestConfig_Base): + """Configuration class for BMI model tests.""" diff --git a/tests/test_consts.py b/tests/test_consts.py new file mode 100644 index 00000000..e2bce408 --- /dev/null +++ b/tests/test_consts.py @@ -0,0 +1,16 @@ +import os + +### This disables a LOG call which was causing a crash at ioMod.py: LOG.debug(f"Wgrib2 command: {Wgrib2Cmd}", True) +os.environ["MFE_SILENT"] = "true" + + +RETRO_FORCING_CONFIG_FILE__AORC_CONUS = ( + "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/aorc_config.yml" +) +FORECAST_FORCING_CONFIG_FILE__SHORT_RANGE_CONUS = "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/short_range_config.yml" +FORECAST_FORCING_CONFIG_FILE__SHORT_RANGE_PR = "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/short_range_puertorico_config.yml" +FORECAST_FORCING_CONFIG_FILE__ANA_CONUS = "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/configs/standard_ana_config.yml" + +COMPOSITE_KEYS_TO_CHECK = () +GRID_TYPE = "hydrofabric" # ["gridded","hydrofabric","unstructured"] +KEYS_TO_EXCLUDE = ("uid64",) diff --git a/tests/test_data/configs/README.md b/tests/test_data/configs/README.md new file mode 100644 index 00000000..25673a1c --- /dev/null +++ b/tests/test_data/configs/README.md @@ -0,0 +1,3 @@ +This folder contains BMI forcing configuration files that are used by the tests. + +Additional configuration of the tests themselves are found within the Python test scripts. diff --git a/tests/test_data/configs/short_range_puertorico_config.yml b/tests/test_data/configs/short_range_puertorico_config.yml new file mode 100644 index 00000000..6abd611f --- /dev/null +++ b/tests/test_data/configs/short_range_puertorico_config.yml @@ -0,0 +1,63 @@ +time_step_seconds: 3600 +initial_time: 0 +NWM_VERSION: 4.0 +NWM_CONFIG: short_range_puertorico +InputForcings: [14] +InputForcingDirectories: [/ngen-app/data/raw_input/PR_NAM] +InputForcingTypes: [GRIB2] +InputMandatory: [1] +OutputFrequency: 60 +SubOutputHour: 0 +SubOutFreq: 0 +ScratchDir: /ngen-app/data/scratch/short_range_puertorico/ +Output: 0 +compressOutput: 0 +floatOutput: 0 +AnAFlag: 0 +LookBack: -9999 +RefcstBDateProc: '202507100000' +ForecastFrequency: 60 +ForecastShift: 0 +ForecastInputHorizons: [2880] +ForecastInputOffsets: [0] +Geopackage: /workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_50027000.gpkg +GeogridIn: /workspaces/nwm-rte/src/ngen-forcing/tests/test_data/esmf_mesh/gauge_50027000_ESMF_Mesh.nc +SpatialMetaIn: '' +GRID_TYPE: hydrofabric +NodeCoords: nodeCoords +ElemID: element_id +ElemCoords: centerCoords +ElemConn: elementConn +NumElemConn: numElementConn +HGTVAR: Element_Elevation +SLOPE: Element_Slope +SLOPE_AZIMUTH: Element_Slope_Azmuith +IgnoredBorderWidths: [0] +RegridOpt: [1] +ForcingTemporalInterpolation: [0] +TemperatureBiasCorrection: [0] +PressureBiasCorrection: [0] +HumidityBiasCorrection: [0] +WindBiasCorrection: [0] +SwBiasCorrection: [0] +LwBiasCorrection: [0] +PrecipBiasCorrection: [0] +TemperatureDownscaling: [0] +ShortwaveDownscaling: [0] +PressureDownscaling: [0] +PrecipDownscaling: [0] +HumidityDownscaling: [0] +DownscalingParamDirs: [/ngen-app/data] +SuppPcp: [15] +SuppPcpForcingTypes: [GRIB2] +SuppPcpDirectories: [/ngen-app/data/raw_input/NBM_PR] +SuppPcpParamDir: /ngen-app/data +RegridOptSuppPcp: [1] +SuppPcpTemporalInterpolation: [0] +SuppPcpInputOffsets: [0] +SuppPcpMandatory: [1] +RqiMethod: 0 +RqiThreshold: 0.9 +cfsEnsNumber: '' +custom_input_fcst_freq: [] +includeLQFrac: 1 diff --git a/tests/test_data/configs/standard_ana_config.yml b/tests/test_data/configs/standard_ana_config.yml new file mode 100644 index 00000000..ed391adb --- /dev/null +++ b/tests/test_data/configs/standard_ana_config.yml @@ -0,0 +1,63 @@ +time_step_seconds: 3600 +initial_time: 0 +NWM_VERSION: 4.0 +NWM_CONFIG: standard_ana +InputForcings: [6, 5] +InputForcingDirectories: [/ngen-app/data/raw_input/RAP_ANA, /ngen-app/data/raw_input/HRRR_ANA] +InputForcingTypes: [GRIB2, GRIB2] +InputMandatory: [1, 1] +OutputFrequency: 60 +SubOutputHour: 0 +SubOutFreq: 0 +ScratchDir: /ngen-app/data/scratch/standard_ana +Output: 0 +compressOutput: 0 +floatOutput: 0 +AnAFlag: 1 +LookBack: 180 +RefcstBDateProc: '202507100900' +ForecastFrequency: 60 +ForecastShift: 0 +ForecastInputHorizons: [180, 180] +ForecastInputOffsets: [0, 0] +Geopackage: /workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg +GeogridIn: /workspaces/nwm-rte/src/ngen-forcing/tests/test_data/esmf_mesh/gauge_01123000_ESMF_Mesh.nc +SpatialMetaIn: '' +GRID_TYPE: hydrofabric +NodeCoords: nodeCoords +ElemCoords: centerCoords +ElemConn: elementConn +ElemID: element_id +NumElemConn: numElementConn +HGTVAR: Element_Elevation +SLOPE: Element_Slope +SLOPE_AZIMUTH: Element_Slope_Azmuith +IgnoredBorderWidths: [0, 0] +RegridOpt: [1, 1] +ForcingTemporalInterpolation: [0, 0] +TemperatureBiasCorrection: [0, 0] +PressureBiasCorrection: [0, 0] +HumidityBiasCorrection: [0, 0] +WindBiasCorrection: [0, 0] +SwBiasCorrection: [0, 0] +LwBiasCorrection: [0, 0] +PrecipBiasCorrection: [0, 0] +TemperatureDownscaling: [0, 0] +ShortwaveDownscaling: [0, 0] +PressureDownscaling: [0, 0] +PrecipDownscaling: [0, 0] +HumidityDownscaling: [0, 0] +DownscalingParamDirs: [/ngen-app/data, /ngen-app/data] +SuppPcp: [1, 2] +SuppPcpForcingTypes: [GRIB2, GRIB2] +SuppPcpDirectories: [/ngen-app/data/raw_input/MRMS_RO, /ngen-app/data/raw_input/MRMS_MS] +SuppPcpParamDir: /ngen-app/data/raw_input/RQI +RegridOptSuppPcp: [2, 2] +SuppPcpTemporalInterpolation: [0, 0] +SuppPcpInputOffsets: [0, 0] +SuppPcpMandatory: [1, 1] +RqiMethod: 0 +RqiThreshold: 0.0 +cfsEnsNumber: '' +custom_input_fcst_freq: [] +includeLQFrac: 1 diff --git a/tests/test_data/esmf_mesh/gauge_50027000_ESMF_Mesh.nc b/tests/test_data/esmf_mesh/gauge_50027000_ESMF_Mesh.nc new file mode 100644 index 00000000..af851518 Binary files /dev/null and b/tests/test_data/esmf_mesh/gauge_50027000_ESMF_Mesh.nc differ diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n1_rank0__step_1.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n1_rank0__step_1.json new file mode 100644 index 00000000..bc722bea --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n1_rank0__step_1.json @@ -0,0 +1,172 @@ +{ + "idOut": null, + "outDate": "2025-07-10T07:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -1.410295844078064, + -0.9769837260246277, + -1.0550719499588013, + -1.1564271450042725, + -1.038574457168579, + -1.1512030363082886, + -1.3210023641586304 + ], + [ + -1.075816035270691, + -1.7945302724838257, + -1.9976998567581177, + -2.2715940475463867, + -2.2515783309936523, + -1.9823459386825562, + -1.8057399988174438 + ], + [ + 414.9977722167969, + 414.0677185058594, + 422.7254638671875, + 425.6545104980469, + 426.2725830078125, + 424.894287109375, + 412.1449279785156 + ], + [ + 0.0009722222457639873, + 0.0008611110970377922, + 0.00016666667943354696, + 0.00011111111234640703, + 0.00013888889225199819, + 0.0, + 0.000750000006519258 + ], + [ + 294.3380432128906, + 294.4169006347656, + 294.9239196777344, + 294.8855285644531, + 295.153564453125, + 294.81158447265625, + 294.45782470703125 + ], + [ + 0.01567092351615429, + 0.015658782795071602, + 0.015821261331439018, + 0.01592061296105385, + 0.01596120186150074, + 0.015891123563051224, + 0.01563367433845997 + ], + [ + 99145.0234375, + 99279.625, + 99800.34375, + 99717.625, + 99945.6875, + 99710.90625, + 99270.46875 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -1.410295844078064, + -0.9769837260246277, + -1.0550719499588013, + -1.1564271450042725, + -1.038574457168579, + -1.1512030363082886, + -1.3210023641586304 + ], + [ + -1.075816035270691, + -1.7945302724838257, + -1.9976998567581177, + -2.2715940475463867, + -2.2515783309936523, + -1.9823459386825562, + -1.8057399988174438 + ], + [ + 414.9977722167969, + 414.0677185058594, + 422.7254638671875, + 425.6545104980469, + 426.2725830078125, + 424.894287109375, + 412.1449279785156 + ], + [ + 0.0009722222457639873, + 0.0008611110970377922, + 0.00016666667943354696, + 0.00011111111234640703, + 0.00013888889225199819, + 0.0, + 0.000750000006519258 + ], + [ + 294.3380432128906, + 294.4169006347656, + 294.9239196777344, + 294.8855285644531, + 295.153564453125, + 294.81158447265625, + 294.45782470703125 + ], + [ + 0.01567092351615429, + 0.015658782795071602, + 0.015821261331439018, + 0.01592061296105385, + 0.01596120186150074, + 0.015891123563051224, + 0.01563367433845997 + ], + [ + 99145.0234375, + 99279.625, + 99800.34375, + 99717.625, + 99945.6875, + 99710.90625, + 99270.46875 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n1_rank0__step_2.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n1_rank0__step_2.json new file mode 100644 index 00000000..1a577708 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n1_rank0__step_2.json @@ -0,0 +1,172 @@ +{ + "idOut": null, + "outDate": "2025-07-10T08:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -2.2241005897521973, + -1.807473063468933, + -1.245255708694458, + -1.508069634437561, + -1.683876395225525, + -1.100544810295105, + -1.967042326927185 + ], + [ + -0.9001779556274414, + -1.0442909002304077, + -1.4980731010437012, + -1.5387722253799438, + -1.4350796937942505, + -1.6279373168945312, + -0.774793803691864 + ], + [ + 397.1433410644531, + 405.2170104980469, + 416.85870361328125, + 415.1512756347656, + 414.35736083984375, + 418.4111328125, + 402.11065673828125 + ], + [ + 0.0005277777672745287, + 0.0008888888987712562, + 0.000722222204785794, + 0.0006666667177341878, + 0.000750000006519258, + 0.0007777777500450611, + 0.0010555555345490575 + ], + [ + 293.9549865722656, + 294.1123352050781, + 294.6629943847656, + 294.86199951171875, + 295.0794677734375, + 294.70306396484375, + 294.1600341796875 + ], + [ + 0.014883879572153091, + 0.015128380618989468, + 0.015394970774650574, + 0.01567152515053749, + 0.015849996358156204, + 0.015485675074160099, + 0.015181985683739185 + ], + [ + 99239.328125, + 99369.734375, + 99901.7265625, + 99841.3203125, + 100066.3828125, + 99823.4375, + 99365.671875 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -2.2241005897521973, + -1.807473063468933, + -1.245255708694458, + -1.508069634437561, + -1.683876395225525, + -1.100544810295105, + -1.967042326927185 + ], + [ + -0.9001779556274414, + -1.0442909002304077, + -1.4980731010437012, + -1.5387722253799438, + -1.4350796937942505, + -1.6279373168945312, + -0.774793803691864 + ], + [ + 397.1433410644531, + 405.2170104980469, + 416.85870361328125, + 415.1512756347656, + 414.35736083984375, + 418.4111328125, + 402.11065673828125 + ], + [ + 0.0005277777672745287, + 0.0008888888987712562, + 0.000722222204785794, + 0.0006666667177341878, + 0.000750000006519258, + 0.0007777777500450611, + 0.0010555555345490575 + ], + [ + 293.9549865722656, + 294.1123352050781, + 294.6629943847656, + 294.86199951171875, + 295.0794677734375, + 294.70306396484375, + 294.1600341796875 + ], + [ + 0.014883879572153091, + 0.015128380618989468, + 0.015394970774650574, + 0.01567152515053749, + 0.015849996358156204, + 0.015485675074160099, + 0.015181985683739185 + ], + [ + 99239.328125, + 99369.734375, + 99901.7265625, + 99841.3203125, + 100066.3828125, + 99823.4375, + 99365.671875 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n1_rank0__step_3.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n1_rank0__step_3.json new file mode 100644 index 00000000..e8f3302f --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n1_rank0__step_3.json @@ -0,0 +1,172 @@ +{ + "idOut": null, + "outDate": "2025-07-10T09:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -0.09835651516914368, + -0.5334993600845337, + -1.0217965841293335, + -1.0319740772247314, + -0.8142603635787964, + -1.1877989768981934, + -0.292375385761261 + ], + [ + 0.3140997588634491, + 1.1746679544448853, + 2.0089995861053467, + 2.035417318344116, + 1.761492133140564, + 2.082761287689209, + 1.2768900394439697 + ], + [ + 417.97906494140625, + 410.6579895019531, + 421.15472412109375, + 420.8013916015625, + 418.1336975097656, + 422.92791748046875, + 414.14129638671875 + ], + [ + 0.005527777597308159, + 0.0034722222480922937, + 0.0007777777500450611, + 0.00016666667943354696, + 0.00016666667943354696, + 0.0003055555571336299, + 0.0034166667610406876 + ], + [ + 294.3316345214844, + 294.3771057128906, + 294.6235656738281, + 294.14996337890625, + 294.2622985839844, + 294.3876953125, + 294.4525451660156 + ], + [ + 0.015577448531985283, + 0.015614578500390053, + 0.015549663454294205, + 0.015084546990692616, + 0.015104496851563454, + 0.0153276352211833, + 0.01570560410618782 + ], + [ + 99125.8046875, + 99274.671875, + 99811.9453125, + 99760.21875, + 99994.4921875, + 99734.3515625, + 99265.09375 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -0.09835651516914368, + -0.5334993600845337, + -1.0217965841293335, + -1.0319740772247314, + -0.8142603635787964, + -1.1877989768981934, + -0.292375385761261 + ], + [ + 0.3140997588634491, + 1.1746679544448853, + 2.0089995861053467, + 2.035417318344116, + 1.761492133140564, + 2.082761287689209, + 1.2768900394439697 + ], + [ + 417.97906494140625, + 410.6579895019531, + 421.15472412109375, + 420.8013916015625, + 418.1336975097656, + 422.92791748046875, + 414.14129638671875 + ], + [ + 0.005527777597308159, + 0.0034722222480922937, + 0.0007777777500450611, + 0.00016666667943354696, + 0.00016666667943354696, + 0.0003055555571336299, + 0.0034166667610406876 + ], + [ + 294.3316345214844, + 294.3771057128906, + 294.6235656738281, + 294.14996337890625, + 294.2622985839844, + 294.3876953125, + 294.4525451660156 + ], + [ + 0.015577448531985283, + 0.015614578500390053, + 0.015549663454294205, + 0.015084546990692616, + 0.015104496851563454, + 0.0153276352211833, + 0.01570560410618782 + ], + [ + 99125.8046875, + 99274.671875, + 99811.9453125, + 99760.21875, + 99994.4921875, + 99734.3515625, + 99265.09375 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank0__step_1.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank0__step_1.json new file mode 100644 index 00000000..5f32dc0f --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank0__step_1.json @@ -0,0 +1,145 @@ +{ + "idOut": null, + "outDate": "2025-07-10T07:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -1.410295844078064, + -0.9769837260246277, + -1.0550719499588013, + -1.1564271450042725, + -1.038574457168579, + -1.1512030363082886, + -1.3210023641586304 + ], + [ + -1.075816035270691, + -1.7945302724838257, + -1.9976998567581177, + -2.2715940475463867, + -2.2515783309936523, + -1.9823459386825562, + -1.8057399988174438 + ], + [ + 414.9977722167969, + 414.0677185058594, + 422.7254638671875, + 425.6545104980469, + 426.2725830078125, + 424.894287109375, + 412.1449279785156 + ], + [ + 0.0009722222457639873, + 0.0008611110970377922, + 0.00016666667943354696, + 0.00011111111234640703, + 0.00013888889225199819, + 0.0, + 0.000750000006519258 + ], + [ + 294.3380432128906, + 294.4169006347656, + 294.9239196777344, + 294.8855285644531, + 295.153564453125, + 294.81158447265625, + 294.45782470703125 + ], + [ + 0.01567092351615429, + 0.015658782795071602, + 0.015821261331439018, + 0.01592061296105385, + 0.01596120186150074, + 0.015891123563051224, + 0.01563367433845997 + ], + [ + 99145.0234375, + 99279.625, + 99800.34375, + 99717.625, + 99945.6875, + 99710.90625, + 99270.46875 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -1.410295844078064, + -0.9769837260246277, + -1.0550719499588013, + -1.1564271450042725 + ], + [ + -1.075816035270691, + -1.7945302724838257, + -1.9976998567581177, + -2.2715940475463867 + ], + [ + 414.9977722167969, + 414.0677185058594, + 422.7254638671875, + 425.6545104980469 + ], + [ + 0.0009722222457639873, + 0.0008611110970377922, + 0.00016666667943354696, + 0.00011111111234640703 + ], + [ + 294.3380432128906, + 294.4169006347656, + 294.9239196777344, + 294.8855285644531 + ], + [ + 0.01567092351615429, + 0.015658782795071602, + 0.015821261331439018, + 0.01592061296105385 + ], + [ + 99145.0234375, + 99279.625, + 99800.34375, + 99717.625 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank0__step_2.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank0__step_2.json new file mode 100644 index 00000000..f8c4f6c9 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank0__step_2.json @@ -0,0 +1,145 @@ +{ + "idOut": null, + "outDate": "2025-07-10T08:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -2.2241005897521973, + -1.807473063468933, + -1.245255708694458, + -1.508069634437561, + -1.683876395225525, + -1.100544810295105, + -1.967042326927185 + ], + [ + -0.9001779556274414, + -1.0442909002304077, + -1.4980731010437012, + -1.5387722253799438, + -1.4350796937942505, + -1.6279373168945312, + -0.774793803691864 + ], + [ + 397.1433410644531, + 405.2170104980469, + 416.85870361328125, + 415.1512756347656, + 414.35736083984375, + 418.4111328125, + 402.11065673828125 + ], + [ + 0.0005277777672745287, + 0.0008888888987712562, + 0.000722222204785794, + 0.0006666667177341878, + 0.000750000006519258, + 0.0007777777500450611, + 0.0010555555345490575 + ], + [ + 293.9549865722656, + 294.1123352050781, + 294.6629943847656, + 294.86199951171875, + 295.0794677734375, + 294.70306396484375, + 294.1600341796875 + ], + [ + 0.014883879572153091, + 0.015128380618989468, + 0.015394970774650574, + 0.01567152515053749, + 0.015849996358156204, + 0.015485675074160099, + 0.015181985683739185 + ], + [ + 99239.328125, + 99369.734375, + 99901.7265625, + 99841.3203125, + 100066.3828125, + 99823.4375, + 99365.671875 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -2.2241005897521973, + -1.807473063468933, + -1.245255708694458, + -1.508069634437561 + ], + [ + -0.9001779556274414, + -1.0442909002304077, + -1.4980731010437012, + -1.5387722253799438 + ], + [ + 397.1433410644531, + 405.2170104980469, + 416.85870361328125, + 415.1512756347656 + ], + [ + 0.0005277777672745287, + 0.0008888888987712562, + 0.000722222204785794, + 0.0006666667177341878 + ], + [ + 293.9549865722656, + 294.1123352050781, + 294.6629943847656, + 294.86199951171875 + ], + [ + 0.014883879572153091, + 0.015128380618989468, + 0.015394970774650574, + 0.01567152515053749 + ], + [ + 99239.328125, + 99369.734375, + 99901.7265625, + 99841.3203125 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank0__step_3.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank0__step_3.json new file mode 100644 index 00000000..165a36b8 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank0__step_3.json @@ -0,0 +1,145 @@ +{ + "idOut": null, + "outDate": "2025-07-10T09:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -0.09835651516914368, + -0.5334993600845337, + -1.0217965841293335, + -1.0319740772247314, + -0.8142603635787964, + -1.1877989768981934, + -0.292375385761261 + ], + [ + 0.3140997588634491, + 1.1746679544448853, + 2.0089995861053467, + 2.035417318344116, + 1.761492133140564, + 2.082761287689209, + 1.2768900394439697 + ], + [ + 417.97906494140625, + 410.6579895019531, + 421.15472412109375, + 420.8013916015625, + 418.1336975097656, + 422.92791748046875, + 414.14129638671875 + ], + [ + 0.005527777597308159, + 0.0034722222480922937, + 0.0007777777500450611, + 0.00016666667943354696, + 0.00016666667943354696, + 0.0003055555571336299, + 0.0034166667610406876 + ], + [ + 294.3316345214844, + 294.3771057128906, + 294.6235656738281, + 294.14996337890625, + 294.2622985839844, + 294.3876953125, + 294.4525451660156 + ], + [ + 0.015577448531985283, + 0.015614578500390053, + 0.015549663454294205, + 0.015084546990692616, + 0.015104496851563454, + 0.0153276352211833, + 0.01570560410618782 + ], + [ + 99125.8046875, + 99274.671875, + 99811.9453125, + 99760.21875, + 99994.4921875, + 99734.3515625, + 99265.09375 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -0.09835651516914368, + -0.5334993600845337, + -1.0217965841293335, + -1.0319740772247314 + ], + [ + 0.3140997588634491, + 1.1746679544448853, + 2.0089995861053467, + 2.035417318344116 + ], + [ + 417.97906494140625, + 410.6579895019531, + 421.15472412109375, + 420.8013916015625 + ], + [ + 0.005527777597308159, + 0.0034722222480922937, + 0.0007777777500450611, + 0.00016666667943354696 + ], + [ + 294.3316345214844, + 294.3771057128906, + 294.6235656738281, + 294.14996337890625 + ], + [ + 0.015577448531985283, + 0.015614578500390053, + 0.015549663454294205, + 0.015084546990692616 + ], + [ + 99125.8046875, + 99274.671875, + 99811.9453125, + 99760.21875 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank1__step_1.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank1__step_1.json new file mode 100644 index 00000000..52506b9e --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank1__step_1.json @@ -0,0 +1,136 @@ +{ + "idOut": null, + "outDate": "2025-07-10T07:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -1.410295844078064, + -0.9769837260246277, + -1.0550719499588013, + -1.1564271450042725, + -1.038574457168579, + -1.1512030363082886, + -1.3210023641586304 + ], + [ + -1.075816035270691, + -1.7945302724838257, + -1.9976998567581177, + -2.2715940475463867, + -2.2515783309936523, + -1.9823459386825562, + -1.8057399988174438 + ], + [ + 414.9977722167969, + 414.0677185058594, + 422.7254638671875, + 425.6545104980469, + 426.2725830078125, + 424.894287109375, + 412.1449279785156 + ], + [ + 0.0009722222457639873, + 0.0008611110970377922, + 0.00016666667943354696, + 0.00011111111234640703, + 0.00013888889225199819, + 0.0, + 0.000750000006519258 + ], + [ + 294.3380432128906, + 294.4169006347656, + 294.9239196777344, + 294.8855285644531, + 295.153564453125, + 294.81158447265625, + 294.45782470703125 + ], + [ + 0.01567092351615429, + 0.015658782795071602, + 0.015821261331439018, + 0.01592061296105385, + 0.01596120186150074, + 0.015891123563051224, + 0.01563367433845997 + ], + [ + 99145.0234375, + 99279.625, + 99800.34375, + 99717.625, + 99945.6875, + 99710.90625, + 99270.46875 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -1.038574457168579, + -1.1512030363082886, + -1.3210023641586304 + ], + [ + -2.2515783309936523, + -1.9823459386825562, + -1.8057399988174438 + ], + [ + 426.2725830078125, + 424.894287109375, + 412.1449279785156 + ], + [ + 0.00013888889225199819, + 0.0, + 0.000750000006519258 + ], + [ + 295.153564453125, + 294.81158447265625, + 294.45782470703125 + ], + [ + 0.01596120186150074, + 0.015891123563051224, + 0.01563367433845997 + ], + [ + 99945.6875, + 99710.90625, + 99270.46875 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank1__step_2.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank1__step_2.json new file mode 100644 index 00000000..2045e0cf --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank1__step_2.json @@ -0,0 +1,136 @@ +{ + "idOut": null, + "outDate": "2025-07-10T08:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -2.2241005897521973, + -1.807473063468933, + -1.245255708694458, + -1.508069634437561, + -1.683876395225525, + -1.100544810295105, + -1.967042326927185 + ], + [ + -0.9001779556274414, + -1.0442909002304077, + -1.4980731010437012, + -1.5387722253799438, + -1.4350796937942505, + -1.6279373168945312, + -0.774793803691864 + ], + [ + 397.1433410644531, + 405.2170104980469, + 416.85870361328125, + 415.1512756347656, + 414.35736083984375, + 418.4111328125, + 402.11065673828125 + ], + [ + 0.0005277777672745287, + 0.0008888888987712562, + 0.000722222204785794, + 0.0006666667177341878, + 0.000750000006519258, + 0.0007777777500450611, + 0.0010555555345490575 + ], + [ + 293.9549865722656, + 294.1123352050781, + 294.6629943847656, + 294.86199951171875, + 295.0794677734375, + 294.70306396484375, + 294.1600341796875 + ], + [ + 0.014883879572153091, + 0.015128380618989468, + 0.015394970774650574, + 0.01567152515053749, + 0.015849996358156204, + 0.015485675074160099, + 0.015181985683739185 + ], + [ + 99239.328125, + 99369.734375, + 99901.7265625, + 99841.3203125, + 100066.3828125, + 99823.4375, + 99365.671875 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -1.683876395225525, + -1.100544810295105, + -1.967042326927185 + ], + [ + -1.4350796937942505, + -1.6279373168945312, + -0.774793803691864 + ], + [ + 414.35736083984375, + 418.4111328125, + 402.11065673828125 + ], + [ + 0.000750000006519258, + 0.0007777777500450611, + 0.0010555555345490575 + ], + [ + 295.0794677734375, + 294.70306396484375, + 294.1600341796875 + ], + [ + 0.015849996358156204, + 0.015485675074160099, + 0.015181985683739185 + ], + [ + 100066.3828125, + 99823.4375, + 99365.671875 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank1__step_3.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank1__step_3.json new file mode 100644 index 00000000..8842a25a --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_after_update_n2_rank1__step_3.json @@ -0,0 +1,136 @@ +{ + "idOut": null, + "outDate": "2025-07-10T09:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -0.09835651516914368, + -0.5334993600845337, + -1.0217965841293335, + -1.0319740772247314, + -0.8142603635787964, + -1.1877989768981934, + -0.292375385761261 + ], + [ + 0.3140997588634491, + 1.1746679544448853, + 2.0089995861053467, + 2.035417318344116, + 1.761492133140564, + 2.082761287689209, + 1.2768900394439697 + ], + [ + 417.97906494140625, + 410.6579895019531, + 421.15472412109375, + 420.8013916015625, + 418.1336975097656, + 422.92791748046875, + 414.14129638671875 + ], + [ + 0.005527777597308159, + 0.0034722222480922937, + 0.0007777777500450611, + 0.00016666667943354696, + 0.00016666667943354696, + 0.0003055555571336299, + 0.0034166667610406876 + ], + [ + 294.3316345214844, + 294.3771057128906, + 294.6235656738281, + 294.14996337890625, + 294.2622985839844, + 294.3876953125, + 294.4525451660156 + ], + [ + 0.015577448531985283, + 0.015614578500390053, + 0.015549663454294205, + 0.015084546990692616, + 0.015104496851563454, + 0.0153276352211833, + 0.01570560410618782 + ], + [ + 99125.8046875, + 99274.671875, + 99811.9453125, + 99760.21875, + 99994.4921875, + 99734.3515625, + 99265.09375 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -0.8142603635787964, + -1.1877989768981934, + -0.292375385761261 + ], + [ + 1.761492133140564, + 2.082761287689209, + 1.2768900394439697 + ], + [ + 418.1336975097656, + 422.92791748046875, + 414.14129638671875 + ], + [ + 0.00016666667943354696, + 0.0003055555571336299, + 0.0034166667610406876 + ], + [ + 294.2622985839844, + 294.3876953125, + 294.4525451660156 + ], + [ + 0.015104496851563454, + 0.0153276352211833, + 0.01570560410618782 + ], + [ + 99994.4921875, + 99734.3515625, + 99265.09375 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_finalize_n1_rank0_.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_finalize_n1_rank0_.json new file mode 100644 index 00000000..e8f3302f --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_finalize_n1_rank0_.json @@ -0,0 +1,172 @@ +{ + "idOut": null, + "outDate": "2025-07-10T09:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -0.09835651516914368, + -0.5334993600845337, + -1.0217965841293335, + -1.0319740772247314, + -0.8142603635787964, + -1.1877989768981934, + -0.292375385761261 + ], + [ + 0.3140997588634491, + 1.1746679544448853, + 2.0089995861053467, + 2.035417318344116, + 1.761492133140564, + 2.082761287689209, + 1.2768900394439697 + ], + [ + 417.97906494140625, + 410.6579895019531, + 421.15472412109375, + 420.8013916015625, + 418.1336975097656, + 422.92791748046875, + 414.14129638671875 + ], + [ + 0.005527777597308159, + 0.0034722222480922937, + 0.0007777777500450611, + 0.00016666667943354696, + 0.00016666667943354696, + 0.0003055555571336299, + 0.0034166667610406876 + ], + [ + 294.3316345214844, + 294.3771057128906, + 294.6235656738281, + 294.14996337890625, + 294.2622985839844, + 294.3876953125, + 294.4525451660156 + ], + [ + 0.015577448531985283, + 0.015614578500390053, + 0.015549663454294205, + 0.015084546990692616, + 0.015104496851563454, + 0.0153276352211833, + 0.01570560410618782 + ], + [ + 99125.8046875, + 99274.671875, + 99811.9453125, + 99760.21875, + 99994.4921875, + 99734.3515625, + 99265.09375 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -0.09835651516914368, + -0.5334993600845337, + -1.0217965841293335, + -1.0319740772247314, + -0.8142603635787964, + -1.1877989768981934, + -0.292375385761261 + ], + [ + 0.3140997588634491, + 1.1746679544448853, + 2.0089995861053467, + 2.035417318344116, + 1.761492133140564, + 2.082761287689209, + 1.2768900394439697 + ], + [ + 417.97906494140625, + 410.6579895019531, + 421.15472412109375, + 420.8013916015625, + 418.1336975097656, + 422.92791748046875, + 414.14129638671875 + ], + [ + 0.005527777597308159, + 0.0034722222480922937, + 0.0007777777500450611, + 0.00016666667943354696, + 0.00016666667943354696, + 0.0003055555571336299, + 0.0034166667610406876 + ], + [ + 294.3316345214844, + 294.3771057128906, + 294.6235656738281, + 294.14996337890625, + 294.2622985839844, + 294.3876953125, + 294.4525451660156 + ], + [ + 0.015577448531985283, + 0.015614578500390053, + 0.015549663454294205, + 0.015084546990692616, + 0.015104496851563454, + 0.0153276352211833, + 0.01570560410618782 + ], + [ + 99125.8046875, + 99274.671875, + 99811.9453125, + 99760.21875, + 99994.4921875, + 99734.3515625, + 99265.09375 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_finalize_n2_rank0_.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_finalize_n2_rank0_.json new file mode 100644 index 00000000..165a36b8 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_finalize_n2_rank0_.json @@ -0,0 +1,145 @@ +{ + "idOut": null, + "outDate": "2025-07-10T09:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -0.09835651516914368, + -0.5334993600845337, + -1.0217965841293335, + -1.0319740772247314, + -0.8142603635787964, + -1.1877989768981934, + -0.292375385761261 + ], + [ + 0.3140997588634491, + 1.1746679544448853, + 2.0089995861053467, + 2.035417318344116, + 1.761492133140564, + 2.082761287689209, + 1.2768900394439697 + ], + [ + 417.97906494140625, + 410.6579895019531, + 421.15472412109375, + 420.8013916015625, + 418.1336975097656, + 422.92791748046875, + 414.14129638671875 + ], + [ + 0.005527777597308159, + 0.0034722222480922937, + 0.0007777777500450611, + 0.00016666667943354696, + 0.00016666667943354696, + 0.0003055555571336299, + 0.0034166667610406876 + ], + [ + 294.3316345214844, + 294.3771057128906, + 294.6235656738281, + 294.14996337890625, + 294.2622985839844, + 294.3876953125, + 294.4525451660156 + ], + [ + 0.015577448531985283, + 0.015614578500390053, + 0.015549663454294205, + 0.015084546990692616, + 0.015104496851563454, + 0.0153276352211833, + 0.01570560410618782 + ], + [ + 99125.8046875, + 99274.671875, + 99811.9453125, + 99760.21875, + 99994.4921875, + 99734.3515625, + 99265.09375 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -0.09835651516914368, + -0.5334993600845337, + -1.0217965841293335, + -1.0319740772247314 + ], + [ + 0.3140997588634491, + 1.1746679544448853, + 2.0089995861053467, + 2.035417318344116 + ], + [ + 417.97906494140625, + 410.6579895019531, + 421.15472412109375, + 420.8013916015625 + ], + [ + 0.005527777597308159, + 0.0034722222480922937, + 0.0007777777500450611, + 0.00016666667943354696 + ], + [ + 294.3316345214844, + 294.3771057128906, + 294.6235656738281, + 294.14996337890625 + ], + [ + 0.015577448531985283, + 0.015614578500390053, + 0.015549663454294205, + 0.015084546990692616 + ], + [ + 99125.8046875, + 99274.671875, + 99811.9453125, + 99760.21875 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_ana_standard_conus_finalize_n2_rank1_.json b/tests/test_data/expected_results/test_expected_ana_standard_conus_finalize_n2_rank1_.json new file mode 100644 index 00000000..8842a25a --- /dev/null +++ b/tests/test_data/expected_results/test_expected_ana_standard_conus_finalize_n2_rank1_.json @@ -0,0 +1,136 @@ +{ + "idOut": null, + "outDate": "2025-07-10T09:00:00", + "outPath": null, + "out_ndv": -9999, + "output_global": [ + [ + -0.09835651516914368, + -0.5334993600845337, + -1.0217965841293335, + -1.0319740772247314, + -0.8142603635787964, + -1.1877989768981934, + -0.292375385761261 + ], + [ + 0.3140997588634491, + 1.1746679544448853, + 2.0089995861053467, + 2.035417318344116, + 1.761492133140564, + 2.082761287689209, + 1.2768900394439697 + ], + [ + 417.97906494140625, + 410.6579895019531, + 421.15472412109375, + 420.8013916015625, + 418.1336975097656, + 422.92791748046875, + 414.14129638671875 + ], + [ + 0.005527777597308159, + 0.0034722222480922937, + 0.0007777777500450611, + 0.00016666667943354696, + 0.00016666667943354696, + 0.0003055555571336299, + 0.0034166667610406876 + ], + [ + 294.3316345214844, + 294.3771057128906, + 294.6235656738281, + 294.14996337890625, + 294.2622985839844, + 294.3876953125, + 294.4525451660156 + ], + [ + 0.015577448531985283, + 0.015614578500390053, + 0.015549663454294205, + 0.015084546990692616, + 0.015104496851563454, + 0.0153276352211833, + 0.01570560410618782 + ], + [ + 99125.8046875, + 99274.671875, + 99811.9453125, + 99760.21875, + 99994.4921875, + 99734.3515625, + 99265.09375 + ], + [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ] + ], + "output_local": [ + [ + -0.8142603635787964, + -1.1877989768981934, + -0.292375385761261 + ], + [ + 1.761492133140564, + 2.082761287689209, + 1.2768900394439697 + ], + [ + 418.1336975097656, + 422.92791748046875, + 414.14129638671875 + ], + [ + 0.00016666667943354696, + 0.0003055555571336299, + 0.0034166667610406876 + ], + [ + 294.2622985839844, + 294.3876953125, + 294.4525451660156 + ], + [ + 0.015104496851563454, + 0.0153276352211833, + 0.01570560410618782 + ], + [ + 99994.4921875, + 99734.3515625, + 99265.09375 + ], + [ + 0.0, + 0.0, + 0.0 + ], + [ + 1.0, + 1.0, + 1.0 + ] + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_after_update_n1_rank0__step_1.json b/tests/test_data/expected_results/test_expected_config_options_after_update_n1_rank0__step_1.json new file mode 100644 index 00000000..32071782 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_after_update_n1_rank0__step_1.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 3600, + "bmi_time_index": 1, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T01:00:00", + "current_output_step": 1, + "current_time": "2013-07-01T01:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "func esmf_regridobj_call_retry finished after 1 attempts.", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_after_update_n1_rank0__step_2.json b/tests/test_data/expected_results/test_expected_config_options_after_update_n1_rank0__step_2.json new file mode 100644 index 00000000..443ae3eb --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_after_update_n1_rank0__step_2.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 7200, + "bmi_time_index": 2, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T02:00:00", + "current_output_step": 2, + "current_time": "2013-07-01T02:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "func esmf_regridobj_call_retry finished after 1 attempts.", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_after_update_n1_rank0__step_3.json b/tests/test_data/expected_results/test_expected_config_options_after_update_n1_rank0__step_3.json new file mode 100644 index 00000000..df132555 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_after_update_n1_rank0__step_3.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 10800, + "bmi_time_index": 3, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T03:00:00", + "current_output_step": 3, + "current_time": "2013-07-01T03:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "func esmf_regridobj_call_retry finished after 1 attempts.", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank0__step_1.json b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank0__step_1.json new file mode 100644 index 00000000..32071782 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank0__step_1.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 3600, + "bmi_time_index": 1, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T01:00:00", + "current_output_step": 1, + "current_time": "2013-07-01T01:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "func esmf_regridobj_call_retry finished after 1 attempts.", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank0__step_2.json b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank0__step_2.json new file mode 100644 index 00000000..443ae3eb --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank0__step_2.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 7200, + "bmi_time_index": 2, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T02:00:00", + "current_output_step": 2, + "current_time": "2013-07-01T02:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "func esmf_regridobj_call_retry finished after 1 attempts.", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank0__step_3.json b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank0__step_3.json new file mode 100644 index 00000000..df132555 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank0__step_3.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 10800, + "bmi_time_index": 3, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T03:00:00", + "current_output_step": 3, + "current_time": "2013-07-01T03:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "func esmf_regridobj_call_retry finished after 1 attempts.", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank1__step_1.json b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank1__step_1.json new file mode 100644 index 00000000..32071782 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank1__step_1.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 3600, + "bmi_time_index": 1, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T01:00:00", + "current_output_step": 1, + "current_time": "2013-07-01T01:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "func esmf_regridobj_call_retry finished after 1 attempts.", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank1__step_2.json b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank1__step_2.json new file mode 100644 index 00000000..443ae3eb --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank1__step_2.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 7200, + "bmi_time_index": 2, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T02:00:00", + "current_output_step": 2, + "current_time": "2013-07-01T02:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "func esmf_regridobj_call_retry finished after 1 attempts.", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank1__step_3.json b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank1__step_3.json new file mode 100644 index 00000000..df132555 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_after_update_n2_rank1__step_3.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 10800, + "bmi_time_index": 3, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T03:00:00", + "current_output_step": 3, + "current_time": "2013-07-01T03:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "func esmf_regridobj_call_retry finished after 1 attempts.", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_finalize_n1_rank0_.json b/tests/test_data/expected_results/test_expected_config_options_finalize_n1_rank0_.json new file mode 100644 index 00000000..6984d1b8 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_finalize_n1_rank0_.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 10800, + "bmi_time_index": 3, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T03:00:00", + "current_output_step": 3, + "current_time": "2013-07-01T03:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "Starting BMI finalize()", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_finalize_n2_rank0_.json b/tests/test_data/expected_results/test_expected_config_options_finalize_n2_rank0_.json new file mode 100644 index 00000000..6984d1b8 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_finalize_n2_rank0_.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 10800, + "bmi_time_index": 3, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T03:00:00", + "current_output_step": 3, + "current_time": "2013-07-01T03:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "Starting BMI finalize()", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_finalize_n2_rank1_.json b/tests/test_data/expected_results/test_expected_config_options_finalize_n2_rank1_.json new file mode 100644 index 00000000..6984d1b8 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_finalize_n2_rank1_.json @@ -0,0 +1,349 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": { + "attrs": {}, + "coords": { + "spatial_ref": { + "attrs": { + "crs_wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]", + "geographic_crs_name": "WGS 84", + "grid_mapping_name": "latitude_longitude", + "horizontal_datum_name": "World Geodetic System 1984", + "inverse_flattening": 298.257223563, + "longitude_of_prime_meridian": 0.0, + "prime_meridian_name": "Greenwich", + "reference_ellipsoid_name": "WGS 84", + "semi_major_axis": 6378137.0, + "semi_minor_axis": 6356752.314245179, + "spatial_ref": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]" + }, + "data": 0, + "dims": [] + }, + "time": { + "attrs": { + "long_name": "verification time generated by wgrib2 function verftime()", + "reference_date": "2013.01.01 00:00:00 UTC", + "reference_time": 1356998400.0, + "reference_time_description": "kind of product unclear, reference date is variable, min found reference date is given", + "reference_time_type": 0, + "time_step": 0.0, + "time_step_setting": "auto" + }, + "data": "ERR_NOT_JSON_SERIALIZABLE:TYPE:", + "dims": [] + }, + "x": { + "attrs": { + "long_name": "longitude", + "units": "degrees_east" + }, + "data": "hash_-7248319024934117860", + "dims": [ + "x" + ] + }, + "y": { + "attrs": { + "long_name": "latitude", + "units": "degrees_north" + }, + "data": "hash_-6585113156651046999", + "dims": [ + "y" + ] + } + }, + "data_vars": { + "APCP_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Total Precipitation", + "short_name": "APCP_surface", + "units": "kg/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DLWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Long-Wave Rad. Flux", + "short_name": "DLWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "DSWRF_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Downward Short-Wave Rad. Flux", + "short_name": "DSWRF_surface", + "units": "W/m^2" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "PRES_surface": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "surface", + "long_name": "Pressure", + "short_name": "PRES_surface", + "units": "Pa" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "SPFH_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Specific Humidity", + "short_name": "SPFH_2maboveground", + "units": "kg/kg" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "TMP_2maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "2 m above ground", + "long_name": "Temperature", + "short_name": "TMP_2maboveground", + "units": "K" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "UGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "U-Component of Wind", + "short_name": "UGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + }, + "VGRD_10maboveground": { + "attrs": { + "AORC_Contact": "aorc.info@noaa.gov", + "aorc_version": "v1.1", + "crs": "EPSG:4326", + "level": "10 m above ground", + "long_name": "V-Component of Wind", + "short_name": "VGRD_10maboveground", + "units": "m/s" + }, + "data": null, + "dims": [ + "y", + "x" + ] + } + }, + "dims": { + "x": 14, + "y": 28 + } + }, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": 10800, + "bmi_time_index": 3, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "currentCustomForceNum": 0, + "currentForceNum": 1, + "current_fcst_cycle": "2013-07-01T00:00:00", + "current_output_date": "2013-07-01T03:00:00", + "current_output_step": 3, + "current_time": "2013-07-01T03:00:00", + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": "2013-07-01T00:00:00", + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": "2013-07-01T00:00:00", + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": "Starting BMI finalize()", + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_init_n1_rank0_.json b/tests/test_data/expected_results/test_expected_config_options_init_n1_rank0_.json new file mode 100644 index 00000000..08d6d9a0 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_init_n1_rank0_.json @@ -0,0 +1,159 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": null, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": null, + "bmi_time_index": 0, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "current_fcst_cycle": null, + "current_output_date": null, + "current_output_step": null, + "current_time": null, + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": null, + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": null, + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": null, + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_init_n2_rank0_.json b/tests/test_data/expected_results/test_expected_config_options_init_n2_rank0_.json new file mode 100644 index 00000000..08d6d9a0 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_init_n2_rank0_.json @@ -0,0 +1,159 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": null, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": null, + "bmi_time_index": 0, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "current_fcst_cycle": null, + "current_output_date": null, + "current_output_step": null, + "current_time": null, + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": null, + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": null, + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": null, + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_config_options_init_n2_rank1_.json b/tests/test_data/expected_results/test_expected_config_options_init_n2_rank1_.json new file mode 100644 index 00000000..08d6d9a0 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_config_options_init_n2_rank1_.json @@ -0,0 +1,159 @@ +{ + "ExactExtract": null, + "actual_output_steps": 71, + "ana_flag": 0, + "aorc_alaska_source": "s3://ngwpc-data/AORC/Alaska", + "aorc_alaska_url": "{source}/{year}/{year}{month:02d}/AK_AORC-OWP_{date}.nc4", + "aorc_conus_source": "s3://noaa-nws-aorc-v1-1-1km", + "aorc_conus_year_url": "{source}/{year}.zarr", + "aws": true, + "aws_obj": null, + "aws_time": null, + "b_date_proc": "2013-07-01T00:00:00", + "bmi_time": null, + "bmi_time_index": 0, + "cfsv2EnsMember": null, + "config_path": null, + "cosalpha_var": null, + "current_fcst_cycle": null, + "current_output_date": null, + "current_output_step": null, + "current_time": null, + "customFcstFreq": [], + "customSuppPcpFreq": null, + "cycle_length_minutes": 4260, + "dScaleParamDirs": [ + "/ngen-app/data" + ], + "e_date_proc": null, + "elemconn_var": "elementConn", + "elemcoords_var": "centerCoords", + "element_id_var": "element_id", + "errFlag": 0, + "errMsg": null, + "fcst_freq": 60, + "fcst_input_horizons": [ + 4260 + ], + "fcst_input_offsets": [ + 0 + ], + "fcst_shift": 0, + "first_fcst_cycle": null, + "forceTemoralInterp": [ + 0 + ], + "forcing_output": 0, + "future_time": null, + "geopackage": "/workspaces/nwm-rte/src/ngen-forcing/tests/test_data/gpkg/gauge_01123000.gpkg", + "globalNdv": -9999.0, + "grid_meta": null, + "grid_type": "hydrofabric", + "hgt_elem_var": null, + "hgt_var": null, + "ignored_border_widths": [ + 0 + ], + "include_lqfrac": 1, + "input_force_dirs": [ + "s3://null" + ], + "input_force_mandatory": [ + 0 + ], + "input_force_types": [ + "GRIB2" + ], + "input_forcings": [ + 12 + ], + "lat_var": null, + "logFile": null, + "logHandle": null, + "lon_var": null, + "look_back": -9999, + "lwBiasCorrectOpt": [ + 0 + ], + "nFcsts": 1, + "nodecoords_var": "nodeCoords", + "num_output_steps": 71, + "num_supp_output_steps": null, + "number_custom_inputs": 0, + "number_inputs": 1, + "number_supp_pcp": 0, + "numelemconn_var": "numElementConn", + "nwmConfig": "AORC", + "nwmVersion": 4.0, + "nwm_domain": null, + "nwm_geogrid": null, + "nwm_source": "s3://noaa-nwm-retrospective-3-0-pds", + "nwm_url": null, + "output_freq": 60, + "paramFlagArray": null, + "precipBiasCorrectOpt": [ + 0 + ], + "precipDownscaleOpt": [ + 0 + ], + "precip_only_flag": false, + "prev_output_date": null, + "process_window": null, + "psfcBiasCorrectOpt": [ + 0 + ], + "psfcDownscaleOpt": [ + 0 + ], + "q2BiasCorrectOpt": [ + 0 + ], + "q2dDownscaleOpt": [ + 0 + ], + "realtime_flag": false, + "refcst_flag": true, + "regrid_opt": [ + 1 + ], + "regrid_opt_supp_pcp": null, + "rqiMethod": null, + "rqiThresh": 1.0, + "runCfsNldasBiasCorrect": false, + "sinalpha_var": null, + "slope_azimuth_var": null, + "slope_azimuth_var_elem": null, + "slope_var": null, + "slope_var_elem": null, + "spatial_meta": null, + "statusMsg": null, + "sub_output_freq": null, + "sub_output_hour": null, + "suppTemporalInterp": null, + "supp_pcp_max_hours": null, + "supp_precip_dirs": null, + "supp_precip_file_types": [], + "supp_precip_forcings": [], + "supp_precip_mandatory": null, + "supp_precip_param_dir": null, + "swBiasCorrectOpt": [ + 0 + ], + "swDownscaleOpt": [ + 0 + ], + "t2BiasCorrectOpt": [ + 0 + ], + "t2dDownscaleOpt": [ + 0 + ], + "useCompression": 0, + "useFloats": 0, + "use_data_at_current_time": true, + "weightsDir": null, + "windBiasCorrect": [ + 0 + ] +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_1.json b/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_1.json index dc6b5caf..12611f40 100644 --- a/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_1.json +++ b/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_1.json @@ -22,6 +22,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -75,8 +106,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": "hash_4066407811557226096", "latitude_grid": [ @@ -119,12 +258,24 @@ "ny_global_elem": null, "ny_local": 7, "ny_local_elem": null, + "pet_element_inds": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_2.json b/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_2.json index dc6b5caf..12611f40 100644 --- a/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_2.json +++ b/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_2.json @@ -22,6 +22,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -75,8 +106,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": "hash_4066407811557226096", "latitude_grid": [ @@ -119,12 +258,24 @@ "ny_global_elem": null, "ny_local": 7, "ny_local_elem": null, + "pet_element_inds": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_3.json b/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_3.json index dc6b5caf..12611f40 100644 --- a/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_3.json +++ b/tests/test_data/expected_results/test_expected_geomod_after_update_n1_rank0__step_3.json @@ -22,6 +22,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -75,8 +106,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": "hash_4066407811557226096", "latitude_grid": [ @@ -119,12 +258,24 @@ "ny_global_elem": null, "ny_local": 7, "ny_local_elem": null, + "pet_element_inds": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_1.json b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_1.json index 2acf30ba..f185cbfb 100644 --- a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_1.json +++ b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_1.json @@ -19,6 +19,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -66,8 +97,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": "hash_4066407811557226096", "latitude_grid": [ @@ -101,12 +240,21 @@ "ny_global_elem": null, "ny_local": 4, "ny_local_elem": null, + "pet_element_inds": [ + 0, + 1, + 2, + 3 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_2.json b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_2.json index 2acf30ba..f185cbfb 100644 --- a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_2.json +++ b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_2.json @@ -19,6 +19,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -66,8 +97,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": "hash_4066407811557226096", "latitude_grid": [ @@ -101,12 +240,21 @@ "ny_global_elem": null, "ny_local": 4, "ny_local_elem": null, + "pet_element_inds": [ + 0, + 1, + 2, + 3 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_3.json b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_3.json index 2acf30ba..f185cbfb 100644 --- a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_3.json +++ b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank0__step_3.json @@ -19,6 +19,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -66,8 +97,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": "hash_4066407811557226096", "latitude_grid": [ @@ -101,12 +240,21 @@ "ny_global_elem": null, "ny_local": 4, "ny_local_elem": null, + "pet_element_inds": [ + 0, + 1, + 2, + 3 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_1.json b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_1.json index a3f11c93..2721b2c7 100644 --- a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_1.json +++ b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_1.json @@ -18,6 +18,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -63,8 +94,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": null, "latitude_grid": [ @@ -95,12 +234,20 @@ "ny_global_elem": null, "ny_local": 3, "ny_local_elem": null, + "pet_element_inds": [ + 4, + 5, + 6 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_2.json b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_2.json index a3f11c93..2721b2c7 100644 --- a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_2.json +++ b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_2.json @@ -18,6 +18,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -63,8 +94,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": null, "latitude_grid": [ @@ -95,12 +234,20 @@ "ny_global_elem": null, "ny_local": 3, "ny_local_elem": null, + "pet_element_inds": [ + 4, + 5, + 6 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_3.json b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_3.json index a3f11c93..2721b2c7 100644 --- a/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_3.json +++ b/tests/test_data/expected_results/test_expected_geomod_after_update_n2_rank1__step_3.json @@ -18,6 +18,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -63,8 +94,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": null, "latitude_grid": [ @@ -95,12 +234,20 @@ "ny_global_elem": null, "ny_local": 3, "ny_local_elem": null, + "pet_element_inds": [ + 4, + 5, + 6 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_finalize_n1_rank0_.json b/tests/test_data/expected_results/test_expected_geomod_finalize_n1_rank0_.json index dc6b5caf..12611f40 100644 --- a/tests/test_data/expected_results/test_expected_geomod_finalize_n1_rank0_.json +++ b/tests/test_data/expected_results/test_expected_geomod_finalize_n1_rank0_.json @@ -22,6 +22,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -75,8 +106,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": "hash_4066407811557226096", "latitude_grid": [ @@ -119,12 +258,24 @@ "ny_global_elem": null, "ny_local": 7, "ny_local_elem": null, + "pet_element_inds": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_finalize_n2_rank0_.json b/tests/test_data/expected_results/test_expected_geomod_finalize_n2_rank0_.json index 2acf30ba..f185cbfb 100644 --- a/tests/test_data/expected_results/test_expected_geomod_finalize_n2_rank0_.json +++ b/tests/test_data/expected_results/test_expected_geomod_finalize_n2_rank0_.json @@ -19,6 +19,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -66,8 +97,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": "hash_4066407811557226096", "latitude_grid": [ @@ -101,12 +240,21 @@ "ny_global_elem": null, "ny_local": 4, "ny_local_elem": null, + "pet_element_inds": [ + 0, + 1, + 2, + 3 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_finalize_n2_rank1_.json b/tests/test_data/expected_results/test_expected_geomod_finalize_n2_rank1_.json index a3f11c93..2721b2c7 100644 --- a/tests/test_data/expected_results/test_expected_geomod_finalize_n2_rank1_.json +++ b/tests/test_data/expected_results/test_expected_geomod_finalize_n2_rank1_.json @@ -18,6 +18,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -63,8 +94,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": null, "latitude_grid": [ @@ -95,12 +234,20 @@ "ny_global_elem": null, "ny_local": 3, "ny_local_elem": null, + "pet_element_inds": [ + 4, + 5, + 6 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_init_n1_rank0_.json b/tests/test_data/expected_results/test_expected_geomod_init_n1_rank0_.json index dc6b5caf..12611f40 100644 --- a/tests/test_data/expected_results/test_expected_geomod_init_n1_rank0_.json +++ b/tests/test_data/expected_results/test_expected_geomod_init_n1_rank0_.json @@ -22,6 +22,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -75,8 +106,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": "hash_4066407811557226096", "latitude_grid": [ @@ -119,12 +258,24 @@ "ny_global_elem": null, "ny_local": 7, "ny_local_elem": null, + "pet_element_inds": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_init_n2_rank0_.json b/tests/test_data/expected_results/test_expected_geomod_init_n2_rank0_.json index 2acf30ba..f185cbfb 100644 --- a/tests/test_data/expected_results/test_expected_geomod_init_n2_rank0_.json +++ b/tests/test_data/expected_results/test_expected_geomod_init_n2_rank0_.json @@ -19,6 +19,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -66,8 +97,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": "hash_4066407811557226096", "latitude_grid": [ @@ -101,12 +240,21 @@ "ny_global_elem": null, "ny_local": 4, "ny_local_elem": null, + "pet_element_inds": [ + 0, + 1, + 2, + 3 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_geomod_init_n2_rank1_.json b/tests/test_data/expected_results/test_expected_geomod_init_n2_rank1_.json index a3f11c93..2721b2c7 100644 --- a/tests/test_data/expected_results/test_expected_geomod_init_n2_rank1_.json +++ b/tests/test_data/expected_results/test_expected_geomod_init_n2_rank1_.json @@ -18,6 +18,37 @@ 11475, 11476 ], + "elementcoords_global": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "esmf_ds": null, "esmf_grid": { "_area": [ null, @@ -63,8 +94,116 @@ }, "esmf_lat": null, "esmf_lon": null, + "geogrid_ds": { + "attrs": { + "gridType": "unstructured", + "version": "0.9" + }, + "coords": {}, + "data_vars": { + "centerCoords": { + "attrs": { + "units": "degrees" + }, + "data": [ + [ + -72.04918711744217, + 41.824530105139985 + ], + [ + -72.0498876679477, + 41.79153684369973 + ], + [ + -72.05118870198277, + 41.739617787523294 + ], + [ + -72.04754380872834, + 41.68903878715741 + ], + [ + -72.0554434265969, + 41.66453348086255 + ], + [ + -72.03341338948294, + 41.721705460500516 + ], + [ + -72.07444419922648, + 41.77940007526497 + ] + ], + "dims": [ + "elementCount", + "coordDim" + ] + }, + "elementConn": { + "attrs": { + "long_name": "Node Indices that define the element connectivity" + }, + "data": "hash_-5156445445542653928", + "dims": [ + "connectionCount" + ] + }, + "element_id": { + "attrs": { + "long_name": "Catchment ID for hydrofabric" + }, + "data": [ + 11466, + 11467, + 11468, + 11469, + 11470, + 11475, + 11476 + ], + "dims": [ + "elementCount" + ] + }, + "nodeCoords": { + "attrs": { + "units": "degrees" + }, + "data": null, + "dims": [ + "nodeCount", + "coordDim" + ] + }, + "numElementConn": { + "attrs": { + "long_name": "Number of nodes per element" + }, + "data": [ + 102, + 185, + 130, + 132, + 90, + 113, + 124 + ], + "dims": [ + "elementCount" + ] + } + }, + "dims": { + "connectionCount": 876, + "coordDim": 2, + "elementCount": 7, + "nodeCount": 653 + } + }, "height": null, "height_elem": null, + "heights_global": null, "inds": null, "lat_bounds": null, "latitude_grid": [ @@ -95,12 +234,20 @@ "ny_global_elem": null, "ny_local": 3, "ny_local_elem": null, + "pet_element_inds": [ + 4, + 5, + 6 + ], "sina_grid": null, "slope": null, "slope_elem": null, + "slopes_global": null, "slp_azi": null, "slp_azi_elem": null, + "slp_azi_global": null, "spatial_global_atts": null, + "spatial_metadata_exists": false, "x_coord_atts": null, "x_coords": null, "x_lower_bound": null, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_1.json b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_1.json index 797e0fd1..826ccefb 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_1.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_1.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -278,10 +278,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070101z.grib2", "file_in2": "s3://null/AORC-OWP_2013070101z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 1.100000023841858, @@ -356,13 +357,13 @@ 0.0 ], [ - 7.987401246651457e-44, - 8.127531093083939e-44, - 8.267660939516421e-44, - 8.407790785948902e-44, - 8.547920632381384e-44, - 8.688050478813866e-44, - 8.828180325246348e-44 + NaN, + NaN, + NaN, + NaN, + NaN, + NaN, + NaN ] ], "final_forcings_elem": null, @@ -393,6 +394,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -420,7 +423,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -454,7 +462,6 @@ "ny_local": 28, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -462,11 +469,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -494,6 +500,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 1.100000023841858, @@ -568,13 +575,13 @@ 0.0 ], [ - 1.6255062186167878e-43, - 6.305843089461677e-44, - 6.866362475191604e-44, - 6.866362475191604e-44, - 7.286752014489049e-44, - 7.707141553786494e-44, - 6.726232628759122e-44 + NaN, + NaN, + NaN, + NaN, + NaN, + NaN, + NaN ] ], "regridded_forcings1_elem": null, @@ -652,13 +659,13 @@ 0.0 ], [ - 7.987401246651457e-44, - 8.127531093083939e-44, - 8.267660939516421e-44, - 8.407790785948902e-44, - 8.547920632381384e-44, - 8.688050478813866e-44, - 8.828180325246348e-44 + NaN, + NaN, + NaN, + NaN, + NaN, + NaN, + NaN ] ], "regridded_forcings2_elem": null, @@ -690,8 +697,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -700,12 +707,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_2.json b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_2.json index 6e61a1bf..a164e8a7 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_2.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_2.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -278,10 +278,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070102z.grib2", "file_in2": "s3://null/AORC-OWP_2013070102z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 1.100000023841858, @@ -393,6 +394,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -420,7 +423,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -454,7 +462,6 @@ "ny_local": 28, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -462,11 +469,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -494,6 +500,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 1.100000023841858, @@ -568,13 +575,13 @@ 0.0 ], [ - 7.987401246651457e-44, - 8.127531093083939e-44, - 8.267660939516421e-44, - 8.407790785948902e-44, - 8.547920632381384e-44, - 8.688050478813866e-44, - 8.828180325246348e-44 + NaN, + NaN, + NaN, + NaN, + NaN, + NaN, + NaN ] ], "regridded_forcings1_elem": null, @@ -690,8 +697,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -700,12 +707,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_3.json b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_3.json index 67a6c576..576ad206 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_3.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n1_rank0__step_3.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -278,10 +278,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070103z.grib2", "file_in2": "s3://null/AORC-OWP_2013070103z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 1.0, @@ -393,6 +394,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -420,7 +423,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -454,7 +462,6 @@ "ny_local": 28, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -462,11 +469,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -494,6 +500,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 1.100000023841858, @@ -690,8 +697,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -700,12 +707,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_1.json b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_1.json index 1c3479b5..4d5d2692 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_1.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_1.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -269,10 +269,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070101z.grib2", "file_in2": "s3://null/AORC-OWP_2013070101z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 1.100000023841858, @@ -323,10 +324,10 @@ 0.0 ], [ - 9.18803377088496e-41, - 4.364694391755724e-40, - 0.0, - -6.165852519510108e+34 + NaN, + NaN, + NaN, + NaN ] ], "final_forcings_elem": null, @@ -357,6 +358,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -381,7 +384,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -415,7 +423,6 @@ "ny_local": 14, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -423,11 +430,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -455,6 +461,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 1.100000023841858, @@ -505,10 +512,10 @@ 0.0 ], [ - 9.18915480965642e-41, - 4.350345095481038e-40, - 0.0, - 0.11376953125 + NaN, + NaN, + NaN, + NaN ] ], "regridded_forcings1_elem": null, @@ -562,10 +569,10 @@ 0.0 ], [ - 9.18803377088496e-41, - 4.364694391755724e-40, - 0.0, - -6.165852519510108e+34 + NaN, + NaN, + NaN, + NaN ] ], "regridded_forcings2_elem": null, @@ -591,8 +598,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -601,12 +608,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_2.json b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_2.json index 01ccb117..4c35a31d 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_2.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_2.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -112,7 +112,7 @@ "esmf_field_out": { "_data": [ 99263.83797955123, - 99864.20759754517, + 99864.20759754519, 99984.1178572765, 99951.00373610242 ], @@ -269,10 +269,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070102z.grib2", "file_in2": "s3://null/AORC-OWP_2013070102z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 1.100000023841858, @@ -357,6 +358,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -381,7 +384,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -415,7 +423,6 @@ "ny_local": 14, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -423,11 +430,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -455,6 +461,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 1.100000023841858, @@ -505,10 +512,10 @@ 0.0 ], [ - 9.18803377088496e-41, - 4.364694391755724e-40, - 0.0, - -6.165852519510108e+34 + NaN, + NaN, + NaN, + NaN ] ], "regridded_forcings1_elem": null, @@ -591,8 +598,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -601,12 +608,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_3.json b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_3.json index 9970fd8b..0b68a282 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_3.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank0__step_3.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -111,7 +111,7 @@ "esmf_field_in_elem": null, "esmf_field_out": { "_data": [ - 99363.83797955123, + 99363.83797955124, 99970.04062791045, 100085.72479451672, 100059.85331996171 @@ -269,10 +269,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070103z.grib2", "file_in2": "s3://null/AORC-OWP_2013070103z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 1.0, @@ -357,6 +358,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -381,7 +384,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -415,7 +423,6 @@ "ny_local": 14, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -423,11 +430,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -455,6 +461,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 1.100000023841858, @@ -591,8 +598,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -601,12 +608,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_1.json b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_1.json index 641b95a6..2ee6bc95 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_1.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_1.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -266,10 +266,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070101z.grib2", "file_in2": "s3://null/AORC-OWP_2013070101z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 0.800000011920929, @@ -312,9 +313,9 @@ 0.0 ], [ - 2.5638655642978847e-09, - 0.0, - 0.0 + NaN, + NaN, + NaN ] ], "final_forcings_elem": null, @@ -345,6 +346,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -368,7 +371,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -402,7 +410,6 @@ "ny_local": 14, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -410,11 +417,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -442,6 +448,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 0.800000011920929, @@ -484,9 +491,9 @@ 0.0 ], [ - 2.5638655642978847e-09, - 0.0, - 0.0 + NaN, + NaN, + NaN ] ], "regridded_forcings1_elem": null, @@ -532,9 +539,9 @@ 0.0 ], [ - 2.5638655642978847e-09, - 0.0, - 0.0 + NaN, + NaN, + NaN ] ], "regridded_forcings2_elem": null, @@ -558,8 +565,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -568,12 +575,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_2.json b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_2.json index 3b3d7d69..72f41e1c 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_2.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_2.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -113,7 +113,7 @@ "_data": [ 100253.86506548879, 99872.71103274089, - 99065.63984167963 + 99065.63984167964 ], "_finalized": false, "_grid": { @@ -266,10 +266,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070102z.grib2", "file_in2": "s3://null/AORC-OWP_2013070102z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 0.699999988079071, @@ -345,6 +346,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -368,7 +371,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -402,7 +410,6 @@ "ny_local": 14, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -410,11 +417,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -442,6 +448,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 0.800000011920929, @@ -484,9 +491,9 @@ 0.0 ], [ - 2.5638655642978847e-09, - 0.0, - 0.0 + NaN, + NaN, + NaN ] ], "regridded_forcings1_elem": null, @@ -558,8 +565,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -568,12 +575,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_3.json b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_3.json index 094eaadb..d82d176a 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_3.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_after_update_n2_rank1__step_3.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -266,10 +266,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070103z.grib2", "file_in2": "s3://null/AORC-OWP_2013070103z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 0.6000000238418579, @@ -345,6 +346,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -368,7 +371,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -402,7 +410,6 @@ "ny_local": 14, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -410,11 +417,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -442,6 +448,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 0.800000011920929, @@ -484,9 +491,9 @@ 0.0 ], [ - 2.5638655642978847e-09, - 0.0, - 0.0 + NaN, + NaN, + NaN ] ], "regridded_forcings1_elem": null, @@ -558,8 +565,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -568,12 +575,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_finalize_n1_rank0_.json b/tests/test_data/expected_results/test_expected_input_forcing_finalize_n1_rank0_.json index 67a6c576..576ad206 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_finalize_n1_rank0_.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_finalize_n1_rank0_.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -278,10 +278,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070103z.grib2", "file_in2": "s3://null/AORC-OWP_2013070103z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 1.0, @@ -393,6 +394,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -420,7 +423,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -454,7 +462,6 @@ "ny_local": 28, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -462,11 +469,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -494,6 +500,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 1.100000023841858, @@ -690,8 +697,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -700,12 +707,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_finalize_n2_rank0_.json b/tests/test_data/expected_results/test_expected_input_forcing_finalize_n2_rank0_.json index 9970fd8b..0b68a282 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_finalize_n2_rank0_.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_finalize_n2_rank0_.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -111,7 +111,7 @@ "esmf_field_in_elem": null, "esmf_field_out": { "_data": [ - 99363.83797955123, + 99363.83797955124, 99970.04062791045, 100085.72479451672, 100059.85331996171 @@ -269,10 +269,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070103z.grib2", "file_in2": "s3://null/AORC-OWP_2013070103z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 1.0, @@ -357,6 +358,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -381,7 +384,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -415,7 +423,6 @@ "ny_local": 14, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -423,11 +430,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -455,6 +461,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 1.100000023841858, @@ -591,8 +598,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -601,12 +608,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_finalize_n2_rank1_.json b/tests/test_data/expected_results/test_expected_input_forcing_finalize_n2_rank1_.json index 094eaadb..d82d176a 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_finalize_n2_rank1_.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_finalize_n2_rank1_.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": { "_data": null, "_finalized": false, @@ -266,10 +266,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": "s3://null/AORC-OWP_2013070103z.grib2", "file_in2": "s3://null/AORC-OWP_2013070103z.grib2", - "file_type": "GRIB2", "final_forcings": [ [ 0.6000000238418579, @@ -345,6 +346,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -368,7 +371,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -402,7 +410,6 @@ "ny_local": 14, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -410,11 +417,10 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -442,6 +448,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": [ [ 0.800000011920929, @@ -484,9 +491,9 @@ 0.0 ], [ - 2.5638655642978847e-09, - 0.0, - 0.0 + NaN, + NaN, + NaN ] ], "regridded_forcings1_elem": null, @@ -558,8 +565,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -568,12 +575,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": 0, "x_lower_bound_corner": null, "x_upper_bound": 14, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_init_n1_rank0_.json b/tests/test_data/expected_results/test_expected_input_forcing_init_n1_rank0_.json index 238cfa4c..4cb92980 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_init_n1_rank0_.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_init_n1_rank0_.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": null, "esmf_field_in_elem": null, "esmf_field_out": null, @@ -16,10 +16,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": null, "file_in2": null, - "file_type": "GRIB2", "final_forcings": [ [ NaN, @@ -131,6 +132,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -158,7 +161,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -192,7 +200,6 @@ "ny_local": null, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -200,12 +207,11 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj": null, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -233,6 +239,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": null, "regridded_forcings1_elem": null, "regridded_forcings2": null, @@ -265,8 +272,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -275,12 +282,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": null, "x_lower_bound_corner": null, "x_upper_bound": null, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_init_n2_rank0_.json b/tests/test_data/expected_results/test_expected_input_forcing_init_n2_rank0_.json index 302e1df0..1cbbe391 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_init_n2_rank0_.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_init_n2_rank0_.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": null, "esmf_field_in_elem": null, "esmf_field_out": null, @@ -16,10 +16,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": null, "file_in2": null, - "file_type": "GRIB2", "final_forcings": [ [ NaN, @@ -104,6 +105,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -128,7 +131,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -162,7 +170,6 @@ "ny_local": null, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -170,12 +177,11 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj": null, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -203,6 +209,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": null, "regridded_forcings1_elem": null, "regridded_forcings2": null, @@ -229,8 +236,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -239,12 +246,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": null, "x_lower_bound_corner": null, "x_upper_bound": null, diff --git a/tests/test_data/expected_results/test_expected_input_forcing_init_n2_rank1_.json b/tests/test_data/expected_results/test_expected_input_forcing_init_n2_rank1_.json index db9a46a1..de6ce9a6 100644 --- a/tests/test_data/expected_results/test_expected_input_forcing_init_n2_rank1_.json +++ b/tests/test_data/expected_results/test_expected_input_forcing_init_n2_rank1_.json @@ -1,9 +1,9 @@ { - "border": 0, "coarse_input_forcings1": null, "coarse_input_forcings2": null, + "custom_count": 0, "cycle_freq": -9999, - "enforce": 0, + "dScaleParamDirs": "/ngen-app/data", "esmf_field_in": null, "esmf_field_in_elem": null, "esmf_field_out": null, @@ -16,10 +16,11 @@ "fcst_date2": null, "fcst_hour1": null, "fcst_hour2": null, + "fcst_input_horizons": 4260, + "fcst_input_offsets": 0, "file_ext": ".grib2", "file_in1": null, "file_in2": null, - "file_type": "GRIB2", "final_forcings": [ [ NaN, @@ -95,6 +96,8 @@ "8": "find_hourly_wrf_arw_neighbors", "9": "find_gfs_neighbors" }, + "forceTemoralInterp": 0, + "force_count": 9, "forecast_horizons": null, "globalPcpRate1": null, "globalPcpRate1_elem": null, @@ -118,7 +121,12 @@ NaN ], "height_elem": null, - "inDir": "s3://null", + "idx": 0, + "ignored_border_widths": 0, + "input_force_dirs": "s3://null", + "input_force_mandatory": 0, + "input_force_types": "GRIB2", + "input_forcings": 12, "input_map_output": [ 4, 5, @@ -152,7 +160,6 @@ "ny_local": null, "ny_local_corner": null, "outFreq": null, - "paramDir": "/ngen-app/data", "precipBiasCorrectOpt": 0, "precipDownscaleOpt": 0, "product_name": "AORC", @@ -160,12 +167,11 @@ "psfcDownscaleOpt": 0, "psfcTmp": null, "psfcTmp_elem": null, - "q2dBiasCorrectOpt": 0, + "q2BiasCorrectOpt": 0, "q2dDownscaleOpt": 0, "regridComplete": false, "regridObj": null, "regridObj_elem": null, - "regridOpt": 1, "regrid_map": { "1": "regrid_conus_rap", "10": "regrid_custom_hourly_netcdf", @@ -193,6 +199,7 @@ "8": "regrid_hourly_wrf_arw", "9": "regrid_gfs" }, + "regrid_opt": 1, "regridded_forcings1": null, "regridded_forcings1_elem": null, "regridded_forcings2": null, @@ -217,8 +224,8 @@ "rstFlag": 0, "skip": false, "swBiasCorrectOpt": 0, - "swDowscaleOpt": 0, - "t2dBiasCorrectOpt": 0, + "swDownscaleOpt": 0, + "t2BiasCorrectOpt": 0, "t2dDownscaleOpt": 0, "t2dTmp": null, "t2dTmp_elem": null, @@ -227,12 +234,9 @@ "1": "nearest_neighbor", "2": "weighted_average" }, - "timeInterpOpt": 0, "tmpFile": null, "tmpFileHeight": null, - "userCycleOffset": 0, - "userFcstHorizon": 4260, - "windBiasCorrectOpt": 0, + "windBiasCorrect": 0, "x_lower_bound": null, "x_lower_bound_corner": null, "x_upper_bound": null, diff --git a/tests/test_data/expected_results/test_expected_supp_precip_after_update_n1_rank0__step_1.json b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n1_rank0__step_1.json new file mode 100644 index 00000000..d63276f2 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n1_rank0__step_1.json @@ -0,0 +1,397 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 225, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 0, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 225, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.014528336122961009, + 0.12875606365276365, + 0.5080000162124634, + 0.2705844906322781, + 0.0, + 0.0, + 0.0, + 0.08568306245137822, + 0.06162601396190727 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_5956666910370932842", + "hash_398372956991710115" + ], + [ + [ + -66.60592401826192, + -66.56229876343377, + -66.58445759390953, + -66.59020754572474, + -66.58040387800175, + -66.61924544175804, + -66.61432182496434, + -66.54970733920212, + -66.54733995904326 + ], + [ + 18.28181486086812, + 18.270309542806565, + 18.3195853360751, + 18.300628771128547, + 18.271599906172842, + 18.27608475709033, + 18.257676718849797, + 18.292360723661034, + 18.24764748674116 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 3079, + 9 + ], + "_size_owned": [ + 3079, + 9 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 9 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 225, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T00:00:00", + "fcst_date2": "2025-07-10T01:00:00", + "fcst_hour1": 0, + "fcst_hour2": 1, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f001.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f001.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0, + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 225, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0, + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0, + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 0, + "y_upper_bound": 225 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_after_update_n1_rank0__step_2.json b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n1_rank0__step_2.json new file mode 100644 index 00000000..5a2b11f5 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n1_rank0__step_2.json @@ -0,0 +1,397 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 225, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 0, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 225, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.16467297020824123, + 0.0, + 0.0, + 0.0, + 0.1254085057251157, + 0.2540000081062317, + 0.2540000081062317, + 0.0, + 0.2540000081062317 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_5956666910370932842", + "hash_398372956991710115" + ], + [ + [ + -66.60592401826192, + -66.56229876343377, + -66.58445759390953, + -66.59020754572474, + -66.58040387800175, + -66.61924544175804, + -66.61432182496434, + -66.54970733920212, + -66.54733995904326 + ], + [ + 18.28181486086812, + 18.270309542806565, + 18.3195853360751, + 18.300628771128547, + 18.271599906172842, + 18.27608475709033, + 18.257676718849797, + 18.292360723661034, + 18.24764748674116 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 3079, + 9 + ], + "_size_owned": [ + 3079, + 9 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 9 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 225, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T01:00:00", + "fcst_date2": "2025-07-10T02:00:00", + "fcst_hour1": 1, + "fcst_hour2": 2, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f002.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f001.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 4.574249032884836e-05, + 0.0, + 0.0, + 0.0, + 3.4835695259971544e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 0.0, + 7.055555761326104e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 225, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0, + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 4.574249032884836e-05, + 0.0, + 0.0, + 0.0, + 3.4835695259971544e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 0.0, + 7.055555761326104e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 0, + "y_upper_bound": 225 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_after_update_n1_rank0__step_3.json b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n1_rank0__step_3.json new file mode 100644 index 00000000..381971c4 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n1_rank0__step_3.json @@ -0,0 +1,397 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 225, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 0, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 225, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317, + 0.18961624786774367, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_5956666910370932842", + "hash_398372956991710115" + ], + [ + [ + -66.60592401826192, + -66.56229876343377, + -66.58445759390953, + -66.59020754572474, + -66.58040387800175, + -66.61924544175804, + -66.61432182496434, + -66.54970733920212, + -66.54733995904326 + ], + [ + 18.28181486086812, + 18.270309542806565, + 18.3195853360751, + 18.300628771128547, + 18.271599906172842, + 18.27608475709033, + 18.257676718849797, + 18.292360723661034, + 18.24764748674116 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 3079, + 9 + ], + "_size_owned": [ + 3079, + 9 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 9 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 225, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T02:00:00", + "fcst_date2": "2025-07-10T03:00:00", + "fcst_hour1": 2, + "fcst_hour2": 3, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f003.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f002.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 5.267118103802204e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 225, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0, + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 5.267118103802204e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 0, + "y_upper_bound": 225 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank0__step_1.json b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank0__step_1.json new file mode 100644 index 00000000..1a401f17 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank0__step_1.json @@ -0,0 +1,361 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 113, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 113, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 0, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 113, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.014528336122961009, + 0.12875606365276365, + 0.5080000162124634, + 0.2705844906322781, + 0.0 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_-8764384264248681935", + "hash_-8047490021897303354" + ], + [ + [ + -66.60592401826192, + -66.56229876343377, + -66.58445759390953, + -66.59020754572474, + -66.58040387800175 + ], + [ + 18.28181486086812, + 18.270309542806565, + 18.3195853360751, + 18.300628771128547, + 18.271599906172842 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 2594, + 5 + ], + "_size_owned": [ + 2594, + 5 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 5 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 113, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 113, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T00:00:00", + "fcst_date2": "2025-07-10T01:00:00", + "fcst_hour1": 0, + "fcst_hour2": 1, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f001.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f001.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 113, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 0, + "y_upper_bound": 113 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank0__step_2.json b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank0__step_2.json new file mode 100644 index 00000000..c7ce1a8f --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank0__step_2.json @@ -0,0 +1,361 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 113, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 113, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 0, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 113, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.16467297020824123, + 0.0, + 0.0, + 0.0, + 0.1254085057251157 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_-8764384264248681935", + "hash_-8047490021897303354" + ], + [ + [ + -66.60592401826192, + -66.56229876343377, + -66.58445759390953, + -66.59020754572474, + -66.58040387800175 + ], + [ + 18.28181486086812, + 18.270309542806565, + 18.3195853360751, + 18.300628771128547, + 18.271599906172842 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 2594, + 5 + ], + "_size_owned": [ + 2594, + 5 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 5 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 113, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 113, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T01:00:00", + "fcst_date2": "2025-07-10T02:00:00", + "fcst_hour1": 1, + "fcst_hour2": 2, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f002.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f001.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 4.574249032884836e-05, + 0.0, + 0.0, + 0.0, + 3.4835695259971544e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 113, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 4.574249032884836e-05, + 0.0, + 0.0, + 0.0, + 3.4835695259971544e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 0, + "y_upper_bound": 113 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank0__step_3.json b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank0__step_3.json new file mode 100644 index 00000000..a4e699c8 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank0__step_3.json @@ -0,0 +1,361 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 113, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 113, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 0, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 113, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_-8764384264248681935", + "hash_-8047490021897303354" + ], + [ + [ + -66.60592401826192, + -66.56229876343377, + -66.58445759390953, + -66.59020754572474, + -66.58040387800175 + ], + [ + 18.28181486086812, + 18.270309542806565, + 18.3195853360751, + 18.300628771128547, + 18.271599906172842 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 2594, + 5 + ], + "_size_owned": [ + 2594, + 5 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 5 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 113, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 113, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T02:00:00", + "fcst_date2": "2025-07-10T03:00:00", + "fcst_hour1": 2, + "fcst_hour2": 3, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f003.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f002.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 113, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 0, + "y_upper_bound": 113 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank1__step_1.json b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank1__step_1.json new file mode 100644 index 00000000..ef5684aa --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank1__step_1.json @@ -0,0 +1,352 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 113, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 112, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 113, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 225, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.0, + 0.0, + 0.08568306245137822, + 0.06162601396190727 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_-3785066934698869327", + "hash_44388240431464778" + ], + [ + [ + -66.61924544175804, + -66.61432182496434, + -66.54970733920212, + -66.54733995904326 + ], + [ + 18.27608475709033, + 18.257676718849797, + 18.292360723661034, + 18.24764748674116 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 1000, + 4 + ], + "_size_owned": [ + 485, + 4 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 4 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 113, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 112, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T00:00:00", + "fcst_date2": "2025-07-10T01:00:00", + "fcst_hour1": 0, + "fcst_hour2": 1, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f001.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f001.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 112, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 113, + "y_upper_bound": 225 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank1__step_2.json b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank1__step_2.json new file mode 100644 index 00000000..53c6a5e8 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank1__step_2.json @@ -0,0 +1,352 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 113, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 112, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 113, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 225, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.2540000081062317, + 0.2540000081062317, + 0.0, + 0.2540000081062317 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_-3785066934698869327", + "hash_44388240431464778" + ], + [ + [ + -66.61924544175804, + -66.61432182496434, + -66.54970733920212, + -66.54733995904326 + ], + [ + 18.27608475709033, + 18.257676718849797, + 18.292360723661034, + 18.24764748674116 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 1000, + 4 + ], + "_size_owned": [ + 485, + 4 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 4 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 113, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 112, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T01:00:00", + "fcst_date2": "2025-07-10T02:00:00", + "fcst_hour1": 1, + "fcst_hour2": 2, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f002.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f001.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 7.055555761326104e-05, + 7.055555761326104e-05, + 0.0, + 7.055555761326104e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 112, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 7.055555761326104e-05, + 7.055555761326104e-05, + 0.0, + 7.055555761326104e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 113, + "y_upper_bound": 225 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank1__step_3.json b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank1__step_3.json new file mode 100644 index 00000000..cb4dc5e8 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_after_update_n2_rank1__step_3.json @@ -0,0 +1,352 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 113, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 112, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 113, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 225, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.18961624786774367, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_-3785066934698869327", + "hash_44388240431464778" + ], + [ + [ + -66.61924544175804, + -66.61432182496434, + -66.54970733920212, + -66.54733995904326 + ], + [ + 18.27608475709033, + 18.257676718849797, + 18.292360723661034, + 18.24764748674116 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 1000, + 4 + ], + "_size_owned": [ + 485, + 4 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 4 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 113, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 112, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T02:00:00", + "fcst_date2": "2025-07-10T03:00:00", + "fcst_hour1": 2, + "fcst_hour2": 3, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f003.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f002.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 5.267118103802204e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 112, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 5.267118103802204e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 113, + "y_upper_bound": 225 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_finalize_n1_rank0_.json b/tests/test_data/expected_results/test_expected_supp_precip_finalize_n1_rank0_.json new file mode 100644 index 00000000..381971c4 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_finalize_n1_rank0_.json @@ -0,0 +1,397 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 225, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 0, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 225, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317, + 0.18961624786774367, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_5956666910370932842", + "hash_398372956991710115" + ], + [ + [ + -66.60592401826192, + -66.56229876343377, + -66.58445759390953, + -66.59020754572474, + -66.58040387800175, + -66.61924544175804, + -66.61432182496434, + -66.54970733920212, + -66.54733995904326 + ], + [ + 18.28181486086812, + 18.270309542806565, + 18.3195853360751, + 18.300628771128547, + 18.271599906172842, + 18.27608475709033, + 18.257676718849797, + 18.292360723661034, + 18.24764748674116 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 3079, + 9 + ], + "_size_owned": [ + 3079, + 9 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 9 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 225, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T02:00:00", + "fcst_date2": "2025-07-10T03:00:00", + "fcst_hour1": 2, + "fcst_hour2": 3, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f003.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f002.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 5.267118103802204e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 225, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0, + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 5.267118103802204e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 0, + "y_upper_bound": 225 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_finalize_n2_rank0_.json b/tests/test_data/expected_results/test_expected_supp_precip_finalize_n2_rank0_.json new file mode 100644 index 00000000..a4e699c8 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_finalize_n2_rank0_.json @@ -0,0 +1,361 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 113, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 113, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 0, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 113, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_-8764384264248681935", + "hash_-8047490021897303354" + ], + [ + [ + -66.60592401826192, + -66.56229876343377, + -66.58445759390953, + -66.59020754572474, + -66.58040387800175 + ], + [ + 18.28181486086812, + 18.270309542806565, + 18.3195853360751, + 18.300628771128547, + 18.271599906172842 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 2594, + 5 + ], + "_size_owned": [ + 2594, + 5 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 5 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 0, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 113, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 113, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T02:00:00", + "fcst_date2": "2025-07-10T03:00:00", + "fcst_hour1": 2, + "fcst_hour2": 3, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f003.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f002.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 113, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 4.035648998979013e-06, + 3.576557355700061e-05, + 0.0001411111152265221, + 7.516235928051174e-05, + 0.0 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 0, + "y_upper_bound": 113 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_finalize_n2_rank1_.json b/tests/test_data/expected_results/test_expected_supp_precip_finalize_n2_rank1_.json new file mode 100644 index 00000000..cb4dc5e8 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_finalize_n2_rank1_.json @@ -0,0 +1,352 @@ +{ + "enforce": 1, + "esmf_field_in": { + "_data": null, + "_finalized": false, + "_grid": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 113, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 112, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "_lower_bounds": [ + 113, + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCP_NATIVE", + "_ndbounds": null, + "_rank": 2, + "_staggerloc": 0, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 225, + 339 + ], + "_xd": 0 + }, + "esmf_field_out": { + "_data": [ + 0.18961624786774367, + 0.2540000081062317, + 0.2540000081062317, + 0.2540000081062317 + ], + "_finalized": false, + "_grid": { + "_area": [ + null, + null + ], + "_coord_sys": null, + "_coords": [ + [ + "hash_-3785066934698869327", + "hash_44388240431464778" + ], + [ + [ + -66.61924544175804, + -66.61432182496434, + -66.54970733920212, + -66.54733995904326 + ], + [ + 18.27608475709033, + 18.257676718849797, + 18.292360723661034, + 18.24764748674116 + ] + ] + ], + "_finalized": false, + "_mask": [ + null, + null + ], + "_meta": {}, + "_parametric_dim": 2, + "_rank": 1, + "_size": [ + 1000, + 4 + ], + "_size_owned": [ + 485, + 4 + ], + "_spatial_dim": null, + "_struct": {} + }, + "_lower_bounds": [ + 0 + ], + "_meta": {}, + "_name": "NBM_CORE_PR_APCPSUPP_PCP_REGRIDDED", + "_ndbounds": null, + "_rank": 1, + "_staggerloc": 1, + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + 4 + ], + "_xd": 0 + }, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": { + "_area": [ + null, + null, + null, + null + ], + "_areatype": 6, + "_coord_sys": 1, + "_coords": [ + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ], + [ + null, + null + ] + ], + "_decount": 1, + "_finalized": false, + "_has_corners": false, + "_lower_bounds": [ + [ + 113, + 0 + ], + null, + null, + null + ], + "_mask": [ + null, + null, + null, + null + ], + "_max_index": [ + 225, + 339 + ], + "_meta": {}, + "_ndims": 2, + "_num_peri_dims": 0, + "_ocgis": {}, + "_periodic_dim": null, + "_pole_dim": null, + "_pole_kind": null, + "_rank": 2, + "_size": [ + [ + 112, + 339 + ], + null, + null, + null + ], + "_staggerloc": [ + true, + false, + false, + false + ], + "_struct": {}, + "_type": 6, + "_upper_bounds": [ + [ + 225, + 339 + ], + null, + null, + null + ] + }, + "esmf_lats": null, + "esmf_lons": null, + "fcst_date1": "2025-07-10T02:00:00", + "fcst_date2": "2025-07-10T03:00:00", + "fcst_hour1": 2, + "fcst_hour2": 3, + "file_ext": ".grib2", + "file_in1": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f003.pr.grib2", + "file_in2": "/ngen-app/data/raw_input/NBM_PR/blend.20250710/00/core/blend.t00z.core.f002.pr.grib2", + "file_type": "GRIB2", + "final_supp_precip": [ + 5.267118103802204e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": 60.0, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": 339, + "nx_local": 339, + "ny_global": 225, + "ny_local": 112, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridOpt": 1, + "regridded_mask": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "regridded_mask_elem": null, + "regridded_precip1": [ + 0.0, + 0.0, + 2.3800850613042712e-05, + 1.711833647277672e-05 + ], + "regridded_precip1_elem": null, + "regridded_precip2": [ + 5.267118103802204e-05, + 7.055555761326104e-05, + 7.055555761326104e-05, + 7.055555761326104e-05 + ], + "regridded_precip2_elem": null, + "regridded_rqi1": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi1_elem": null, + "regridded_rqi2": [ + -9999.0, + -9999.0, + -9999.0, + -9999.0 + ], + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": 0, + "x_upper_bound": 339, + "y_lower_bound": 113, + "y_upper_bound": 225 +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_init_n1_rank0_.json b/tests/test_data/expected_results/test_expected_supp_precip_init_n1_rank0_.json new file mode 100644 index 00000000..43a55d40 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_init_n1_rank0_.json @@ -0,0 +1,88 @@ +{ + "enforce": 1, + "esmf_field_in": null, + "esmf_field_out": null, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": null, + "esmf_lats": null, + "esmf_lons": null, + "fcst_hour1": null, + "fcst_hour2": null, + "file_ext": ".grib2", + "file_in1": null, + "file_in2": null, + "file_type": "GRIB2", + "final_supp_precip": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": null, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": null, + "nx_local": null, + "ny_global": null, + "ny_local": null, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridObj": null, + "regridOpt": 1, + "regridded_mask": [ + NaN, + NaN, + NaN, + NaN, + NaN, + NaN, + NaN, + NaN, + NaN + ], + "regridded_mask_elem": null, + "regridded_precip1": null, + "regridded_precip1_elem": null, + "regridded_precip2": null, + "regridded_precip2_elem": null, + "regridded_rqi1": null, + "regridded_rqi1_elem": null, + "regridded_rqi2": null, + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": null, + "x_upper_bound": null, + "y_lower_bound": null, + "y_upper_bound": null +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_init_n2_rank0_.json b/tests/test_data/expected_results/test_expected_supp_precip_init_n2_rank0_.json new file mode 100644 index 00000000..81bc7814 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_init_n2_rank0_.json @@ -0,0 +1,80 @@ +{ + "enforce": 1, + "esmf_field_in": null, + "esmf_field_out": null, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": null, + "esmf_lats": null, + "esmf_lons": null, + "fcst_hour1": null, + "fcst_hour2": null, + "file_ext": ".grib2", + "file_in1": null, + "file_in2": null, + "file_type": "GRIB2", + "final_supp_precip": [ + NaN, + NaN, + NaN, + NaN, + NaN + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": null, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": null, + "nx_local": null, + "ny_global": null, + "ny_local": null, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridObj": null, + "regridOpt": 1, + "regridded_mask": [ + NaN, + NaN, + NaN, + NaN, + NaN + ], + "regridded_mask_elem": null, + "regridded_precip1": null, + "regridded_precip1_elem": null, + "regridded_precip2": null, + "regridded_precip2_elem": null, + "regridded_rqi1": null, + "regridded_rqi1_elem": null, + "regridded_rqi2": null, + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": null, + "x_upper_bound": null, + "y_lower_bound": null, + "y_upper_bound": null +} \ No newline at end of file diff --git a/tests/test_data/expected_results/test_expected_supp_precip_init_n2_rank1_.json b/tests/test_data/expected_results/test_expected_supp_precip_init_n2_rank1_.json new file mode 100644 index 00000000..692c6b33 --- /dev/null +++ b/tests/test_data/expected_results/test_expected_supp_precip_init_n2_rank1_.json @@ -0,0 +1,78 @@ +{ + "enforce": 1, + "esmf_field_in": null, + "esmf_field_out": null, + "esmf_field_out_elem": null, + "esmf_field_out_poly": null, + "esmf_grid_in": null, + "esmf_lats": null, + "esmf_lons": null, + "fcst_hour1": null, + "fcst_hour2": null, + "file_ext": ".grib2", + "file_in1": null, + "file_in2": null, + "file_type": "GRIB2", + "final_supp_precip": [ + NaN, + NaN, + NaN, + NaN + ], + "final_supp_precip_elem": null, + "global_x_lower": null, + "global_x_upper": null, + "global_y_lower": null, + "global_y_upper": null, + "grib_levels": [ + "BLAH" + ], + "grib_vars": null, + "has_cache": false, + "inDir": "/ngen-app/data/raw_input/NBM_PR", + "input_frequency": null, + "keyValue": 15, + "netcdf_var_names": [ + "APCP_surface" + ], + "nx_global": null, + "nx_local": null, + "ny_global": null, + "ny_local": null, + "output_var_idx": 3, + "pcp_date1": null, + "pcp_date2": null, + "pcp_hour1": null, + "pcp_hour2": null, + "product_name": "NBM_CORE_PR_APCP", + "regridComplete": false, + "regridObj": null, + "regridOpt": 1, + "regridded_mask": [ + NaN, + NaN, + NaN, + NaN + ], + "regridded_mask_elem": null, + "regridded_precip1": null, + "regridded_precip1_elem": null, + "regridded_precip2": null, + "regridded_precip2_elem": null, + "regridded_rqi1": null, + "regridded_rqi1_elem": null, + "regridded_rqi2": null, + "regridded_rqi2_elem": null, + "rqiMethod": 0, + "rqiThresh": 1.0, + "rqi_file_in1": null, + "rqi_file_in2": null, + "rqi_netcdf_var_names": null, + "timeInterpOpt": 0, + "tmpFile": null, + "userCycleOffset": 0, + "x_lower_bound": null, + "x_upper_bound": null, + "y_lower_bound": null, + "y_upper_bound": null +} \ No newline at end of file diff --git a/tests/test_data/gpkg/gauge_50027000.gpkg b/tests/test_data/gpkg/gauge_50027000.gpkg new file mode 100644 index 00000000..7a81ba26 Binary files /dev/null and b/tests/test_data/gpkg/gauge_50027000.gpkg differ diff --git a/tests/test_utils.py b/tests/test_utils.py index aaeaee78..f684cc3f 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -8,9 +8,22 @@ from dataclasses import dataclass from datetime import datetime +import test_config_classes # noqa: F401 # Used by test implementations, more convenient to have it in here rather than using more importlib +import test_consts # noqa: F401 # Used by test implementations, more convenient to have it in here rather than using more importlib import xarray as xr +from test_config_classes import ( + TestConfig_AnA, + TestConfig_Base, + TestConfig_BmiModel, + TestConfig_ConfigOptions, + TestConfig_GeoMod, + TestConfig_InputForcing, + TestConfig_Regrid, + TestConfig_SuppPrecip, +) from NextGen_Forcings_Engine_BMI.NextGen_Forcings_Engine.bmi_model import ( + BMIMODEL, NWMv3_Forcing_Engine_BMI_model_Base, ) from NextGen_Forcings_Engine_BMI.NextGen_Forcings_Engine.core.config import ( @@ -31,11 +44,6 @@ serialize_to_json, ) -try: - import esmpy as ESMF -except ImportError: - import ESMF - OS_VAR__CREATE_TEST_EXPECT_DATA = "FORCING_PYTEST_WRITE_TEST_EXPECTED_DATA" @@ -199,39 +207,34 @@ class BMIForcingFixture: For example usage, see: tests/esmf_regrid/test_esmf_regrid.test_regrid. """ - def __init__(self, bmi_model: NWMv3_Forcing_Engine_BMI_model_Base) -> None: + def __init__(self, cfg: TestConfig_Base) -> None: """Initialize BMIForcingFixture.""" - self.bmi_model: NWMv3_Forcing_Engine_BMI_model_Base = bmi_model - self.mpi_config: MpiConfig = bmi_model._mpi_meta - self.config_options: ConfigOptions = bmi_model._job_meta - self.geo_meta: GeoMeta = bmi_model.geo_meta + self.bmi_model: NWMv3_Forcing_Engine_BMI_model_Base = BMIMODEL[cfg.grid_type]() + self.bmi_model.initialize_with_params(config_file=cfg.config_file) + + self.mpi_config: MpiConfig = self.bmi_model._mpi_meta + self.config_options: ConfigOptions = self.bmi_model._job_meta + self.geo_meta: GeoMeta = self.bmi_model.geo_meta self.input_forcing_mod: dict = self.bmi_model._input_forcing_mod + self.supp_precip_mod: dict = self.bmi_model._supp_pcp_mod + + self.keys_to_check = cfg.keys_to_check + self.keys_to_exclude = cfg.keys_to_exclude + self.map_old_to_new_var_names = cfg.map_old_to_new_var_names + self.test_file_name_prefix = cfg.test_file_name_prefix class BMIForcingFixture_Class(BMIForcingFixture): """Test fixture for Class-based tests.""" - def __init__( - self, - bmi_model: NWMv3_Forcing_Engine_BMI_model_Base, - keys_to_check: tuple[str] = (), - keys_to_exclude: tuple[str] = (), - map_old_to_new_var_names: bool = True, - ) -> None: + def __init__(self, cfg: TestConfig_Base) -> None: """Initialize BMIForcingFixture_Class. Args: ---- - bmi_model: The BMI model to be used in the test fixture - keys_to_check: The keys to check - keys_to_exclude: The keys to exclude from the test results json and from equality checks, for example because they contain non-deterministic values or values that are not relevant to the test. - map_old_to_new_var_names: Whether to map old variable names to new variable names in the expected results data, which is needed when updating the test expected outputs dataset but should be false for regular test runs. + cfg: an instance of TestConfig_Base """ - super().__init__(bmi_model=bmi_model) - - self.keys_to_check = keys_to_check - self.keys_to_exclude = keys_to_exclude - self.map_old_to_new_var_names = map_old_to_new_var_names + super().__init__(cfg) self.expected_sub_dir = "test_data/expected_results" self.actual_sub_dir = "test_data/actual_results" @@ -310,6 +313,7 @@ def after_intitialization_check(self) -> None: This is useful for checking the state of the model immediately after initialization, before any updates have occurred. """ + logging.info("Starting after_intitialization_check()...") self.compare(self.deserial_actual("init"), self.deserial_expected("init")) def compare(self, actual: dict, expected: dict) -> None: @@ -341,6 +345,7 @@ def after_bmi_model_update(self, current_output_step: int) -> None: current_output_step: The current output step, which can be used to conditionally run different checks on the first step vs subsequent steps, since the first step behaves differently in some ways. """ + logging.info("Starting after_bmi_model_update()...") self.compare( self.deserial_actual("after_update", f"_step_{current_output_step}"), self.deserial_expected("after_update", f"_step_{current_output_step}"), @@ -348,6 +353,7 @@ def after_bmi_model_update(self, current_output_step: int) -> None: def after_finalize(self) -> None: """Run checks after bmi_model.finalize() has been called.""" + logging.info("Starting after_finalize()...") self.compare( self.deserial_actual("finalize"), self.deserial_expected("finalize") ) @@ -368,105 +374,85 @@ def expected_results_file_path( class BMIForcingFixture_GeoMod(BMIForcingFixture_Class): """Test fixture for GeoMod tests.""" - def __init__( - self, - bmi_model: NWMv3_Forcing_Engine_BMI_model_Base, - keys_to_check: tuple = (), - keys_to_exclude: tuple = (), - ) -> None: + def __init__(self, cfg: TestConfig_GeoMod) -> None: """Initialize BMIForcingFixture_GeoMod. Args: - ---- - bmi_model: the BMI model to be used in the test fixture - keys_to_chek: The keys to check - keys_to_exclude: The keys to exclude from the test results json and from equality checks, for example because they contain non-deterministic values or values that are not relevant to the test. - + cfg: an instance of TestConfig_GeoMod """ - super().__init__( - bmi_model=bmi_model, - keys_to_check=keys_to_check, - keys_to_exclude=keys_to_exclude, - ) + super().__init__(cfg) self.test_class = self.geo_meta - self.test_file_name_prefix = "geomod" + +class BMIForcingFixture_ConfigOptions(BMIForcingFixture_Class): + """Test fixture for ConfigOptions tests.""" + + def __init__(self, cfg: TestConfig_ConfigOptions) -> None: + """Initialize BMIForcingFixture_ConfigOptions. + + Args: + cfg: an instance of TestConfig_ConfigOptions + """ + super().__init__(cfg) + self.test_class = self.config_options class BMIForcingFixture_InputForcing(BMIForcingFixture_Class): """Test fixture for InputForcing tests.""" - def __init__( - self, - bmi_model: NWMv3_Forcing_Engine_BMI_model_Base, - keys_to_check: tuple = (), - keys_to_exclude: tuple = (), - force_key: int = None, - map_old_to_new_var_names: bool = True, - ) -> None: + def __init__(self, cfg: TestConfig_InputForcing) -> None: """Initialize BMIForcingFixture_InputForcing. Args: - ---- - bmi_model: the BMI model to be used in the test fixture - keys_to_chek: The keys to check - keys_to_exclude: The keys to exclude from the test results json and from equality checks, for example because they contain non-deterministic values or values that are not relevant to the test. - force_key: Key for the forcing type - map_old_to_new_var_names: whether to map old variable names to new variable names in the expected results data, which is needed when updating the test expected outputs dataset but should be false for regular test runs. - + cfg: an instance of TestConfig_InputForcing """ - super().__init__( - bmi_model=bmi_model, - keys_to_check=keys_to_check, - keys_to_exclude=keys_to_exclude, - map_old_to_new_var_names=map_old_to_new_var_names, - ) - self.force_key = force_key + super().__init__(cfg) + self.force_key = cfg.force_key self.test_class = self.input_forcing_mod[self.force_key] - self.test_file_name_prefix = "input_forcing" + + +class BMIForcingFixture_SuppPrecip(BMIForcingFixture_Class): + """Test fixture for SuppPrecip tests.""" + + def __init__(self, cfg: TestConfig_SuppPrecip) -> None: + """Initialize BMIForcingFixture_SuppPrecip. + + Args: + cfg: an instance of TestConfig_SuppPrecip + """ + super().__init__(cfg) + self.force_key = cfg.force_key + self.test_class = self.supp_precip_mod[self.force_key] + + +class BMIForcingFixture_AnA(BMIForcingFixture_Class): + """Test fixture for Analysis and Assimilation tests.""" + + def __init__(self, cfg: TestConfig_AnA) -> None: + """Initialize BMIForcingFixture_AnA. + + Args: + cfg: an instance of TestConfig_AnA + """ + super().__init__(cfg) + self.test_class = self.bmi_model._output_obj class BMIForcingFixture_BmiModel(BMIForcingFixture_Class): """Test fixture for BMI model tests.""" - def __init__( - self, - bmi_model: NWMv3_Forcing_Engine_BMI_model_Base, - keys_to_check: tuple = (), - keys_to_exclude: tuple = (), - ) -> None: - """Initialize BMIForcingFixture_BmiModel. + def __init__(self, cfg: TestConfig_BmiModel) -> None: + """Initialize BMIForcingFixture_AnA. Args: - ---- - bmi_model: the BMI model to be used in the test fixture - keys_to_check: The keys to check - keys_to_exclude: The keys to exclude from the test results json and from - equality checks, for example because they contain non-deterministic - values or values that are not relevant to the test. - + cfg: an instance of TestConfig_AnA """ - super().__init__( - bmi_model=bmi_model, - keys_to_check=keys_to_check, - keys_to_exclude=keys_to_exclude, - ) + super().__init__(cfg) self.test_class = self.bmi_model - self.test_file_name_prefix = "bmi_model" - class BMIForcingFixture_Regrid(BMIForcingFixture): - def __init__( - self, - bmi_model: NWMv3_Forcing_Engine_BMI_model_Base, - regrid_func: typing.Callable, - force_key: int, - extra_attrs: tuple[ClassAttrFetcher], - regrid_arrays_to_trim_extra_elements: tuple[str], - keys_to_check: tuple[str], - keys_to_exclude: tuple[str], - ) -> None: + def __init__(self, cfg: TestConfig_Regrid) -> None: """Writers of regrid tests must call the methods in this order. This is enforced by state attributes. self.pre_regrid() @@ -475,28 +461,20 @@ def __init__( self.post_regrid() Args: - ---- - bmi_model: the BMI model to be used in the test fixture - regrid_func: The regrid function that is being tested. - force_key: Should agree with the regrid function being tested, e.g. see ginputfunc.forcing_map - extra_attrs: These are extra attributes to be added to the test results JSON, to supplement the primary InputForcings attributes. - regrid_arrays_to_trim_extra_elements: These are output arrays which can contain extra unused elements which need to be removed during an equality check. - keys_to_check: These are keys to include in the "expected" test results json, and are checked for equality versus "actual" results from regrid operation. - keys_to_exclude: These are keys to exclude from the test results json and from equality checks, for example because they contain non-deterministic values or values that are not relevant to the test. - + cfg: An instance of TestConfig_Regrid """ - super().__init__(bmi_model=bmi_model) + assert isinstance(cfg, TestConfig_Regrid) + super().__init__(cfg) - self.regrid_func = regrid_func - self.regrid_arrays_to_trim_extra_elements = regrid_arrays_to_trim_extra_elements - self.keys_to_check = keys_to_check - self.keys_to_exclude = keys_to_exclude + self.regrid_func = cfg.regrid_func + self.regrid_arrays_to_trim_extra_elements = ( + cfg.regrid_arrays_to_trim_extra_elements + ) + self.force_key = cfg.force_key + self.extra_attrs: tuple[ClassAttrFetcher] = cfg.extra_attrs - self.force_key = force_key self.cull_force_keys_not_used_this_test() - self.extra_attrs: tuple[ClassAttrFetcher] = extra_attrs - self._state = None # Test fixture state used to help ensure things happen in the right order def cull_force_keys_not_used_this_test(self) -> None: @@ -532,9 +510,7 @@ def serialized_file_suffix(self) -> str: def regrid_results_file_name_expect(self) -> str: """File name for expected test results.""" test_dir = os.path.dirname(os.path.abspath(__file__)) - file_basename = ( - f"test_expect_{self.regrid_func.__name__}{self.serialized_file_suffix}.json" - ) + file_basename = f"test_expect_{self.test_file_name_prefix}{self.regrid_func.__name__}{self.serialized_file_suffix}.json" file_path = os.path.join( test_dir, "test_data", "expected_results", file_basename ) @@ -544,9 +520,7 @@ def regrid_results_file_name_expect(self) -> str: def regrid_results_file_name_actual(self) -> str: """File name for actual test results.""" test_dir = os.path.dirname(os.path.abspath(__file__)) - file_basename = ( - f"test_actual_{self.regrid_func.__name__}{self.serialized_file_suffix}.json" - ) + file_basename = f"test_actual_{self.test_file_name_prefix}{self.regrid_func.__name__}{self.serialized_file_suffix}.json" file_path = os.path.join(test_dir, "test_data", "actual_results", file_basename) return file_path