From c603a3a3b027372b4ed447cf5766b4a75d6e4875 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 20 Mar 2020 14:38:36 +0000 Subject: [PATCH 1/2] ECC-1068: tigge_check update (resolution checking for S2S) (Initial try) --- tigge/tigge_check.c | 14 ++++++++++++++ tigge/tigge_check.h | 46 ++++++++++++++++++++++----------------------- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/tigge/tigge_check.c b/tigge/tigge_check.c index 13e0501f3..e340b5a7b 100755 --- a/tigge/tigge_check.c +++ b/tigge/tigge_check.c @@ -80,6 +80,8 @@ static void given_thickness(grib_handle*,const parameter*,double,double); static void has_bitmap(grib_handle*,const parameter*,double,double); static void has_soil_level(grib_handle*,const parameter*,double,double); static void has_soil_layer(grib_handle*,const parameter*,double,double); +static void resolution_s2s(grib_handle*,const parameter*,double,double); +static void resolution_s2s_ocean(grib_handle*,const parameter*,double,double); static void height_level(grib_handle*,const parameter*,double,double); static void pressure_level(grib_handle*,const parameter*,double,double); @@ -840,6 +842,18 @@ static void has_soil_layer(grib_handle* h,const parameter* p,double min,double m CHECK(le(h,"level",14)); /* max in UERRA */ } +static void resolution_s2s(grib_handle* h,const parameter* p,double min,double max) +{ + CHECK(eq(h,"iDirectionIncrement",1500000)); + CHECK(eq(h,"jDirectionIncrement",1500000)); +} + +static void resolution_s2s_ocean(grib_handle* h,const parameter* p,double min,double max) +{ + CHECK(eq(h,"iDirectionIncrement",1000000)); + CHECK(eq(h,"jDirectionIncrement",1000000)); +} + static void six_hourly(grib_handle* h,const parameter* p,double min,double max) { statistical_process(h,p,min,max); diff --git a/tigge/tigge_check.h b/tigge/tigge_check.h index 3f5517ab1..40773add7 100644 --- a/tigge/tigge_check.h +++ b/tigge/tigge_check.h @@ -1495,7 +1495,7 @@ uerra, eswi-an: an.sp.sfc.grib2, field 1 [surface_pressure_sfc]: surface_pressur {"typeOfSecondFixedSurface", GRIB_TYPE_LONG, 8}, {NULL, }, }, - {&daily_average, &predefined_thickness}, + {&daily_average, &predefined_thickness, &resolution_s2s}, }, /* S2S/CAWCR: total_column_water_sfc.glob minimum value 0.00832421 is not in [0.01,1] @@ -1521,7 +1521,7 @@ warning: s2s.z_tigge_c_kwbc_20090829000000_ncep_prod_pf_sl_0024_003_0000_tcw.gri {"typeOfSecondFixedSurface", GRIB_TYPE_LONG, 8}, {NULL, }, }, - {&daily_average, &predefined_thickness}, + {&daily_average, &predefined_thickness, &resolution_s2s}, }, { @@ -1567,7 +1567,7 @@ s2s/ammc: warning: s2s.2t_20151224_26.grib2, field 12 [surface_air_temperature_s {"typeOfFirstFixedSurface", GRIB_TYPE_LONG, 103}, {NULL, }, }, - {&daily_average, &given_level}, + {&daily_average, &given_level, &resolution_s2s}, }, { @@ -1614,7 +1614,7 @@ s2s/ammc: warning: s2s.2t_20151224_26.grib2, field 12 [surface_air_temperature_s {"typeOfFirstFixedSurface", GRIB_TYPE_LONG, 103}, {NULL, }, }, - {&daily_average, &given_level}, + {&daily_average, &given_level, &resolution_s2s}, }, /* S2S/CAWCR: skin_temperature_sfc.glob maximum value 309.28 is not in [310,355] @@ -1639,7 +1639,7 @@ uerra/egrr/det/an: skin_temperature_sfc minimum value 266.875 is not in [160,250 {"typeOfFirstFixedSurface", GRIB_TYPE_LONG, 1}, {NULL, }, }, - {&daily_average, &predefined_level}, + {&daily_average, &predefined_level, &resolution_s2s}, }, /* @@ -1842,7 +1842,7 @@ s2s_prod/ammc/enfo:warning: s2s.st20_20151004_4.grib2, field 61 [soil_temperatur {"scaledValueOfSecondFixedSurface", GRIB_TYPE_LONG, 10}, {NULL, }, }, - {&daily_average, &given_thickness, &has_bitmap}, + {&daily_average, &given_thickness, &has_bitmap, &resolution_s2s}, }, /* S2S/CAWCR: snow_depth_water_equivalent_sfc.glob maximum value 9066.25 is not in [10000,15000] @@ -1866,7 +1866,7 @@ warning: s2s.z_tigge_c_kwbc_19990817000000_ncep_prod_cf_sl_0024_000_0000_sd.grib {"typeOfFirstFixedSurface", GRIB_TYPE_LONG, 1}, {NULL, }, }, - {&daily_average, &predefined_level}, + {&daily_average, &predefined_level, &resolution_s2s}, }, /*s2s/isac:warning: s2s.z_s2s_c_isac_201510190000_glob_prod_cf_0744_00.sl.grib2, field 25 [snow_depth_water_equivalent_sfc.glob]: snow_depth_water_equivalent_sfc.glob maximum value 118.824 @@ -1894,7 +1894,7 @@ warning: s2s.z_tigge_c_kwbc_19990817000000_ncep_prod_cf_sl_0024_000_0000_sd.grib {"typeOfFirstFixedSurface", GRIB_TYPE_LONG, 1}, {NULL, }, }, - {&daily_average, &predefined_level}, + {&daily_average, &predefined_level, &resolution_s2s}, }, /* @@ -1926,7 +1926,7 @@ s2s/ammc/enfo:s2s.tcc_20151004_9.grib2, field 21 [total_cloud_cover_sfc.glob]: t {"typeOfSecondFixedSurface", GRIB_TYPE_LONG, 8}, {NULL, }, }, - {&daily_average, &predefined_thickness}, + {&daily_average, &predefined_thickness, &resolution_s2s}, }, /* @@ -1957,7 +1957,7 @@ s2s/ammc/enfo:s2s.tcc_20151004_9.grib2, field 21 [total_cloud_cover_sfc.glob]: t {"typeOfSecondFixedSurface", GRIB_TYPE_LONG, 8}, {NULL, }, }, - {&daily_average, &predefined_thickness}, + {&daily_average, &predefined_thickness, &resolution_s2s}, }, { @@ -2003,7 +2003,7 @@ s2s/ammc/enfo:s2s.tcc_20151004_9.grib2, field 21 [total_cloud_cover_sfc.glob]: t {"typeOfFirstFixedSurface", GRIB_TYPE_LONG, 1}, {NULL, }, }, - {&daily_average, &predefined_level, &has_bitmap}, + {&daily_average, &predefined_level, &has_bitmap, &resolution_s2s}, }, { @@ -2027,7 +2027,7 @@ s2s/ammc/enfo:s2s.tcc_20151004_9.grib2, field 21 [total_cloud_cover_sfc.glob]: t {"typeOfFirstFixedSurface", GRIB_TYPE_LONG, 1}, {NULL, }, }, - {&daily_average, &predefined_level}, + {&daily_average, &predefined_level, &resolution_s2s}, }, /* @@ -2055,7 +2055,7 @@ s2s/ammc/enfo:s2s.tcc_20151004_9.grib2, field 21 [total_cloud_cover_sfc.glob]: t {"typeOfFirstFixedSurface", GRIB_TYPE_LONG, 1}, {NULL, }, }, - {&daily_average, &predefined_level, &has_bitmap}, + {&daily_average, &predefined_level, &has_bitmap, &resolution_s2s}, }, { @@ -3755,7 +3755,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {"scaledValueOfFirstFixedSurface", GRIB_TYPE_LONG, 29315}, {NULL, }, }, - {&daily_average, &given_level, &has_bitmap}, + {&daily_average, &given_level, &has_bitmap, &resolution_s2s_ocean}, }, { "average_salinity_in_the_upper_300_m_o2d.s2", @@ -3780,7 +3780,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {"scaledValueOfSecondFixedSurface", GRIB_TYPE_LONG, 300}, {NULL, }, }, - {&daily_average, &given_thickness, &has_bitmap}, + {&daily_average, &given_thickness, &has_bitmap, &resolution_s2s_ocean}, }, { "mean_sea_water_temperature_in_the_upper_300_m_o2d.s2", @@ -3805,7 +3805,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {"scaledValueOfSecondFixedSurface", GRIB_TYPE_LONG, 300}, {NULL, }, }, - {&daily_average, &given_thickness, &has_bitmap}, + {&daily_average, &given_thickness, &has_bitmap, &resolution_s2s_ocean}, }, { "mean_sea_water_potential_temperature_in_the_upper_300_m_o2d.s2", @@ -3830,7 +3830,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {"scaledValueOfSecondFixedSurface", GRIB_TYPE_LONG, 300}, {NULL, }, }, - {&daily_average, &given_thickness, &has_bitmap}, + {&daily_average, &given_thickness, &has_bitmap, &resolution_s2s_ocean}, }, { "ocean_mixed_layer_thickness_defined_by_sigma_theta_0.01_kg/m3_o2d.s2", @@ -3852,7 +3852,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {NULL, }, }, - {&daily_average, &given_level, &has_bitmap}, + {&daily_average, &given_level, &has_bitmap, &resolution_s2s_ocean}, }, { "eastward_sea_water_velocity_o2d.s2", @@ -3874,7 +3874,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {NULL, }, }, - {&daily_average, &given_level, &has_bitmap}, + {&daily_average, &given_level, &has_bitmap, &resolution_s2s_ocean}, }, { "northward_sea_water_velocity_o2d.s2", @@ -3896,7 +3896,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {NULL, }, }, - {&daily_average, &given_level, &has_bitmap}, + {&daily_average, &given_level, &has_bitmap, &resolution_s2s}, }, { "sea-ice_thickness_o2d.s2", @@ -3918,7 +3918,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {NULL, }, }, - {&daily_average, &given_level, &has_bitmap}, + {&daily_average, &given_level, &has_bitmap, &resolution_s2s_ocean}, }, { "sea_surface_height_o2d.s2", @@ -3940,7 +3940,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {NULL, }, }, - {&daily_average, &given_level, &has_bitmap}, + {&daily_average, &given_level, &has_bitmap, &resolution_s2s_ocean}, }, { "sea_surface_practical_salinity_o2d.s2", @@ -3962,7 +3962,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {NULL, }, }, - {&daily_average, &given_level, &has_bitmap}, + {&daily_average, &given_level, &has_bitmap, &resolution_s2s_ocean}, }, }; From fe00e93b58180d44ba596ffaaa45dd11afc57d96 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 20 Mar 2020 17:24:56 +0000 Subject: [PATCH 2/2] ECC-1068: tigge_check update (resolution checking for S2S) --- tigge/tigge_check.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tigge/tigge_check.h b/tigge/tigge_check.h index 40773add7..98178be7d 100644 --- a/tigge/tigge_check.h +++ b/tigge/tigge_check.h @@ -3896,7 +3896,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100] {NULL, }, }, - {&daily_average, &given_level, &has_bitmap, &resolution_s2s}, + {&daily_average, &given_level, &has_bitmap, &resolution_s2s_ocean}, }, { "sea-ice_thickness_o2d.s2",