Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OxyPOM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
ElbeXtreme
OxyPOM
Commits
0aaf8c1b
Commit
0aaf8c1b
authored
4 weeks ago
by
og
Browse files
Options
Downloads
Patches
Plain Diff
lintr formatting r
parent
fe2d7865
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
testcases/estuary/plot_output.R
+9
-8
9 additions, 8 deletions
testcases/estuary/plot_output.R
testcases/estuary/setup_data.R
+4
-2
4 additions, 2 deletions
testcases/estuary/setup_data.R
testcases/light/model_comparison.R
+1
-1
1 addition, 1 deletion
testcases/light/model_comparison.R
with
14 additions
and
11 deletions
testcases/estuary/plot_output.R
+
9
−
8
View file @
0aaf8c1b
...
...
@@ -15,7 +15,7 @@ as.POSIXct = function(...) base::as.POSIXct(..., format = "%Y-%m-%d %H:%M:%S")
nc_data
=
nc_open
(
"output.nc"
)
is_oxypom
=
TRUE
# True if OxyPOM is validated False if DiaMo is validated
if
(
"diamo_PAR"
%in%
names
(
nc_data
$
var
))
is_oxypom
=
FALSE
# DiaMo is validated
if
(
"diamo_PAR"
%in%
names
(
nc_data
$
var
))
is_oxypom
=
FALSE
# DiaMo is validated
temp
=
t
(
ncvar_get
(
nc_data
,
"temp"
))
...
...
@@ -66,9 +66,10 @@ col_obs3 = "gray50"
png
(
filename
=
"./estuary_validation.png"
,
width
=
800
,
height
=
400
)
width
=
800
,
height
=
400
)
par
(
mfrow
=
c
(
2
,
1
),
mai
=
c
(
0.42
,
0.42
,
0.21
,
0.21
),
oma
=
2
*
c
(
1
,
1
,
0.5
,
0.5
),
las
=
1
)
par
(
mfrow
=
c
(
2
,
1
),
mai
=
c
(
0.42
,
0.42
,
0.21
,
0.21
),
oma
=
2
*
c
(
1
,
1
,
0.5
,
0.5
),
las
=
1
)
plot
(
x
,
rowMeans
(
temp
[,
bottom
:
surface
]),
type
=
"n"
,
...
...
@@ -78,7 +79,7 @@ plot(x, rowMeans(temp[,bottom:surface]),
lwd
=
0.5
,
ylab
=
""
,
xlab
=
"days"
)
)
title
(
"temperature at the surface degC"
,
adj
=
0
,
line
=
0.1
,
cex
=
0.5
,
font.main
=
1
)
points
(
as.Date
(
temp_obs_2
$
V1
),
temp_obs_2
$
V2
,
col
=
col_obs2
,
pch
=
0
,
cex
=
.5
)
...
...
@@ -96,7 +97,7 @@ plot(x, rowMeans(oxy[,1:2]),
lwd
=
0.5
,
ylab
=
""
,
xlab
=
"days"
,
)
)
title
(
"dissolved oxygen concentration mmol-O2 L-1"
,
adj
=
0
,
line
=
0.1
,
cex
=
0.5
,
font.main
=
1
)
points
(
as.Date
(
DO_obs_2
$
V1
),
(
1000
/
32
)
*
DO_obs_2
$
V2
,
col
=
col_obs2
,
pch
=
0
,
cex
=
.5
)
...
...
@@ -113,8 +114,8 @@ legend("bottomleft",
pt.cex
=
c
(
.5
,
1
,
NA
,
NA
,
NA
),
col
=
c
(
col_obs2
,
col_obs
,
col_obs3
,
col_sim
,
col_sim_bottom
),
pch
=
c
(
0
,
20
,
0
,
0
,
0
),
pt.lwd
=
c
(
1
,
1
,
1
,
1
,
1
),
lwd
=
c
(
0
,
0
,
1
,
2
,
1
)
)
pt.lwd
=
c
(
1
,
1
,
1
,
1
,
1
),
lwd
=
c
(
0
,
0
,
1
,
2
,
1
)
)
dev.off
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
testcases/estuary/setup_data.R
+
4
−
2
View file @
0aaf8c1b
...
...
@@ -18,10 +18,12 @@ temp = read.delim("Cuxhaven_DWD!Lufttemperatur.txt",
header
=
FALSE
,
comment.char
=
"#"
)
wind
=
read.delim
(
"Cuxhaven_DWD!Windgeschwindigkeit.txt"
,
header
=
FALSE
,
comment.char
=
"#"
)
dirw
=
read.delim
(
"Cuxhaven_DWD!Windrichtung.txt"
,
header
=
FALSE
,
comment.char
=
"#"
...
...
@@ -32,7 +34,7 @@ wind$V1 = as.POSIXct(wind$V1)
dirw
$
V1
=
as.POSIXct
(
dirw
$
V1
)
## transforming temperatures at 9m above ground to 2 meter values
## assuming linear profile
## assuming linear
temperature
profile
h_station
=
9
h_model
=
2
T_gradient
=
-0.0065
...
...
@@ -40,7 +42,7 @@ bias = 5
temp
$
temp
=
temp
$
V2
+
(
h_model
-
h_station
)
*
T_gradient
+
bias
## transforming wind speed at 9m above ground to 10 meter values
## assuming logarithmic profile
## assuming logarithmic
wind
profile
h_station
=
9
h_model
=
10
w_exponent
=
0.14
...
...
This diff is collapsed.
Click to expand it.
testcases/light/model_comparison.R
+
1
−
1
View file @
0aaf8c1b
...
...
@@ -90,7 +90,7 @@ plot(rowMeans(rphy[, 1:(N / 2 + 1)]),
xlab
=
""
,
ylab
=
"mmol-C m-3"
)
lines
(
rowMeans
(
bphy
[,
1
:
(
N
/
2
+
1
)]),
type
=
"l"
,
col
=
col_sim
)
lines
(
rowMeans
(
bphy
[,
1
:
(
N
/
2
+
1
)]),
type
=
"l"
,
col
=
col_sim
)
dev.off
()
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