32 create output image for global and local results#62
Conversation
| @@ -0,0 +1,259 @@ | |||
| #!/usr/bin/env python3 | |||
| """ | |||
There was a problem hiding this comment.
These docs are not shown when running with --help
| @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): |
There was a problem hiding this comment.
Maybe add a docstring for use with --help?
| @@ -0,0 +1,22 @@ | |||
| date=20250305 | |||
There was a problem hiding this comment.
lots of hardcoded stuff here. Should the file be here? And how does it integrate with uv?
| # 15, 63.3, standard_parallels=[63.3, 63.3]))) | ||
|
|
||
| # Projection Africa | ||
| map = mpl.gcf().add_axes([0, 0, 1, 1], projection=ccrs.Mercator()) |
There was a problem hiding this comment.
does this mean that it only works for Africa?
| We can now create an image with both global and local forecast. | ||
|
|
||
| ``` | ||
| uv run create_singlemap.py global_0_25deg.nc lam.nc |
There was a problem hiding this comment.
should lam.nc be mentioned in the config above?
| "twine>=6.2.0", | ||
| "torch-geometric==2.4.0", | ||
| "cartopy>=0.21.1", | ||
| "gridpp", |
There was a problem hiding this comment.
Either make it an optional dependency or replace with scipy
|
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@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 = { |
There was a problem hiding this comment.
These are redefined later down, without having been used at all, it seems?
There was a problem hiding this comment.
removed coords at this spot
Close: #32
The documentation is preliminary