Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
finam
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FINAM
finam
Commits
3361aaf8
Commit
3361aaf8
authored
2 years ago
by
Martin Lange
Browse files
Options
Downloads
Plain Diff
Merge branch 'tweak-benchmarks' into 'main'
Tweak benchmarks See merge request
!211
parents
16e79ec2
fcede5c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!211
Tweak benchmarks
Pipeline
#132103
passed with stages
in 4 minutes and 35 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
benchmarks/README.md
+5
-0
5 additions, 0 deletions
benchmarks/README.md
benchmarks/adapters/test_regrid.py
+22
-2
22 additions, 2 deletions
benchmarks/adapters/test_regrid.py
with
27 additions
and
2 deletions
benchmarks/README.md
+
5
−
0
View file @
3361aaf8
...
...
@@ -42,4 +42,9 @@ Regridding adapters, dependent on grid size.
Regridding from a uniform grid to another uniform grid of the same size, with slightly offset origin.
For more performant regridding, see the
[
ESMPy
](
https://earthsystemmodeling.org/esmpy/
)
-based regridding adapter in
[
`finam-regrid`
](
https://git.ufz.de/FINAM/finam-regrid/
)
(
[
benchmarks
](
https://git.ufz.de/FINAM/finam-regrid/-/tree/main/benchmarks
)
)

This diff is collapsed.
Click to expand it.
benchmarks/adapters/test_regrid.py
+
22
−
2
View file @
3361aaf8
...
...
@@ -50,7 +50,17 @@ class TestRegrid(unittest.TestCase):
)
@pytest.mark.benchmark
(
group
=
"
adapters-regrid
"
)
def
test_regrid_nearest_03_2048x1024
(
self
):
def
test_regrid_nearest_03_1024x512
(
self
):
grid1
=
fm
.
UniformGrid
((
1024
,
512
))
grid2
=
fm
.
UniformGrid
((
1024
,
512
),
origin
=
(
0.25
,
0.25
))
self
.
setup_adapter
(
grid1
,
grid2
,
fm
.
adapters
.
RegridNearest
())
_result
=
self
.
benchmark
(
self
.
adapter
.
get_data
,
time
=
dt
.
datetime
(
2000
,
1
,
1
),
target
=
None
)
@pytest.mark.benchmark
(
group
=
"
adapters-regrid
"
)
def
test_regrid_nearest_04_2048x1024
(
self
):
grid1
=
fm
.
UniformGrid
((
2048
,
1024
))
grid2
=
fm
.
UniformGrid
((
2048
,
1024
),
origin
=
(
0.25
,
0.25
))
...
...
@@ -80,7 +90,17 @@ class TestRegrid(unittest.TestCase):
)
@pytest.mark.benchmark
(
group
=
"
adapters-regrid
"
)
def
test_regrid_linear_03_2048x1024
(
self
):
def
test_regrid_linear_03_1024x512
(
self
):
grid1
=
fm
.
UniformGrid
((
1024
,
512
))
grid2
=
fm
.
UniformGrid
((
1024
,
512
),
origin
=
(
0.25
,
0.25
))
self
.
setup_adapter
(
grid1
,
grid2
,
fm
.
adapters
.
RegridLinear
())
_result
=
self
.
benchmark
(
self
.
adapter
.
get_data
,
time
=
dt
.
datetime
(
2000
,
1
,
1
),
target
=
None
)
@pytest.mark.benchmark
(
group
=
"
adapters-regrid
"
)
def
test_regrid_linear_04_2048x1024
(
self
):
grid1
=
fm
.
UniformGrid
((
2048
,
1024
))
grid2
=
fm
.
UniformGrid
((
2048
,
1024
),
origin
=
(
0.25
,
0.25
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment