Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Detection eddies
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IPSL
LMD
DPAO
Detection eddies
Commits
28267553
Commit
28267553
authored
7 years ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Shapefile test_max_speed_contour no longer exists. Values of points in
test_set_outermost_contour are in degrees.
parent
68b9b6a9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Sources/Tests/test_mean_speed.f
+3
-3
3 additions, 3 deletions
Sources/Tests/test_mean_speed.f
Sources/Tests/test_mean_speed.py
+5
-5
5 additions, 5 deletions
Sources/Tests/test_mean_speed.py
Sources/Tests/tests_detection_eddies.sh
+36
-16
36 additions, 16 deletions
Sources/Tests/tests_detection_eddies.sh
with
44 additions
and
24 deletions
Sources/Tests/test_mean_speed.f
+
3
−
3
View file @
28267553
...
...
@@ -30,7 +30,7 @@ program test_mean_speed
call
nf95_close
(
ncid
)
call
shp_open_03
(
"test_
max_speed
_contour
_ssh
"
,
"rb"
,
hshp
)
call
shp_open_03
(
"test_
set_outermost
_contour"
,
"rb"
,
hshp
)
call
shp_read_object_03
(
hshp
,
0
,
psobject
)
! Note: this is the outermost contour, not the maximum speed contour.
CALL
shpclose
(
hshp
)
...
...
@@ -38,8 +38,8 @@ program test_mean_speed
p
%
n_points
=
psobject
%
nvertices
p
%
closed
=
.true.
allocate
(
p
%
points
(
2
,
p
%
n_points
))
p
%
points
(
1
,
:)
=
psobject
%
padfx
p
%
points
(
2
,
:)
=
psobject
%
padfy
p
%
points
(
1
,
:)
=
psobject
%
padfx
*
radian_per_degree
p
%
points
(
2
,
:)
=
psobject
%
padfy
*
radian_per_degree
m
=
mean_speed
(
u
(
21
:
49
,
215
:
231
,
1
),
v
(
21
:
49
,
215
:
231
,
1
),
p
,
&
center
=
[
9.625
,
-
33.875
]
*
radian_per_degree
,
&
...
...
This diff is collapsed.
Click to expand it.
Sources/Tests/test_mean_speed.py
+
5
−
5
View file @
28267553
...
...
@@ -21,16 +21,16 @@ lat_rad = lat * np.pi / 180
values
=
np
.
stack
((
u
,
v
),
axis
=
-
1
)
sf
=
shapefile
.
Reader
(
"
test_
max_speed
_contour
_ssh
"
)
sf
=
shapefile
.
Reader
(
"
test_
set_outermost
_contour
"
)
# This is the outermost contour, not the maximum speed contour.
p
=
sf
.
shape
(
0
)
p
=
np
.
array
(
p
.
points
)
lon_interp
_rad
=
p
[:,
0
]
lat_interp
_rad
=
p
[:,
1
]
lon_interp
=
p
[:,
0
]
lat_interp
=
p
[:,
1
]
lon_interp
=
lon_interp
_rad
*
180
/
np
.
pi
lat_interp
=
lat_interp
_rad
*
180
/
np
.
pi
lon_interp
_rad
=
lon_interp
/
180
*
np
.
pi
lat_interp
_rad
=
lat_interp
/
180
*
np
.
pi
xi
=
np
.
column_stack
((
lat_interp_rad
,
lon_interp_rad
))
values_x
=
interpolate
.
interpn
((
lat_rad
,
lon_rad
),
values
,
xi
)
...
...
This diff is collapsed.
Click to expand it.
Sources/Tests/tests_detection_eddies.sh
+
36
−
16
View file @
28267553
set
-
x
e
set
-e
compil_prod_dir
=
~/Downloads/Compil_prod/Detection_eddies
src_tests_dir
=
~/Documents/Informatique_fonctionnement/Programs/Detection_eddies/Sources/Tests
src_tests_dir
=
`
dirname
$0
`
# From low-level to high-level tests, minding that some tests use
# output from previous tests:
$compil_prod_dir
/test_good_contour
for
suffix
in
dbf shp shx
do
diff Old/test_good_contour.
$suffix
test_good_contour.
$suffix
done
$compil_prod_dir
/test_local_extrema h_2006_01_01.nc
<<
EOF
&main_nml /
EOF
$src_tests_dir
/test_local_extrema.py h_2006_01_01.nc
$compil_prod_dir
/test_inside
$src_tests_dir
/test_inside.py
$compil_prod_dir
/test_outermost_contour
>
test_outermost_contour_stdout.txt
$compil_prod_dir
/test_max_speed_contour_ssh
\
>
test_max_speed_contour_ssh_stdout.txt
for
suffix
in
nc csv
do
diff Old/test_local_extrema.
$suffix
test_local_extrema.
$suffix
done
##$src_tests_dir/test_local_extrema.py h_2006_01_01.nc
$compil_prod_dir
/test_inside
>
test_inside_stdout.txt
diff Old/test_inside_stdout.txt test_inside_stdout.txt
##$src_tests_dir/test_inside.py
$compil_prod_dir
/test_set_outermost_contour h_2006_01_01.nc
\
Old/test_local_extrema.nc
\
>
test_set_outermost_contour_stdout.txt
<<
EOF
&MAIN_NML /
EOF
for
suffix
in
_stdout.txt .dbf .shp .shx
do
diff Old/test_set_outermost_contour
$suffix
test_set_outermost_contour
$suffix
done
$compil_prod_dir
/test_max_speed_contour_ssh h_2006_01_01.nc uv_2006_01_01.nc
\
>
test_max_speed_contour_ssh_stdout.txt
<<
EOF
&MAIN_NML /
EOF
diff Old/test_max_speed_contour_ssh_stdout.txt
\
test_max_speed_contour_ssh_stdout.txt
$compil_prod_dir
/test_mean_speed
>
test_mean_speed_stdout.txt
$src_tests_dir
/test_mean_speed.py
##
$src_tests_dir/test_mean_speed.py
$compil_prod_dir
/test_get_eddy
>
test_get_eddy_stdout.txt
$src_tests_dir
/test_get_eddy.py
##$src_tests_dir/test_get_eddy.py
$compil_prod_dir
/test_get_snapshot
$src_tests_dir
/test_get_snapshot.py
##
$compil_prod_dir/test_get_snapshot
##
$src_tests_dir/test_get_snapshot.py
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