Commit 9e27646c authored by brivas's avatar brivas
Browse files

Merge branch 'deck730' into 'master'

Deck730

See merge request !4
parents 02873d26 345a3940
# Following to access the subpackages main modules (or/and functions) directly wihout loops through the full subpackage path
{
"INCHES MERCURY": 1001,
"DLS12FRANS": null,
"DLS100": null,
"DLS10": null,
"DLS1004": null,
"DLS1204F": null,
"DLS1200R": null,
"DLS1204R": null,
"INCHES MERCURY60": 1001,
"DLS1104R": null,
"DLS1200": null,
"DLS12R": null,
"MILLIMETERS MERCURY": 1002,
"RHINE INCHE MERCURY": 1012,
"DLS1004A": null,
"DLS12": null,
"DLS1204": null,
"DLS1004R": null,
"DLS10R": null,
"AMST INCHES MERCURY": 1015
}
\ No newline at end of file
{
"BARK": 105,
"FALUCHO": 133,
"BRIK": 110,
"BERGANTIN": 106,
"MERCHANT BRIG": 110,
"BRIG": 110,
"BRIGANTIJN": 107,
"BRIG/SLOOP": 105,
"BARGENTIJN": 106,
"BRIK VAN OORLOG":110,
"BRICK": 110,
"SCHOENERBRIK": 108,
"CORVETTE": 111,
"CORVETA": 111,
"KORVET": 111,
"CORVET": 111,
"KORVET V OORLOG":111,
"KORVET VAN OORL":111,
"CUTTER": 112,
"KOTTER": 112,
"COTTER": 112,
"SPIEGELRETOURSC":114,
"FLUTE": 115,
"FLUIT": 115,
"FRIGATE": 109,
"FREGAT": 109,
"FR�GATE": 109,
"FREGATE": 109,
"FREGATTE": 109,
"FRAGATA": 109,
"FRAGATA CORREO": 109,
"5TH RATE": 127,
"6TH RATE": 128,
"4TH RATE": 126,
"3RD RATE": 125,
"2ND RATE": 124,
"6TH RATE FRIGAT":128,
"FRAGATA DE GUER":109,
"7TH RATE": 129,
"8TH RATE": 130,
"L'AVISO": 113,
"GABARRE": 141,
"NAVIO": 26,
"SHIP O.T. LINE": 131,
"NAV�O": 26,
"BOMB VESSEL, SL":117,
"OORLOGSSCHIP": 149,
"BOMB/EXPLORATIO":117,
"STORESHIP": 121,
"PAQUEBOTE": 116,
"PAQUEBOT": 116,
"BALANDRA": 132,
"TRANSPORT": 122,
"EXPLORATION VES":117,
"CHAMBEQU�N": 117,
"BUQUE": 26,
"FIRESHIP": 117,
"NAV�O DE LA REA":26,
"PINK": 137,
"HOEKERSCHIP": 135,
"HOEKER": 135,
"POLACRA": 138,
"PAKKETBOOT (BRI":116,
"ARMED STORESHIP":121,
"PACKET SHIP": 116,
"STORE SHIP": 122,
"TROOP SHIP": 123,
"LINIESCHIP": 131,
"KOOPVAARDER": 26,
"FREGATSCHIP": 109,
"TRANSPORTSCHIP": 122,
"STOOMSCHIP": 120,
"GOLETA GUARDA C":108,
"SCHOENER": 108,
"GOLETA": 108,
"SLOOP": 117,
"SLOOP (?)": 117,
"SLOOP, THREE MA":117,
"SLOEP": 117,
"SNOW": 118,
"SNAUW": 118,
"OORLOGSSNAUW": 118,
"SNAAUW": 118,
"STEAMPOWERED WA":120,
"STEAMER": 120,
"GALJOOT": 134,
"ADVIJSJAGT": 116,
"WHALER": 139,
"MISTICO": 136
}
\ No newline at end of file
{
"0":2,
"1":2,
"2":2,
"3":2,
"4":33,
"5":2,
"6":4,
"7":5,
"8":6,
"9":32,
"10":35,
"11":34,
"12":44,
"13":43,
"14":43,
"15":3,
"16":38,
"17":46,
"18":36,
"19":40,
"20":42,
"21":45,
"31":43
}
{
"1": 5,
"3": 4
}
{
"0":1,
"1":0,
"2":1
}
{
"range_key(1750,1967)":
{
"0":"0 knots",
"1":"1-3 knots",
"2":"4-6 knots",
"3":"7-9 knots",
"4":"10-12 knots",
"5":"13-15 knots",
"6":"16-18 knots",
"7":"19-21 knots",
"8":"22-24 knots",
"9":">24 knots"
},
"range_key(1968,yyyy)":
{
"0":"0 knots",
"1":"1-5 knots",
"2":"6-10 knots",
"3":"11-15 knots",
"4":"16-20 knots",
"5":"21-25 knots",
"6":"26-30 knots",
"7":"31-35 knots",
"8":"36-40 knots",
"9":">40 knots"
}
}
{
"range_key(1750,1967)":
{
"0":0.0000,
"1":1.02888,
"2":2.5722,
"3":4.11552,
"4":5.65884,
"5":7.20216,
"6":8.74548,
"7":10.2888,
"8":11.8321,
"9":12.8610
},
"range_key(1968,yyyy)":
{
"0":0.0000,
"1":1.54332,
"2":4.11552,
"3":6.68772,
"4":9.25992,
"5":11.8321,
"6":14.4043,
"7":16.9765,
"8":19.5487,
"9":22.1209
}
}
{
"0":0,
"1":45,
"2":90,
"3":135,
"4":180,
"5":225,
"6":270,
"7":315,
"8":360
}
{
"CELSIUS": 60,
"FAHRENHEIT": 1005,
"REAMUR": 1006,
"REAUMUR": 1006
}
\ No newline at end of file
{
" ":
{"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":" ","99":" "},
"0":
{"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":" ","99":" "},
"1":
{"00":" ","02":" ","05":" ","07":" ","09":" ",
"11":" ","14":" ","16":" ","18":" ",
"20":" ","23":" ","25":" ","27":" ","29":" ",
"32":" ","34":" ","36":" ","99":" "},
"2":
{"00":" ","02":" ","04":" ","06":" ","08":" ",
"10":" ","12":" ","14":" ","16":" ","18":" ",
"20":" ","22":" ","24":" ","26":" ","28":" ",
"30":" ","32":" ","99":" "}
}
{
"report_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","separator":"-"}
},
"application_area": {
"default": [1,7,10,11]
},
"observing_programme": {
"sections": "c1",
"elements": "PT",
"transform": "observing_programme"
},
"report_type": {
"default": 0
},
"station_name": {
"sections": "c99_voyage",
"elements": "ShipName"
},
"station_type": {
"default": 2
},
"platform_type": {
"sections": "c1",
"elements": "PT",
"code_table": "platform_type"
},
"platform_sub_type": {
"sections": "c99_voyage",
"elements": "Ship_type",
"code_table": "platform_sub_type"
},
"primary_station_id": {
"sections": "c99_voyage",
"elements": "ShipName"
},
"station_record_number": {
"default": 1
},
"primary_station_id_scheme": {
"sections": "core",
"elements": "II",
"fill_value": 8,
"code_table": "primary_station_id_scheme"
},
"longitude": {
"sections": "core",
"elements": "LON",
"transform": "longitude_360to180",
"decimal_places": "decimal_places"
},
"latitude": {
"sections": "core",
"elements": "LAT",
"decimal_places": "decimal_places"
},
"location_accuracy": {
"sections": "core",
"elements": ["LI","LAT"],
"transform": "location_accuracy",
"decimal_places": 0
},
"location_quality": {
"default": 3
},
"crs": {
"default": 0
},
"station_speed": {
"sections": "core",
"elements": ["YR","VS"],
"code_table": "ship_speed_ms",
"decimal_places":1
},
"station_course": {
"sections": "core",
"elements": "DS",
"code_table": "station_course",
"decimal_places": 0
},
"height_of_station_above_local_ground": {
"default": 0,
"decimal_places":1
},
"height_of_station_above_sea_level": {
"default": 0,
"decimal_places":1
},
"report_meaning_of_timestamp": {
"default": 2
},
"report_timestamp": {
"sections": "core",
"elements": ["YR","MO","DY","HR"],
"transform": "datetime_imma1"
},
"report_duration": {
"default": 11
},
"report_time_accuracy": {
"sections": "core",
"elements": "TI",
"transform": "time_accuracy",
"decimal_places":0
},
"report_time_quality":{
"default":2
},
"report_quality": {
"sections": "c98",
"elements": "IRF",
"code_table": "report_quality"
},
"duplicate_status": {
"default": 4
},
"record_timestamp": {
"transform": "datetime_utcnow"
},
"history": {
"sections": "core",
"elements": "YR",
"transform": "lineage"
},
"source_id": {
"sections":["c1","c1","core","core"],
"elements": ["SID","DCK","YR","MO"],
"transform": "string_join_add",
"kwargs":{"prepend":"ICOADS-3-0-0T","separator":"-","zfill_col":[0,3],"zfill":[3,2]}
},
"source_record_id": {
"sections": "c98",
"elements": "UID"
}
}
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 3 10:31:18 2019
imodel: imma1
Functions to map imodel elements to CDM elements
Main functions are those invoqued in the mappings files (table_name.json)
Main functions need to be part of class mapping_functions()
Main functions get:
- 1 positional argument (pd.Series or pd.DataFrame with imodel data or
imodel element name)
- Optionally, keyword arguments
Main function return: pd.Series, np.array or scalars
Auxiliary functions can be used and defined in or outside class mapping_functions
@author: iregon
"""
import math
import numpy as np
import pandas as pd
import datetime
def longitude_360to180_i(lon):
if lon > 180:
return -180 + math.fmod(lon, 180)
else:
return lon
def location_accuracy_i(li,lat):
# math.sqrt(111**2)=111.0
# math.sqrt(2*111**2)=156.97770542341354
# Previous implementation:
# degrees = {0: .1,1: 1,2: fmiss,3: fmiss,4: 1/60,5: 1/3600,imiss: fmiss}
degrees = {0: .1,1: 1,4: 1/60,5: 1/3600}
deg_km = 111
accuracy = degrees.get(int(li), np.nan)*math.sqrt((deg_km**2)*( 1 + math.cos(math.radians(lat))**2))
return np.nan if np.isnan(accuracy) else max(1,int(round(accuracy)))
def string_add_i(a,b,c,sep):
if b:
return sep.join(filter(None,[a,b,c]))
else:
return
class mapping_functions():
def __init__(self, atts):
self.atts = atts
def datetime_decimalhour_to_HM(self,ds):
hours = int( math.floor(ds) )
minutes = int( math.floor(60.0 * math.fmod(ds, 1)))
return hours,minutes
def datetime_imma1(self,df): # TZ awareness?
date_format = "%Y-%m-%d-%H-%M"
hours,minutes = np.vectorize(mapping_functions(self.atts).datetime_decimalhour_to_HM)(df.iloc[:,-1].values)
# the mapping_functions(self.atts) does not look right, but otherwise it won't recognize things, seems it need to be
# newly instantiated to be vectorized, ohhhhhhh, me lo estoy inventando, pero suena bien, jajajajaja
df.drop(df.columns[len(df.columns)-1], axis=1, inplace=True)
df['H'] = hours
df['M'] = minutes
# VALUES!!!!
data = pd.to_datetime(df.astype(str).apply("-".join, axis=1).values, format = date_format, errors = 'coerce')
return data
def datetime_utcnow(self):
return datetime.datetime.utcnow()
def decimal_places(self,element):
return self.atts.get(element[0]).get('decimal_places')
def decimal_places_temperature_kelvin(self,element):
origin_decimals = self.atts.get(element[0]).get('decimal_places')
if origin_decimals <= 2:
return 2
else:
return origin_decimals
def decimal_places_pressure_pascal(self,element):
origin_decimals = self.atts.get(element[0]).get('decimal_places')
if origin_decimals > 2:
return origin_decimals - 2
else:
return 0
def df_col_join(self,df,sep):
joint = df.iloc[:,0].astype(str)
for i in range(1,len(df.columns)):
joint = joint + sep + df.iloc[:,i].astype(str)
return joint
def float_scale(self,ds,factor = 1):
return ds*factor
def integer_to_float(self,ds,float_type = 'float32'):
return ds.astype(float_type)
def lineage(self,ds):
return datetime.datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S') + ". Initial conversion from ICOADS R3.0.0T"
def location_accuracy(self,df): #(li_core,lat_core) math.radians(lat_core)
la = np.vectorize(location_accuracy_i,otypes='f')(df.iloc[:,0], df.iloc[:,1])#last minute tweak so that is does no fail on nans!
return la
def longitude_360to180(self,ds):
lon = np.vectorize(longitude_360to180_i)(ds)
return lon
def observing_programme(self,ds):
op = { str(i):[5,7,56] for i in range(0,6) }
op.update({'7':[5,7,9]})
return ds.map( op, na_action = 'ignore' )
# Previous version:
#observing_programmes = { range(1, 5): '{7, 56}',7: '{5,7,9}'} see how to do a beautifull range dict in the future. Does not seem to be straighforward....
# if no PT, assume ship
# !!!! set only for drifting buoys. Rest assumed ships!
#return df[df.columns[0]].swifter.apply( lambda x: '{5,7,9}' if x == 7 else '{7,56}')
def string_add(self,ds,prepend = None,append = None, separator = None,zfill_col = None,zfill = None):
prepend = '' if not prepend else prepend
append = '' if not append else append
separator = '' if not separator else separator
if zfill_col and zfill:
for col,width in zip(zfill_col,zfill):
df.iloc[:,col] = df.iloc[:,col].astype(str).str.zfill(width)
ds['string_add'] = np.vectorize(string_add_i)(prepend,ds,append,separator)
return ds['string_add']
def string_join_add(self,df,prepend = None,append = None, separator = None,zfill_col = None,zfill = None):
separator = '' if not separator else separator
# This duplication is to prevent error in Int to object casting of types
# when nrows ==1, shown after introduction of nullable integers in objects.
duplicated = False
if len(df) == 1:
df = pd.concat([df,df])
duplicated = True
if zfill_col and zfill:
for col,width in zip(zfill_col,zfill):
df.iloc[:,col] = df.iloc[:,col].astype(str).str.zfill(width)
joint = mapping_functions(self.atts).df_col_join(df,separator)
df['string_add'] = np.vectorize(string_add_i)(prepend,joint,append,separator)
if duplicated:
df = df[:-1]
return df['string_add']
def temperature_celsius_to_kelvin(self,ds):
return ds + 273.15
def time_accuracy(self,ds): #ti_core
# Shouldn't we use the code_table mapping for this? see CDM!
secs = {'0': 3600,'1': int(round(3600/10)),'2': int(round(3600/60)),'3': int(round(3600/100))}
return ds.map( secs, na_action = 'ignore' )
{
"observation_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","append":"AT","separator":"-"}
},
"report_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","separator":"-"}
},
"data_policy_licence": {
"default": 0
},
"date_time": {
"sections": "core",
"elements": ["YR","MO","DY","HR"],
"transform": "datetime_imma1"
},
"date_time_meaning": {
"default": 2
},
"observation_duration": {
"default": 8
},
"longitude": {
"sections": "core",
"elements": "LON",
"transform": "longitude_360to180",
"decimal_places": "decimal_places"
},
"latitude": {
"sections": "core",
"elements": "LAT",
"decimal_places": "decimal_places"
},
"crs": {
"default": 0
},
"z_coordinate_type": {
"default": 0
},
"observed_variable": {
"default": 85
},
"observation_value": {
"sections": "core",
"elements": "AT",
"transform": "temperature_celsius_to_kelvin",
"decimal_places": "decimal_places_temperature_kelvin"
},
"value_significance": {
"default": 2
},
"units": {
"default": 5
},
"conversion_flag": {
"default": 0
},
"location_precision": {
"sections": "core",
"elements": ["LI","LAT"],
"transform": "location_accuracy",
"decimal_places": 0
},
"spatial_representativeness": {
"default": 3
},
"quality_flag": {
"default": 2
},
"numerical_precision": {
},
"sensor_automation_status": {
"default": 5
},
"exposure_of_sensor": {
"default": 3
},
"original_precision": {
},
"original_units": {
"sections": "c99_data",
"elements": "AT_reading_units",
"code_table": "temperature_units",
"decimal_places":0
},
"original_value": {
"sections": "c99_data",
"elements": "AT_outside",
"decimal_places":"decimal_places"
},
"conversion_method": {
"default": 1
},
"processing_level": {
"default": 3
},
"traceability": {
"default": 2
},
"advanced_qc": {
"default": 0
},
"advanced_uncertainty": {
"default": 0
},
"advanced_homogenisation": {
"default": 0
},
"source_id": {
"sections":["c1","c1","core","core"],
"elements": ["SID","DCK","YR","MO"],
"transform": "string_join_add",
"kwargs":{"prepend":"ICOADS-3-0-0T","separator":"-","zfill_col":[0,3],"zfill":[3,2]}
}
}
{
"observation_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","append":"DPT","separator":"-"}
},
"report_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","separator":"-"}
},
"data_policy_licence": {
"default": 0
},
"date_time": {
"sections": "core",
"elements": ["YR","MO","DY","HR"],
"transform": "datetime_imma1"
},
"date_time_meaning": {
"default": 2
},
"observation_duration": {
"default": 8
},
"longitude": {
"sections": "core",
"elements": "LON",
"transform": "longitude_360to180",
"decimal_places": "decimal_places"
},
"latitude": {
"sections": "core",
"elements": "LAT",
"decimal_places": "decimal_places"
},
"crs": {
"default": 0
},
"z_coordinate_type": {
"default": 0
},
"observed_variable": {
"default": 36
},
"observation_value": {
"sections": "core",
"elements": "DPT",
"transform": "temperature_celsius_to_kelvin",
"decimal_places": "decimal_places_temperature_kelvin"
},
"value_significance": {
"default": 2
},
"units": {
"default": 5
},
"conversion_flag": {
"default": 0
},
"location_precision": {
"sections": "core",
"elements": ["LI","LAT"],
"transform": "location_accuracy",
"decimal_places":0
},
"spatial_representativeness": {
"default": 3
},
"quality_flag": {
"default": 2
},
"numerical_precision": {
},
"sensor_automation_status": {
"default": 5
},
"exposure_of_sensor": {
"default": 3
},
"original_precision": {
},
"original_units": {
"default": 60
},
"original_value": {
"sections": "core",
"elements": "DPT",
"decimal_places":"decimal_places"
},
"conversion_method": {
"default": 1
},
"processing_level": {
"default": 3
},
"traceability": {
"default": 2
},
"advanced_qc": {
"default": 0
},
"advanced_uncertainty": {
"default": 0
},
"advanced_homogenisation": {
"default": 0
},
"source_id": {
"sections":["c1","c1","core","core"],
"elements": ["SID","DCK","YR","MO"],
"transform": "string_join_add",
"kwargs":{"prepend":"ICOADS-3-0-0T","separator":"-","zfill_col":[0,3],"zfill":[3,2]}
}
}
{
"observation_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","append":"SLP","separator":"-"}
},
"report_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","separator":"-"}
},
"data_policy_licence": {
"default": 0
},
"date_time": {
"sections": "core",
"elements": ["YR","MO","DY","HR"],
"transform": "datetime_imma1"
},
"date_time_meaning": {
"default": 2
},
"observation_duration": {
"default": 8
},
"longitude": {
"sections": "core",
"elements": "LON",
"transform": "longitude_360to180",
"decimal_places": "decimal_places"
},
"latitude": {
"sections": "core",
"elements": "LAT",
"decimal_places": "decimal_places"
},
"crs": {
"default": 0
},
"z_coordinate_type": {
"default": 0
},
"observed_variable": {
"default": 58
},
"observation_value": {
"sections": "core",
"elements": "SLP",
"transform": "float_scale",
"kwargs":{"factor":100},
"decimal_places": "decimal_places_pressure_pascal"
},
"value_significance": {
"default": 2
},
"units": {
"default": 32
},
"conversion_flag": {
"default": 0
},
"location_precision": {
"sections": "core",
"elements": ["LI","LAT"],
"transform": "location_accuracy",
"decimal_places":0
},
"spatial_representativeness": {
"default": 3
},
"quality_flag": {
"default": 2
},
"numerical_precision": {
},
"sensor_automation_status": {
"default": 5
},
"exposure_of_sensor": {
"default": 3
},
"original_precision": {
},
"original_units": {
"default": 530
},
"original_value": {
"sections": "core",
"elements": "SLP",
"decimal_places":"decimal_places"
},
"conversion_method": {
"default": 7
},
"processing_level": {
"default": 3
},
"traceability": {
"default": 2
},
"advanced_qc": {
"default": 0
},
"advanced_uncertainty": {
"default": 0
},
"advanced_homogenisation": {
"default": 0
},
"source_id": {
"sections":["c1","c1","core","core"],
"elements": ["SID","DCK","YR","MO"],
"transform": "string_join_add",
"kwargs":{"prepend":"ICOADS-3-0-0T","separator":"-","zfill_col":[0,3],"zfill":[3,2]}
}
}
{
"observation_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","append":"SST","separator":"-"}
},
"report_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","separator":"-"}
},
"data_policy_licence": {
"default": 0
},
"date_time": {
"sections": "core",
"elements": ["YR","MO","DY","HR"],
"transform": "datetime_imma1"
},
"date_time_meaning": {
"default": 2
},
"observation_duration": {
"default": 8
},
"longitude": {
"sections": "core",
"elements": "LON",
"transform": "longitude_360to180",
"decimal_places": "decimal_places"
},
"latitude": {
"sections": "core",
"elements": "LAT",
"decimal_places": "decimal_places"
},
"crs": {
"default": 0
},
"z_coordinate_type": {
"default": 0
},
"observed_variable": {
"default": 95
},
"observation_value": {
"sections": "core",
"elements": "SST",
"transform": "temperature_celsius_to_kelvin",
"decimal_places": "decimal_places_temperature_kelvin"
},
"value_significance": {
"default": 2
},
"units": {
"default": 5
},
"conversion_flag": {
"default": 0
},
"location_precision": {
"sections": "core",
"elements": ["LI","LAT"],
"transform": "location_accuracy",
"decimal_places":0
},
"spatial_representativeness": {
"default": 3
},
"quality_flag": {
"default": 2
},
"numerical_precision": {
},
"sensor_automation_status": {
"default": 5
},
"exposure_of_sensor": {
"default": 3
},
"original_precision": {
},
"original_units": {
"sections": "c99_data",
"elements": "SST_reading_units",
"code_table": "temperature_units",
"decimal_places":0
},
"original_value": {
"sections": "c99_data",
"elements": "SST",
"decimal_places":"decimal_places"
},
"conversion_method": {
"default": 1
},
"processing_level": {
"default": 3
},
"traceability": {
"default": 2
},
"advanced_qc": {
"default": 0
},
"advanced_uncertainty": {
"default": 0
},
"advanced_homogenisation": {
"default": 0
},
"source_id": {
"sections":["c1","c1","core","core"],
"elements": ["SID","DCK","YR","MO"],
"transform": "string_join_add",
"kwargs":{"prepend":"ICOADS-3-0-0T","separator":"-","zfill_col":[0,3],"zfill":[3,2]}
}
}
{
"observation_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","append":"WBT","separator":"-"}
},
"report_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","separator":"-"}
},
"data_policy_licence": {
"default": 0
},
"date_time": {
"sections": "core",
"elements": ["YR","MO","DY","HR"],
"transform": "datetime_imma1"
},
"date_time_meaning": {
"default": 2
},
"observation_duration": {
"default": 8
},
"longitude": {
"sections": "core",
"elements": "LON",
"transform": "longitude_360to180",
"decimal_places": "decimal_places"
},
"latitude": {
"sections": "core",
"elements": "LAT",
"decimal_places": "decimal_places"
},
"crs": {
"default": 0
},
"z_coordinate_type": {
"default": 0
},
"observed_variable": {
"default": 41
},
"observation_value": {
"sections": "core",
"elements": "WBT",
"transform": "temperature_celsius_to_kelvin",
"decimal_places": "decimal_places_temperature_kelvin"
},
"value_significance": {
"default": 2
},
"units": {
"default": 5
},
"conversion_flag": {
"default": 0
},
"location_precision": {
"sections": "core",
"elements": ["LI","LAT"],
"transform": "location_accuracy",
"decimal_places":0
},
"spatial_representativeness": {
"default": 3
},
"quality_flag": {
"default": 2
},
"numerical_precision": {
},
"sensor_automation_status": {
"default": 5
},
"exposure_of_sensor": {
"default": 3
},
"original_precision": {
},
"original_units": {
"default": 60
},
"original_value": {
"sections": "core",
"elements": "WBT",
"decimal_places":"decimal_places"
},
"conversion_method": {
"default": 1
},
"processing_level": {
"default": 3
},
"traceability": {
"default": 2
},
"advanced_qc": {
"default": 0
},
"advanced_uncertainty": {
"default": 0
},
"advanced_homogenisation": {
"default": 0
},
"source_id": {
"sections":["c1","c1","core","core"],
"elements": ["SID","DCK","YR","MO"],
"transform": "string_join_add",
"kwargs":{"prepend":"ICOADS-3-0-0T","separator":"-","zfill_col":[0,3],"zfill":[3,2]}
}
}
{
"observation_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","append":"WD","separator":"-"}
},
"report_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","separator":"-"}
},
"data_policy_licence": {
"default": 0
},
"date_time": {
"sections": "core",
"elements": ["YR","MO","DY","HR"],
"transform": "datetime_imma1"
},
"date_time_meaning": {
"default": 2
},
"observation_duration": {
"default": 8
},
"longitude": {
"sections": "core",
"elements": "LON",
"transform": "longitude_360to180",
"decimal_places": "decimal_places"
},
"latitude": {
"sections": "core",
"elements": "LAT",
"decimal_places": "decimal_places"
},
"crs": {
"default": 0
},
"z_coordinate_type": {
"default": 0
},
"observed_variable": {
"default": 106
},
"observation_value": {
"sections": "core",
"elements": "D",
"transform": "integer_to_float",
"kwargs":{"float_type":"float16"},
"decimal_places": 0
},
"value_significance": {
"default": 2
},
"units": {
"default": 320
},
"conversion_flag": {
"default": 2
},
"location_precision": {
"sections": "core",
"elements": ["LI","LAT"],
"transform": "location_accuracy",
"decimal_places":0
},
"spatial_representativeness": {
"default": 3
},
"quality_flag": {
"default": 2
},
"numerical_precision": {
},
"sensor_automation_status": {
"default": 5
},
"exposure_of_sensor": {
"default": 3
},
"original_precision": {
},
"original_units": {
"default": 320
},
"original_value": {
"sections": "core",
"elements": "D",
"transform": "integer_to_float",
"kwargs":{"float_type":"float16"},
"decimal_places": 0
},
"processing_level": {
"default": 3
},
"traceability": {
"default": 2
},
"advanced_qc": {
"default": 0
},
"advanced_uncertainty": {
"default": 0
},
"advanced_homogenisation": {
"default": 0
},
"source_id": {
"sections":["c1","c1","core","core"],
"elements": ["SID","DCK","YR","MO"],
"transform": "string_join_add",
"kwargs":{"prepend":"ICOADS-3-0-0T","separator":"-","zfill_col":[0,3],"zfill":[3,2]}
}
}
{
"observation_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","append":"WS","separator":"-"}
},
"report_id": {
"sections": "c98",
"elements": "UID",
"transform": "string_add",
"kwargs":{"prepend":"ICOADS-30","separator":"-"}
},
"data_policy_licence": {
"default": 0
},
"date_time": {
"sections": "core",
"elements": ["YR","MO","DY","HR"],
"transform": "datetime_imma1"
},
"date_time_meaning": {
"default": 2
},
"observation_duration": {
"default": 8
},
"longitude": {
"sections": "core",
"elements": "LON",
"transform": "longitude_360to180",
"decimal_places": "decimal_places"
},
"latitude": {
"sections": "core",
"elements": "LAT",
"decimal_places": "decimal_places"
},
"crs": {
"default": 0
},
"z_coordinate_type": {
"default": 0
},
"observed_variable": {
"default": 107
},
"observation_value": {
"sections": "core",
"elements": "W",
"decimal_places": "decimal_places"
},
"value_significance": {
"default": 2
},
"units": {
"default": 731
},
"conversion_flag": {
"default": 2
},
"location_precision": {
"sections": "core",
"elements": ["LI","LAT"],
"transform": "location_accuracy",
"decimal_places":0
},
"spatial_representativeness": {
"default": 3
},
"quality_flag": {
"default": 2
},
"numerical_precision": {
},
"sensor_automation_status": {
"default": 5
},
"exposure_of_sensor": {
"default": 3
},
"original_precision": {
},
"original_units": {
"default": 731
},
"original_value": {
"sections": "core",
"elements": "W",
"decimal_places": "decimal_places"
},
"processing_level": {
"default": 3
},
"traceability": {
"default": 2
},
"advanced_qc": {
"default": 0
},
"advanced_uncertainty": {
"default": 0
},
"advanced_homogenisation": {
"default": 0
},
"source_id": {
"sections":["c1","c1","core","core"],
"elements": ["SID","DCK","YR","MO"],
"transform": "string_join_add",
"kwargs":{"prepend":"ICOADS-3-0-0T","separator":"-","zfill_col":[0,3],"zfill":[3,2]}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment