{"id":32176380,"url":"https://github.com/powellb/seapy","last_synced_at":"2025-10-21T19:59:17.496Z","repository":{"id":33589574,"uuid":"37238172","full_name":"powellb/seapy","owner":"powellb","description":"State Estimation and Analysis in Python","archived":false,"fork":false,"pushed_at":"2025-07-12T01:45:08.000Z","size":2324,"stargazers_count":32,"open_issues_count":0,"forks_count":24,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-10-21T19:59:08.612Z","etag":null,"topics":["analysis","grid","model","numpy","oceanography","roms"],"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/powellb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-06-11T03:54:10.000Z","updated_at":"2025-09-04T13:35:56.000Z","dependencies_parsed_at":"2023-12-13T00:35:46.953Z","dependency_job_id":"3248941b-5b0b-467f-919e-0ddeda062cde","html_url":"https://github.com/powellb/seapy","commit_stats":{"total_commits":450,"total_committers":5,"mean_commits":90.0,"dds":"0.12444444444444447","last_synced_commit":"01adc965f83dc4f350040e3a8302bde8a7654ce2"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/powellb/seapy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powellb%2Fseapy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powellb%2Fseapy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powellb%2Fseapy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powellb%2Fseapy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/powellb","download_url":"https://codeload.github.com/powellb/seapy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powellb%2Fseapy/sbom","scorecard":{"id":742363,"data":{"date":"2025-08-11","repo":{"name":"github.com/powellb/seapy","commit":"5ea8eeb3f01be77c89afe04887f6ad24fc54f040"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/18 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"11 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/powellb/seapy/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/powellb/seapy/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/powellb/seapy/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/powellb/seapy/test.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:23","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T17:47:05.820Z","repository_id":33589574,"created_at":"2025-08-22T17:47:05.820Z","updated_at":"2025-08-22T17:47:05.820Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280325298,"owners_count":26311419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["analysis","grid","model","numpy","oceanography","roms"],"created_at":"2025-10-21T19:59:15.917Z","updated_at":"2025-10-21T19:59:17.488Z","avatar_url":"https://github.com/powellb.png","language":"Python","readme":"# State Estimation and Analysis in PYthon (SEAPY)\n\n[![Test](https://github.com/powellb/seapy/actions/workflows/test.yml/badge.svg)](https://github.com/powellb/seapy/actions/workflows/test.yml)\n[![Build](https://github.com/powellb/seapy/actions/workflows/build.yml/badge.svg)](https://github.com/powellb/seapy/actions/workflows/build.yml)\n\n\n\nTools for working with ocean models and data.\n\nSEAPY requires: basemap, h5py, joblib, netcdf4, numpy, numpy_groupies, rich and scipy.\n\n\n## Installation\n\nThe SEAPY source code is maintained by Brian Powell, (powellb)[https://github.com/powellb]. Releases are made on the [main branch](https://github.com/powellb/seapy/tree/main)\n\nInstallation can be accomplished a number of ways.\n\n## Install from source code on GitHub.com\n\nThanks to [@rsoultelino](https://github.com/rsoutelino), seapy has been updated to work with the latest setupconfig and can easily be installed via a number of methods.\n\n\nPip installation is based on [meson-python](https://mesonbuild.com/meson-python/), following example from [pyfort](https://github.com/larsbuntemeyer/pyfort).\n\nInstall from [GitHub.com](https://github.com/) with PIP:\n```\n$ pip install git+git://github.com/powellb/seapy\n```\n\nOR clone a copy of the source and install in editable mode, eg:\n```\n$ git clone https://github.com/powellb/seapy.git\n$ pip install --no-build-isolation -e seapy\n```\n\nWith an [editable-mode](https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs) installation, changes you make to your copy of the source code will take effect when you import the module.\n\nIn principle it is possible to build from source on Windows--and success with this has been achieved in the past--but the process tends to break with changes in the environment or Python version, so we don't recommend it or support it.\n\n### Install into virtual environment\n\n- create a python virtual environment using your preferred tool, activate the environment, clone the repository, and run `pip install .` from within the repository.\n\nSimple example using virtualenvwrapper assuming you are in the root directory of cloned\nversion of this repository:\n\n```bash\ngit clone https://github.com/powellb/seapy.git\nmkvirtualenv seapy\nworkon seapy # if not activated automatically\npip install seapy\n```\n\n\n## Install from Conda-Forge\n\nInstall from [conda-forge](https://conda-forge.org/) with the Conda package manager:\n```\n$ conda install -c conda-forge seapy\n```\n\nYou should also consider making conda-forge your default channel. See the [conda-forge tips and tricks page](https://conda-forge.org/docs/user/tipsandtricks.html).\n\nThe Conda-Forge [SEAPY feedstock](https://github.com/conda-forge/seapy-feedstock) is maintained by Filipe Fernandes, [ocefpaf](https://github.com/ocefpaf/). As of February 2021 there are binary packages on all the platforms that Conda-Forge supports: Python 3.6 through 3.9 on Linux, Windows and Mac OSX (all 64-bit).\n\nTo remove seapy:\n```\n$ conda remove seapy\n```\n\n## Install from PyPI\n\nInstall from [PyPI](https://pypi.org/) with PIP:\n```\n$ pip install seapy-ocean\n```\n\nNote that on PyPI (but nowhere else) the package name is seapy-ocean to avoid a name clash with another package. The module name is still seapy.\n\nSEAPY packages on PyPI have been built and uploaded by Mark Hadfield, [hadfieldnz](https://pypi.org/user/hadfieldnz/). There is a source distribution that should build with no problems on Linux (and Mac OSX, but we haven't tested it). In the pst there have been binary distributions for Windows (64-bit), but these have now been deleted as binary builds with PIP are no longer supported.\n\nIn a Conda environment, it is quite possible to install with PIP, but dependency handling and updating will be cleaner if you use the Conda package.\n\nTo remove seapy-ocean\n```\n$ pip uninstall seapy-ocean\n```\n\n## Contributing\n\n\nIf you've installed from source in editable mode, then you should definitely consider forking your own copy of the repository. This allows you to keep your changes under revision control on GitHub.com and potentially contribute them to the main project. You should follow the procedures described in this [Git Workflow](https://www.asmeurer.com/git-workflow/) document.\n\n[Forking on GitHub.com](https://help.github.com/en/articles/fork-a-repo) is a lightweight process that won't complicate your workflow and keeps the relationship between your work and the original project clear, so it is strongly advised to do it early. However the immutable and unique nature of Git commits means that you can create and populate a fork later if you want to, as long as you have saved your work somewhere in Git format. To create a fork you will need a [GitHub.com user account](https://help.github.com/en/articles/signing-up-for-a-new-github-account).\n\n\nAll your changes should be committed to a branch other than \"master\", which is reserved for the master branch in Brian Powell's repository (or copies thereof). A common practice in the [existing SEAPY forks](https://github.com/powellb/seapy/network/members) is to use a branch name matching your user name for your own work. However if you are developing a specific feature or bug fix to be pulled into master, it may be sensible to name the branch after that feature or bug fix.\n\n\n## Examples\n\nMany of the time-saving features are in generating fields for running the ROMS model.\n\n1. To load the meta information about a model (ROMS, HYCOM, MITgcm, POM, SODA), load an output file (history, average, climatology, grid, etc.) via:\n\n        \u003e\u003e mygrid = seapy.model.asgrid(filename)\n\n        \u003e\u003e mygrid\n        C-Grid: 32x194x294\n\n        \u003e\u003e print(mygrid)\n        filename\n        32x194x294: C-Grid with S-level\n        Available: I,J,_isroms,_nc,angle,cgrid,cs_r,depth_rho,depth_u,depth_v,dm,dn,eta_rho,eta_u,eta_v,f,filename,h,hc,lat_rho,lat_u,lat_v,lm,ln,lon_rho,lon_u,lon_v,mask_rho,mask_u,mask_v,n,name,pm,pn,s_rho,shape,spatial_dims,tcline,theta_b,theta_s,thick_rho,thick_u,thick_v,vstretching,vtransform,xi_rho,xi_u,xi_v\n\n\n2. Most methods available in SEAPY require a grid, which can be specified as a \"filename\" or as a grid object.\n\n3. Find out how to download global HYCOM data that will span my grid from 1/1/2015 through 5/1/2015:\n\n\n        \u003e\u003e seapy.model.hycom.load_history(\"hycom_file.nc\", start_time=datetime(2015,1,1),\n                                         end_time=datetime(2015,5,1),\n                                         grid=mygrid, load_data=False)\n        ncks -v water_temp,salinity,surf_el,water_v,water_u -d time,352,352 -d lat,1204,1309 -d lon,2438,2603 http://tds.hycom.org/thredds/dodsC/GLBu0.08/expt_91.1 hycom_file.nc\n\nThis will display the 'ncks' command necessary to download the data. If you want to have SEAPY download it (not recommended due to server-speed), use `'load_data=True'`.\n\n4. Once you have HYCOM data, interpolate it to your grid\n\n        \u003e\u003e seapy.roms.interp.to_clim(\"hycom_file.nc\", \"my_clim.nc\",\n                          dest_grid=mygrid, nx=1/6, ny=1/6,\n                          vmap={\"surf_el\":\"zeta\", \"water_temp\":\"temp\",\n                          \"water_u\":\"u\", \"water_v\":\"v\", \"salinity\":\"salt\"})\n\n5. Generate boundary conditions from the climatology\n\n        \u003e\u003e seapy.roms.boundary.from_roms(\"my_clim.nc\", \"my_bry.nc\")\n\n6. Generate initial conditions from the climatology\n\n        \u003e\u003e seapy.roms.initial.from_roms(\"my_clim.nc\", \"my_ini.nc\")\n\n7. You now have what you need to run your model\n\n8. To set up data assimilation, download the raw observations (e.g., `aviso_map_day1.nc`, `aviso_map_day2.nc`, `argo_day1.nc` ). You can then process the data:\n\n        \u003e\u003e dt = 400/86400       # time-step of the model in days\n        \u003e\u003e aviso_gen = seapy.roms.obsgen.aviso_sla_map(mygrid, dt)\n        \u003e\u003e aviso_gen.batch_files(seapy.list_files('./aviso.*nc'), 'aviso_roms_#.nc')\n        \u003e\u003e argo_gen = seapy.roms.obsgen.argo_ctd(mygrid, dt)\n        \u003e\u003e obs = argo_gen.convert_file(\"argo_day1.nc\")\n        \u003e\u003e obs.to_netcdf(\"argo_roms_1.nc\")\n\n9. Put all of the processed observations files together into a file for a given assimilation window\n\n        \u003e\u003e seapy.roms.obs.merge_files(seapy.list_files('.*roms_[0-9]+.nc'), 'roms_obs_#.nc', np.arange([0, 10.1, 5]))\n\nThere are many more things that can be done, but these show some of the power available via simple commands.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowellb%2Fseapy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpowellb%2Fseapy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowellb%2Fseapy/lists"}