From 6211baa88b65fdd6c93b8334e38ad78549f60bff Mon Sep 17 00:00:00 2001 From: Leon Foks Date: Tue, 19 Dec 2023 10:18:22 -0800 Subject: [PATCH] updated docs to open_netcdf --- .../Creating_GS_Files/plot_aseg_tempest_to_netcdf.py | 2 +- .../Creating_GS_Files/plot_csv_resolve_to_netcdf.py | 2 +- .../Creating_GS_Files/plot_csv_skytem_to_netcdf.py | 4 ++-- .../Creating_GS_Files/plot_tifs_to_netcdf.py | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/documentation_source/source/examples/Creating_GS_Files/plot_aseg_tempest_to_netcdf.py b/documentation_source/source/examples/Creating_GS_Files/plot_aseg_tempest_to_netcdf.py index 833ad8a..fe75a69 100644 --- a/documentation_source/source/examples/Creating_GS_Files/plot_aseg_tempest_to_netcdf.py +++ b/documentation_source/source/examples/Creating_GS_Files/plot_aseg_tempest_to_netcdf.py @@ -69,7 +69,7 @@ #%% # Read back in the NetCDF file -new_survey = Survey.read_netcdf(d_out) +new_survey = Survey.open_netcdf(d_out) # Once the survey is read in, we can access variables like a standard xarray dataset. print(new_survey.raster.magnetic_tmi) diff --git a/documentation_source/source/examples/Creating_GS_Files/plot_csv_resolve_to_netcdf.py b/documentation_source/source/examples/Creating_GS_Files/plot_csv_resolve_to_netcdf.py index 3aa36c8..864ff35 100644 --- a/documentation_source/source/examples/Creating_GS_Files/plot_csv_resolve_to_netcdf.py +++ b/documentation_source/source/examples/Creating_GS_Files/plot_csv_resolve_to_netcdf.py @@ -57,7 +57,7 @@ #%% # Reading back in the GS NetCDF file -new_survey = Survey.read_netcdf(d_out) +new_survey = Survey.open_netcdf(d_out) # Check the Survey information print(new_survey.xarray) diff --git a/documentation_source/source/examples/Creating_GS_Files/plot_csv_skytem_to_netcdf.py b/documentation_source/source/examples/Creating_GS_Files/plot_csv_skytem_to_netcdf.py index 15dc784..8385be2 100644 --- a/documentation_source/source/examples/Creating_GS_Files/plot_csv_skytem_to_netcdf.py +++ b/documentation_source/source/examples/Creating_GS_Files/plot_csv_skytem_to_netcdf.py @@ -32,7 +32,7 @@ data_path = '..//..//supplemental//region//WI' # Survey metadata file -metadata = join(data_path, "data//WI_SkyTEM_survey_md.json") +metadata = join(data_path, "data//WI_SkyTEM_survey_md.yml") # Establish the Survey survey = Survey(metadata) @@ -96,7 +96,7 @@ #%% # Reading back in -new_survey = Survey.read_netcdf(d_out) +new_survey = Survey.open_netcdf(d_out) #%% # Plotting diff --git a/documentation_source/source/examples/Creating_GS_Files/plot_tifs_to_netcdf.py b/documentation_source/source/examples/Creating_GS_Files/plot_tifs_to_netcdf.py index bf2b769..0c2c8e1 100644 --- a/documentation_source/source/examples/Creating_GS_Files/plot_tifs_to_netcdf.py +++ b/documentation_source/source/examples/Creating_GS_Files/plot_tifs_to_netcdf.py @@ -2,20 +2,20 @@ GeoTIFFs to NetCDF ------------------ -In this example, we demonstrates the workflow for creating a GS file from the GeoTIFF (.tif/.tiff) file format. This includes adding individual TIF files as single 2-D variables, as well as how to create a 3-D variable by stacking multiple TIF files along a specified dimension. +In this example, we demonstrates the workflow for creating a GS file from the GeoTIFF (.tif/.tiff) file format. This includes adding individual TIF files as single 2-D variables, as well as how to create a 3-D variable by stacking multiple TIF files along a specified dimension. -Additionally, this example shows how to handle Raster data that have differing x-y grids. Specifically, this example creates the following Raster datasets: +Additionally, this example shows how to handle Raster data that have differing x-y grids. Specifically, this example creates the following Raster datasets: 1. Raster Dataset #1 1a. 2-D magnetic grid, original x-y discretization (600 m cell size) 2. Raster Dataset #2 2a. 2-D magnetic grid, aligned to match the x-y dimensions of the resistivity layers (1000 m cell size) - + 2b. 3-D resistivity grid Dataset References: -Minsley, B.J., James, S.R., Bedrosian, P.A., Pace, M.D., Hoogenboom, B.E., and Burton, B.L., 2021, Airborne electromagnetic, magnetic, and radiometric survey of the Mississippi Alluvial Plain, November 2019 - March 2020: U.S. Geological Survey data release, https://doi.org/10.5066/P9E44CTQ. +Minsley, B.J., James, S.R., Bedrosian, P.A., Pace, M.D., Hoogenboom, B.E., and Burton, B.L., 2021, Airborne electromagnetic, magnetic, and radiometric survey of the Mississippi Alluvial Plain, November 2019 - March 2020: U.S. Geological Survey data release, https://doi.org/10.5066/P9E44CTQ. James, S.R., and Minsley, B.J., 2021, Combined results and derivative products of hydrogeologic structure and properties from airborne electromagnetic surveys in the Mississippi Alluvial Plain: U.S. Geological Survey data release, https://doi.org/10.5066/P9382RCI. @@ -69,12 +69,12 @@ #%% # Reading back in the GS NetCDF file -new_survey = Survey.read_netcdf(d_out) +new_survey = Survey.open_netcdf(d_out) #%% # Plotting -# Make a map-view plot of a specific data variable, using Xarray's plotter +# Make a map-view plot of a specific data variable, using Xarray's plotter # In this case, we slice the 3-D resistivity variable along the depth dimension new_survey.raster[1]['resistivity'].plot(col='z', vmax=3, cmap='jet')