@climateriskcommons/crc-framework 0.6.0 → 1.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,612 @@
1
+ {
2
+ "$id": "https://climateriskcommons.org/schemas/measurement-1.0.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "oneOf": [
5
+ {
6
+ "additionalProperties": false,
7
+ "description": "Open user-owned scientific meaning.",
8
+ "properties": {
9
+ "fields": {
10
+ "type": "object"
11
+ },
12
+ "kind": {
13
+ "const": "measurement"
14
+ },
15
+ "quantity": {
16
+ "minLength": 1,
17
+ "pattern": "^\\S(?:[\\s\\S]*\\S)?$",
18
+ "type": "string"
19
+ },
20
+ "schema": {
21
+ "type": "object"
22
+ },
23
+ "unit": {
24
+ "minLength": 1,
25
+ "pattern": "^\\S(?:[\\s\\S]*\\S)?$",
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": [
30
+ "kind"
31
+ ],
32
+ "title": "Measurement",
33
+ "type": "object",
34
+ "x-crc-calibration": {
35
+ "quantity_field": "quantity",
36
+ "unit_field": "unit"
37
+ }
38
+ },
39
+ {
40
+ "additionalProperties": false,
41
+ "description": "Depth measured above the local ground surface.",
42
+ "properties": {
43
+ "kind": {
44
+ "const": "depth_above_ground"
45
+ },
46
+ "unit": {
47
+ "enum": [
48
+ "m",
49
+ "cm",
50
+ "mm",
51
+ "ft"
52
+ ],
53
+ "type": "string"
54
+ }
55
+ },
56
+ "required": [
57
+ "kind",
58
+ "unit"
59
+ ],
60
+ "title": "DepthAboveGround",
61
+ "type": "object",
62
+ "x-crc-calibration": {
63
+ "quantity": "depth_above_ground",
64
+ "unit_field": "unit"
65
+ }
66
+ },
67
+ {
68
+ "additionalProperties": false,
69
+ "description": "Water surface elevation in the explicitly identified vertical datum.",
70
+ "properties": {
71
+ "datum": {
72
+ "minLength": 1,
73
+ "pattern": "^\\S(?:[\\s\\S]*\\S)?$",
74
+ "type": "string"
75
+ },
76
+ "kind": {
77
+ "const": "water_surface_elevation"
78
+ },
79
+ "unit": {
80
+ "enum": [
81
+ "m",
82
+ "cm",
83
+ "mm",
84
+ "ft"
85
+ ],
86
+ "type": "string"
87
+ }
88
+ },
89
+ "required": [
90
+ "kind",
91
+ "unit",
92
+ "datum"
93
+ ],
94
+ "title": "WaterSurfaceElevation",
95
+ "type": "object",
96
+ "x-crc-calibration": {
97
+ "quantity": "water_surface_elevation",
98
+ "unit_field": "unit"
99
+ }
100
+ },
101
+ {
102
+ "additionalProperties": false,
103
+ "description": "Dimensionless ratio in fractions or percent.",
104
+ "properties": {
105
+ "kind": {
106
+ "const": "ratio"
107
+ },
108
+ "unit": {
109
+ "enum": [
110
+ "1",
111
+ "percent"
112
+ ],
113
+ "type": "string"
114
+ }
115
+ },
116
+ "required": [
117
+ "kind",
118
+ "unit"
119
+ ],
120
+ "title": "Ratio",
121
+ "type": "object",
122
+ "x-crc-calibration": {
123
+ "quantity": "ratio",
124
+ "unit_field": "unit"
125
+ }
126
+ },
127
+ {
128
+ "additionalProperties": false,
129
+ "description": "Elapsed time in an explicitly selected time unit.",
130
+ "properties": {
131
+ "kind": {
132
+ "const": "time_duration"
133
+ },
134
+ "unit": {
135
+ "enum": [
136
+ "s",
137
+ "h",
138
+ "d",
139
+ "month",
140
+ "yr"
141
+ ],
142
+ "type": "string"
143
+ }
144
+ },
145
+ "required": [
146
+ "kind",
147
+ "unit"
148
+ ],
149
+ "title": "TimeDuration",
150
+ "type": "object",
151
+ "x-crc-calibration": {
152
+ "quantity": "time_duration",
153
+ "unit_field": "unit"
154
+ }
155
+ },
156
+ {
157
+ "additionalProperties": false,
158
+ "description": "Temperature in the selected scale.",
159
+ "properties": {
160
+ "kind": {
161
+ "const": "temperature"
162
+ },
163
+ "unit": {
164
+ "enum": [
165
+ "degC",
166
+ "K",
167
+ "degF"
168
+ ],
169
+ "type": "string"
170
+ }
171
+ },
172
+ "required": [
173
+ "kind",
174
+ "unit"
175
+ ],
176
+ "title": "Temperature",
177
+ "type": "object",
178
+ "x-crc-calibration": {
179
+ "quantity": "temperature",
180
+ "unit_field": "unit"
181
+ }
182
+ },
183
+ {
184
+ "additionalProperties": false,
185
+ "description": "Wind speed with optional explicit averaging and reduction facts.",
186
+ "properties": {
187
+ "aggregation": {
188
+ "enum": [
189
+ "maximum",
190
+ "minimum",
191
+ "mean",
192
+ "sum",
193
+ "count"
194
+ ],
195
+ "type": "string"
196
+ },
197
+ "averaging_duration": {
198
+ "additionalProperties": false,
199
+ "properties": {
200
+ "unit": {
201
+ "enum": [
202
+ "s",
203
+ "h",
204
+ "d",
205
+ "month",
206
+ "yr"
207
+ ],
208
+ "type": "string"
209
+ },
210
+ "value": {
211
+ "exclusiveMinimum": 0,
212
+ "type": "number"
213
+ }
214
+ },
215
+ "required": [
216
+ "value",
217
+ "unit"
218
+ ],
219
+ "type": "object"
220
+ },
221
+ "kind": {
222
+ "const": "wind_speed"
223
+ },
224
+ "unit": {
225
+ "enum": [
226
+ "m/s",
227
+ "km/h"
228
+ ],
229
+ "type": "string"
230
+ }
231
+ },
232
+ "required": [
233
+ "kind",
234
+ "unit"
235
+ ],
236
+ "title": "WindSpeed",
237
+ "type": "object",
238
+ "x-crc-calibration": {
239
+ "quantity": "wind_speed",
240
+ "unit_field": "unit"
241
+ }
242
+ },
243
+ {
244
+ "additionalProperties": false,
245
+ "description": "Precipitation rate over an explicit accumulation duration and reduction.",
246
+ "properties": {
247
+ "accumulation_duration": {
248
+ "additionalProperties": false,
249
+ "properties": {
250
+ "unit": {
251
+ "enum": [
252
+ "s",
253
+ "h",
254
+ "d",
255
+ "month",
256
+ "yr"
257
+ ],
258
+ "type": "string"
259
+ },
260
+ "value": {
261
+ "exclusiveMinimum": 0,
262
+ "type": "number"
263
+ }
264
+ },
265
+ "required": [
266
+ "value",
267
+ "unit"
268
+ ],
269
+ "type": "object"
270
+ },
271
+ "aggregation": {
272
+ "enum": [
273
+ "maximum",
274
+ "minimum",
275
+ "mean",
276
+ "sum",
277
+ "count"
278
+ ],
279
+ "type": "string"
280
+ },
281
+ "kind": {
282
+ "const": "precipitation_rate"
283
+ },
284
+ "unit": {
285
+ "enum": [
286
+ "mm/day",
287
+ "mm/h",
288
+ "kg m-2 s-1"
289
+ ],
290
+ "type": "string"
291
+ }
292
+ },
293
+ "required": [
294
+ "kind",
295
+ "unit",
296
+ "accumulation_duration",
297
+ "aggregation"
298
+ ],
299
+ "title": "PrecipitationRate",
300
+ "type": "object",
301
+ "x-crc-calibration": {
302
+ "quantity": "precipitation_rate",
303
+ "unit_field": "unit"
304
+ }
305
+ },
306
+ {
307
+ "additionalProperties": false,
308
+ "description": "Accumulated precipitation amount over an explicit interval.",
309
+ "properties": {
310
+ "accumulation_duration": {
311
+ "additionalProperties": false,
312
+ "properties": {
313
+ "unit": {
314
+ "enum": [
315
+ "s",
316
+ "h",
317
+ "d",
318
+ "month",
319
+ "yr"
320
+ ],
321
+ "type": "string"
322
+ },
323
+ "value": {
324
+ "exclusiveMinimum": 0,
325
+ "type": "number"
326
+ }
327
+ },
328
+ "required": [
329
+ "value",
330
+ "unit"
331
+ ],
332
+ "type": "object"
333
+ },
334
+ "kind": {
335
+ "const": "precipitation_amount"
336
+ },
337
+ "unit": {
338
+ "enum": [
339
+ "m",
340
+ "cm",
341
+ "mm",
342
+ "ft"
343
+ ],
344
+ "type": "string"
345
+ }
346
+ },
347
+ "required": [
348
+ "kind",
349
+ "unit",
350
+ "accumulation_duration"
351
+ ],
352
+ "title": "PrecipitationAmount",
353
+ "type": "object",
354
+ "x-crc-calibration": {
355
+ "quantity": "precipitation_amount",
356
+ "unit_field": "unit"
357
+ }
358
+ },
359
+ {
360
+ "additionalProperties": false,
361
+ "allOf": [
362
+ {
363
+ "if": {
364
+ "properties": {
365
+ "event": {
366
+ "enum": [
367
+ "frost_day",
368
+ "hot_day",
369
+ "freeze_thaw_cycle"
370
+ ]
371
+ }
372
+ },
373
+ "required": [
374
+ "event"
375
+ ]
376
+ },
377
+ "then": {
378
+ "properties": {
379
+ "threshold": {
380
+ "properties": {
381
+ "unit": {
382
+ "enum": [
383
+ "degC",
384
+ "K",
385
+ "degF"
386
+ ],
387
+ "type": "string"
388
+ }
389
+ }
390
+ }
391
+ }
392
+ }
393
+ }
394
+ ],
395
+ "description": "Count of explicitly identified events, with optional threshold and counting duration.",
396
+ "properties": {
397
+ "aggregation": {
398
+ "enum": [
399
+ "maximum",
400
+ "minimum",
401
+ "mean",
402
+ "sum",
403
+ "count"
404
+ ],
405
+ "type": "string"
406
+ },
407
+ "duration": {
408
+ "additionalProperties": false,
409
+ "properties": {
410
+ "unit": {
411
+ "enum": [
412
+ "s",
413
+ "h",
414
+ "d",
415
+ "month",
416
+ "yr"
417
+ ],
418
+ "type": "string"
419
+ },
420
+ "value": {
421
+ "exclusiveMinimum": 0,
422
+ "type": "number"
423
+ }
424
+ },
425
+ "required": [
426
+ "value",
427
+ "unit"
428
+ ],
429
+ "type": "object"
430
+ },
431
+ "event": {
432
+ "enum": [
433
+ "freeze_thaw_cycle",
434
+ "frost_day",
435
+ "hot_day",
436
+ "dry_day"
437
+ ],
438
+ "type": "string"
439
+ },
440
+ "kind": {
441
+ "const": "event_count"
442
+ },
443
+ "threshold": {
444
+ "additionalProperties": false,
445
+ "properties": {
446
+ "unit": {
447
+ "minLength": 1,
448
+ "pattern": "^\\S(?:[\\s\\S]*\\S)?$",
449
+ "type": "string"
450
+ },
451
+ "value": {
452
+ "type": "number"
453
+ }
454
+ },
455
+ "required": [
456
+ "value",
457
+ "unit"
458
+ ],
459
+ "type": "object"
460
+ }
461
+ },
462
+ "required": [
463
+ "kind",
464
+ "event",
465
+ "aggregation"
466
+ ],
467
+ "title": "EventCount",
468
+ "type": "object",
469
+ "x-crc-calibration": {
470
+ "fixed_unit": "count",
471
+ "quantity": "event_count"
472
+ }
473
+ },
474
+ {
475
+ "additionalProperties": false,
476
+ "description": "An identified climate index, with explicit timescale and reference years when known.",
477
+ "properties": {
478
+ "accumulation_duration": {
479
+ "additionalProperties": false,
480
+ "properties": {
481
+ "unit": {
482
+ "enum": [
483
+ "s",
484
+ "h",
485
+ "d",
486
+ "month",
487
+ "yr"
488
+ ],
489
+ "type": "string"
490
+ },
491
+ "value": {
492
+ "exclusiveMinimum": 0,
493
+ "type": "number"
494
+ }
495
+ },
496
+ "required": [
497
+ "value",
498
+ "unit"
499
+ ],
500
+ "type": "object"
501
+ },
502
+ "index": {
503
+ "enum": [
504
+ "fire_weather_index",
505
+ "standardized_precipitation_evapotranspiration_index"
506
+ ],
507
+ "type": "string"
508
+ },
509
+ "kind": {
510
+ "const": "climate_index"
511
+ },
512
+ "reference_period": {
513
+ "additionalProperties": false,
514
+ "properties": {
515
+ "end": {
516
+ "type": "integer"
517
+ },
518
+ "start": {
519
+ "type": "integer"
520
+ }
521
+ },
522
+ "required": [
523
+ "start",
524
+ "end"
525
+ ],
526
+ "type": "object"
527
+ }
528
+ },
529
+ "required": [
530
+ "kind",
531
+ "index"
532
+ ],
533
+ "title": "ClimateIndex",
534
+ "type": "object",
535
+ "x-crc-calibration": {
536
+ "fixed_unit": "1",
537
+ "quantity": "climate_index"
538
+ }
539
+ },
540
+ {
541
+ "additionalProperties": false,
542
+ "description": "Integrated temperature departures from a declared threshold over a declared duration.",
543
+ "properties": {
544
+ "duration": {
545
+ "additionalProperties": false,
546
+ "properties": {
547
+ "unit": {
548
+ "enum": [
549
+ "s",
550
+ "h",
551
+ "d",
552
+ "month",
553
+ "yr"
554
+ ],
555
+ "type": "string"
556
+ },
557
+ "value": {
558
+ "exclusiveMinimum": 0,
559
+ "type": "number"
560
+ }
561
+ },
562
+ "required": [
563
+ "value",
564
+ "unit"
565
+ ],
566
+ "type": "object"
567
+ },
568
+ "kind": {
569
+ "const": "degree_days"
570
+ },
571
+ "threshold": {
572
+ "additionalProperties": false,
573
+ "properties": {
574
+ "unit": {
575
+ "minLength": 1,
576
+ "pattern": "^\\S(?:[\\s\\S]*\\S)?$",
577
+ "type": "string"
578
+ },
579
+ "value": {
580
+ "type": "number"
581
+ }
582
+ },
583
+ "required": [
584
+ "value",
585
+ "unit"
586
+ ],
587
+ "type": "object"
588
+ },
589
+ "unit": {
590
+ "enum": [
591
+ "K.d",
592
+ "degC.d"
593
+ ],
594
+ "type": "string"
595
+ }
596
+ },
597
+ "required": [
598
+ "kind",
599
+ "unit",
600
+ "threshold",
601
+ "duration"
602
+ ],
603
+ "title": "DegreeDays",
604
+ "type": "object",
605
+ "x-crc-calibration": {
606
+ "quantity": "degree_days",
607
+ "unit_field": "unit"
608
+ }
609
+ }
610
+ ],
611
+ "title": "Measurement"
612
+ }