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
afa1a146
Commit
afa1a146
authored
8 months ago
by
GUEZ Lionel
Browse files
Options
Downloads
Patches
Plain Diff
Transmit projection coordinates to `mean_speed`
Transmit projection coordinates of contour to `mean_speed`.
parent
9e08b7b9
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
Inst_eddies/Tests/test_mean_speed.f90
+9
-2
9 additions, 2 deletions
Inst_eddies/Tests/test_mean_speed.f90
Inst_eddies/mean_speed.f90
+4
-1
4 additions, 1 deletion
Inst_eddies/mean_speed.f90
Inst_eddies/set_max_speed.f90
+2
-2
2 additions, 2 deletions
Inst_eddies/set_max_speed.f90
with
15 additions
and
5 deletions
Inst_eddies/Tests/test_mean_speed.f90
+
9
−
2
View file @
afa1a146
...
...
@@ -20,12 +20,16 @@ program test_mean_speed
real
::
center
(
2
)
=
[
9.625
,
-
33.875
]
! longitude and latitude, in degrees
integer
ncid
,
varid
,
dimid
integer
::
ishape
=
0
integer
nlon
,
nlat
integer
nlon
,
nlat
,
i
real
lon_max
,
lat_max
! longitude and latitude, in degrees
real
step
(
2
)
! longitude and latitude steps, in degrees
real
,
allocatable
::
u
(:,
:),
v
(:,
:)
! (nlon, nlat) wind, in m s-1
TYPE
(
shpfileobject
)
hshp
type
(
polygon
)
p
real
,
allocatable
::
points_xy
(:,
:)
! (2, p%part(1)%n_points)
! Points given by projection coordinates.
character
(
len
=
:),
allocatable
::
contour_filename
real
min_lon_p
! minimum longitude of p, in degrees
...
...
@@ -93,7 +97,10 @@ program test_mean_speed
end
if
p
%
part
(
1
)
%
points
=
p
%
part
(
1
)
%
points
*
deg_to_rad
print
*
,
"mean azimuthal speed = "
,
mean_speed
(
u
,
v
,
p
%
part
(
1
),
&
allocate
(
points_xy
(
2
,
p
%
part
(
1
)
%
n_points
))
forall
(
i
=
1
:
p
%
part
(
1
)
%
n_points
)
points_xy
(:,
i
)
=
(
p
%
part
(
1
)
%
points
(:,
i
)
&
-
corner
)
/
step
+
1.
print
*
,
"mean azimuthal speed = "
,
mean_speed
(
u
,
v
,
p
%
part
(
1
),
points_xy
,
&
center
*
deg_to_rad
,
corner
*
deg_to_rad
,
step
*
deg_to_rad
),
"m s-1"
end
program
test_mean_speed
This diff is collapsed.
Click to expand it.
Inst_eddies/mean_speed.f90
+
4
−
1
View file @
afa1a146
...
...
@@ -4,7 +4,7 @@ module mean_speed_m
contains
real
function
mean_speed
(
u
,
v
,
p
,
center
,
corner
,
step
)
real
function
mean_speed
(
u
,
v
,
p
,
points_xy
,
center
,
corner
,
step
)
! Interpolates the wind at each point of the input polyline and
! computes the mean azimuthal speed at interpolation points. We
...
...
@@ -26,6 +26,9 @@ contains
! Contour, with points given by longitude and latitude, in
! radians. Should be closed.
real
,
intent
(
in
)::
points_xy
(:,
:)
! (2, p%n_points)
! Points given by projection coordinates.
real
,
intent
(
in
)::
center
(:)
! (2)
! Longitude and latitude, in rad. Azimuthal speed is computed with
! respect to this point.
...
...
This diff is collapsed.
Click to expand it.
Inst_eddies/set_max_speed.f90
+
2
−
2
View file @
afa1a146
...
...
@@ -103,8 +103,8 @@ contains
do
i
=
1
,
n_cont
if
(
cont_list
(
i
)
%
closed
)
then
speed
(
i
)
=
mean_speed
(
u
,
v
,
cont_list
(
i
)
%
polyline
,
extr_coord
,
&
corner
,
step
)
speed
(
i
)
=
mean_speed
(
u
,
v
,
cont_list
(
i
)
%
polyline
,
&
cont_list_proj
(
i
)
%
points
,
extr_coord
,
corner
,
step
)
else
! It is possible that good_contour returned a null polyline
! if there is a missing value of SSH inside the outermost
...
...
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