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
0a2f4c89
Commit
0a2f4c89
authored
5 years ago
by
Irene Perez Gonzalez
Browse files
Options
Download
Email Patches
Plain Diff
First commit
parents
master
mdf_reader
v1.2
v1.0
No related merge requests found
Changes
245
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
756 additions
and
0 deletions
+756
-0
schemas/__init__.py
schemas/__init__.py
+0
-0
schemas/code_tables.py
schemas/code_tables.py
+178
-0
schemas/controlled_vocabulary/units.json
schemas/controlled_vocabulary/units.json
+141
-0
schemas/lib/cisdm_dbo_imma1/cisdm_dbo_imma1.json
schemas/lib/cisdm_dbo_imma1/cisdm_dbo_imma1.json
+163
-0
schemas/lib/cisdm_dbo_imma1/code_tables/qc_flags.json
schemas/lib/cisdm_dbo_imma1/code_tables/qc_flags.json
+6
-0
schemas/lib/deck-116/deck-116.json
schemas/lib/deck-116/deck-116.json
+27
-0
schemas/lib/deck-188/code_tables/ship.json
schemas/lib/deck-188/code_tables/ship.json
+13
-0
schemas/lib/deck-188/deck-188.json
schemas/lib/deck-188/deck-188.json
+12
-0
schemas/lib/deck-192/deck-192.json
schemas/lib/deck-192/deck-192.json
+39
-0
schemas/lib/deck-193/deck-193.json
schemas/lib/deck-193/deck-193.json
+24
-0
schemas/lib/deck110_td11/code_tables/ceiling_height.json
schemas/lib/deck110_td11/code_tables/ceiling_height.json
+12
-0
schemas/lib/deck110_td11/code_tables/cloud_amount_tenths.json
...mas/lib/deck110_td11/code_tables/cloud_amount_tenths.json
+13
-0
schemas/lib/deck110_td11/code_tables/cloud_height.json
schemas/lib/deck110_td11/code_tables/cloud_height.json
+12
-0
schemas/lib/deck110_td11/code_tables/cloud_type_high.json
schemas/lib/deck110_td11/code_tables/cloud_type_high.json
+6
-0
schemas/lib/deck110_td11/code_tables/cloud_type_low.json
schemas/lib/deck110_td11/code_tables/cloud_type_low.json
+9
-0
schemas/lib/deck110_td11/code_tables/cloud_type_middle.json
schemas/lib/deck110_td11/code_tables/cloud_type_middle.json
+8
-0
schemas/lib/deck110_td11/code_tables/sea_state.json
schemas/lib/deck110_td11/code_tables/sea_state.json
+12
-0
schemas/lib/deck110_td11/code_tables/sea_swell_direction.json
...mas/lib/deck110_td11/code_tables/sea_swell_direction.json
+12
-0
schemas/lib/deck110_td11/code_tables/sky_condition.json
schemas/lib/deck110_td11/code_tables/sky_condition.json
+66
-0
schemas/lib/deck110_td11/code_tables/sky_condition.keys
schemas/lib/deck110_td11/code_tables/sky_condition.keys
+3
-0
No files found.
schemas/__init__.py
0 → 100755
View file @
0a2f4c89
This diff is collapsed.
Click to expand it.
schemas/code_tables.py
0 → 100644
View file @
0a2f4c89
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 13 15:14:51 2018
"""
from
__future__
import
print_function
from
__future__
import
absolute_import
# Import required libraries
import
sys
import
json
import
datetime
import
copy
import
numpy
as
np
import
pandas
as
pd
import
os
import
glob
import
shutil
from
copy
import
deepcopy
from
pandas.io.json.normalize
import
nested_to_record
import
ast
if
sys
.
version_info
[
0
]
>=
3
:
py3
=
True
else
:
py3
=
False
#https://stackoverflow.com/questions/10756427/loop-through-all-nested-dictionary-values
#def print_nested(d):
# if isinstance(d, dict):
# for k, v in d.items():
# print_nested(v)
# elif hasattr(d, '__iter__') and not isinstance(d, str):
# for item in d:
# print_nested(item)
# elif isinstance(d, str):
# print(d)
#
# else:
# print(d)
toolPath
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
table_lib
=
os
.
path
.
join
(
toolPath
,
'lib'
)
templates_path
=
os
.
path
.
join
(
table_lib
,
'templates'
,
'code_tables'
)
def
templates
():
tables
=
glob
.
glob
(
os
.
path
.
join
(
templates_path
,
'*.json'
))
return
[
os
.
path
.
basename
(
x
).
split
(
"."
)[
0
]
for
x
in
tables
]
def
copy_template
(
table
,
out_dir
=
None
,
out_path
=
None
):
tables
=
templates
()
if
table
in
tables
:
table_path
=
os
.
path
.
join
(
templates_path
,
table
+
'.json'
)
table_out
=
out_path
if
out_path
else
os
.
path
.
join
(
out_dir
,
table
+
'.json'
)
shutil
.
copyfile
(
table_path
,
table_out
)
if
os
.
path
.
isfile
(
table_out
):
print
(
'Schema template {0} copied to {1}'
.
format
(
table
,
table_out
))
return
else
:
print
(
'copy_template ERROR:'
)
print
(
'
\t
Error copying table template {0} copied to {1}'
.
format
(
table
,
table_out
))
return
else
:
print
(
'copy_template ERROR:'
)
print
(
'
\t
Requested template {} must be a valid name.'
.
format
(
table
))
print
(
'
\t
Valid names are: {}'
.
format
(
", "
.
join
(
tables
)))
return
def
expand_integer_range_key
(
d
):
# Looping based on print_nested above
if
isinstance
(
d
,
dict
):
for
k
,
v
in
list
(
d
.
items
()):
if
'range_key'
in
k
[
0
:
9
]:
range_params
=
k
[
10
:
-
1
].
split
(
","
)
try
:
lower
=
int
(
range_params
[
0
])
except
Exception
as
e
:
print
(
"Lower bound parsing error in range key: "
,
k
)
print
(
"Error is:"
)
print
(
e
)
return
try
:
upper
=
int
(
range_params
[
1
])
except
Exception
as
e
:
if
range_params
[
1
]
==
'yyyy'
:
upper
=
datetime
.
date
.
today
().
year
else
:
print
(
"Upper bound parsing error in range key: "
,
k
)
print
(
"Error is:"
)
print
(
e
)
return
if
len
(
range_params
)
>
2
:
try
:
step
=
int
(
range_params
[
2
])
except
Exception
as
e
:
print
(
"Range step parsing error in range key: "
,
k
)
print
(
"Error is:"
)
print
(
e
)
return
else
:
step
=
1
for
i_range
in
range
(
lower
,
upper
+
1
,
step
):
deep_copy_value
=
deepcopy
(
d
[
k
])
# Otherwiserepetitions are linked and act as one!
d
.
update
({
str
(
i_range
):
deep_copy_value
})
d
.
pop
(
k
,
None
)
else
:
for
k
,
v
in
d
.
items
():
expand_integer_range_key
(
v
)
def
eval_dict_items
(
item
):
try
:
return
ast
.
literal_eval
(
item
)
except
:
return
item
def
read_table
(
table_path
):
with
open
(
table_path
)
as
fileObj
:
table
=
json
.
load
(
fileObj
)
keys_path
=
"."
.
join
([
"."
.
join
(
table_path
.
split
(
'.'
)[:
-
1
]),
'keys'
])
if
os
.
path
.
isfile
(
keys_path
):
with
open
(
keys_path
)
as
fileObj
:
table_keys
=
json
.
load
(
fileObj
)
table
[
'_keys'
]
=
{}
for
x
,
y
in
table_keys
.
items
():
key
=
eval_dict_items
(
x
)
values
=
[
eval_dict_items
(
k
)
for
k
in
y
]
table
[
'_keys'
][
key
]
=
values
expand_integer_range_key
(
table
)
return
table
def
table_keys
(
table
):
separator
=
'∿'
# something hopefully not in keys...
if
table
.
get
(
'_keys'
):
_table
=
deepcopy
(
table
)
_table
.
pop
(
'_keys'
)
keys
=
list
(
nested_to_record
(
_table
,
sep
=
separator
).
keys
())
return
[
x
.
split
(
separator
)
for
x
in
keys
]
else
:
return
list
(
table
.
keys
())
def
get_nested
(
table
,
*
args
):
# HERE HAVE TO ADD WHICH ITEM TO GET FROM THE KEY: WE HAVE TO ADD VALUE, LOWER, ETC...TO THE CODE TABLES!!!
# CAN BE AND OPTIONAL PARAMETER, LIKE: similarly, would have to add tbis to table_value_from_keys
# def get_nested(table,param = None,*args):
# nested_get_str = 'table'
# z = np.array([*args])
# for i,x in enumerate(z):
# nested_get_str += '.get(z[' + str(i) + '])'
# if param:
# nested_get_str += '.get(' + param + ')'
# try:
# return eval(nested_get_str)
# except:
# return None
nested_get_str
=
'table'
z
=
np
.
array
([
*
args
])
for
i
,
x
in
enumerate
(
z
):
nested_get_str
+=
'.get(z['
+
str
(
i
)
+
'])'
try
:
return
eval
(
nested_get_str
)
except
:
return
None
def
table_value_from_keys
(
table
,
df
):
# df is pd.DataFrame or Series
v_nested_get
=
np
.
vectorize
(
get_nested
)
# Because cannot directly vectorize a nested get, we build it in a function, and then vectorize it
calling_str
=
'v_nested_get(table'
if
isinstance
(
df
,
pd
.
DataFrame
):
#return v_nested_get(table,[ df[x] for x in df]) # This won't work
for
i
,
x
in
enumerate
(
df
.
columns
):
calling_str
+=
',df['
+
str
(
x
)
+
'].astype(str)'
# have to do likewise in not DataFrame!!!
calling_str
+=
')'
return
eval
(
calling_str
)
else
:
return
v_nested_get
(
table
,
df
)
This diff is collapsed.
Click to expand it.
schemas/controlled_vocabulary/units.json
0 → 100644
View file @
0a2f4c89
{
"metre"
:
"m"
,
"kilogram"
:
"kg"
,
"second"
:
"s"
,
"ampere"
:
"A"
,
"kelvin"
:
"K"
,
"mole"
:
"mol"
,
"candela"
:
"cd"
,
"radian"
:
"rad"
,
"steradian"
:
"sr"
,
"hertz"
:
"Hz"
,
"newton"
:
"N"
,
"pascal"
:
"Pa"
,
"joule"
:
"J"
,
"watt"
:
"W"
,
"coulomb"
:
"C"
,
"volt"
:
"V"
,
"farad"
:
"F"
,
"ohm"
:
"Ohm"
,
"siemens"
:
"S"
,
"weber"
:
"Wb"
,
"tesla"
:
"T"
,
"henry"
:
"H"
,
"degree Celsius"
:
"deg C"
,
"lumen"
:
"lm"
,
"lux"
:
"lx"
,
"becquerel"
:
"Bq"
,
"grey"
:
"Gy"
,
"sievert"
:
"Sv"
,
"degree (angle)"
:
"deg"
,
"minute (angle)"
:
"'"
,
"second (angle)"
:
"
\"
"
,
"litre"
:
[
"l"
,
"L"
],
"minute (time)"
:
"min"
,
"hour"
:
"h"
,
"day"
:
"d"
,
"tonne"
:
"t"
,
"electron"
:
"eV"
,
"atomic"
:
"unit"
,
"astronomic"
:
"AU"
,
"parsec"
:
"pc"
,
"nautical"
:
""
,
"knot"
:
"kt"
,
"decibel"
:
"dB"
,
"hectare"
:
"ha"
,
"week"
:
""
,
"year"
:
"a"
,
"per cent"
:
"
\\
%"
,
"parts per thousand"
:
"0/00"
,
"eighths of cloud"
:
"okta"
,
"degrees true"
:
"deg"
,
"degrees per second"
:
"deg/s"
,
"degrees Celsius"
:
"C"
,
"degrees Celsius per metre"
:
"C/m"
,
"degrees Celsius per 100 metres"
:
"m"
,
"Dobson Unit"
:
"DU"
,
"month"
:
"mon"
,
"per second (same as hertz)"
:
"/s"
,
"per second squared"
:
"s-2"
,
"knots per 1000 metres"
:
"m"
,
"foot"
:
"ft"
,
"inch"
:
"in"
,
"decipascals per second (microbar per second)"
:
"dPa/s"
,
"centibars per second"
:
"cb/s"
,
"centibars per 12 hours"
:
"h"
,
"dekapascal"
:
"daPa"
,
"hectopascal"
:
"hPa"
,
"hectopascals per second"
:
"s-1"
,
"hectopascals per hour"
:
"h-1"
,
"hectopascals per 3 hours"
:
"h"
,
"nanobar = hPa 10-6"
:
"nbar"
,
"grams per kilogram"
:
"g/kg"
,
"grams per kilogram per second"
:
"g kg-1 s-1"
,
"kilograms per kilogram"
:
"kg/kg"
,
"kilograms per kilogram per second"
:
"kg kg-1 s-1"
,
"kilograms per square metre"
:
"kg m-2"
,
"acceleration due to gravity"
:
"g"
,
"geopotential metre"
:
"gpm"
,
"millimetre"
:
"mm"
,
"millimetres per second"
:
"mm/s"
,
"millimetres per hour"
:
"mm/h"
,
"millimetres to the sixth power per cubic metre"
:
"mm6 m-3"
,
"centimetre"
:
"cm"
,
"centimetres per second"
:
"cm/s"
,
"centimetres per hour"
:
"cm/h"
,
"decimetre"
:
"dm"
,
"metres per second"
:
"m/s"
,
"metres per second per metre"
:
"m s-1/m"
,
"metres per second per 1000 metres"
:
"m s-1/km"
,
"square metres"
:
"m2"
,
"square metres per second"
:
"m2/s"
,
"kilometre"
:
"km"
,
"kilometres per hour"
:
"km/h"
,
"kilometres per day"
:
"km/d"
,
"per metre"
:
"m-1"
,
"becquerels per litre"
:
"Bq/l"
,
"becquerels per square metre"
:
"Bq m-2"
,
"becquerels per cubic metre"
:
"Bq m-3"
,
"millisievert"
:
"mSv"
,
"metres per second squared"
:
"m s-2"
,
"square metres second"
:
"m2 s"
,
"square metres per second squared"
:
"m2 s-2"
,
"square metres per radian second"
:
"m2 rad-1 s"
,
"square metres per hertz"
:
"m2/Hz"
,
"cubic metres"
:
"m3"
,
"cubic metres per second"
:
"m3/s"
,
"cubic metres per cubic metre"
:
"m3 m-3"
,
"metres to the fourth power"
:
""
,
"metres to the two thirds power per second"
:
"m2/3 s-1"
,
"logarithm per metre"
:
"log (m-1)"
,
"logarithm per square metre"
:
"log (m-2)"
,
"kilograms per metre"
:
"kg/m"
,
"kilograms per square metre per second"
:
"kg m-2 s-1"
,
"kilograms per cubic metre"
:
"kg m-3"
,
"per square kilogram per second"
:
"kg-2 s-1"
,
"seconds per metre"
:
"s/m"
,
"kelvin metres per second"
:
"K m s-1"
,
"kelvins per metre"
:
"K/m"
,
"kelvin square metres per kilogram per second"
:
"K m2 kg-1 s-1"
,
"moles per mole"
:
"mol/mol"
,
"radians per metre"
:
"rad/m"
,
"newtons per square metre"
:
"N m-2"
,
"pascals per second"
:
"Pa/s"
,
"kilopascal"
:
"kPa"
,
"joules per square metre"
:
"J m-2"
,
"joules per kilogram"
:
"J/kg"
,
"watts per metre per steradian"
:
"W m-1 sr-1"
,
"watts per square metre"
:
"W m-2"
,
"watts per square metre per steradian"
:
"W m-2 sr-1"
,
"watts per square metre per steradian centimetre"
:
"W m-2 sr-1 cm"
,
"watts per square metre per steradian metre"
:
"W m-2 sr-1 m"
,
"watts per cubic metre per steradian"
:
"W m-3 sr-1"
,
"siemens per metre"
:
"S/m"
,
"square degrees"
:
"deg2"
,
"becquerel seconds per cubic metre"
:
"Bq s m-3"
,
"decibels per metre"
:
"dB/m"
,
"decibels per degree"
:
"dB/deg"
,
"pH unit"
:
"pH unit"
,
"N units"
:
"N units"
,
"Nephelometric turbidity units"
:
"NTU"
}
This diff is collapsed.
Click to expand it.
schemas/lib/cisdm_dbo_imma1/cisdm_dbo_imma1.json
0 → 100644
View file @
0a2f4c89
{
"header"
:
{
"format"
:
"fixed_width"
,
"delimiter"
:
","
},
"elements"
:
{
"Identifier"
:
{
"description"
:
"WMO Buoy number"
,
"field_length"
:
5
,
"column_type"
:
"object"
},
"Odate"
:
{
"description"
:
"Observation date"
,
"field_length"
:
8
,
"column_type"
:
"str"
},
"Otime"
:
{
"description"
:
"Observation time"
,
"field_length"
:
4
,
"column_type"
:
"str"
},
"Lat"
:
{
"description"
:
"Latitude (positive North)"
,
"field_length"
:
9
,
"column_type"
:
"float16"
,
"valid_max"
:
90.0
,
"valid_min"
:
-90.0
,
"decimal_places"
:
4
,
"units"
:
"degrees"
},
"Lon"
:
{
"description"
:
"Longitude (positive West)"
,
"field_length"
:
9
,
"column_type"
:
"float16"
,
"valid_max"
:
180.0
,
"valid_min"
:
-180.0
,
"decimal_places"
:
4
,
"units"
:
"degrees"
},
"QC_POS"
:
{
"description"
:
"Quality control flag for position"
,
"field_length"
:
1
,
"column_type"
:
"key"
,
"missing_value"
:
"P"
,
"codetable"
:
"qc_flags"
},
"PDT"
:
{
"description"
:
"Position date"
,
"field_length"
:
8
,
"column_type"
:
"str"
},
"PTM"
:
{
"description"
:
"Position time"
,
"field_length"
:
4
,
"column_type"
:
"str"
},
"Drogue"
:
{
"description"
:
"Drogue depth"
,
"field_length"
:
7
,
"column_type"
:
"float16"
,
"valid_max"
:
99999.0
,
"valid_min"
:
0.0
,
"decimal_places"
:
1
,
"units"
:
"metre"
},
"SST"
:
{
"description"
:
"Sea surface temperature"
,
"field_length"
:
7
,
"column_type"
:
"float16"
,
"valid_max"
:
99.99
,
"valid_min"
:
-99.99
,
"decimal_places"
:
2
,
"units"
:
"degree Celsius"
},
"QC_SST"
:
{
"description"
:
"Quality control flag for SST"
,
"field_length"
:
1
,
"column_type"
:
"key"
,
"missing_value"
:
"P"
,
"codetable"
:
"qc_flags"
},
"Airtemp"
:
{
"description"
:
"Air temperature"
,
"field_length"
:
7
,
"column_type"
:
"float16"
,
"valid_max"
:
99.99
,
"valid_min"
:
-99.99
,
"decimal_places"
:
2
,
"units"
:
"degree Celsius"
},
"QC_AirT"
:
{
"description"
:
"Quality control flag for Air temp"
,
"field_length"
:
1
,
"column_type"
:
"key"
,
"missing_value"
:
"P"
,
"codetable"
:
"qc_flags"
},
"Pressure"
:
{
"description"
:
"Air Pressure at sea level"
,
"field_length"
:
7
,
"column_type"
:
"float32"
,
"valid_max"
:
1074.6
,
"valid_min"
:
870.0
,
"decimal_places"
:
2
,
"units"
:
"hectopascal"
},
"QC_Pr"
:
{
"description"
:
"Quality control flag for pressure"
,
"field_length"
:
1
,
"column_type"
:
"key"
,
"missing_value"
:
"P"
,
"codetable"
:
"qc_flags"
},
"WSp"
:
{
"description"
:
"Wind speed"
,
"field_length"
:
7
,
"column_type"
:
"float16"
,
"valid_max"
:
99.99
,
"valid_min"
:
0.0
,
"decimal_places"
:
2
,
"units"
:
"metres per second"
},
"QC_Wsp"
:
{
"description"
:
"Quality control flag for Wind Speed"
,
"field_length"
:
1
,
"column_type"
:
"key"
,
"missing_value"
:
"P"
,
"codetable"
:
"qc_flags"
},
"WDir"
:
{
"description"
:
"Wind direction relative to true North"
,
"field_length"
:
7
,
"column_type"
:
"float16"
,
"valid_max"
:
360.0
,
"valid_min"
:
0.0
,
"decimal_places"
:
2
,
"units"
:
"degrees true"
},
"QC_WD"
:
{
"description"
:
"Quality control flag for Wind direction"
,
"field_length"
:
1
,
"column_type"
:
"key"
,
"missing_value"
:
"P"
,
"codetable"
:
"qc_flags"
},
"RelHum"
:
{
"description"
:
"Relative humidity (%)"
,
"field_length"
:
7
,
"column_type"
:
"float16"
,
"valid_max"
:
100.0
,
"valid_min"
:
0.0
,
"decimal_places"
:
2
},
"QC_RH"
:
{
"description"
:
"Quality control flag for relative humidity"
,
"field_length"
:
1
,
"column_type"
:
"key"
,
"missing_value"
:
"P"
,
"codetable"
:
"qc_flags"
}
}
}
This diff is collapsed.
Click to expand it.
schemas/lib/cisdm_dbo_imma1/code_tables/qc_flags.json
0 → 100755
View file @
0a2f4c89
{
"0"
:
"not checked"
,
"1"
:
"good"
,
"3"
:
"doubtful"
,
"4"
:
"bad"
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck-116/deck-116.json
0 → 100644
View file @
0a2f4c89
{
"header"
:
{
"format"
:
"fixed width"
,
"encoding"
:
"ascii"
},
"elements"
:
{
"RH"
:
{
"description"
:
"Relative humidity"
,
"field_length"
:
3
,
"column_type"
:
"int8"
,
"valid_max"
:
100
,
"valid_min"
:
0
},
"N"
:
{
"description"
:
"Total cloud amount"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"what?"
},
"h"
:
{
"description"
:
"Height of low cloud"
,
"field_length"
:
2
,
"column_type"
:
"object"
,
"codetable"
:
"cloud_height_low"
},
"Nh"
:
{
"description"
:
"Amount of lower clouds"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"what?"
},
"AMT SIG"
:
{
"description"
:
"Significant cloud amount (tenths)"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"what?"
},
"AMT"
:
{
"description"
:
"Significant cloud amount (eigths)"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_amount_significant_eights"
},
"TYP"
:
{
"description"
:
"Type of significant cloud"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_type_significant"
},
"HGT SIG"
:
{
"description"
:
"Height of significant cloud"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_height_significant"
},
"ICE RPT A"
:
{
"description"
:
"Kind of ice"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"ice_kind"
},
"ICE RPT B"
:
{
"description"
:
"Effect of ice on navigation"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"ice_effect"
},
"ICE RPT C"
:
{
"description"
:
"Bearing of ice edge"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"ice_edge_bearing"
},
"ICE RPT D"
:
{
"description"
:
"Dtce to ice edge from rptng ship"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"ice_edge_distance"
},
"ICE RPT E"
:
{
"description"
:
"Orientation of ice edge"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"ice_edge_orientation"
},
"B A R"
:
{
"description"
:
"Barometer comparison station or data source"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"bar_compare_station"
},
"WND DIR"
:
{
"description"
:
"Wind direction"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"note in Section 1"
},
"VIS"
:
{
"description"
:
"Visibility"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"visibility"
},
"WX"
:
{
"description"
:
"Present weather"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"need to look further"
}
}
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck-188/code_tables/ship.json
0 → 100644
View file @
0a2f4c89
{
"0"
:
" "
,
"1"
:
" "
,
"2"
:
" "
,
"3"
:
" "
,
"4"
:
" "
,
"5"
:
" "
,
"6"
:
" "
,
"7"
:
" "
,
"8"
:
" "
,
"9"
:
" "
,
"-"
:
" "
,
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck-188/deck-188.json
0 → 100644
View file @
0a2f4c89
{
"header"
:
{
"format"
:
"fixed_width"
,
"encoding"
:
"ascii"
},
"elements"
:
{
"RH"
:
{
"description"
:
"Relative humidity"
,
"field_length"
:
3
,
"column_type"
:
"object"
},
"S H P"
:
{
"description"
:
"Ship number"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"ship"
}
}
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck-192/deck-192.json
0 → 100644
View file @
0a2f4c89
{
"header"
:
{
"format"
:
"fixed width"
,
"encoding"
:
"ascii"
},
"elements"
:
{
"LOG TYP"
:
{
"description"
:
"Log book type"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"logbook_type"
},
"CODE SHEET"
:
{
"description"
:
"Code sheet number"
,
"field_length"
:
6
,
"column_type"
:
"str"
},
"BF WD"
:
{
"description"
:
"Beaufort wind force"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"wind_force_beaufort"
},
"WX"
:
{
"description"
:
"Present weather"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"weather_present"
},
"PPP"
:
{
"description"
:
"Sea level pressure"
,
"field_length"
:
3
,
"column_type"
:
"str"
},
"V I S"
:
{
"description"
:
"Visibility"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"visibility"
},
"C L"
:
{
"description"
:
"Low cloud type"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_type_low"
},
"C M"
:
{
"description"
:
"Middle cloud type"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_type_middle"
},
"C H"
:
{
"description"
:
"High cloud type"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_type_high"
},
"N"
:
{
"description"
:
"Total cloud amount"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_amount"
},
"N h"
:
{
"description"
:
"Low cloud amount"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_amount"
},
"SEA DIR"
:
{
"description"
:
"Direction of sea"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"direction"
},
"S T A"
:
{
"description"
:
"State of the sea"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"sea_state"
},
"SWL DIR"
:
{
"description"
:
"Direction of swell"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"direction"
},
"T Y P"
:
{
"description"
:
"Swell type"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"swell_type"
},
"a"
:
{
"description"
:
"Barometric tendency"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"bar_tendency"
},
"pp"
:
{
"description"
:
"Amount of pressure change"
,
"field_length"
:
2
,
"column_type"
:
"str"
},
"RH"
:
{
"description"
:
"Relative humidity"
,
"field_length"
:
2
,
"column_type"
:
"str"
},
"LS PRE"
:
{
"description"
:
"Precipitation from lightship"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"precipitation_lightship"
},
"BEAU. WX A"
:
{
"description"
:
"Cloud cover"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_cover"
},
"BEAU. WX B"
:
{
"description"
:
"Beaufort weather B"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"weather_b"
},
"BEAU. WX C"
:
{
"description"
:
"Beaufort weather C"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"weather_c"
},
"BEAU. WX D"
:
{
"description"
:
"Beaufort weather D"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"weather_d"
},
"BEAU. WX E"
:
{
"description"
:
"Beaufort weather E"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"weather_e"
},
"BEAU. WX F"
:
{
"description"
:
"Beaufort weather F"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"weather_f"
},
"BEAU. WX G"
:
{
"description"
:
"Beaufort weather G"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"weather_g"
},
"BEAU. WX H"
:
{
"description"
:
"Beaufort weather H"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"weather_h"
},
"BEAU. WX I"
:
{
"description"
:
"Gale duration"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"duration"
},
"BEAU. WX J"
:
{
"description"
:
"Fog duration"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"duration"
}
}
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck-193/deck-193.json
0 → 100644
View file @
0a2f4c89
{
"header"
:
{
"format"
:
"fixed width"
,
"encoding"
:
"ascii"
},
"elements"
:
{
"CUR SET"
:
{
"description"
:
"Current (set)"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"current_set"
},
"CUR DFT"
:
{
"description"
:
"Current (drift)"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"direction_16_of_32"
},
"W A T"
:
{
"description"
:
"Watch"
,
"field_length"
:
1
,
"column_type"
:
"int8"
,
"codetable"
:
"probably not: see tape field 10 (core?hour?)"
},
"BF WD"
:
{
"description"
:
"Beaufort wind force"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"wind_force_beaufort"
},
"PPP"
:
{
"description"
:
"Pressure (mmHg)"
,
"field_length"
:
3
,
"column_type"
:
"float16"
,
"encoding"
:
"deck_193.higher_order"
,
"scale"
:
0.1
,
"offset"
:
700
,
"valid_max"
:
799.9
,
"valid_min"
:
700
},
"V I S"
:
{
"description"
:
"Visibility"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"visibility"
},
"C H"
:
{
"description"
:
"Cloud type (high)"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_type_high"
},
"CLD DIR"
:
{
"description"
:
"Cloud direction"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"direction_16_of_32"
},
"N"
:
{
"description"
:
"Total cloud amount"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"cloud_amount_total"
},
"S E A"
:
{
"description"
:
"State of the sea"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"sea_state"
},
"SWL DIR"
:
{
"description"
:
"Direction of swell"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"swell_direction"
},
"A M T"
:
{
"description"
:
"Amount of swell"
,
"field_length"
:
1
,
"column_type"
:
"str"
,
"codetable"
:
"swell_amount"
},
"FOG DUR"
:
{
"description"
:
"Duration of fog(min)"
,
"field_length"
:
2
,
"column_type"
:
"int16"
,
"scale"
:
15
},
"PCP DUR"
:
{
"description"
:
"Duration of precipitation"
,
"field_length"
:
2
,
"column_type"
:
"str"
,
"codetable"
:
"precipitation_duration"
}
}
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck110_td11/code_tables/ceiling_height.json
0 → 100644
View file @
0a2f4c89
{
"00"
:
" "
,
"01"
:
" "
,
"02"
:
" "
,
"03"
:
" "
,
"04"
:
" "
,
"05"
:
" "
,
"06"
:
" "
,
"07"
:
" "
,
"08"
:
" "
,
"09"
:
" "
,
"10"
:
" "
,
"11"
:
" "
,
"12"
:
" "
,
"13"
:
" "
,
"14"
:
" "
,
"15"
:
" "
,
"16"
:
" "
,
"17"
:
" "
,
"18"
:
" "
,
"19"
:
" "
,
"20"
:
" "
,
"21"
:
" "
,
"22"
:
" "
,
"23"
:
" "
,
"24"
:
" "
,
"25"
:
" "
,
"26"
:
" "
,
"27"
:
" "
,
"28"
:
" "
,
"29"
:
" "
,
"30"
:
" "
,
"31"
:
" "
,
"32"
:
" "
,
"33"
:
" "
,
"34"
:
" "
,
"35"
:
" "
,
"36"
:
" "
,
"37"
:
" "
,
"38"
:
" "
,
"39"
:
" "
,
"40"
:
" "
,
"41"
:
" "
,
"42"
:
" "
,
"43"
:
" "
,
"44"
:
" "
,
"45"
:
" "
,
"46"
:
" "
,
"47"
:
" "
,
"48"
:
" "
,
"49"
:
" "
,
"50"
:
" "
,
"51"
:
" "
,
"52"
:
" "
,
"53"
:
" "
,
"54"
:
" "
,
"55"
:
" "
,
"56"
:
" "
,
"57"
:
" "
,
"58"
:
" "
,
"59"
:
" "
,
"60"
:
" "
,
"61"
:
" "
,
"62"
:
" "
,
"63"
:
" "
,
"64"
:
" "
,
"65"
:
" "
,
"66"
:
" "
,
"67"
:
" "
,
"68"
:
" "
,
"69"
:
" "
,
"70"
:
" "
,
"71"
:
" "
,
"72"
:
" "
,
"73"
:
" "
,
"74"
:
" "
,
"75"
:
" "
,
"76"
:
" "
,
"77"
:
" "
,
"78"
:
" "
,
"79"
:
" "
,
"80"
:
" "
,
"81"
:
" "
,
"82"
:
" "
,
"83"
:
" "
,
"84"
:
" "
,
"85"
:
" "
,
"86"
:
" "
,
"87"
:
" "
,
"88"
:
" "
,
"89"
:
" "
,
"90"
:
" "
,
"91"
:
" "
,
"92"
:
" "
,
"93"
:
" "
,
"94"
:
" "
,
"95"
:
" "
,
"--"
:
"unlimited"
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck110_td11/code_tables/cloud_amount_tenths.json
0 → 100644
View file @
0a2f4c89
{
"0"
:
0
,
"1"
:
1
,
"2"
:
2
,
"3"
:
3
,
"4"
:
4
,
"5"
:
5
,
"6"
:
6
,
"7"
:
7
,
"8"
:
8
,
"9"
:
9
,
"-"
:
10
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck110_td11/code_tables/cloud_height.json
0 → 100644
View file @
0a2f4c89
{
"00"
:
" "
,
"01"
:
" "
,
"02"
:
" "
,
"03"
:
" "
,
"04"
:
" "
,
"05"
:
" "
,
"06"
:
" "
,
"07"
:
" "
,
"08"
:
" "
,
"09"
:
" "
,
"10"
:
" "
,
"11"
:
" "
,
"12"
:
" "
,
"13"
:
" "
,
"14"
:
" "
,
"15"
:
" "
,
"16"
:
" "
,
"17"
:
" "
,
"18"
:
" "
,
"19"
:
" "
,
"20"
:
" "
,
"21"
:
" "
,
"22"
:
" "
,
"23"
:
" "
,
"24"
:
" "
,
"25"
:
" "
,
"26"
:
" "
,
"27"
:
" "
,
"28"
:
" "
,
"29"
:
" "
,
"30"
:
" "
,
"31"
:
" "
,
"32"
:
" "
,
"33"
:
" "
,
"34"
:
" "
,
"35"
:
" "
,
"36"
:
" "
,
"37"
:
" "
,
"38"
:
" "
,
"39"
:
" "
,
"40"
:
" "
,
"41"
:
" "
,
"42"
:
" "
,
"43"
:
" "
,
"44"
:
" "
,
"45"
:
" "
,
"46"
:
" "
,
"47"
:
" "
,
"48"
:
" "
,
"49"
:
" "
,
"50"
:
" "
,
"51"
:
" "
,
"52"
:
" "
,
"53"
:
" "
,
"54"
:
" "
,
"55"
:
" "
,
"56"
:
" "
,
"57"
:
" "
,
"58"
:
" "
,
"59"
:
" "
,
"60"
:
" "
,
"61"
:
" "
,
"62"
:
" "
,
"63"
:
" "
,
"64"
:
" "
,
"65"
:
" "
,
"66"
:
" "
,
"67"
:
" "
,
"68"
:
" "
,
"69"
:
" "
,
"70"
:
" "
,
"71"
:
" "
,
"72"
:
" "
,
"73"
:
" "
,
"74"
:
" "
,
"75"
:
" "
,
"76"
:
" "
,
"77"
:
" "
,
"78"
:
" "
,
"79"
:
" "
,
"80"
:
" "
,
"81"
:
" "
,
"82"
:
" "
,
"83"
:
" "
,
"84"
:
" "
,
"85"
:
" "
,
"86"
:
" "
,
"87"
:
" "
,
"88"
:
" "
,
"89"
:
" "
,
"90"
:
" "
,
"91"
:
" "
,
"92"
:
" "
,
"93"
:
" "
,
"94"
:
" "
,
"95"
:
" "
,
"--"
:
" "
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck110_td11/code_tables/cloud_type_high.json
0 → 100644
View file @
0a2f4c89
{
"0"
:
"None"
,
"1"
:
"Cirrostratus"
,
"2"
:
"Cirrus"
,
"3"
:
"Cirocumulus"
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck110_td11/code_tables/cloud_type_low.json
0 → 100644
View file @
0a2f4c89
{
"0"
:
"None"
,
"1"
:
"Stratus"
,
"2"
:
"Stratocumulus"
,
"3"
:
"Cumulus"
,
"4"
:
"Cumulonimbus"
,
"5"
:
"Nimbus"
,
"6"
:
"Fog"
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck110_td11/code_tables/cloud_type_middle.json
0 → 100644
View file @
0a2f4c89
{
"0"
:
"None"
,
"1"
:
"Altostratus"
,
"2"
:
"Altocumulus"
,
"3"
:
"High Cumulus"
,
"4"
:
"High Cumulonimbus"
,
"5"
:
"Nimbostratus"
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck110_td11/code_tables/sea_state.json
0 → 100644
View file @
0a2f4c89
{
"0"
:
"Flat,oily"
,
"1"
:
"Calm,rippled"
,
"2"
:
"Smooth (wavelets)"
,
"3"
:
"Slight"
,
"4"
:
"Moderate"
,
"5"
:
"Rough"
,
"6"
:
"Very rough"
,
"7"
:
"High"
,
"8"
:
"Very high"
,
"9"
:
"Montainous"
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck110_td11/code_tables/sea_swell_direction.json
0 → 100644
View file @
0a2f4c89
{
"0"
:
"Calm"
,
"1"
:
"N"
,
"2"
:
"NE"
,
"3"
:
"E"
,
"4"
:
"SE"
,
"5"
:
"S"
,
"6"
:
"SW"
,
"7"
:
"W"
,
"8"
:
"NW"
,
"-"
:
"Unknown"
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck110_td11/code_tables/sky_condition.json
0 → 100644
View file @
0a2f4c89
{
"0"
:{
"0"
:
"Clear"
,
"1"
:
"less than 6 tenths of sky covered by low thin clouds at height nn (reported cloud height)"
,
"2"
:
"less than 6 tenths of sky covered by low clouds at height nn (reported cloud height)"
,
"3"
:
"less than 6 tenths of sky covered by low thick clouds at height nn (reported cloud height)"
,
"-"
:
"No clouds visible due to obscuring phenomena"
},
"J"
:{
" "
:
"less than 6 tenths covered by high thin clouds"
},
"2"
:{
"2"
:
"less than 6 tenths of clouds over less than 6 tenths clouds at height nn (reported cloud height)"
},
"K"
:{
" "
:
"less than 6 tenths of high clouds"
,
"2"
:
"less than 6 tenths of high clouds, less than 6 tenths of lower clouds at height nn (reported cloud height)"
},
"L"
:{
" "
:
"less than 6 tenths of high thick clouds"
},
"4"
:{
" "
:
"at least 6 but less than 10 tenths covered by low thin clouds"
},
"M"
:{
" "
:
"at least 6 but less than 10 tenths covered by high thin clouds"
},
"5"
:{
" "
:
"at least 6 but less than 10 tenths covered by low clouds"
,
"2"
:
"6-9 tenths clouds over less than 6 tenths clouds at height nn (reported cloud height)"
,
"5"
:
"6-9 tenths clouds over less 6-9 tenths lower clouds"
},
"N"
:{
" "
:
"at least 6 but less than 10 tenths covered by high clouds"
,
"2"
:
"6-9 tenths high clouds, less than 6 tenths lower clouds at height nn (reported cloud height)"
,
"5"
:
"6-9 tenths high clouds, 6-9 tenths lower clouds"
},
"6"
:{
" "
:
"at least 6 but less than 10 tenths covered by low thick clouds"
},
"O"
:{
" "
:
"at least 6 but less than 10 tenths covered by high thick clouds"
},
"7"
:{
" "
:
"10 tenths covered by low thin clouds"
},
"P"
:{
" "
:
"10 tenths covered by high thin clouds"
},
"8"
:{
" "
:
"10 tenths covered by low clouds"
,
"2"
:
"10 tenths clouds over less than 6 tenths clouds at height nn (reported cloud height)"
,
"5"
:
"10 tenths clouds over 6-9 tenths lower clouds"
},
"Q"
:{
" "
:
"10 tenths covered by high clouds"
,
"2"
:
"10 tenths high clouds, less than 6 tenths lower clouds at height nn (reported cloud height)"
,
"5"
:
"10 tenths high clouds, 6-9 tenths lower clouds"
},
"9"
:{
" "
:
"10 tenths covered by low thick clouds"
},
"R"
:{
" "
:
"10 tenths covered by high thick clouds"
}
}
This diff is collapsed.
Click to expand it.
schemas/lib/deck110_td11/code_tables/sky_condition.keys
0 → 100644
View file @
0a2f4c89
{
"SKY COND" : ["SKY COND I","SKY COND"]
}
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
6
…
13
Next
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