Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hourly data tests #58

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading