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
40f6a2b7
Commit
40f6a2b7
authored
4 months ago
by
GUEZ Lionel
Browse files
Options
Downloads
Patches
Plain Diff
Keep radius in km
Avoiding multiplication by 1000 for each instantaneous eddy.
parent
61ae65ae
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Trajectories/cost_function.py
+6
-6
6 additions, 6 deletions
Trajectories/cost_function.py
with
6 additions
and
6 deletions
Trajectories/cost_function.py
+
6
−
6
View file @
40f6a2b7
...
...
@@ -28,7 +28,7 @@ import util_eddies
Omega
=
2
*
math
.
pi
/
86164.0
# in s-1
r_Earth
=
6371
# radius of the Earth, in km
FACTOR
=
2
*
Omega
FACTOR
=
2
*
Omega
*
1000
# 1000 for conversion of km to m
def
avg_radii_rossby
(
latitude_list
,
speed_list
,
radius_list
):
...
...
@@ -44,13 +44,13 @@ def avg_radii_rossby(latitude_list, speed_list, radius_list):
n_valid_Rossby
=
0
for
latitude
,
speed
,
radius
in
zip
(
latitude_list
,
speed_list
,
radius_list
):
radius
=
radius
*
1000
# in m
if
abs
(
speed
)
<
100
:
avg_Rossby
+=
speed
/
(
FACTOR
*
math
.
sin
(
latitude
)
*
radius
)
# (convert radius to m)
n_valid_Rossby
+=
1
avg_rad
+=
radius
# in m
avg_rad
+=
radius
avg_rad
/=
len
(
radius_list
)
...
...
@@ -211,8 +211,8 @@ delta_cent_mean = 3.8481 # in km
delta_cent_std
=
8.0388
# in km
delta_ro_mean
=
-
0.0025965
delta_ro_std
=
5.2168
delta_r_mean
=
-
9.4709
# in m
delta_r_std
=
8.6953
e3
# in m
delta_r_mean
=
-
9.4709
e-3
# in
k
m
delta_r_std
=
8.6953
# in
k
m
# Load the graph_tool file:
...
...
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