Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LAKE
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
Model registry
Operate
Environments
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
Andrey Klenin
LAKE
Commits
a989ce93
Commit
a989ce93
authored
4 years ago
by
Victor Stepanenko
Browse files
Options
Downloads
Patches
Plain Diff
Plotting hourly profiles improved
parent
e7c01d05
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/plot_hourly.py
+83
-83
83 additions, 83 deletions
tools/plot_hourly.py
with
83 additions
and
83 deletions
tools/plot_hourly.py
+
83
−
83
View file @
a989ce93
...
...
@@ -27,7 +27,8 @@ plt.rc('text.latex',preamble='\usepackage[russian]{babel}')
#path = ['../results/windforc_base/hourly/', \
# '../results/windforc_kor/hourly/', \
# '../results/windforc_dynpgrad4/hourly/'] # path to files
path
=
[
'
../results/Mojai2016-2017_damw5/hourly/
'
]
#,'../results/Mojai2016-2017_damtribheat=0/hourly/']
#path = ['../results/Mojai2016-2017_damw5/hourly/']#,'../results/Mojai2016-2017_damtribheat=0/hourly/']
path
=
[
'
../results/river/hourly/
'
]
year
=
int
(
input
(
"
Enter year
\n
"
))
nm0
=
int
(
input
(
"
Enter month
\n
"
))
...
...
@@ -50,8 +51,9 @@ else:
#pathobs = os.path.expanduser('/media/victor/main/Files/main/observdata/Mojai/TO2CH4_050720171600.csv')
#pathobs = os.path.expanduser('/media/victor/main/Files/main/observdata/Mojai/TO2CH4_100720171800.csv')
#pathobs = os.path.expanduser('/media/victor/main/Files/main/observdata/Mojai/TO2CH4_200820171700.csv')
pathobs
=
os
.
path
.
expanduser
(
'
/home/victor/Files/main/observdata/Mojai2016-2017/TO2CH4_
'
+
\
str
(
nd0
).
zfill
(
2
)
+
str
(
nm0
).
zfill
(
2
)
+
str
(
year
)
+
str
(
nh0
).
zfill
(
2
)
+
'
00.csv
'
)
#Path to Mojai measured profiles
#pathobs = os.path.expanduser('/home/victor/Files/main/observdata/Mojai2016-2017/TO2CH4_'+\
# str(nd0).zfill(2)+str(nm0).zfill(2)+str(year)+str(nh0).zfill(2)+'00.csv')
nonval
=
-
999.
...
...
@@ -89,8 +91,9 @@ ncols = []
nheader
=
[]
scale
=
[]
varname_
=
'
ch4
'
varnames_list
=
[
'
temp
'
,
'
o2
'
,
'
ch4
'
,
'
co2
'
]
varname_
=
'
nut
'
varnames_list
=
[
'
temp
'
,
'
o2
'
,
'
ch4
'
,
'
co2
'
,
'
uspeed
'
,
'
tke
'
,
'
nut
'
,
\
'
sprod
'
,
'
bprod
'
,
'
eps
'
,
'
tketrans
'
]
nvarlist
=
varnames_list
.
index
(
varname_
)
#varname = 'Absolute value of velocity'
...
...
@@ -101,6 +104,7 @@ nvarlist = varnames_list.index(varname_)
#ncols = 14 #Total number of columns
#nheader = 14 #Number of lines in the header
logscale
=
False
if
(
nvarlist
==
varnames_list
.
index
(
'
temp
'
)):
#varname.append(u'Temperature, model')
#ylabel = u'Depth, m' #$\circ C$
...
...
@@ -112,7 +116,6 @@ if (nvarlist == varnames_list.index('temp')):
ncols
.
append
(
17
)
#Total number of columns
nheader
.
append
(
17
)
#Number of lines in the header
scale
.
append
(
1.
)
logscale
=
False
xmin
=
6.
xmax
=
26.
if
(
nvarlist
==
varnames_list
.
index
(
'
o2
'
)):
...
...
@@ -127,7 +130,6 @@ if (nvarlist == varnames_list.index('o2')):
ncols
.
append
(
17
)
#Total number of columns
nheader
.
append
(
17
)
#Number of lines in the header
scale
.
append
(
1.
)
logscale
=
False
xmin
=
0.
xmax
=
15.
if
(
nvarlist
==
varnames_list
.
index
(
'
ch4
'
)):
...
...
@@ -157,84 +159,82 @@ if (nvarlist == varnames_list.index('co2')):
ncols
.
append
(
17
)
#Total number of columns
nheader
.
append
(
17
)
#Number of lines in the header
scale
.
append
(
1.
)
logscale
=
False
#xmin = -8.E-2
#xmax = 8.E-2
#varname.append(u'Компонента скорости по оси $x$')
#ylabel = u'Глубина, м' #$\circ C$
#xlabel = varname[len(varname)-1] + u',~м/с'
#basefilename.append('Profiles')
#ncol.append(12) #The column number to display, 2 for temperature
#ncols.append(14) #Total number of columns
#nheader.append(14) #Number of lines in the header
#scale.append(1.)
if
(
nvarlist
==
varnames_list
.
index
(
'
uspeed
'
)):
varname
.
append
(
u
'
Компонента скорости по оси $x$
'
)
ylabel
=
u
'
Глубина, м
'
#$\circ C$
xlabel
=
varname
[
len
(
varname
)
-
1
]
+
u
'
,~м/с
'
basefilename
.
append
(
'
Profiles
'
)
ncol
.
append
(
12
)
#The column number to display, 2 for temperature
ncols
.
append
(
17
)
#Total number of columns
nheader
.
append
(
17
)
#Number of lines in the header
scale
.
append
(
1.
)
#xmin = -8.E-2
#xmax = 8.E-2
#varname = u'Турбулентная кинетическая энергия'
#ylabel = u'Глубина, м' #$\circ C$
#xlabel = varname + u',~м$^2$/с$^2$'
#basefilename = 'Profiles'
#ncol = 5 #The column number to display, 2 for temperature
#ncols = 14 #Total number of columns
#nheader = 14 #Number of lines in the header
#varname = u'Скорость диссипации ТКЭ'
#ylabel = u'Глубина, м' #$\circ C$
#xlabel = varname + u',~м$^2$/с$^3$'
#basefilename = 'Profiles'
#ncol = 6 #The column number to display, 2 for temperature
#ncols = 14 #Total number of columns
#nheader = 14 #Number of lines in the header
if
(
nvarlist
==
varnames_list
.
index
(
'
tke
'
)):
varname
.
append
(
u
'
Турбулентная кинетическая энергия
'
)
ylabel
=
u
'
Глубина, м
'
#$\circ C$
xlabel
=
varname
[
len
(
varname
)
-
1
]
+
u
'
,~м$^2$/с$^2$
'
basefilename
.
append
(
'
Profiles
'
)
ncol
.
append
(
5
)
#The column number to display, 2 for temperature
ncols
.
append
(
17
)
#Total number of columns
nheader
.
append
(
17
)
#Number of lines in the header
scale
.
append
(
1.
)
#varname = u'Коэффициент вязкости для ТКЭ'
#ylabel = u'Глубина, м' #$\circ C$
#xlabel = varname + u',~м$^2$/с'
#basefilename = 'Profiles'
#ncol = 7 #The column number to display, 2 for temperature
#ncols = 14 #Total number of columns
#nheader = 14 #Number of lines in the header
if
(
nvarlist
==
varnames_list
.
index
(
'
nut
'
)):
varname
.
append
(
u
'
Коэффициент вязкости для ТКЭ
'
)
ylabel
=
u
'
Глубина, м
'
#$\circ C$
xlabel
=
varname
[
len
(
varname
)
-
1
]
+
u
'
,~м$^2$/с
'
basefilename
.
append
(
'
Profiles
'
)
ncol
.
append
(
7
)
#The column number to display, 2 for temperature
ncols
.
append
(
17
)
#Total number of columns
nheader
.
append
(
17
)
#Number of lines in the header
scale
.
append
(
1.
)
#varname.append(u'Сдвиговая генерация')
if
(
nvarlist
==
varnames_list
.
index
(
'
sprod
'
)):
varname
.
append
(
u
'
Сдвиговая генерация
'
)
#varname.append(u'S')
#ylabel = u'Глубина, м' #$\circ C$
##xlabel = varname[len(varname)-1] + u', м$^2$/с$^3$'
#basefilename.append('TKE_budget')
#ncol.append(2)
#ncols.append(6)
#nheader.append(7)
#scale.append(1.)
#varname.append(u'Источник/сток за счет плавучести')
ylabel
=
u
'
Глубина, м
'
#$\circ C$
xlabel
=
varname
[
len
(
varname
)
-
1
]
+
u
'
, м$^2$/с$^3$
'
basefilename
.
append
(
'
TKE_budget
'
)
ncol
.
append
(
2
)
ncols
.
append
(
6
)
nheader
.
append
(
7
)
scale
.
append
(
1.
)
if
(
nvarlist
==
varnames_list
.
index
(
'
bprod
'
)):
varname
.
append
(
u
'
Источник/сток за счет плавучести
'
)
#varname.append(u'B')
#ylabel = u'Глубина, м' #$\circ C$
##xlabel = varname[len(varname)-1] + u', м$^2$/с$^3$'
#basefilename.append('TKE_budget')
#ncol.append(4)
#ncols.append(6)
#nheader.append(7)
#scale.append(1.)
#varname.append(u'Диссипация ТКЭ')
ylabel
=
u
'
Глубина, м
'
#$\circ C$
xlabel
=
varname
[
len
(
varname
)
-
1
]
+
u
'
, м$^2$/с$^3$
'
basefilename
.
append
(
'
TKE_budget
'
)
ncol
.
append
(
4
)
ncols
.
append
(
6
)
nheader
.
append
(
7
)
scale
.
append
(
1.
)
if
(
nvarlist
==
varnames_list
.
index
(
'
eps
'
)):
varname
.
append
(
u
'
Диссипация ТКЭ
'
)
#varname.append(u'$\epsilon$')
#ylabel = u'Глубина, м' #$\circ C$
##xlabel = varname[len(varname)-1] + u', м$^2$/с$^3$'
#basefilename.append('TKE_budget')
#ncol.append(5)
#ncols.append(6)
#nheader.append(7)
#scale.append(-1.)
#varname.append(u'Перенос ТКЭ')
#ylabel = u'Глубина, м' #$\circ C$
##xlabel = varname[len(varname)-1] + u', м$^2$/с$^3$'
#basefilename.append('TKE_budget')
#ncol.append(6)
#ncols.append(6)
#nheader.append(7)
#scale.append(1.)
ylabel
=
u
'
Глубина, м
'
#$\circ C$
xlabel
=
varname
[
len
(
varname
)
-
1
]
+
u
'
, м$^2$/с$^3$
'
basefilename
.
append
(
'
TKE_budget
'
)
ncol
.
append
(
5
)
ncols
.
append
(
6
)
nheader
.
append
(
7
)
scale
.
append
(
-
1.
)
if
(
nvarlist
==
varnames_list
.
index
(
'
tketrans
'
)):
varname
.
append
(
u
'
Перенос ТКЭ
'
)
ylabel
=
u
'
Глубина, м
'
#$\circ C$
xlabel
=
varname
[
len
(
varname
)
-
1
]
+
u
'
, м$^2$/с$^3$
'
basefilename
.
append
(
'
TKE_budget
'
)
ncol
.
append
(
6
)
ncols
.
append
(
6
)
nheader
.
append
(
7
)
scale
.
append
(
1.
)
#xlabel = u'Температура, $^{\circ}C$' #u'Слагаемые уравнения баланса ТКЭ, м$^2$/с$^3$'
#xlabel = u'Methane, mcmol/l$'
...
...
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