Skip to content

Commit

Permalink
centering crop preprocess: Updated descriptions in the configuration …
Browse files Browse the repository at this point in the history
…file and tested process more thoroughly
  • Loading branch information
JuLieAlgebra committed Mar 12, 2024
1 parent 0ca9855 commit 6925889
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions config/preprocess_netcdf.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[CropFiles]
# Full relative directory is data/input_dir, data/output_dir
input_dir = "ims_1km"

# Change this output_dir name to reflect the window size and center coordinates selected
output_dir = "ims_netcdf_1km_cropped_4_000_000m_window"
# Example: _50000x_15000y
output_dir = "ims_netcdf_1km_cropped_4_000_000m_window
# Final shape will be (window_size*2, window_size*2)
window_size = 4000 #km
# Expect str format in x,y coordinates if provided. Example: "1000, 2000"
# Defaults to center of current grid system if "None"
center_coordinates = "1000, 1500"#None"
center_coordinates = "None"
1 change: 0 additions & 1 deletion icedyno/preprocess/crop.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def run(self) -> None:
x=slice(x_coord - window, x_coord + window),
y=slice(y_coord - window, y_coord + window),
)

# Write the cropped data to a new NetCDF file
cropped_ds.to_netcdf(output_filename, engine="h5netcdf")

Expand Down

0 comments on commit 6925889

Please sign in to comment.