NVIDIA / earth2mip

Earth-2 Model Intercomparison Project (MIP) is a python framework that enables climate researchers and scientists to inter-compare AI models for weather and climate.
https://nvidia.github.io/earth2mip/
Apache License 2.0
183 stars 40 forks source link

Changes to inference_medium_range.py #157

Closed pgarg7 closed 7 months ago

pgarg7 commented 8 months ago

Earth-2 MIP Pull Request

Description

I have changed the run_forecast function within the inference_medium_range.py module in order to make sure that deterministic scores are only calculated for variables which are same in model's input and output channels. I added some code in which it finds the indexes of model's in_channels in model's out_channels and then calls the metric on only those indexes. In this way, it's not raising an error related to input/output shape mismatch specially for Graphcast_Operational model. -- This PR "closes #156"

Checklist

Dependencies

NickGeneva commented 8 months ago

/blossom-ci

NickGeneva commented 8 months ago

Hi @pgarg7

Appreciate the bug report and the PR. I'll take an additional look at this today and hopefully run some tests. Left some initial comments but no rush.

nbren12 commented 8 months ago

I think some of this is fixed in #154.

nbren12 commented 7 months ago

154 fixed this bug, so this PR is no longer needed. Graphcast has an input tp06 that is not available in most data sources. There is an experimental PR (#94) which adds it cds.DataSource, but I didn't think that implementation was robust enough to merge yet.