Skip to content

Failure in ww3 buildnml when running on a machine without ww3 inputdata present #16

@billsacks

Description

@billsacks

On my Mac, which does not yet have a wav/ subdirectory of the inputdata directory, I tried running:

./create_test --baseline-root $scratch/cesm_baselines --generate cesm_2bc4f08 -n SMS.ne30pg3_t232.B1850C_LTso.green_gnu

This failed in ww3 buildnml with:

        Create namelist for component ww3
           Calling /Users/sacks/cesm/cesm0/components/ww3//cime_config/buildnml
           Running /Users/sacks/cesm/cesm0/components/ww3//cime_config/buildnml
        File not found: prestage_wind = /Users/sacks/projects/cesm-inputdata/wav/ww3/core2_G4_wns_30min_20000601_to_05.nc, will attempt to download in check_input_data phase
        File not found: prestage_mod_def = /Users/sacks/projects/cesm-inputdata/wav/ww3/G4L1.mod_def.ww3.121031, will attempt to download in check_input_data phase
        Traceback (most recent call last):
          File "/Users/sacks/cesm/cesm0/components/ww3//cime_config/buildnml", line 253, in <module>
            _main_func()
            ~~~~~~~~~~^^
          File "/Users/sacks/cesm/cesm0/components/ww3//cime_config/buildnml", line 248, in _main_func
            buildnml(case, caseroot, "ww")
            ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
          File "/Users/sacks/cesm/cesm0/components/ww3//cime_config/buildnml", line 182, in buildnml
            _prestage_inputs(case)
            ~~~~~~~~~~~~~~~~^^^^^^
          File "/Users/sacks/cesm/cesm0/components/ww3//cime_config/buildnml", line 211, in _prestage_inputs
            files = os.listdir(input_dir)
        FileNotFoundError: [Errno 2] No such file or directory: '/Users/sacks/projects/cesm-inputdata/wav/ww3/grid_inp.wgx3v7.250428'
        ERROR: /Users/sacks/cesm/cesm0/components/ww3//cime_config/buildnml /Users/sacks/projects/scratch/SMS.ne30pg3_t232.B1850C_LTso.green_gnu.G.20251018_073751_752ujl FAILED, see above'
          File "/Users/sacks/cesm/cesm0/cime/CIME/test_scheduler.py", line 1126, in _run_catch_exceptions
            return run(test)
          File "/Users/sacks/cesm/cesm0/cime/CIME/test_scheduler.py", line 1012, in _setup_phase
            expect(
            ~~~~~~^
                cmdstat in [0, TESTS_FAILED_ERR_CODE],
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                "Fatal error in case.cmpgen_namelists: {}".format(output),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            )
            ^
          File "/Users/sacks/cesm/cesm0/cime/CIME/utils.py", line 179, in expect
            raise exc_type(msg)

The problem is that this tries to list a directory that doesn't yet exist:

# Copy ww3_inp and other needed info to ww3_moddef_create directory
input_dir = case.get_value("WW3_GRID_INP_DIR")
files = os.listdir(input_dir)

@alperaltuntas and @jedwards4b - it looks like you fixed a similar issue in #10 (e.g., see #10 (comment)). Maybe a similar fix is needed here?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions