Skip to content

Support global models - #204

Merged
jonasbhend merged 33 commits into
mainfrom
feat/support-global-eval
Jul 24, 2026
Merged

Support global models#204
jonasbhend merged 33 commits into
mainfrom
feat/support-global-eval

Conversation

@dnerini

@dnerini dnerini commented Jun 30, 2026

Copy link
Copy Markdown
Member

supersedes #90 following #190

additionally:

  • add support for cloud cover and surface radiation variables
  • add support for rotating animations

@dnerini
dnerini requested a review from MicheleCattaneo June 30, 2026 20:10
Comment thread src/verification/__init__.py Outdated
]
if shp and shp != [""]:
has_shapefiles = bool(shp and shp != [""])
if has_shapefiles:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, now as soon as there is a shapefile in the regions, there is a "hardcoded" all region that is the ICON domain. If no shapefile is passed, the behaviour changes for regional models, where the results are going to be global.

Potential issues I see:

  • Would we ever pass other shapefiles that are not within our hardcoded all?
  • We should make it clear that for regional forecaster, not passing any region shapefile changes the reulsts.

What do you think?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct and I introduced it mostly for backward compatibility. But maybe we can try to find a better logic here? @jonasbhend is also refining the hardcoded domain as part of #191

@MicheleCattaneo MicheleCattaneo Jul 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But my point is that it's not backward compatible, or am I missing something?
What was the expected domain of verification if no shapefile was passed? With this PR, it is a global verification. I thought that it was always regional so far.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's backward compatible to the extent that we usually include regions for stratification, but otherwise no, results will change for an empty lists of regions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the intended behavior for global models? Verify on the globe?

Couldn't we check the list of regions againts the data domain and only iterate on those that are fully within the data domain? That way, we could use a different set of shapefiles for global and regional analysis. Not sure how to elegantly handle the different defaults for global (take all the data) and regional (take the inner 'all' domain) though. I guess with a simple conditional should work for now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the domain selection now as you want it? I think we are close to a merge. Let me know if there is still something to be done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would still argue that we should take this opportunity to harmonize the region definitions and make regions explicit. I.e. avoid the all region that will be the icon domain or global domain depending on the use case. Instead I propose to use:

  1. default to icon domain if no stratification is provided
  2. use global for the global verification to avoid confusion

This of course implies that we have to select the icon domain by default in the dashboard and plots.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about avoiding defaults and having the schema expect an explicit value for the region of interest?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's another proposal:

  1. we disallow region = None and make selection of regions explicit (i.e. we can use icon and global as names)
  2. first region gets plotted and used in dashboard

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit 69099e2 implements your suggestion, can you have a look?

Comment thread src/data_input/__init__.py Outdated
Comment thread src/data_input/__init__.py
Comment thread config/stage-a-o96-multi-step.yaml Outdated
@dnerini dnerini self-assigned this Jul 23, 2026

@jonasbhend jonasbhend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few minor comments, otherwise looking good. Sorry for taking so long.

Comment thread src/data_input/__init__.py
Comment on lines +30 to +35
# TODO: ssrd is treated as a plain per-step field (no de-accumulation),
# which only holds because it's not currently listed in any
# accumulate_from_start_of_forecast.accumulations in the inference
# configs (unlike tp, see _tot_prec_handling). If ssrd/strd are ever
# added there, this needs the same cumulative-since-start handling tp
# gets, or verification/plots will silently be wrong.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we already produce this, but in fact it is accumulated (or not)? I am confused...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for my enlightenment, not really important.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my understanding is that we predict the same variable used during training, which is period accumulated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry missed the comment.
We produce it only on some global experiments are the moment. The unit is W/m^2, and Watts are depending on a time of accumulation, so it's similar to precipitation in that way, and it could be produced with the accumulation from the start of the forecast just like precip. For simplicity now I treated is as an instantaneous variable (and the accumulation depends on the dataset used, 1h or 6h)

Comment thread src/data_input/__init__.py
Comment thread config/aifs-single.yaml Outdated
Comment thread config/forecasters-ich1-oper.yaml Outdated
Comment thread src/evalml/config.py Outdated
Comment thread src/verification/__init__.py Outdated
Comment thread config/forecasters-ich1.yaml Outdated
@dnerini

dnerini commented Jul 24, 2026

Copy link
Copy Markdown
Member Author

I have a few minor comments, otherwise looking good. Sorry for taking so long.

thanks! I addressed your comments above, hopefully a final look?

@jonasbhend
jonasbhend merged commit 0d1c8cb into main Jul 24, 2026
4 checks passed
@jonasbhend
jonasbhend deleted the feat/support-global-eval branch July 24, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants