{"components":{"parameters":{"AP":{"description":"(Optional) The Ap-index provides a daily average level for geomagnetic activity F107, F107A, AP effects can be neglected below 80 km. If unspecified, the average of values in the 24 hours preceding the date-time  are automatically calculated from data provided by GFZ German Research Centre  for Geosciences.\n","in":"query","name":"ap","required":false,"schema":{"example":30,"type":"number"}},"Altitude":{"description":"Altitude in (km)","in":"query","name":"altitude","required":true,"schema":{"example":300,"type":"number"}},"Day":{"description":"Day in DD format","in":"query","name":"day","required":true,"schema":{"example":23,"type":"integer"}},"F107":{"description":"(Optional) Daily F10.7 cm radio flux for previous day (SFU). F107 and F107A values correspond to the 10.7 cm radio flux at the actual distance of Earth from Sun rather than radio flux at 1 AU. F107, F107A, AP effects can be neglected below 80 km. If unspecified, values provided by the US National Oceanic and  Atmospheric Administration are retrieved automatically.\n","in":"query","name":"f107","required":false,"schema":{"example":120,"type":"number"}},"F107A":{"description":"(Optional) 81 day average of F10.7 flux (SFU) centered on the specified day. F107 and F107A values correspond to the 10.7 cm radio flux at the actual distance of Earth from Sun rather than radio flux at 1 AU. F107, F107A, AP effects can be neglected below 80 km. If unspecified, values provided by the US National Oceanic and  Atmospheric Administration are retrieved automatically.\n","in":"query","name":"f107a","required":false,"schema":{"example":120,"type":"number"}},"GeodeticLatitude":{"description":"GeodeticLatitude (deg) -90 to 90 deg","in":"query","name":"geodetic_latitude","required":true,"schema":{"example":42,"type":"number"}},"GeodeticLongitude":{"description":"GeodeticLongitude (deg) 0 to 360 deg","in":"query","name":"geodetic_longitude","required":true,"schema":{"example":42,"type":"number"}},"Hour":{"description":"UTC Hour of the day in 24 hour format","in":"query","name":"hour","required":true,"schema":{"example":15,"type":"integer"}},"Latitude":{"description":"Latitude (deg) -90 to 90 deg","in":"query","name":"latitude","required":true,"schema":{"example":42,"type":"number"}},"Longitude":{"description":"Longitude (deg) 0 to 360 deg or -180 to 180 deg","in":"query","name":"longitude","required":true,"schema":{"example":42,"type":"number"}},"Minute":{"description":"Minute of the given hour","in":"query","name":"minute","required":true,"schema":{"example":10,"type":"integer"}},"Month":{"description":"Month in MM format","in":"query","name":"month","required":true,"schema":{"example":5,"type":"integer"}},"UTC":{"description":"Coordinated Universal Time (hrs)","in":"query","name":"utc","required":true,"schema":{"example":2,"type":"number"}},"Year":{"description":"Year in YYYY format","in":"query","name":"year","required":true,"schema":{"example":2020,"type":"integer"}}}},"info":{"description":"Instantly access predictive atmospheric and ionospheric models. <br><br>\nAPI requests must contain a key \"API-Key\" in the header (see code samples). <br><br> \nVisit our <Button to='#' transparent><a href='https://developer.amentum.io'>Developer Portal</a></Button> to obtain a key with a 14 day free trial.<br><br> \nAmentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br>\nCopyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2024.\n","title":"Atmosphere API","version":"1.1.1","x-logo":{"altText":"Amentum Scientific","backgroundColor":"#FFFFFF","url":"https://amentum.io/static/img/AMENTUMSPACE_GREY_SMALL.jpg"}},"openapi":"3.0.0","paths":{"/ipe/2d":{"get":{"description":"at a given position and time on 42-48 hour forecast horizon (5 minute resolution). NOTE: latitudes outside the interval (-90,90) are clipped to the endpoints; longitudes outside (0,360) are wrapped.   \n","operationId":"app.api_wfs.endpoints.IPE2D.get_values","parameters":[{"$ref":"#/components/parameters/Latitude"},{"$ref":"#/components/parameters/Longitude"},{"$ref":"#/components/parameters/Year"},{"$ref":"#/components/parameters/Month"},{"$ref":"#/components/parameters/Day"},{"$ref":"#/components/parameters/Hour"},{"$ref":"#/components/parameters/Minute"}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"HmF2":{"units":"km","value":597.8390502929688},"NmF2":{"units":"/m3","value":1202689540096.0},"point":{"latitude":21.0,"longitude":-12.0},"tec":{"units":"TECu","value":61.65298080444336}},"properties":{"HmF2":{"description":"Peak Height of the F2 Layer in (km).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"NmF2":{"description":"Peak Electron Density in (/m3).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"point":{"description":"The closest point in the dataset to the given point in request.","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"tec":{"description":"Total Electron Content in (TECu).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"}},"type":"object"}}},"description":"Successful IPE2D calculation"}},"summary":"Forecast 2-dimensional ionosphere outputs (TEC, NmF2, HmF2)  \n","tags":["ipe"],"x-codeSamples":[{"lang":"Shell","source":"# NOTE: Sample code will lag forecast, update this to be a datetime within 42 hours of the time of your request\ncurl -X GET \"https://atmosphere.amentum.io/ipe/2d?latitude=21.0&longitude=-12.0&year=2024&month=3&day=25&hour=15&minute=10\" -H \"accept: application/json\" -H \"API-Key: <your_key>\"\n"},{"lang":"Python","source":"import json\nimport requests\n\nurl = \"https://atmosphere.amentum.io/ipe/2d\"\n\nheaders = {\"API-Key\": \"<add_your_key>\"}\n\n# NOTE: Sample code time will lag forecast, update this to be a datetime within 42 hours of the time of your request\nparams = {\n  \"latitude\": 21.0,\n  \"longitude\": -12.0,\n  \"year\": 2024,\n  \"month\": 3,\n  \"day\": 25,\n  \"hour\": 15,\n  \"minute\": 10\n}\n\n# handle exceptions\nresponse = requests.get(url, headers=headers, params=params)\njson_payload = response.json()\n\nprint(json.dumps(json_payload, indent=4, sort_keys=True))\n"},{"lang":"R","source":"library(httr)\nlibrary(jsonlite)\n\nurl <- \"https://atmosphere.amentum.io/ipe/2d\"\n\nheaders <- add_headers(\"API-Key\" = \"<your_key>\")\n\n# NOTE: Sample code time will lag forecast, update this to be a datetime within 42 hours of the time of your request\nparams <- list(\n  latitude = 21.0,\n  longitude = -12.0,\n  year = 2024,\n  month = 3,\n  day = 25,\n  hour = 15,\n  minute = 10\n)\n\nresponse <- GET(url, query = params, headers)\njson_payload <- fromJSON(content(response, \"text\"))\n\nprint(toJSON(json_payload, pretty = TRUE))\n"},{"lang":"Julia","source":"using HTTP, JSON\n\nurl = \"https://atmosphere.amentum.io/ipe/2d\"\n\nheaders = Dict(\"API-Key\" => \"<your_key>\")\n\n# NOTE: Sample code time will lag forecast, update this to be a datetime within 42 hours of the time of your request\nparams = Dict(\n  \"latitude\" => 21.0,\n  \"longitude\" => -12.0,\n  \"year\" => 2024,\n  \"month\" => 3,\n  \"day\" => 25,\n  \"hour\" => 15,\n  \"minute\" => 10\n)\n\nresponse = HTTP.get(url, headers; query = params)\njson_payload = JSON.parse(String(response.body))\n\nprintln(JSON.print(json_payload, 4))\n"},{"lang":"Go","source":"package main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"io/ioutil\"\n  \"net/http\"\n)\n\nfunc main() {\n  url := \"https://atmosphere.amentum.io/ipe/2d?latitude=21.0&longitude=-12.0&year=2024&month=3&day=25&hour=15&minute=10\"\n  \n  req, _ := http.NewRequest(\"GET\", url, nil)\n  req.Header.Add(\"API-Key\", \"<your_key>\")\n  req.Header.Add(\"accept\", \"application/json\")\n  \n  client := &http.Client{}\n  resp, _ := client.Do(req)\n  defer resp.Body.Close()\n  \n  body, _ := ioutil.ReadAll(resp.Body)\n  \n  var json_payload map[string]interface{}\n  json.Unmarshal(body, &json_payload)\n  \n  json_response, _ := json.MarshalIndent(json_payload, \"\", \"  \")\n  fmt.Println(string(json_response))\n}\n"},{"lang":"JavaScript","source":"const fetch = require('node-fetch');\n\nconst url = 'https://atmosphere.amentum.io/ipe/2d?latitude=21.0&longitude=-12.0&year=2024&month=3&day=25&hour=15&minute=10';\n\nconst options = {\n  method: 'GET',\n  headers: {\n    'API-Key': '<your_key>',\n    'accept': 'application/json'\n  }\n};\n\nfetch(url, options)\n  .then(response => response.json())\n  .then(json_payload => console.log(JSON.stringify(json_payload, null, 4)))\n  .catch(err => console.error('error:', err));\n"},{"lang":"Java","source":"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.net.HttpURLConnection;\nimport java.net.URL;\nimport com.google.gson.Gson;\nimport com.google.gson.GsonBuilder;\n\npublic class Main {\n    public static void main(String[] args) {\n        try {\n            String url = \"https://atmosphere.amentum.io/ipe/2d?latitude=21.0&longitude=-12.0&year=2024&month=3&day=25&hour=15&minute=10\";\n            \n            HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n            conn.setRequestMethod(\"GET\");\n            conn.setRequestProperty(\"API-Key\", \"<your_key>\");\n            conn.setRequestProperty(\"accept\", \"application/json\");\n            \n            BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n            String inputLine;\n            StringBuilder content = new StringBuilder();\n            while ((inputLine = in.readLine()) != null) {\n                content.append(inputLine);\n            }\n            \n            in.close();\n            conn.disconnect();\n            \n            Gson gson = new GsonBuilder().setPrettyPrinting().create();\n            Object json_payload = gson.fromJson(content.toString(), Object.class);\n            System.out.println(gson.toJson(json_payload));\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n}\n"},{"lang":"C++","source":"#include <iostream>\n#include <sstream>\n#include <curl/curl.h>\n#include <json/json.h>\n\nsize_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp)\n{\n    ((std::string*)userp)->append((char*)contents, size * nmemb);\n    return size * nmemb;\n}\n\nint main() {\n    CURL* curl;\n    CURLcode res;\n    std::string readBuffer;\n\n    curl = curl_easy_init();\n    if(curl) {\n        curl_easy_setopt(curl, CURLOPT_URL, \"https://atmosphere.amentum.io/ipe/2d?latitude=21.0&longitude=-12.0&year=2024&month=3&day=25&hour=15&minute=10\");\n        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, curl_slist_append(NULL, \"API-Key: <your_key>\"));\n        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, curl_slist_append(NULL, \"accept: application/json\"));\n        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);\n        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);\n        res = curl_easy_perform(curl);\n        curl_easy_cleanup(curl);\n\n        Json::CharReaderBuilder builder;\n        Json::CharReader* reader = builder.newCharReader();\n        Json::Value json_payload;\n        std::string errs;\n\n        reader->parse(readBuffer.c_str(), readBuffer.c_str() + readBuffer.size(), &json_payload, &errs);\n        delete reader;\n\n        Json::StreamWriterBuilder writer;\n        std::cout << Json::writeString(writer, json_payload) << std::endl;\n    }\n    return 0;\n}\n"},{"lang":"Swift","source":"import Foundation\n\nlet url = URL(string: \"https://atmosphere.amentum.io/ipe/2d?latitude=21.0&longitude=-12.0&year=2024&month=3&day=25&hour=15&minute=10\")!\nvar request = URLRequest(url: url)\nrequest.setValue(\"<your_key>\", forHTTPHeaderField: \"API-Key\")\nrequest.setValue(\"application/json\", forHTTPHeaderField: \"accept\")\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in\n    guard let data = data, error == nil else {\n        print(\"Error:\", error ?? \"Unknown error\")\n        return\n    }\n    \n    if let json = try? JSONSerialization.jsonObject(with: data, options: .mutableContainers) {\n        let jsonData = try! JSONSerialization.data(withJSONObject: json, options: .prettyPrinted)\n        if let jsonString = String(data: jsonData, encoding: .utf8) {\n            print(jsonString)\n        }\n    }\n}\n\ntask.resume()\n"}]}},"/ipe/3d":{"get":{"description":"at a given position and time on 42-48 hour forecast horizon (10 minute resolution). NOTE: latitudes outside the interval (-90,90) are clipped to the endpoints; longitudes outside (0,360) are wrapped.   \n","operationId":"app.api_wfs.endpoints.IPE.get_values","parameters":[{"$ref":"#/components/parameters/Latitude"},{"$ref":"#/components/parameters/Longitude"},{"$ref":"#/components/parameters/Altitude"},{"$ref":"#/components/parameters/Year"},{"$ref":"#/components/parameters/Month"},{"$ref":"#/components/parameters/Day"},{"$ref":"#/components/parameters/Hour"},{"$ref":"#/components/parameters/Minute"}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"H_plus_density":{"units":"/m3","value":156902448.0},"He_plus_density":{"units":"/m3","value":2507313.0},"N2_plus_density":{"units":"/m3","value":995118720.0},"NO_plus_density":{"units":"/m3","value":2543411968.0},"N_plus_density":{"units":"/m3","value":14610540544.0},"O2_plus_density":{"units":"/m3","value":1031651200.0},"O_plus_density":{"units":"/m3","value":1283322413056.0},"eastward_ExB_velocity":{"units":"m/s","value":-12.19701099395752},"electron_temperature":{"units":"K","value":1550.673828125},"ion_temperature":{"units":"K","value":1264.8216552734375},"northward_ExB_velocity":{"units":"m/s","value":12.165947914123535},"point":{"altitude":324.0,"latitude":30.0,"longitude":248.0},"upward_ExB_velocity":{"units":"m/s","value":6.349876880645752}},"properties":{"H_plus_density":{"description":"Hydrogen ion density in (/m3).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"He_plus_density":{"description":"Helium ion density in (/m3).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"N2_plus_density":{"description":"Dinitrogen(.1+) density in (/m3).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"NO_plus_density":{"description":"Nitrosonium ion density in (/m3).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"N_plus_density":{"description":"Nitronium ion density in (/m3).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"O2_plus_density":{"description":"Dioxygenyl ion density in (/m3).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"O_plus_density":{"description":"Oxygen ion density in (/m3).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"eastward_ExB_velocity":{"description":"Easterly component of ExB drift in (m/s).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"electron_temperature":{"description":"Electron temperature in (K).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"ion_temperature":{"description":"Ion temperature in (K).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"northward_ExB_velocity":{"description":"Northerly component of ExB drift in (m/s).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"},"point":{"description":"The closest point in the dataset to the given point in request.","properties":{"altitude":{"type":"number"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"upward_ExB_velocity":{"description":"Upward component of ExB drift in (m/s).\n","properties":{"units":{"type":"number"},"value":{"type":"number"}},"type":"object"}},"type":"object"}}},"description":"Successful IPE calculation"}},"summary":"Forecast 3-dimensional densities, temperatures, and velocities of charged particles in the ionosphere\n","tags":["ipe"],"x-codeSamples":[{"lang":"Shell","source":"# NOTE: Sample code will lag forecast, update this to be a datetime within 42 hours of the time of your request\ncurl -X GET \"https://atmosphere.amentum.io/ipe/3d?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10\" -H \"accept: application/json\" -H \"API-Key: <your_key>\"\n"},{"lang":"Python","source":"import json\nimport requests\n\nurl = \"https://atmosphere.amentum.io/ipe/3d\"\n\nheaders = {\"API-Key\": \"<add_your_key>\"}\n\n# NOTE: Sample code time will lag forecast, update this to be a datetime within 42 hours of the time of your request\nparams = {\n  \"latitude\": 21.0,\n  \"longitude\": -12.0,\n  \"altitude\": 300,\n  \"year\": 2022,\n  \"month\": 5,\n  \"day\": 23,\n  \"hour\": 15,\n  \"minute\": 10\n}\n\n# handle exceptions\nresponse = requests.get(url, headers=headers, params=params)\njson_payload = response.json()\n\nprint(json.dumps(json_payload, indent=4, sort_keys=True))\n"},{"lang":"R","source":"library(httr)\nlibrary(jsonlite)\n\nurl <- \"https://atmosphere.amentum.io/ipe/3d\"\n\nheaders <- add_headers(\"API-Key\" = \"<your_key>\")\n\n# NOTE: Sample code time will lag forecast, update this to be a datetime within 42 hours of the time of your request\nparams <- list(\n  latitude = 21.0,\n  longitude = -12.0,\n  altitude = 300,\n  year = 2022,\n  month = 5,\n  day = 23,\n  hour = 15,\n  minute = 10\n)\n\nresponse <- GET(url, query = params, headers)\njson_payload <- fromJSON(content(response, \"text\"))\n\nprint(toJSON(json_payload, pretty = TRUE))\n"},{"lang":"Julia","source":"using HTTP, JSON\n\nurl = \"https://atmosphere.amentum.io/ipe/3d\"\n\nheaders = Dict(\"API-Key\" => \"<your_key>\")\n\n# NOTE: Sample code time will lag forecast, update this to be a datetime within 42 hours of the time of your request\nparams = Dict(\n  \"latitude\" => 21.0,\n  \"longitude\" => -12.0,\n  \"altitude\" => 300,\n  \"year\" => 2022,\n  \"month\" => 5,\n  \"day\" => 23,\n  \"hour\" => 15,\n  \"minute\" => 10\n)\n\nresponse = HTTP.get(url, headers; query = params)\njson_payload = JSON.parse(String(response.body))\n\nprintln(JSON.print(json_payload, 4))\n"},{"lang":"Go","source":"package main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"io/ioutil\"\n  \"net/http\"\n)\n\nfunc main() {\n  url := \"https://atmosphere.amentum.io/ipe/3d?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10\"\n  \n  req, _ := http.NewRequest(\"GET\", url, nil)\n  req.Header.Add(\"API-Key\", \"<your_key>\")\n  req.Header.Add(\"accept\", \"application/json\")\n  \n  client := &http.Client{}\n  resp, _ := client.Do(req)\n  defer resp.Body.Close()\n  \n  body, _ := ioutil.ReadAll(resp.Body)\n  \n  var json_payload map[string]interface{}\n  json.Unmarshal(body, &json_payload)\n  \n  json_response, _ := json.MarshalIndent(json_payload, \"\", \"  \")\n  fmt.Println(string(json_response))\n}\n"},{"lang":"JavaScript","source":"const fetch = require('node-fetch');\n\nconst url = 'https://atmosphere.amentum.io/ipe/3d?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10';\n\nconst options = {\n  method: 'GET',\n  headers: {\n    'API-Key': '<your_key>',\n    'accept': 'application/json'\n  }\n};\n\nfetch(url, options)\n  .then(response => response.json())\n  .then(json_payload => console.log(JSON.stringify(json_payload, null, 4)))\n  .catch(err => console.error('error:', err));\n"},{"lang":"Java","source":"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.net.HttpURLConnection;\nimport java.net.URL;\nimport com.google.gson.Gson;\nimport com.google.gson.GsonBuilder;\n\npublic class Main {\n    public static void main(String[] args) {\n        try {\n            String url = \"https://atmosphere.amentum.io/ipe/3d?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10\";\n            \n            HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n            conn.setRequestMethod(\"GET\");\n            conn.setRequestProperty(\"API-Key\", \"<your_key>\");\n            conn.setRequestProperty(\"accept\", \"application/json\");\n            \n            BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n            String inputLine;\n            StringBuilder content = new StringBuilder();\n            while ((inputLine = in.readLine()) != null) {\n                content.append(inputLine);\n            }\n            \n            in.close();\n            conn.disconnect();\n            \n            Gson gson = new GsonBuilder().setPrettyPrinting().create();\n            Object json_payload = gson.fromJson(content.toString(), Object.class);\n            System.out.println(gson.toJson(json_payload));\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n}\n"},{"lang":"C++","source":"#include <iostream>\n#include <sstream>\n#include <curl/curl.h>\n#include <json/json.h>\n\nsize_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp)\n{\n    ((std::string*)userp)->append((char*)contents, size * nmemb);\n    return size * nmemb;\n}\n\nint main() {\n    CURL* curl;\n    CURLcode res;\n    std::string readBuffer;\n\n    curl = curl_easy_init();\n    if(curl) {\n        curl_easy_setopt(curl, CURLOPT_URL, \"https://atmosphere.amentum.io/ipe/3d?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10\");\n        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, curl_slist_append(NULL, \"API-Key: <your_key>\"));\n        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, curl_slist_append(NULL, \"accept: application/json\"));\n        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);\n        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);\n        res = curl_easy_perform(curl);\n        curl_easy_cleanup(curl);\n\n        Json::CharReaderBuilder builder;\n        Json::CharReader* reader = builder.newCharReader();\n        Json::Value json_payload;\n        std::string errs;\n\n        reader->parse(readBuffer.c_str(), readBuffer.c_str() + readBuffer.size(), &json_payload, &errs);\n        delete reader;\n\n        Json::StreamWriterBuilder writer;\n        std::cout << Json::writeString(writer, json_payload) << std::endl;\n    }\n    return 0;\n}\n"},{"lang":"Swift","source":"import Foundation\n\nlet url = URL(string: \"https://atmosphere.amentum.io/ipe/3d?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10\")!\nvar request = URLRequest(url: url)\nrequest.setValue(\"<your_key>\", forHTTPHeaderField: \"API-Key\")\nrequest.setValue(\"application/json\", forHTTPHeaderField: \"accept\")\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in\n    guard let data = data, error == nil else {\n        print(\"Error:\", error ?? \"Unknown error\")\n        return\n    }\n    \n    if let json = try? JSONSerialization.jsonObject(with: data, options: .mutableContainers) {\n        let jsonData = try! JSONSerialization.data(withJSONObject: json, options: .prettyPrinted)\n        if let jsonString = String(data: jsonData, encoding: .utf8) {\n            print(jsonString)\n        }\n    }\n}\n\ntask.resume()\n"}]}},"/wam":{"get":{"description":"at a given position and time on 42-48 hour forecast horizon (10 minute resolution). NOTE: latitudes outside the interval (-90,90) are clipped to the endpoints; longitudes outside (0,360) are wrapped.   \n","operationId":"app.api_wfs.endpoints.WAM.get_values","parameters":[{"$ref":"#/components/parameters/Latitude"},{"$ref":"#/components/parameters/Longitude"},{"$ref":"#/components/parameters/Altitude"},{"$ref":"#/components/parameters/Year"},{"$ref":"#/components/parameters/Month"},{"$ref":"#/components/parameters/Day"},{"$ref":"#/components/parameters/Hour"},{"$ref":"#/components/parameters/Minute"}],"responses":{"200":{"content":{"application/json":{"schema":{"example":{"N2_density":{"units":"/m3","value":1.8508440362185578e+25},"O2_density":{"units":"/m3","value":5.005040353829904e+24},"O_density":{"units":"/m3","value":4279507561218048},"eastward_wind_neutral":{"units":"m/s","value":0.15444904565811157},"northward_wind_neutral":{"units":"m/s","value":-9.831161499023438},"point":{"altitude":327.6,"latitude":30,"longitude":348},"temp_neutral":{"units":"K","value":296.2078},"total_mass_density":{"units":"kg/m3","value":4.124548465486878e-11},"upward_wind_neutral":{"units":"m/s","value":-0.00033221824560314417}},"properties":{"N2_density":{"description":"Molecular nitrogen density in (/m3).\n","properties":{"units":{"type":"string"},"value":{"type":"number"}},"type":"object"},"O2_density":{"description":"Moleculary oxygen density in (/m3).\n","properties":{"units":{"type":"string"},"value":{"type":"number"}},"type":"object"},"O_density":{"description":"Oxygen atomic density in (/m3).\n","properties":{"units":{"type":"string"},"value":{"type":"number"}},"type":"object"},"eastward_wind_neutral":{"description":"Easterly component of neutral wind velocity in (m/s).\n","properties":{"units":{"type":"string"},"value":{"type":"number"}},"type":"object"},"northward_wind_neutral":{"description":"Northerly component of neutral wind velocity in (m/s).\n","properties":{"units":{"type":"string"},"value":{"type":"number"}},"type":"object"},"point":{"description":"The given point in the request.","properties":{"altitude":{"type":"number"},"latitude":{"type":"number"},"longitude":{"type":"number"}},"type":"object"},"temp_neutral":{"description":"Temperature of the atmosphere in (K).\n","properties":{"units":{"type":"string"},"value":{"type":"number"}},"type":"object"},"total_mass_density":{"description":"Total mass density (kg/m3).\n","properties":{"units":{"type":"string"},"value":{"type":"number"}},"type":"object"},"upward_wind_neutral":{"description":"Upward component of neutral wind velocity in (m/s).\n","properties":{"units":{"type":"string"},"value":{"type":"number"}},"type":"object"}},"type":"object"}}},"description":"Successful wam-ipe calculation"}},"summary":"Forecast winds, ion and molecular densities, and temperatures in the atmosphere\n","tags":["wam"],"x-codeSamples":[{"lang":"Shell","source":"# NOTE: sample code time will lag forecast, update this to be a datetime within 42 hours of the time of your request\ncurl -X GET \"https://atmosphere.amentum.io/wam?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10\" -H \"accept: application/json\" -H \"API-Key: <your_key>\"\n"},{"lang":"Python","source":"import json\nimport requests\n\nurl = \"https://atmosphere.amentum.io/wam\"\n\nheaders = {\"API-Key\": \"<add_your_key>\"}\n\n# NOTE: sample code time will lag forecast, update this to be a datetime within 42 hours of the time of your request\nparams = {\n  \"latitude\": 21.0,\n  \"longitude\": -12.0,\n  \"altitude\": 300,\n  \"year\": 2022,\n  \"month\": 5,\n  \"day\": 23,\n  \"hour\": 15,\n  \"minute\": 10\n}\n\n# handle exceptions\nresponse = requests.get(url, headers=headers, params=params)\njson_payload = response.json()\n\nprint(json.dumps(json_payload, indent=4, sort_keys=True))\n"},{"lang":"R","source":"library(httr)\nlibrary(jsonlite)\n\nurl <- \"https://atmosphere.amentum.io/wam\"\n\nheaders <- add_headers(\"API-Key\" = \"<your_key>\")\n\n# NOTE: sample code time will lag forecast, update this to be a datetime within 42 hours of the time of your request\nparams <- list(\n  latitude = 21.0,\n  longitude = -12.0,\n  altitude = 300,\n  year = 2022,\n  month = 5,\n  day = 23,\n  hour = 15,\n  minute = 10\n)\n\nresponse <- GET(url, query = params, headers)\njson_payload <- fromJSON(content(response, \"text\"))\n\nprint(toJSON(json_payload, pretty = TRUE))\n"},{"lang":"Julia","source":"using HTTP, JSON\n\nurl = \"https://atmosphere.amentum.io/wam\"\n\nheaders = Dict(\"API-Key\" => \"<your_key>\")\n\n# NOTE: sample code time will lag forecast, update this to be a datetime within 42 hours of the time of your request\nparams = Dict(\n  \"latitude\" => 21.0,\n  \"longitude\" => -12.0,\n  \"altitude\" => 300,\n  \"year\" => 2022,\n  \"month\" => 5,\n  \"day\" => 23,\n  \"hour\" => 15,\n  \"minute\" => 10\n)\n\nresponse = HTTP.get(url, headers; query = params)\njson_payload = JSON.parse(String(response.body))\n\nprintln(JSON.print(json_payload, 4))\n"},{"lang":"Go","source":"package main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"io/ioutil\"\n  \"net/http\"\n)\n\nfunc main() {\n  url := \"https://atmosphere.amentum.io/wam?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10\"\n  \n  req, _ := http.NewRequest(\"GET\", url, nil)\n  req.Header.Add(\"API-Key\", \"<your_key>\")\n  req.Header.Add(\"accept\", \"application/json\")\n  \n  client := &http.Client{}\n  resp, _ := client.Do(req)\n  defer resp.Body.Close()\n  \n  body, _ := ioutil.ReadAll(resp.Body)\n  \n  var json_payload map[string]interface{}\n  json.Unmarshal(body, &json_payload)\n  \n  json_response, _ := json.MarshalIndent(json_payload, \"\", \"  \")\n  fmt.Println(string(json_response))\n}\n"},{"lang":"JavaScript","source":"const fetch = require('node-fetch');\n\nconst url = 'https://atmosphere.amentum.io/wam?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10';\n\nconst options = {\n  method: 'GET',\n  headers: {\n    'API-Key': '<your_key>',\n    'accept': 'application/json'\n  }\n};\n\nfetch(url, options)\n  .then(response => response.json())\n  .then(json_payload => console.log(JSON.stringify(json_payload, null, 4)))\n  .catch(err => console.error('error:', err));\n"},{"lang":"Java","source":"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.net.HttpURLConnection;\nimport java.net.URL;\nimport com.google.gson.Gson;\nimport com.google.gson.GsonBuilder;\n\npublic class Main {\n    public static void main(String[] args) {\n        try {\n            String url = \"https://atmosphere.amentum.io/wam?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10\";\n            \n            HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n            conn.setRequestMethod(\"GET\");\n            conn.setRequestProperty(\"API-Key\", \"<your_key>\");\n            conn.setRequestProperty(\"accept\", \"application/json\");\n            \n            BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n            String inputLine;\n            StringBuilder content = new StringBuilder();\n            while ((inputLine = in.readLine()) != null) {\n                content.append(inputLine);\n            }\n            \n            in.close();\n            conn.disconnect();\n            \n            Gson gson = new GsonBuilder().setPrettyPrinting().create();\n            Object json_payload = gson.fromJson(content.toString(), Object.class);\n            System.out.println(gson.toJson(json_payload));\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n}\n"},{"lang":"C++","source":"#include <iostream>\n#include <sstream>\n#include <curl/curl.h>\n#include <json/json.h>\n\nsize_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp)\n{\n    ((std::string*)userp)->append((char*)contents, size * nmemb);\n    return size * nmemb;\n}\n\nint main() {\n    CURL* curl;\n    CURLcode res;\n    std::string readBuffer;\n\n    curl = curl_easy_init();\n    if(curl) {\n        curl_easy_setopt(curl, CURLOPT_URL, \"https://atmosphere.amentum.io/wam?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10\");\n        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, curl_slist_append(NULL, \"API-Key: <your_key>\"));\n        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, curl_slist_append(NULL, \"accept: application/json\"));\n        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);\n        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);\n        res = curl_easy_perform(curl);\n        curl_easy_cleanup(curl);\n\n        Json::CharReaderBuilder builder;\n        Json::CharReader* reader = builder.newCharReader();\n        Json::Value json_payload;\n        std::string errs;\n\n        reader->parse(readBuffer.c_str(), readBuffer.c_str() + readBuffer.size(), &json_payload, &errs);\n        delete reader;\n\n        Json::StreamWriterBuilder writer;\n        std::cout << Json::writeString(writer, json_payload) << std::endl;\n    }\n    return 0;\n}\n"},{"lang":"Swift","source":"import Foundation\n\nlet url = URL(string: \"https://atmosphere.amentum.io/wam?latitude=21.0&longitude=-12.0&altitude=300&year=2022&month=5&day=23&hour=15&minute=10\")!\nvar request = URLRequest(url: url)\nrequest.setValue(\"<your_key>\", forHTTPHeaderField: \"API-Key\")\nrequest.setValue(\"application/json\", forHTTPHeaderField: \"accept\")\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in\n    guard let data = data, error == nil else {\n        print(\"Error:\", error ?? \"Unknown error\")\n        return\n    }\n    \n    if let json = try? JSONSerialization.jsonObject(with: data, options: .mutableContainers) {\n        let jsonData = try! JSONSerialization.data(withJSONObject: json, options: .prettyPrinted)\n        if let jsonString = String(data: jsonData, encoding: .utf8) {\n            print(jsonString)\n        }\n    }\n}\n\ntask.resume()\n"}]}}},"servers":[{"url":""}],"tags":[{"description":"The NOAA/SWPC <a href='https://www.swpc.noaa.gov/products/wam-ipe'>Whole Atmosphere Model-Ionosphere Plasmasphere Electrodynamics (WAM-IPE) Forecast System (WFS)</a> provides thermosphere and ionosphere forecasts on a 48 hour horizon.  The model accounts for solar, space weather, and lower atmosphere forcing effects. The neutral density predictions are important for accurate orbit determinations and therefore safer space traffic management. Our <em>wam</em> API endpoint provides the  wind components, temperature, and molecular and atomic concentrations for a given altitude, latitude and longitude, and time  ahead 42-48 hours on a 10 minute grid. (The forecast horizon is 42-48 hours as the data is updated every  6 hours). NOTE: the resulting parameters are for the nearest point in the dataset (the coordinates of which are also in the response). <br><br>  Visit our <Button to='#' transparent><a href='https://developer.amentum.io'>Developer Portal</a></Button> to obtain an API key with a 14 day free trial.\n","name":"wam","x-displayName":"WAM"},{"description":"The NOAA/SWPC <a href='https://www.swpc.noaa.gov/products/wam-ipe'>Whole Atmosphere Model-Ionosphere Plasmasphere Electrodynamics (WAM-IPE) Forecast System (WFS)</a> provides thermosphere and ionosphere forecasts on a 48 hour horizon.  The model accounts for solar, space weather, and lower atmosphere forcing effects. (The forecast horizon is 42-48 hours as the data is updated every  6 hours).  <br><br>  Visit our <Button to='#' transparent><a href='https://developer.amentum.io'>Developer Portal</a></Button> to obtain an API key with a 14 day free trial.\n","name":"ipe","x-displayName":"IPE"},{"description":"The NOAA/SWPC <a href='https://www.swpc.noaa.gov/products/wam-ipe'>Whole Atmosphere Model-Ionosphere Plasmasphere Electrodynamics (WAM-IPE) Forecast System (WFS)</a> provides thermosphere and ionosphere forecasts on a 48 hour horizon.  The model accounts for solar, space weather, and lower atmosphere forcing effects. Our <em>ipe2d</em> API endpoint provides the  Total Electron Content, Peak Electron Density, Peak Height of the F2 Layer for a given latitude and longitude, and time  ahead 42-48 hours on a 5 minute grid. (The forecast horizon is 42-48 hours as the data is updated every  6 hours).  <br><br>  Visit our <Button to='#' transparent><a href='https://developer.amentum.io'>Developer Portal</a></Button> to obtain an API key with a 14 day free trial.\n","name":"ipe2d","x-displayName":"IPE2D"}],"x-tagGroups":[{"name":"Density and composition","tags":["wam","ipe"]}]}
