From 8bd363e11f6d2ab8263845e2705732f40d58bbcc Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Thu, 6 Mar 2025 16:07:33 -0500 Subject: [PATCH 01/15] #23 Start to add schema for static sources in pp yamls --- FRE/fre_pp.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index d0b5127..2d9ee73 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -252,6 +252,20 @@ }, "minItems": 1, "uniqueItems": true + }, + "static": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sources": {}, + "freq": {}, + "variables": {} + }, + "required": ["sources", + "freq"], + "additional_properties": false + } } }, "required": [ From 59f3c36249d4b886520be2b22ca19b1291fec513 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Fri, 7 Mar 2025 08:53:47 -0500 Subject: [PATCH 02/15] #23 Fill ins static schema --- FRE/fre_pp.json | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index 2d9ee73..bdb9f41 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -258,12 +258,30 @@ "items": { "type": "object", "properties": { - "sources": {}, - "freq": {}, - "variables": {} + "sources": { + "description": "History files to include this static source", + "type": "array", + "items": { + "type": "string" + } + }, + "freq": { + "description": "Static sources should have a frequency of P0[M/Y]", + "type": "string" + }, + "variables": { + "description": "Variables for the static source", + "type": "array", + "items": { + "type": "string" + } + }, + "history_file": { + "description": "Path to history file if static source is for offline diagnostics (if history file not included in main history_dir", + "type": "string" + } }, - "required": ["sources", - "freq"], + "required": ["sources"], "additional_properties": false } } From b2414571d89826fba7df8bccccc3e78a1e971437 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Fri, 7 Mar 2025 10:19:00 -0500 Subject: [PATCH 03/15] #23 Update static schema - remove freq - (have to assess what to do with variables) --- FRE/fre_pp.json | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index bdb9f41..92a0afd 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -254,36 +254,24 @@ "uniqueItems": true }, "static": { - "type": "array", - "items": { - "type": "object", - "properties": { - "sources": { - "description": "History files to include this static source", - "type": "array", - "items": { - "type": "string" - } - }, - "freq": { - "description": "Static sources should have a frequency of P0[M/Y]", - "type": "string" - }, - "variables": { - "description": "Variables for the static source", - "type": "array", - "items": { - "type": "string" - } - }, - "history_file": { - "description": "Path to history file if static source is for offline diagnostics (if history file not included in main history_dir", + "type": "object", + "properties": { + "sources": { + "description": "History files to include this static source", + "type": "array", + "items": { "type": "string" } }, - "required": ["sources"], - "additional_properties": false - } + "offline_sources": { + "description": "Path to history file if static source is for offline diagnostics", + "type": "array", + "item": { + "string" + } + } + }, + "additional_properties": false } }, "required": [ From 0abc3e7f5524889537c3aa9c6eef863e15577528 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Fri, 7 Mar 2025 10:28:29 -0500 Subject: [PATCH 04/15] #23 Include variables --- FRE/fre_pp.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index 92a0afd..b3de068 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -266,7 +266,14 @@ "offline_sources": { "description": "Path to history file if static source is for offline diagnostics", "type": "array", - "item": { + "items": { + "string" + } + }, + "variables": { + "description": "Variables included in history file", + "type": "array", + "items": { "string" } } From efd69e314eec5730405d2c3ce79a1c90f0ebc9bf Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Fri, 7 Mar 2025 14:50:56 -0500 Subject: [PATCH 05/15] #23 Fix schema --- FRE/fre_pp.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index b3de068..a8b13c4 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -267,18 +267,18 @@ "description": "Path to history file if static source is for offline diagnostics", "type": "array", "items": { - "string" + "type": "string" } }, "variables": { "description": "Variables included in history file", "type": "array", "items": { - "string" + "type": "string" } } }, - "additional_properties": false + "additionalProperties": false } }, "required": [ From 048ded8d36b5010b58b48808fac29b9b74758a56 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Tue, 11 Mar 2025 10:22:06 -0400 Subject: [PATCH 06/15] #23 Remove `do_statics` as a required property --- FRE/fre_pp.json | 1 - 1 file changed, 1 deletion(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index a8b13c4..b9bab9d 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -183,7 +183,6 @@ }, "required": [ "clean_work", - "do_statics", "do_timeavgs", "do_refinediag", "do_atmos_plevel_masking", From 48e9cf06a320f9ad891967d75f94dcb3c5a847f7 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Tue, 11 Mar 2025 10:27:21 -0400 Subject: [PATCH 07/15] #23 Remove `do_statics` switch --- FRE/fre_pp.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index b9bab9d..cb9c4cd 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -152,10 +152,6 @@ "description": "Switch to remove intermediate data files when they are no longer needed.", "type": "boolean" }, - "do_statics": { - "description": "Switch to turn on/off statics processing.", - "type": "boolean" - }, "do_timeavgs": { "description": "Switch to turn on/off time-average file generation.", "type": "boolean" @@ -253,7 +249,7 @@ "uniqueItems": true }, "static": { - "type": "object", + "type": "array", "properties": { "sources": { "description": "History files to include this static source", From 6bcb0462e2bdbb7d3e8046e62d3d3dbbceee27e0 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Tue, 11 Mar 2025 15:12:33 -0400 Subject: [PATCH 08/15] #23 Update schema --- FRE/fre_pp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index cb9c4cd..109df0f 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -259,7 +259,7 @@ } }, "offline_sources": { - "description": "Path to history file if static source is for offline diagnostics", + "description": "Path to static offline diagnostic", "type": "array", "items": { "type": "string" From f008891c17b360bc00d38d8a50029068b7081b4a Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Wed, 12 Mar 2025 11:30:41 -0400 Subject: [PATCH 09/15] #23 Update static schema --- FRE/fre_pp.json | 53 +++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index 109df0f..d651763 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -250,28 +250,39 @@ }, "static": { "type": "array", - "properties": { - "sources": { - "description": "History files to include this static source", - "type": "array", - "items": { - "type": "string" - } - }, - "offline_sources": { - "description": "Path to static offline diagnostic", - "type": "array", - "items": { - "type": "string" - } - }, - "variables": { - "description": "Variables included in history file", - "type": "array", - "items": { - "type": "string" + "items": { + "anyOf": [ + { + "type": "object", + "properties": { + "sources": { + "description": "History files to include in this component", + "type": "array", + "items": {"type": "string"} + }, + "variables": { + "description": "Variables included in history file", + "type": "array", + "items": {"type": "string"} + } + } + }, + { + "type": "object", + "properties": { + "offline_sources": { + "description": "Path to static offline diagnostic", + "type": "array", + "items": {"type": "string"} + }, + "variables": { + "description": "Variables included in offline diagnostic file", + "type": "array", + "items": {"type": "string"} + } + } } - } + ] }, "additionalProperties": false } From 7c026434b06347688f4bbc63ffe73dac6360aeca Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Wed, 12 Mar 2025 13:37:22 -0400 Subject: [PATCH 10/15] #23 Update static schema --- FRE/fre_pp.json | 60 ++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index d651763..7cff5c2 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -251,38 +251,36 @@ "static": { "type": "array", "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "sources": { - "description": "History files to include in this component", - "type": "array", - "items": {"type": "string"} - }, - "variables": { - "description": "Variables included in history file", - "type": "array", - "items": {"type": "string"} - } - } - }, - { - "type": "object", - "properties": { - "offline_sources": { - "description": "Path to static offline diagnostic", - "type": "array", - "items": {"type": "string"} - }, - "variables": { - "description": "Variables included in offline diagnostic file", - "type": "array", - "items": {"type": "string"} - } - } + "type": "object", + "properties": { + "variables": { + "description": "Variables included in sources", + "type": "array", + "items": {"type": "string"} } - ] + }, + "unevaluatedProperties": false, + "oneOf": [ {"type": "object", + "properties": { + "sources": { + "description": "History files to include in this component", + "type": "array", + "items": {"type": "string"} + } + }, + "required": ["sources"] + }, + {"type": "object", + "properties": { + "offline_sources": { + "description": "Path to static offline diagnostic", + "type": "array", + "items": {"type": "string"} + } + }, + "required": ["offline_sources"] + } + ] }, "additionalProperties": false } From a16246ec632459e06a1a5ddb2b746ce3bd4aae84 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Thu, 13 Mar 2025 13:06:59 -0400 Subject: [PATCH 11/15] #23 Make `sources` a singular string --- FRE/fre_pp.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index 7cff5c2..c6b9d59 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -201,7 +201,13 @@ "description": "History files to include in this component", "type": "array", "items": { - "type": "string" + "properties": { + "history": {"type": "string"}, + "variables": { + "type": "array", + "items": { "type": "string" } + } + } }, "minItems": 1 }, @@ -264,8 +270,7 @@ "properties": { "sources": { "description": "History files to include in this component", - "type": "array", - "items": {"type": "string"} + "type": "string" } }, "required": ["sources"] From 872929589516cae9b882a92aef338c01d8becd63 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Thu, 13 Mar 2025 13:47:46 -0400 Subject: [PATCH 12/15] #23 Update `history` to `history_file` --- FRE/fre_pp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index c6b9d59..ebce0bc 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -202,7 +202,7 @@ "type": "array", "items": { "properties": { - "history": {"type": "string"}, + "history_file": {"type": "string"}, "variables": { "type": "array", "items": { "type": "string" } From bcfd011ab396c4dff939bf6d8105c5dd42c6152d Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Thu, 13 Mar 2025 15:06:09 -0400 Subject: [PATCH 13/15] #23 Update schema --- FRE/fre_pp.json | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index ebce0bc..47e6fa2 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-06/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "name": { @@ -198,18 +198,22 @@ "type": "string" }, "sources": { - "description": "History files to include in this component", "type": "array", "items": { + "type": "object", "properties": { - "history_file": {"type": "string"}, + "history_file": { + "description": "History files to include in this component", + "type": "string" + }, "variables": { "type": "array", - "items": { "type": "string" } + "items": {"type": "string"} } - } + }, + "additionalProperties": false }, - "minItems": 1 + "required": ["history_file"] }, "sourceGrid": { "description": "Input grid type.", @@ -283,7 +287,7 @@ "items": {"type": "string"} } }, - "required": ["offline_sources"] + "required": ["offline_sources"] } ] }, From 442a714c277a37eb96746cbd1b66b76256cb8949 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Thu, 13 Mar 2025 15:35:14 -0400 Subject: [PATCH 14/15] #23 Update static schema --- FRE/fre_pp.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index 47e6fa2..67f5ec4 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -272,7 +272,7 @@ "unevaluatedProperties": false, "oneOf": [ {"type": "object", "properties": { - "sources": { + "source": { "description": "History files to include in this component", "type": "string" } @@ -281,10 +281,9 @@ }, {"type": "object", "properties": { - "offline_sources": { + "offline_source": { "description": "Path to static offline diagnostic", - "type": "array", - "items": {"type": "string"} + "type": "string" } }, "required": ["offline_sources"] From ea32c9362250f8f6c6caf6540c0aa1a9b6c3193b Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Thu, 13 Mar 2025 16:03:46 -0400 Subject: [PATCH 15/15] #23 Remove plural --- FRE/fre_pp.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FRE/fre_pp.json b/FRE/fre_pp.json index 67f5ec4..dbaca2f 100644 --- a/FRE/fre_pp.json +++ b/FRE/fre_pp.json @@ -277,7 +277,7 @@ "type": "string" } }, - "required": ["sources"] + "required": ["source"] }, {"type": "object", "properties": { @@ -286,7 +286,7 @@ "type": "string" } }, - "required": ["offline_sources"] + "required": ["offline_source"] } ] },