Skip to content

Commit

Permalink
Merge pull request #58 from ec-jrc/module_kiwis_interpreter
Browse files Browse the repository at this point in the history
Add hourly data tests
  • Loading branch information
gnrgomes authored Mar 18, 2024
2 parents 93662c0 + 5273bea commit 1d33d30
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[PROPERTIES]

VAR_CODE = pd6
CELL_METHODS = time: mean
UNIT = hPa
UNIT_CONVERSION = 1.0
HEIGHT_CORRECTION_FACTOR = 0.00025
# After the height correction allows removing negative values by setting them to zero
TRUNCATE_NEGATIVE_VALUES = True
VALUE_MIN = 0
VALUE_MAX = 50
VALUE_SCALE = 0.1
VALUE_OFFSET = 0.0
DATA_TYPE_PACKED = i2
STANDARD_NAME = water_vapor_partial_pressure_in_air
LONG_NAME = 6 Hourly Average Vapor Pressure

[VAR_TIME]

UNIT_PATTERN = hours since %%Y-%%m-%%d %%H:%%M:%%S.%%f
UNIT = hours since 1990-01-01 06:00:00.0
FREQUENCY = 6
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[PROPERTIES]

VAR_CODE = rg6
CELL_METHODS = time: sum
UNIT = J/m2
UNIT_CONVERSION = 1.0
VALUE_MIN = 0
VALUE_MAX = 115000000
VALUE_SCALE = 10000.0
VALUE_OFFSET = 0.0
DATA_TYPE_PACKED = i2
STANDARD_NAME = integral_wrt_time_of_surface_downwelling_shortwave_flux_in_air
LONG_NAME = 6 Hourly Calculated Radiation

[VAR_TIME]

UNIT_PATTERN = hours since %%Y-%%m-%%d %%H:%%M:%%S.%%f
UNIT = hours since 1990-01-01 06:00:00.0
FREQUENCY = 6
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[PROPERTIES]

VAR_CODE = tn6
CELL_METHODS = time: minimum
UNIT = degree_Celsius
UNIT_CONVERSION = 1.0
HEIGHT_CORRECTION_FACTOR = 0.006
VALUE_MIN = -55
VALUE_MAX = 50
VALUE_SCALE = 0.1
VALUE_OFFSET = 0.0
DATA_TYPE_PACKED = i2
STANDARD_NAME = air_temperature
LONG_NAME = 6 Hourly Minimum Temperature

[VAR_TIME]

UNIT_PATTERN = hours since %%Y-%%m-%%d %%H:%%M:%%S.%%f
UNIT = hours since 1990-01-01 06:00:00.0
FREQUENCY = 6
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[PROPERTIES]

VAR_CODE = tx6
CELL_METHODS = time: maximum
UNIT = degree_Celsius
UNIT_CONVERSION = 1.0
HEIGHT_CORRECTION_FACTOR = 0.006
VALUE_MIN = -55
VALUE_MAX = 55
VALUE_SCALE = 0.1
VALUE_OFFSET = 0.0
DATA_TYPE_PACKED = i2
STANDARD_NAME = air_temperature
LONG_NAME = 6 Hourly Maximum Temperature

[VAR_TIME]

UNIT_PATTERN = hours since %%Y-%%m-%%d %%H:%%M:%%S.%%f
UNIT = hours since 1990-01-01 06:00:00.0
FREQUENCY = 6
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[PROPERTIES]

VAR_CODE = ws6
CELL_METHODS = time: mean
UNIT = m/s
UNIT_CONVERSION = 1.0
VALUE_MIN = 0
VALUE_MAX = 45
VALUE_SCALE = 0.1
VALUE_OFFSET = 0.0
DATA_TYPE_PACKED = i2
STANDARD_NAME = wind_speed
LONG_NAME = 6 Hourly Average Wind Speed

[VAR_TIME]

UNIT_PATTERN = hours since %%Y-%%m-%%d %%H:%%M:%%S.%%f
UNIT = hours since 1990-01-01 06:00:00.0
FREQUENCY = 6
2 changes: 1 addition & 1 deletion tests/test_gridding.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def test_generate_netcdf_hourly(self):
reference = Dataset(reference_output)
out = Dataset(output_netcdf)

self.compare_netcdfs(out, reference, variable_name='pr1')
self.compare_netcdfs(out, reference, variable_name=variable_code)

out = None
reference = None

0 comments on commit 1d33d30

Please sign in to comment.