Skip to content

Commit

Permalink
remove diagnostic param from mars request
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Sep 20, 2024
1 parent 9aa8efa commit 89db0c9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/anemoi/inference/checkpoint/metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,10 @@ def summary(self):
print(sorted(self.accumulations_params))
print()

print("Select:")
print(json.dumps(self.select, indent=2))
print()
# print("Select:")
# print(json.dumps(self.select, indent=2))
# print()

print("Order by:")
print(json.dumps(self.order_by, indent=2))
print()
# print("Order by:")
# print(json.dumps(self.order_by, indent=2))
# print()
6 changes: 3 additions & 3 deletions src/anemoi/inference/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ def _output(self, *args, **kwargs):

@property
def param_sfc(self):
return self.runner.checkpoint.param_sfc
return self.runner.param_sfc

@property
def param_level_pl(self):
return self.runner.checkpoint.param_level_pl
return self.runner.param_level_pl

@property
def param_level_ml(self):
return self.runner.checkpoint.param_level_ml
return self.runner.param_level_ml

@property
def constant_fields(self):
Expand Down
24 changes: 24 additions & 0 deletions src/anemoi/inference/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,30 @@ def lagged(self):
result = [-s * self.hour_steps for s in result]
return sorted(result)

@property
def param_sfc(self):
param_sfc = self.checkpoint.param_sfc

# Remove diagnostic params

param_sfc = [p for p in param_sfc if p not in self.checkpoint.diagnostic_params]

return param_sfc

@property
def param_level_pl(self):

# To do remove diagnostic params

return self.checkpoint.param_level_pl

@property
def param_level_ml(self):

# To do remove diagnostic params

return self.checkpoint.param_level_ml


class DefaultRunner(Runner):
"""_summary_
Expand Down

0 comments on commit 89db0c9

Please sign in to comment.