Skip to content

Commit

Permalink
Handle CMB surface precip.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpf committed Mar 28, 2024
1 parent 89f2762 commit 04a0303
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gprof_nn/data/training_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ def load_training_data_3d_xtrack_sim(

data = scene[target].data.astype("float32")

if target in ["surface_precip", "convective_precip"]:
if "angles" in scene[target].dims:
data = interpolate(data, weights)

data = torch.tensor(data)
Expand Down
1 change: 1 addition & 0 deletions gprof_nn/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ def save_scene(
"cloud_water_path",
"rain_water_path",
"surface_precip",
"surface_precip_combined",
"convective_precip"
]:
encoding[var] = {"dtype": "float32", "zlib": True}
Expand Down

0 comments on commit 04a0303

Please sign in to comment.