Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihengSun committed Jun 14, 2023
1 parent 0ca6b6e commit de4379a
Show file tree
Hide file tree
Showing 8 changed files with 134 additions and 2 deletions.
Binary file modified .DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions code/search_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from earth_data_utils import *

ssh_short_name = "SEA_SURFACE_HEIGHT_ALT_GRIDS_L4_2SATS_5DAY_6THDEG_V_JPL2205"

results = earthaccess.search_data(
short_name=ssh_short_name,
cloud_hosted=True,
temporal=("2021-07-01", "2021-09-30"),
)
41 changes: 41 additions & 0 deletions history/5ucpoaa3e0bbnwyu1n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[{
"history_id" : "l35gxvzl580",
"history_input" : "\n\n\n# Suppress warnings\nimport warnings\nwarnings.simplefilter('ignore')\nwarnings.filterwarnings('ignore')\n\n# Direct access\nimport earthaccess \nfrom pprint import pprint\nimport xarray as xr\n\n# Harmony\nimport geopandas as gpd\nimport geoviews as gv\ngv.extension('bokeh', 'matplotlib')\nfrom harmony import BBox, Client, Collection, Request, LinkType\nimport datetime as dt\nimport s3fs",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/l35gxvzl580/earth_data_utils.py\", line 10, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686761482808,
"history_end_time" : 1686761483335,
"history_notes" : null,
"history_process" : "wttkvt",
"host_id" : "100001",
"indicator" : "Failed"
},{
"history_id" : "npsj6zmjg8v",
"history_input" : "from earth_data_utils import *\n\nssh_short_name = \"SEA_SURFACE_HEIGHT_ALT_GRIDS_L4_2SATS_5DAY_6THDEG_V_JPL2205\"\n\nresults = earthaccess.search_data(\n short_name=ssh_short_name,\n cloud_hosted=True,\n temporal=(\"2021-07-01\", \"2021-09-30\"),\n)",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/npsj6zmjg8v/search_data.py\", line 1, in <module>\n from earth_data_utils import *\n File \"/Users/joe/gw-workspace/npsj6zmjg8v/earth_data_utils.py\", line 10, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686761484815,
"history_end_time" : 1686761484929,
"history_notes" : null,
"history_process" : "yvo1ds",
"host_id" : "100001",
"indicator" : "Failed"
},{
"history_id" : "coh219tjkes",
"history_input" : "from search_data import *\n\nsst_short_name=\"MUR-JPL-L4-GLOB-v4.1\"\n\nresults = earthaccess.search_data(\n short_name=ssh_short_name,\n cloud_hosted=True,\n temporal=(\"2021-07-01\", \"2021-09-30\"),\n)\n\nauth = earthaccess.login(strategy=\"netrc\", persist=True)\nds = xr.open_mfdataset(earthaccess.open(results))\ngeojson_path = '/home/jovyan/gulf.json'\ngdf = gpd.read_file(geojson_path) #Return a GeoDataFrame object\n\n\nharmony_client = Client()\nsst_short_name=\"MUR-JPL-L4-GLOB-v4.1\"\n\nrequest = Request(\n collection=Collection(id=sst_short_name),\n shape=geojson_path,\n temporal={\n 'start': dt.datetime(2021, 8, 1, 1),\n 'stop': dt.datetime(2021, 8, 1, 2) \n },\n)\njob_id = harmony_client.submit(request)\nharmony_client.wait_for_processing(job_id, show_progress=False)\ndata = harmony_client.result_json(job_id)\nresults = harmony_client.result_urls(job_id, link_type=LinkType.s3)\nurls = list(results)\nurl = urls[0]\n",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/coh219tjkes/earth_access_authenticate.py\", line 1, in <module>\n from search_data import *\n File \"/Users/joe/gw-workspace/coh219tjkes/search_data.py\", line 1, in <module>\n from earth_data_utils import *\n File \"/Users/joe/gw-workspace/coh219tjkes/earth_data_utils.py\", line 10, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686761486386,
"history_end_time" : 1686761486527,
"history_notes" : null,
"history_process" : "cgvhiy",
"host_id" : "100001",
"indicator" : "Failed"
},{
"history_id" : "dadwunxuogt",
"history_input" : "# Suppress warnings\nimport os\nimport warnings\nwarnings.simplefilter('ignore')\nwarnings.filterwarnings('ignore')\n\n# Direct access\nimport earthaccess \nfrom pprint import pprint\nimport xarray as xr\n\n# Harmony\nimport geopandas as gpd\nimport geoviews as gv\ngv.extension('bokeh', 'matplotlib')\nfrom harmony import BBox, Client, Collection, Request, LinkType\nimport datetime as dt\nimport s3fs\nimport matplotlib.pyplot as plt\nfrom earth_access_authenticate import *\n\ncreds = harmony_client.aws_credentials()\ns3_fs = s3fs.S3FileSystem(\n key=creds['aws_access_key_id'],\n secret=creds['aws_secret_access_key'],\n token=creds['aws_session_token'],\n client_kwargs={'region_name':'us-west-2'},\n)\nf = s3_fs.open(url, mode='rb')\nds = xr.open_dataset(f)\nds.analysed_sst.plot()\nhome_dir = os.path.expanduser('~')\nplt.savefig(os.path.join(home_dir, 'plot2.png'))",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/dadwunxuogt/s3_file_storage.py\", line 8, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686761487968,
"history_end_time" : 1686761488098,
"history_notes" : null,
"history_process" : "1b4ko0",
"host_id" : "100001",
"indicator" : "Failed"
}]
41 changes: 41 additions & 0 deletions history/l873z9b33henwzrydx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[{
"history_id" : "p6977t6u1vo",
"history_input" : "\n\n\n# Suppress warnings\nimport warnings\nwarnings.simplefilter('ignore')\nwarnings.filterwarnings('ignore')\n\n# Direct access\nimport earthaccess \nfrom pprint import pprint\nimport xarray as xr\n\n# Harmony\nimport geopandas as gpd\nimport geoviews as gv\ngv.extension('bokeh', 'matplotlib')\nfrom harmony import BBox, Client, Collection, Request, LinkType\nimport datetime as dt\nimport s3fs",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/p6977t6u1vo/earth_data_utils.py\", line 10, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686759148585,
"history_end_time" : 1686759148955,
"history_notes" : null,
"history_process" : "wttkvt",
"host_id" : "100001",
"indicator" : "Failed"
},{
"history_id" : "3l2y4206qef",
"history_input" : "from earth_data_utils import *\n\nssh_short_name = \"SEA_SURFACE_HEIGHT_ALT_GRIDS_L4_2SATS_5DAY_6THDEG_V_JPL2205\"\n\nresults = earthaccess.search_data(\n short_name=ssh_short_name,\n cloud_hosted=True,\n temporal=(\"2021-07-01\", \"2021-09-30\"),\n)",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/3l2y4206qef/search_data.py\", line 1, in <module>\n from earth_data_utils import *\n File \"/Users/joe/gw-workspace/3l2y4206qef/earth_data_utils.py\", line 10, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686759150591,
"history_end_time" : 1686759150744,
"history_notes" : null,
"history_process" : "yvo1ds",
"host_id" : "100001",
"indicator" : "Failed"
},{
"history_id" : "74iyqhnh28j",
"history_input" : "from search_data import *\n\nsst_short_name=\"MUR-JPL-L4-GLOB-v4.1\"\n\nresults = earthaccess.search_data(\n short_name=ssh_short_name,\n cloud_hosted=True,\n temporal=(\"2021-07-01\", \"2021-09-30\"),\n)\n\nauth = earthaccess.login(strategy=\"netrc\", persist=True)\nds = xr.open_mfdataset(earthaccess.open(results))\ngeojson_path = '/home/jovyan/gulf.json'\ngdf = gpd.read_file(geojson_path) #Return a GeoDataFrame object\n\n\nharmony_client = Client()\nsst_short_name=\"MUR-JPL-L4-GLOB-v4.1\"\n\nrequest = Request(\n collection=Collection(id=sst_short_name),\n shape=geojson_path,\n temporal={\n 'start': dt.datetime(2021, 8, 1, 1),\n 'stop': dt.datetime(2021, 8, 1, 2) \n },\n)\njob_id = harmony_client.submit(request)\nharmony_client.wait_for_processing(job_id, show_progress=False)\ndata = harmony_client.result_json(job_id)\nresults = harmony_client.result_urls(job_id, link_type=LinkType.s3)\nurls = list(results)\nurl = urls[0]\n",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/74iyqhnh28j/earth_access_authenticate.py\", line 1, in <module>\n from search_data import *\n File \"/Users/joe/gw-workspace/74iyqhnh28j/search_data.py\", line 1, in <module>\n from earth_data_utils import *\n File \"/Users/joe/gw-workspace/74iyqhnh28j/earth_data_utils.py\", line 10, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686759152006,
"history_end_time" : 1686759152136,
"history_notes" : null,
"history_process" : "cgvhiy",
"host_id" : "100001",
"indicator" : "Failed"
},{
"history_id" : "uu96597mlq0",
"history_input" : "# Suppress warnings\nimport os\nimport warnings\nwarnings.simplefilter('ignore')\nwarnings.filterwarnings('ignore')\n\n# Direct access\nimport earthaccess \nfrom pprint import pprint\nimport xarray as xr\n\n# Harmony\nimport geopandas as gpd\nimport geoviews as gv\ngv.extension('bokeh', 'matplotlib')\nfrom harmony import BBox, Client, Collection, Request, LinkType\nimport datetime as dt\nimport s3fs\nimport matplotlib.pyplot as plt\nfrom earth_access_authenticate import *\n\ncreds = harmony_client.aws_credentials()\ns3_fs = s3fs.S3FileSystem(\n key=creds['aws_access_key_id'],\n secret=creds['aws_secret_access_key'],\n token=creds['aws_session_token'],\n client_kwargs={'region_name':'us-west-2'},\n)\nf = s3_fs.open(url, mode='rb')\nds = xr.open_dataset(f)\nds.analysed_sst.plot()\nhome_dir = os.path.expanduser('~')\nplt.savefig(os.path.join(home_dir, 'plot2.png'))",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/uu96597mlq0/s3_file_storage.py\", line 8, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686759153783,
"history_end_time" : 1686759153919,
"history_notes" : null,
"history_process" : "1b4ko0",
"host_id" : "100001",
"indicator" : "Failed"
}]
41 changes: 41 additions & 0 deletions history/v97kvdt3cfum1172y2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[{
"history_id" : "qrdgeq35rzb",
"history_input" : "\n\n\n# Suppress warnings\nimport warnings\nwarnings.simplefilter('ignore')\nwarnings.filterwarnings('ignore')\n\n# Direct access\nimport earthaccess \nfrom pprint import pprint\nimport xarray as xr\n\n# Harmony\nimport geopandas as gpd\nimport geoviews as gv\ngv.extension('bokeh', 'matplotlib')\nfrom harmony import BBox, Client, Collection, Request, LinkType\nimport datetime as dt\nimport s3fs",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/qrdgeq35rzb/earth_data_utils.py\", line 10, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686759076017,
"history_end_time" : 1686759076500,
"history_notes" : null,
"history_process" : "wttkvt",
"host_id" : "100001",
"indicator" : "Failed"
},{
"history_id" : "g1k064wc7gb",
"history_input" : "from earth_data_utils import *\n\nssh_short_name = \"SEA_SURFACE_HEIGHT_ALT_GRIDS_L4_2SATS_5DAY_6THDEG_V_JPL2205\"\n\nresults = earthaccess.search_data(\n short_name=ssh_short_name,\n cloud_hosted=True,\n temporal=(\"2021-07-01\", \"2021-09-30\"),\n)",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/g1k064wc7gb/search_data.py\", line 1, in <module>\n from earth_data_utils import *\n File \"/Users/joe/gw-workspace/g1k064wc7gb/earth_data_utils.py\", line 10, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686759078023,
"history_end_time" : 1686759078172,
"history_notes" : null,
"history_process" : "yvo1ds",
"host_id" : "100001",
"indicator" : "Failed"
},{
"history_id" : "p0kx8wg6123",
"history_input" : "from search_data import *\n\nsst_short_name=\"MUR-JPL-L4-GLOB-v4.1\"\n\nresults = earthaccess.search_data(\n short_name=ssh_short_name,\n cloud_hosted=True,\n temporal=(\"2021-07-01\", \"2021-09-30\"),\n)\n\nauth = earthaccess.login(strategy=\"netrc\", persist=True)\nds = xr.open_mfdataset(earthaccess.open(results))\ngeojson_path = '/home/jovyan/gulf.json'\ngdf = gpd.read_file(geojson_path) #Return a GeoDataFrame object\n\n\nharmony_client = Client()\nsst_short_name=\"MUR-JPL-L4-GLOB-v4.1\"\n\nrequest = Request(\n collection=Collection(id=sst_short_name),\n shape=geojson_path,\n temporal={\n 'start': dt.datetime(2021, 8, 1, 1),\n 'stop': dt.datetime(2021, 8, 1, 2) \n },\n)\njob_id = harmony_client.submit(request)\nharmony_client.wait_for_processing(job_id, show_progress=False)\ndata = harmony_client.result_json(job_id)\nresults = harmony_client.result_urls(job_id, link_type=LinkType.s3)\nurls = list(results)\nurl = urls[0]\n",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/p0kx8wg6123/earth_access_authenticate.py\", line 1, in <module>\n from search_data import *\n File \"/Users/joe/gw-workspace/p0kx8wg6123/search_data.py\", line 1, in <module>\n from earth_data_utils import *\n File \"/Users/joe/gw-workspace/p0kx8wg6123/earth_data_utils.py\", line 10, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686759079549,
"history_end_time" : 1686759079701,
"history_notes" : null,
"history_process" : "cgvhiy",
"host_id" : "100001",
"indicator" : "Failed"
},{
"history_id" : "680j43ov10s",
"history_input" : "# Suppress warnings\nimport os\nimport warnings\nwarnings.simplefilter('ignore')\nwarnings.filterwarnings('ignore')\n\n# Direct access\nimport earthaccess \nfrom pprint import pprint\nimport xarray as xr\n\n# Harmony\nimport geopandas as gpd\nimport geoviews as gv\ngv.extension('bokeh', 'matplotlib')\nfrom harmony import BBox, Client, Collection, Request, LinkType\nimport datetime as dt\nimport s3fs\nimport matplotlib.pyplot as plt\nfrom earth_access_authenticate import *\n\ncreds = harmony_client.aws_credentials()\ns3_fs = s3fs.S3FileSystem(\n key=creds['aws_access_key_id'],\n secret=creds['aws_secret_access_key'],\n token=creds['aws_session_token'],\n client_kwargs={'region_name':'us-west-2'},\n)\nf = s3_fs.open(url, mode='rb')\nds = xr.open_dataset(f)\nds.analysed_sst.plot()\nhome_dir = os.path.expanduser('~')\nplt.savefig(os.path.join(home_dir, 'plot2.png'))",
"history_output" : "Traceback (most recent call last):\n File \"/Users/joe/gw-workspace/680j43ov10s/s3_file_storage.py\", line 8, in <module>\n import earthaccess \nModuleNotFoundError: No module named 'earthaccess'\n",
"history_begin_time" : 1686759081222,
"history_end_time" : 1686759081357,
"history_notes" : null,
"history_process" : "1b4ko0",
"host_id" : "100001",
"indicator" : "Failed"
}]
Binary file removed kr2novmm4i9i27z5adyj.zip
Binary file not shown.
Binary file removed plot.png
Binary file not shown.
4 changes: 2 additions & 2 deletions workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"description" : "",
"owner" : "111111",
"confidential" : "FALSE",
"edges" : "[{\"source\":{\"title\":\"earth_data_utils\",\"id\":\"wttkvt-GJjq8\",\"x\":524.66552734375,\"y\":562,\"color\":\"green\"},\"target\":{\"title\":\"search_data\",\"id\":\"yvo1ds-96vns\",\"x\":751,\"y\":559,\"color\":\"green\"}},{\"source\":{\"title\":\"search_data\",\"id\":\"yvo1ds-96vns\",\"x\":751,\"y\":559,\"color\":\"green\"},\"target\":{\"title\":\"earth_access_authenticate\",\"id\":\"cgvhiy-BgnXM\",\"x\":983.4237060546875,\"y\":558,\"color\":\"darkseagreen\",\"skip\":false}},{\"source\":{\"title\":\"earth_access_authenticate\",\"id\":\"cgvhiy-BgnXM\",\"x\":983.4237060546875,\"y\":558,\"color\":\"darkseagreen\",\"skip\":false},\"target\":{\"title\":\"s3_file_storage\",\"id\":\"1b4ko0-4k9iL\",\"x\":984.9932250976562,\"y\":687.6644897460938,\"color\":\"green\"}}]",
"nodes" : "[{\"title\":\"earth_data_utils\",\"id\":\"wttkvt-GJjq8\",\"x\":524.66552734375,\"y\":562,\"color\":\"green\"},{\"title\":\"search_data\",\"id\":\"yvo1ds-96vns\",\"x\":751,\"y\":559,\"color\":\"green\"},{\"title\":\"earth_access_authenticate\",\"id\":\"cgvhiy-BgnXM\",\"x\":983.4237060546875,\"y\":558,\"color\":\"darkseagreen\",\"skip\":false},{\"title\":\"s3_file_storage\",\"id\":\"1b4ko0-4k9iL\",\"x\":984.9932250976562,\"y\":687.6644897460938,\"color\":\"green\"}]"
"edges" : "[{\"source\":{\"title\":\"earth_data_utils\",\"id\":\"wttkvt-GJjq8\",\"x\":524.66552734375,\"y\":562,\"color\":\"white\"},\"target\":{\"title\":\"search_data\",\"id\":\"yvo1ds-96vns\",\"x\":751,\"y\":559,\"color\":\"white\"}},{\"source\":{\"title\":\"search_data\",\"id\":\"yvo1ds-96vns\",\"x\":751,\"y\":559,\"color\":\"white\"},\"target\":{\"title\":\"earth_access_authenticate\",\"id\":\"cgvhiy-BgnXM\",\"x\":983.4237060546875,\"y\":558,\"color\":\"white\",\"skip\":false}},{\"source\":{\"title\":\"earth_access_authenticate\",\"id\":\"cgvhiy-BgnXM\",\"x\":983.4237060546875,\"y\":558,\"color\":\"white\",\"skip\":false},\"target\":{\"title\":\"s3_file_storage\",\"id\":\"1b4ko0-4k9iL\",\"x\":984.9932250976562,\"y\":687.6644897460938,\"color\":\"white\"}},{\"source\":{\"title\":\"install_packages\",\"id\":\"ru79i2-VCNCv\",\"x\":523,\"y\":409.5},\"target\":{\"title\":\"earth_data_utils\",\"id\":\"wttkvt-GJjq8\",\"x\":524.66552734375,\"y\":562,\"color\":\"white\"}}]",
"nodes" : "[{\"title\":\"earth_data_utils\",\"id\":\"wttkvt-GJjq8\",\"x\":524.66552734375,\"y\":562,\"color\":\"white\"},{\"title\":\"search_data\",\"id\":\"yvo1ds-96vns\",\"x\":751,\"y\":559,\"color\":\"white\"},{\"title\":\"earth_access_authenticate\",\"id\":\"cgvhiy-BgnXM\",\"x\":983.4237060546875,\"y\":558,\"color\":\"white\",\"skip\":false},{\"title\":\"s3_file_storage\",\"id\":\"1b4ko0-4k9iL\",\"x\":984.9932250976562,\"y\":687.6644897460938,\"color\":\"white\"},{\"title\":\"install_packages\",\"id\":\"ru79i2-VCNCv\",\"x\":523,\"y\":409.5}]"
}

0 comments on commit de4379a

Please sign in to comment.