{"id":18084100,"url":"https://github.com/schuettem/HWM14.jl","last_synced_at":"2025-03-28T23:32:10.956Z","repository":{"id":260125936,"uuid":"878402257","full_name":"schuettem/HWM14","owner":"schuettem","description":"Julia interface for the Horizontal Wind Model 2014 (HWM14) from the Naval Research Laboratory (NRL)","archived":false,"fork":false,"pushed_at":"2024-10-29T18:34:29.000Z","size":335,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T18:35:43.554Z","etag":null,"topics":["atmospheric-science","hwm14","julia","wind-model"],"latest_commit_sha":null,"homepage":"https://ccmc.gsfc.nasa.gov/models/HWM14~2014/","language":"Fortran","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/schuettem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-25T10:23:41.000Z","updated_at":"2024-10-29T18:34:34.000Z","dependencies_parsed_at":"2024-10-29T18:42:51.456Z","dependency_job_id":null,"html_url":"https://github.com/schuettem/HWM14","commit_stats":null,"previous_names":["schuettem/hwm14"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schuettem%2FHWM14","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schuettem%2FHWM14/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schuettem%2FHWM14/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schuettem%2FHWM14/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schuettem","download_url":"https://codeload.github.com/schuettem/HWM14/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222431531,"owners_count":16983387,"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","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":["atmospheric-science","hwm14","julia","wind-model"],"created_at":"2024-10-31T15:05:43.617Z","updated_at":"2025-03-28T23:32:10.948Z","avatar_url":"https://github.com/schuettem.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HWM14.jl\nThis package provides a Julia interface to the Horizontal Wind Model 2014 (HWM14), making it usable within the Julia programming environment. The HWM14 model is an empirical model of the Earth's horizontal wind fields. It was developed by a team of researchers led by Douglas Drob at the Naval Research Laboratory (NRL). The model was further supported and hosted by Jia Yue and Yuta Hozumi at the Community Coordinated Modeling Center (CCMC) at NASA's Goddard Space Flight Center. For more information about the HWM14 model, visit the [CCMC HWM14 page](https://ccmc.gsfc.nasa.gov/models/HWM14~2014/).\n\nNote: This project is not affiliated with NASA, NRL or CCMC in any way.\n\n## Prerequisites\nDuring the installation the fortran Code should be build automatically via `gfortran`.\nIf `gfortran` is not available, it will be installed via:\n - linux (Debian based): `sudo apt-get install -y gfortran`\n - macOS: `brew install gfortran`\n - windows: `choco install mingw`\n\nMake sure the respective package manager is installed.\nIn case you encounter an error, install `gfortran` and execute the build.jl file in the deps folder manually.\n\n## Installation\n\n1. Open julia and enter the package manager (Pkg) mode by pressing `]`.\n2. Use the `add` command to install the package directly from GitHub:\n   ```julia\n   add \u003curl\u003e\n   ```\n\n\n\n## Functions\n### `hwm14`\nCalculates the total wind.\n#### Arguments\n - `iyd::Int64`: Date in yyddd format (year and day of the year)\n - `sec::Float64`: Seconds since midnight UT\n - `alt::Float64`: Altitude in km\n - `glat::Float64`: Geodedic latitude in degrees\n - `glon::Float64`: Geodedic longitude in degrees\n - `stl::Float64`: Not used\n - `f107a::Float64`: Not used\n - `f107::Float64`: Not used\n - `ap::Array{Float64,1}`: `ap[1]`: not used, `ap[2]`: 3hr ap index\n\n#### Output\n - `w[1]`: Meridional wind (m/s, positive northward)\n - `w[2]`: Zonal wind (m/s, positive eastward)\n\n#### Example Usage\n```julia\nusing HWM14\n\n# Define input parameters\niyd = 23001  # Date in yyddd format (year and day of the year)\nsec = 36000.0  # Seconds since midnight UT\nalt = 300.0    # Altitude in km\nglat = 45.0    # Geodedic latitude in degrees\nglon = -75.0   # Geodedic longitude in degrees\nstl = 0.0      # Not used\nf107a = 0.0    # Not used\nf107 = 0.0     # Not used\nap = [0.0, 4.0]  # ap[1]: not used, ap[2]: 3hr ap index\n\n# Calculate the total wind\nw_total = HWM14.hwm14(iyd, sec, alt, glat, glon, stl, f107a, f107, ap)\n\n# Output the results\nprintln(\"Meridional wind (m/s): \", w_total[1])\nprintln(\"Zonal wind (m/s): \", w_total[2])\n```\n\n### `hwm14` quiet time wind\nCalculates the quiet time wind. Use the `hwm14` function with a negative value for `ap[2]`.\n\n### `dwm07`\nCalculate the disturbance wind in geographic coordinates\n#### Arguments\n - `iyd::Int64`: Date in yyddd format (year and day of the year)\n - `sec::Float64`: Seconds since midnight UT\n - `alt::Float64`: Altitude in km\n - `glat::Float64`: Geodedic latitude in degrees\n - `glon::Float64`: Geodedic longitude in degrees\n - `ap::Array{Float64,1}`: `ap[1]`: not used, `ap[2]`: 3hr ap index\n\n#### Output\n - `dw[1]`: Meridional disturbance wind (m/s, positive northward)\n - `dw[2]`: Zonal disturbance wind (m/s, positive eastward)\n\n### `dwm07b`\nCalculates the disturbance wind in magnetic coordinates.\n\n#### Arguments\n - `mlt::Float64`: Magnetic local time in hours\n - `mlat::Float64`: Magnetic latitude in degrees\n - `kp::Float64`: Current 3hr Kp index\n\n#### Output\n - `mmpwind`: Meridional disturbance wind (m/s, positive northward)\n - `mzpwind`: Zonal disturbance wind (m/s, positive eastward)\n\n### `iydsec2datetime`\nConverts a date in yyddd format and seconds since midnight to a `DateTime` object.\n\n#### Arguments\n - `iyd::Int64`: Date in yyddd format (year and day of the year)\n - `sec::Float64`: Seconds since midnight UT\n\n#### Output\n - `DateTime`: A `DateTime` object representing the date and time in UTC.\n\n### `datetime2iydsec`\nConverts a `DateTime` object to a date in yyddd format and seconds since midnight.\n\n#### Arguments\n - `datetime::DateTime`: A `DateTime` object representing the date and time in UTC.\n\n#### Output\n - `iyd::Int64`: Date in yyddd format (year and day of the year)\n - `sec::Float64`: Seconds since midnight UT\n\n\n## License\nThis package is licensed under the MIT License.\n\n## References\n - Drob, D. P., et al. (2015), An Update to the Horizontal Wind Model (HWM): The Quiet Time Thermosphere, Earth and Space Science, submitted.\n - Drob, D. P., et al. (2008), An Empirical Model of the Earth's Horizontal Wind Fields: HWM07, J. Geophys Res., 113, doi:10.1029/2008JA013668.\n - Emmert, J. T., et al. (2008), DWM07 global empirical model of upper thermospheric storm-induced disturbance winds, J. Geophys Res., 113, doi:10.1029/2008JA013541.\n\nFor more information, visit the [CCMC HWM14 page](https://ccmc.gsfc.nasa.gov/models/HWM14~2014/).\n\n## Acknowledgements\nWe acknowledge the Community Coordinated Modeling Center (CCMC) at Goddard Space Flight Center for the use of the [horizontal wind model 2014 (HWM14)](https://ccmc.gsfc.nasa.gov/models/HWM14~2014/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschuettem%2FHWM14.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschuettem%2FHWM14.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschuettem%2FHWM14.jl/lists"}