Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save lat/lon grid variables from sfc_dt_atmos #204

Merged
merged 2 commits into from
Mar 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions workflows/one_step_jobs/runfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,27 @@
"DLWRFsfc",
"ULWRFtoa",
"ULWRFsfc",
"lat",
"lon",
"latb",
"lonb",
"area",
)


def rename_sfc_dt_atmos(sfc: xr.Dataset) -> xr.Dataset:
DIMS = {"grid_xt": "x", "grid_yt": "y", "time": "forecast_time"}
DIMS = {
"grid_xt": "x",
"grid_yt": "y",
"grid_x": "x_interface",
"grid_y": "y_interface",
"time": "forecast_time",
}
return (
sfc[list(SFC_VARIABLES)]
.rename(DIMS)
.transpose("forecast_time", "tile", "y", "x")
.drop(["forecast_time", "y", "x"])
.transpose("forecast_time", "tile", "y", "x", "y_interface", "x_interface")
.drop(["forecast_time", "y", "x", "y_interface", "x_interface"])
)


Expand Down Expand Up @@ -247,7 +258,7 @@ def post_process(
)

monitors = {
key: fv3gfs.ZarrMonitor(path, partitioner, mode="w", mpi_comm=MPI.COMM_WORLD,)
key: fv3gfs.ZarrMonitor(path, partitioner, mode="w", mpi_comm=MPI.COMM_WORLD)
for key, path in paths.items()
}

Expand Down