Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
brivas
mdf_reader
Commits
42e4f3bb
Commit
42e4f3bb
authored
4 years ago
by
Beartriz Recinos Rivas
Browse files
Options
Download
Email Patches
Plain Diff
related to issue
#4
fixed errors in stats cliwoc code
parent
709f08be
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
266 additions
and
322 deletions
+266
-322
docs/notebooks/CLIWOC_missing_code_tables.ipynb
docs/notebooks/CLIWOC_missing_code_tables.ipynb
+246
-308
tests/gather_stats_c99.py
tests/gather_stats_c99.py
+15
-11
tests/run_cliwoc_stats.slurm
tests/run_cliwoc_stats.slurm
+5
-3
No files found.
docs/notebooks/CLIWOC_missing_code_tables.ipynb
View file @
42e4f3bb
This source diff could not be displayed because it is too large. You can
view the blob
instead.
This diff is collapsed.
Click to expand it.
tests/gather_stats_c99.py
View file @
42e4f3bb
...
...
@@ -63,6 +63,7 @@ ap_units = []
bart_units
=
[]
lon_units
=
[]
baro_types
=
[]
releases
=
[]
for
path
in
paths_files
:
...
...
@@ -81,6 +82,7 @@ for path in paths_files:
bart_unit
=
data
.
data
[[
"c99_data"
]].
c99_data
.
BART_reading_units
.
value_counts
(
dropna
=
False
).
to_frame
()
lon_unit
=
data
.
data
[[
"c99_data"
]].
c99_data
.
Longitude_units
.
value_counts
(
dropna
=
False
).
to_frame
()
baro_type
=
data
.
data
[[
"c99_data"
]].
c99_data
.
BARO_type
.
value_counts
(
dropna
=
False
).
to_frame
()
release
=
data
.
data
[[
"c99_data"
]].
c99_data
.
Release
.
value_counts
(
dropna
=
False
).
to_frame
()
ship_types
.
append
(
rig
)
lat_inds
.
append
(
lat_ind
)
...
...
@@ -91,17 +93,19 @@ for path in paths_files:
bart_units
.
append
(
bart_unit
)
lon_units
.
append
(
lon_unit
)
baro_types
.
append
(
baro_type
)
d
[
'ship_types'
]
=
pd
.
concat
(
ship_types
,
axis
=
1
,
join
=
'inner'
).
sum
(
axis
=
1
)
d
[
'lan_inds'
]
=
pd
.
concat
(
lat_inds
,
axis
=
1
,
join
=
'inner'
).
sum
(
axis
=
1
)
d
[
'lon_inds'
]
=
pd
.
concat
(
lon_inds
,
axis
=
1
,
join
=
'inner'
).
sum
(
axis
=
1
)
d
[
'at_units'
]
=
pd
.
concat
(
at_units
,
axis
=
1
,
join
=
'inner'
).
sum
(
axis
=
1
)
d
[
'sst_units'
]
=
pd
.
concat
(
sst_units
,
axis
=
1
,
join
=
'inner'
).
sum
(
axis
=
1
)
d
[
'ap_units'
]
=
pd
.
concat
(
ap_units
,
axis
=
1
,
join
=
'inner'
).
sum
(
axis
=
1
)
d
[
'bart_units'
]
=
pd
.
concat
(
bart_units
,
axis
=
1
,
join
=
'inner'
).
sum
(
axis
=
1
)
d
[
'lon_units'
]
=
pd
.
concat
(
lon_units
,
axis
=
1
,
join
=
'inner'
).
sum
(
axis
=
1
)
d
[
'baro_types'
]
=
pd
.
concat
(
baro_types
,
axis
=
1
,
join
=
'inner'
).
sum
(
axis
=
1
)
releases
.
append
(
release
)
d
[
'ship_types'
]
=
pd
.
concat
(
ship_types
,
axis
=
1
).
sum
(
axis
=
1
)
d
[
'lan_inds'
]
=
pd
.
concat
(
lat_inds
,
axis
=
1
).
sum
(
axis
=
1
)
d
[
'lon_inds'
]
=
pd
.
concat
(
lon_inds
,
axis
=
1
).
sum
(
axis
=
1
)
d
[
'at_units'
]
=
pd
.
concat
(
at_units
,
axis
=
1
).
sum
(
axis
=
1
)
d
[
'sst_units'
]
=
pd
.
concat
(
sst_units
,
axis
=
1
).
sum
(
axis
=
1
)
d
[
'ap_units'
]
=
pd
.
concat
(
ap_units
,
axis
=
1
).
sum
(
axis
=
1
)
d
[
'bart_units'
]
=
pd
.
concat
(
bart_units
,
axis
=
1
).
sum
(
axis
=
1
)
d
[
'lon_units'
]
=
pd
.
concat
(
lon_units
,
axis
=
1
).
sum
(
axis
=
1
)
d
[
'baro_types'
]
=
pd
.
concat
(
baro_types
,
axis
=
1
).
sum
(
axis
=
1
)
d
[
'releases'
]
=
pd
.
concat
(
releases
,
axis
=
1
).
sum
(
axis
=
1
)
print
(
d
)
fp
=
os
.
path
.
join
(
output_path
,
str
(
year
)
+
'.pkl'
)
...
...
This diff is collapsed.
Click to expand it.
tests/run_cliwoc_stats.slurm
View file @
42e4f3bb
#!/bin/bash
#SBATCH --partition=short-serial
#SBATCH --array=
10
1-233
#SBATCH --partition=short-serial
-4hr
#SBATCH --array=
3
1-233
#SBATCH --job-name=cliwoc_ct
#SBATCH --output=slurm_log_output/cliwoc_ct_%A_%a.out
#SBATCH --error=slurm_log_output/cliwoc_ct_%A_%a.err
#SBATCH --mem=4000
#SBATCH --time=00:29:00
source
/home/users/brecinos/c3s_work/
module load jaspy
source
/home/users/brecinos/c3s_work/env0/bin/activate
echo
"starting from
$SLURM_ARRAY_TASK_ID
"
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment