diff --git a/openoa/schema/base_electrical_losses_schema.json b/openoa/schema/base_electrical_losses_schema.json index 491b0275..f31ab01e 100644 --- a/openoa/schema/base_electrical_losses_schema.json +++ b/openoa/schema/base_electrical_losses_schema.json @@ -6,15 +6,16 @@ "units": "kWh" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] }, "scada": { @@ -29,13 +30,13 @@ "units": null }, "frequency": [ - "min", - "ms", "us", + "ns", "D", "s", - "ns", - "h" + "h", + "ms", + "min" ] } } diff --git a/openoa/schema/base_electrical_losses_schema.yml b/openoa/schema/base_electrical_losses_schema.yml index 0d603008..044c1236 100644 --- a/openoa/schema/base_electrical_losses_schema.yml +++ b/openoa/schema/base_electrical_losses_schema.yml @@ -8,25 +8,26 @@ scada: dtype: float units: kW frequency: - - min - - ms - us + - ns - D - s - - ns - h + - ms + - min meter: MMTR_SupWh: name: MMTR_SupWh dtype: float units: kWh frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min diff --git a/openoa/schema/base_monte_carlo_aep_schema.json b/openoa/schema/base_monte_carlo_aep_schema.json index 2eb498c7..b7dc6cae 100644 --- a/openoa/schema/base_monte_carlo_aep_schema.json +++ b/openoa/schema/base_monte_carlo_aep_schema.json @@ -11,15 +11,16 @@ "units": "kWh" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] }, "meter": { @@ -29,15 +30,16 @@ "units": "kWh" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] }, "reanalysis": { @@ -52,15 +54,16 @@ "units": "m/s" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] } } diff --git a/openoa/schema/base_monte_carlo_aep_schema.yml b/openoa/schema/base_monte_carlo_aep_schema.yml index 9a3b7fa2..6d85548f 100644 --- a/openoa/schema/base_monte_carlo_aep_schema.yml +++ b/openoa/schema/base_monte_carlo_aep_schema.yml @@ -4,15 +4,16 @@ meter: dtype: float units: kWh frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min curtail: IAVL_ExtPwrDnWh: name: IAVL_ExtPwrDnWh @@ -23,15 +24,16 @@ curtail: dtype: float units: kWh frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min reanalysis: WMETR_HorWdSpd: name: WMETR_HorWdSpd @@ -42,12 +44,13 @@ reanalysis: dtype: float units: kg/m^3 frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min diff --git a/openoa/schema/base_tie_schema.json b/openoa/schema/base_tie_schema.json index ed3610c0..eff93130 100644 --- a/openoa/schema/base_tie_schema.json +++ b/openoa/schema/base_tie_schema.json @@ -16,13 +16,13 @@ "units": "m/s" }, "frequency": [ - "min", - "ms", "us", + "ns", "D", "s", - "ns", - "h" + "h", + "ms", + "min" ] }, "scada": { @@ -42,13 +42,13 @@ "units": null }, "frequency": [ - "min", - "ms", "us", + "ns", "D", "s", - "ns", - "h" + "h", + "ms", + "min" ] } } diff --git a/openoa/schema/base_tie_schema.yml b/openoa/schema/base_tie_schema.yml index c4040865..2d9c6e77 100644 --- a/openoa/schema/base_tie_schema.yml +++ b/openoa/schema/base_tie_schema.yml @@ -12,13 +12,13 @@ scada: dtype: float units: m/s frequency: - - min - - ms - us + - ns - D - s - - ns - h + - ms + - min reanalysis: WMETR_HorWdSpd: name: WMETR_HorWdSpd @@ -33,10 +33,10 @@ reanalysis: dtype: float units: kg/m^3 frequency: - - min - - ms - us + - ns - D - s - - ns - h + - ms + - min diff --git a/openoa/schema/base_yaw_misalignmental_losses_schema.json b/openoa/schema/base_yaw_misalignmental_losses_schema.json index 22588af7..4bbc6936 100644 --- a/openoa/schema/base_yaw_misalignmental_losses_schema.json +++ b/openoa/schema/base_yaw_misalignmental_losses_schema.json @@ -33,12 +33,12 @@ "units": null }, "frequency": [ - "min", - "ms", "us", - "s", "ns", - "h" + "s", + "h", + "ms", + "min" ] } } diff --git a/openoa/schema/base_yaw_misalignmental_losses_schema.yml b/openoa/schema/base_yaw_misalignmental_losses_schema.yml index ce1c15cc..81f8b02b 100644 --- a/openoa/schema/base_yaw_misalignmental_losses_schema.yml +++ b/openoa/schema/base_yaw_misalignmental_losses_schema.yml @@ -20,12 +20,12 @@ scada: dtype: float units: deg frequency: - - min - - ms - us - - s - ns + - s - h + - ms + - min asset: rated_power: name: rated_power diff --git a/openoa/schema/metadata.py b/openoa/schema/metadata.py index ed82d0cb..c1e11779 100644 --- a/openoa/schema/metadata.py +++ b/openoa/schema/metadata.py @@ -191,7 +191,8 @@ def convert_frequency(offset: str) -> str: "min", "s", "ms", "us", "ns", "M", "H", "T", "S", "L", "U", or "N". """ # Separate leading digits and the offset code - offset_digits, *_ = re.findall(r"\d+", offset) + offset_digits = re.findall(r"\d+", offset) + offset_digits = "" if offset_digits == [] else offset_digits[0] offset_str = offset.translate(remove_digits) # Check the code is a valid format diff --git a/openoa/schema/scada_wake_losses_schema.json b/openoa/schema/scada_wake_losses_schema.json index b60989f5..26b60342 100644 --- a/openoa/schema/scada_wake_losses_schema.json +++ b/openoa/schema/scada_wake_losses_schema.json @@ -28,12 +28,12 @@ "units": "m/s" }, "frequency": [ - "min", - "ms", "us", - "s", "ns", - "h" + "s", + "h", + "ms", + "min" ] }, "scada": { @@ -58,12 +58,12 @@ "units": null }, "frequency": [ - "min", - "ms", "us", - "s", "ns", - "h" + "s", + "h", + "ms", + "min" ] } } diff --git a/openoa/schema/scada_wake_losses_schema.yml b/openoa/schema/scada_wake_losses_schema.yml index 215d5231..daaefa23 100644 --- a/openoa/schema/scada_wake_losses_schema.yml +++ b/openoa/schema/scada_wake_losses_schema.yml @@ -16,12 +16,12 @@ scada: dtype: float units: deg frequency: - - min - - ms - us - - s - ns + - s - h + - ms + - min asset: latitude: name: latitude @@ -45,9 +45,9 @@ reanalysis: dtype: float units: deg frequency: - - min - - ms - us - - s - ns + - s - h + - ms + - min diff --git a/openoa/schema/temperature_monte_carlo_aep_schema.json b/openoa/schema/temperature_monte_carlo_aep_schema.json index 1b9695ea..3d77b29b 100644 --- a/openoa/schema/temperature_monte_carlo_aep_schema.json +++ b/openoa/schema/temperature_monte_carlo_aep_schema.json @@ -11,15 +11,16 @@ "units": "kWh" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] }, "meter": { @@ -29,15 +30,16 @@ "units": "kWh" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] }, "reanalysis": { @@ -57,15 +59,16 @@ "units": "m/s" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] } } diff --git a/openoa/schema/temperature_monte_carlo_aep_schema.yml b/openoa/schema/temperature_monte_carlo_aep_schema.yml index e423a0f0..3febd458 100644 --- a/openoa/schema/temperature_monte_carlo_aep_schema.yml +++ b/openoa/schema/temperature_monte_carlo_aep_schema.yml @@ -4,15 +4,16 @@ meter: dtype: float units: kWh frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min curtail: IAVL_ExtPwrDnWh: name: IAVL_ExtPwrDnWh @@ -23,15 +24,16 @@ curtail: dtype: float units: kWh frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min reanalysis: WMETR_HorWdSpd: name: WMETR_HorWdSpd @@ -46,12 +48,13 @@ reanalysis: dtype: float units: kg/m^3 frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min diff --git a/openoa/schema/temperature_wind_direction_monte_carlo_aep_schema.json b/openoa/schema/temperature_wind_direction_monte_carlo_aep_schema.json index 0f382d1c..9a5a7821 100644 --- a/openoa/schema/temperature_wind_direction_monte_carlo_aep_schema.json +++ b/openoa/schema/temperature_wind_direction_monte_carlo_aep_schema.json @@ -11,15 +11,16 @@ "units": "kWh" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] }, "meter": { @@ -29,15 +30,16 @@ "units": "kWh" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] }, "reanalysis": { @@ -67,15 +69,16 @@ "units": "m/s" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] } } diff --git a/openoa/schema/temperature_wind_direction_monte_carlo_aep_schema.yml b/openoa/schema/temperature_wind_direction_monte_carlo_aep_schema.yml index 059c93de..f5e80868 100644 --- a/openoa/schema/temperature_wind_direction_monte_carlo_aep_schema.yml +++ b/openoa/schema/temperature_wind_direction_monte_carlo_aep_schema.yml @@ -4,15 +4,16 @@ meter: dtype: float units: kWh frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min curtail: IAVL_ExtPwrDnWh: name: IAVL_ExtPwrDnWh @@ -23,15 +24,16 @@ curtail: dtype: float units: kWh frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min reanalysis: WMETR_HorWdSpd: name: WMETR_HorWdSpd @@ -54,12 +56,13 @@ reanalysis: dtype: float units: kg/m^3 frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min diff --git a/openoa/schema/tower_wake_losses_schema.json b/openoa/schema/tower_wake_losses_schema.json index 2378a5d2..e2a2f551 100644 --- a/openoa/schema/tower_wake_losses_schema.json +++ b/openoa/schema/tower_wake_losses_schema.json @@ -28,12 +28,12 @@ "units": "m/s" }, "frequency": [ - "min", - "ms", "us", - "s", "ns", - "h" + "s", + "h", + "ms", + "min" ] }, "scada": { @@ -53,12 +53,12 @@ "units": null }, "frequency": [ - "min", - "ms", "us", - "s", "ns", - "h" + "s", + "h", + "ms", + "min" ] }, "tower": { @@ -78,12 +78,12 @@ "units": null }, "frequency": [ - "min", - "ms", "us", - "s", "ns", - "h" + "s", + "h", + "ms", + "min" ] } } diff --git a/openoa/schema/tower_wake_losses_schema.yml b/openoa/schema/tower_wake_losses_schema.yml index 74b0d2c1..782b1b71 100644 --- a/openoa/schema/tower_wake_losses_schema.yml +++ b/openoa/schema/tower_wake_losses_schema.yml @@ -12,12 +12,12 @@ scada: dtype: float units: m/s frequency: - - min - - ms - us - - s - ns + - s - h + - ms + - min tower: asset_id: name: asset_id @@ -32,12 +32,12 @@ tower: dtype: float units: deg frequency: - - min - - ms - us - - s - ns + - s - h + - ms + - min asset: latitude: name: latitude @@ -61,9 +61,9 @@ reanalysis: dtype: float units: deg frequency: - - min - - ms - us - - s - ns + - s - h + - ms + - min diff --git a/openoa/schema/wind_direction_monte_carlo_aep_schema.json b/openoa/schema/wind_direction_monte_carlo_aep_schema.json index 4f4e4951..07b4aca5 100644 --- a/openoa/schema/wind_direction_monte_carlo_aep_schema.json +++ b/openoa/schema/wind_direction_monte_carlo_aep_schema.json @@ -11,15 +11,16 @@ "units": "kWh" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] }, "meter": { @@ -29,15 +30,16 @@ "units": "kWh" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] }, "reanalysis": { @@ -62,15 +64,16 @@ "units": "m/s" }, "frequency": [ - "min", - "ms", - "W", "us", + "ns", + "ME", + "W", "D", "s", - "ns", + "MS", "h", - "MS" + "ms", + "min" ] } } diff --git a/openoa/schema/wind_direction_monte_carlo_aep_schema.yml b/openoa/schema/wind_direction_monte_carlo_aep_schema.yml index 7e5ab1bf..de0bc2f7 100644 --- a/openoa/schema/wind_direction_monte_carlo_aep_schema.yml +++ b/openoa/schema/wind_direction_monte_carlo_aep_schema.yml @@ -4,15 +4,16 @@ meter: dtype: float units: kWh frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min curtail: IAVL_ExtPwrDnWh: name: IAVL_ExtPwrDnWh @@ -23,15 +24,16 @@ curtail: dtype: float units: kWh frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min reanalysis: WMETR_HorWdSpd: name: WMETR_HorWdSpd @@ -50,12 +52,13 @@ reanalysis: dtype: float units: kg/m^3 frequency: - - min - - ms - - W - us + - ns + - ME + - W - D - s - - ns - - h - MS + - h + - ms + - min