Skip to content

32 create output image for global and local results#62

Draft
bxrgem wants to merge 42 commits intomainfrom
32-create-output-image-for-global-and-local-results
Draft

32 create output image for global and local results#62
bxrgem wants to merge 42 commits intomainfrom
32-create-output-image-for-global-and-local-results

Conversation

@bxrgem
Copy link
Copy Markdown
Member

@bxrgem bxrgem commented Oct 8, 2025

Close: #32

The documentation is preliminary

@bxrgem bxrgem linked an issue Oct 8, 2025 that may be closed by this pull request
Comment thread mkglobal_grid.py Outdated
@@ -0,0 +1,259 @@
#!/usr/bin/env python3
"""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These docs are not shown when running with --help

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.

Updated

Comment thread create_singlemap.py Outdated
@click.option('--map-area', type=click.Choice(['africa', 'northern-europe']), help='Map area to use', show_default=True, default='africa')
@click.argument('global-area', type=click.Path(exists=True))
@click.argument('local-area', type=click.Path(exists=True))
def cli(output: str, timestep: int, colormap: str, map_type: str, global_area: str, local_area: str, map_area: str):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe add a docstring for use with --help?

Comment thread create_animation.sh Outdated
@@ -0,0 +1,22 @@
date=20250305
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lots of hardcoded stuff here. Should the file be here? And how does it integrate with uv?

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.

removed

# 15, 63.3, standard_parallels=[63.3, 63.3])))

# Projection Africa
map = mpl.gcf().add_axes([0, 0, 1, 1], projection=ccrs.Mercator())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

does this mean that it only works for Africa?

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.

Updated comment.

Comment thread README.md Outdated
We can now create an image with both global and local forecast.

```
uv run create_singlemap.py global_0_25deg.nc lam.nc
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should lam.nc be mentioned in the config above?

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.

Updated

@bxrgem bxrgem marked this pull request as draft October 9, 2025 14:33
@bxrgem bxrgem marked this pull request as ready for review October 17, 2025 11:45
Comment thread bris-adapt/pyproject.toml Outdated
"twine>=6.2.0",
"torch-geometric==2.4.0",
"cartopy>=0.21.1",
"gridpp",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This does not work on a mac

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Either make it an optional dependency or replace with scipy

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.

replaced

@vegardb
Copy link
Copy Markdown
Member

vegardb commented Oct 17, 2025

Maybe the source files that are not the click code should be moved into its own package, such as bris_adapt/image, or something like that? It is a little confusing that there are so many files in the script pacakge

@vegardb
Copy link
Copy Markdown
Member

vegardb commented Oct 20, 2025

vegardb@kihon bris-fiab % uv run  bris-adapt process create-image global_0_25deg.nc local.nc --map-type temperature --map-area africa --timestep 1 --output-dir images
Creating temperature images for africa
Number of time steps available: 1
Creating images for timesteps 0 to 0
Creating image for timestep 0  time 2025-04-06 00 ... %                                                                                                                                                                

vegardb@kihon bris-fiab % echo $?
137
vegardb@kihon bris-fiab %

...and no image generated

sfc_names = []
pl_names = []

coords = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These are redefined later down, without having been used at all, it seems?

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.

removed coords at this spot

Comment thread bris-adapt/bris_adapt/scripts/process/make_grid.py
@bxrgem bxrgem marked this pull request as draft November 7, 2025 07:33
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.

Create output image for global and local results

2 participants