{"id":37320113,"url":"https://github.com/csiro/cmextremes-xb2xbg","last_synced_at":"2026-01-16T03:17:08.130Z","repository":{"id":300896166,"uuid":"1004696267","full_name":"csiro/cmextremes-xb2xbg","owner":"csiro","description":"Python script to convert XBeach parameter files for use with XBeach-GPU. It can also be used to generate default XBeach-GPU parameters.","archived":false,"fork":false,"pushed_at":"2025-06-24T05:42:30.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-04T19:08:40.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-19T03:31:53.000Z","updated_at":"2025-06-24T05:29:17.000Z","dependencies_parsed_at":"2025-06-25T13:15:16.569Z","dependency_job_id":null,"html_url":"https://github.com/csiro/cmextremes-xb2xbg","commit_stats":null,"previous_names":["csiro/cmextremes-xb2xbg"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/csiro/cmextremes-xb2xbg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csiro%2Fcmextremes-xb2xbg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csiro%2Fcmextremes-xb2xbg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csiro%2Fcmextremes-xb2xbg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csiro%2Fcmextremes-xb2xbg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csiro","download_url":"https://codeload.github.com/csiro/cmextremes-xb2xbg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csiro%2Fcmextremes-xb2xbg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-16T03:17:07.377Z","updated_at":"2026-01-16T03:17:08.122Z","avatar_url":"https://github.com/csiro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Overview\nPython script to convert XBeach parameter files for use with XBeach-GPU. It can also be used to generate default XBeach-GPU parameters.\n\nCyprien Bosserelle is the creator of XBeach-GPU which is available in [GitHub](https://github.com/CyprienBosserelle/xbeach_gpu). See also the main [XBeach-GPU](https://cyprienbosserelle.github.io/xbeach_gpu) page for more information.\n\nAn ordinary (non-\"reuse\") JONSWAP file listed in an XBeach parameters file will also be converted. A directional spread coefficient can be specified to be used in the converted JONSWAP file. Any bathymetry file with `.z` suffix will be replaced with `.dep`. In addition, sea-level and wind boundary files will also be copied to the specified output location.\n\nRequires Python 3.7 or higher.\n\n#### Usage\n\n    python3 xb2xbg.py -h\n    usage: xb2xbg.py [-h] [--xb-params-path XB_PARAMS_PATH] [--xb-file-root XB_FILE_ROOT] [--xbg-output-dir XBG_OUTPUT_DIR]\n                    [--xbg-user-manual XBG_USER_MANUAL] [--directional-spread-coefficient DIRECTIONAL_SPREAD_COEFFICIENT]\n                    [--peak-enhancement-factor PEAK_ENHANCEMENT_FACTOR] [--gen-doc] [--gen-defaults] [--verbose]\n                    [--use-all-known-output-variables]\n\n    Convert XB params file for use with XBG.\n\n    optional arguments:\n    -h, --help            show this help message and exit\n    --xb-params-path XB_PARAMS_PATH, -b XB_PARAMS_PATH\n                            XB params input file path\n    --xb-file-root XB_FILE_ROOT, -r XB_FILE_ROOT\n                            XB input file (e.g. bcfile) root. We allow XB parameter file location and input file locations to\n                            vary; if specified, will apply to all input files within XB parameters file\n    --xbg-output-dir XBG_OUTPUT_DIR, -p XBG_OUTPUT_DIR\n                            XBG params output file directory\n    --xbg-user-manual XBG_USER_MANUAL, -m XBG_USER_MANUAL\n                            XBG user manual HTML input file path or URL\n    --directional-spread-coefficient DIRECTIONAL_SPREAD_COEFFICIENT, -s DIRECTIONAL_SPREAD_COEFFICIENT\n                            Directional spread coefficient (default: 400)\n    --peak-enhancement-factor PEAK_ENHANCEMENT_FACTOR, -e PEAK_ENHANCEMENT_FACTOR\n                            Peak enhancement factor (default: 3.3)\n    --gen-doc, -g         Generate documentation strings along with parameters\n    --gen-defaults, -d    Generate all XBG default parameters (this argument overrides --xb-params)\n    --verbose, -v         Verbose output mode\n    --use-all-known-output-variables, -u\n                            Allow all known XBG output variables to be used, irrespective of uncertainty of relationship to XB\n\n#### Example Invocations\n\n    # convert XB parameters, generating XBG_params.txt\n    python xb2xbg.py --xb-params-path=data/example-XBeach-params.txt\n\n    # as above, but with verbose output\n    python xb2xbg.py --xb-params-path=data/example-XBeach-params.txt --verbose\n\n    # also add docs per parameter and output variable where they exist\n    python xb2xbg.py --xb-params-path=data/example-XBeach-params.txt --verbose --gen-doc\n\n    # XB input files will have \"data\" prepended to path found in XB parameters file\n    # and XBG files (e.g. XBG parameters, jonswap) will go into the `xbg` directory\n    python xb2xbg.py --xb-params-path=data/example-XBeach-params.txt --xb-file-root=data --xbg-output-dir=xbg\n\n    # default XBG parameters will be generated instead of those values that would normally\n    # be converted from XB\n    python xb2xbg.py --xb-params-path=data/example-XBeach-params.txt --gen-defaults\n\n    # directional spread coefficient for use in jonswap file conversion; defaults to 400\n    python xb2xbg.py --xb-params-path=data/example-XBeach-params.txt --directional-spread-coefficient=300\n\n    # peak enhancement factor for use in jonswap file conversion; defaults to 3.3\n    python3 xb2xbg.py --xb-params-path=data/example-XBeach-params.txt --peak-enhancement-factor=4.2\n\n    # any output variables in XBG where there is some uncertainty re: relationship to XB\n    # will be generated anyway; use with caution\n    python xb2xbg.py --xb-params-path=data/example-XBeach-params.txt --verbose --use-all-known-output-variables\n\n    # explicit reference to XBG user manual HTML\n    python xb2xbg.py --xb-params-path=data/example-XBeach-params.txt --xbg-user-manual=https://raw.githubusercontent.com/CyprienBosserelle/xbeach_gpu/gh-pages/Manual.html\n\n#### Run Unit Tests (optional)\nRequires `pytest` library.\n\n    pytest -v\n\nor, if output from library warnings is too noisy (Python/library version dependent)\n\n    pytest -v --disable-warnings\n\n#### Possible Future Work\n* handle TSnode and TSOfile parameters and XBeach equivalents (see npoints, npointvar, tintp)\n* refinement/addition of output variable and parameter documentation\n* when JONSWAP file detected, instead of giving `wavebndtype` check warning, just set it\n* --no-empty-values: don't include parameters with no value in output\n* --doc-line-wrap (default to None); generated doc strings currently wrapped at or before column 60\n* change wavebndtype=4 advisory in presence of JONSWAP file to setting that value\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsiro%2Fcmextremes-xb2xbg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsiro%2Fcmextremes-xb2xbg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsiro%2Fcmextremes-xb2xbg/lists"}