From c8626f569a7ffb8eba0dc5beb8ed7752fd5501e2 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 16 Apr 2024 08:03:04 -0600 Subject: [PATCH 1/4] doxygen --- src/grib2_all_tables_module.F90 | 58 +++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/src/grib2_all_tables_module.F90 b/src/grib2_all_tables_module.F90 index ac118d0..f843f7a 100644 --- a/src/grib2_all_tables_module.F90 +++ b/src/grib2_all_tables_module.F90 @@ -2066,11 +2066,14 @@ subroutine g2sec4_temp44(icatg, iparm, aer_type, typ_intvl_size, & ! end subroutine g2sec4_temp44 !> - !> This subroutine returns the Grib2 Section 4 Template 4.0 list for given keys - !> PDT 4.46 - Average, accumulation, and/or extreme values or other - !> statistically processed values at a horizontal level - !> or in a horizontal layer in a continuous or - !> non-continuous time interval for aerosol. + !> Returns the GRIB2 Section 4 Template 4.0 list. + !> + !>
+  !> PDT 4.46 - Average, accumulation, and/or extreme values or other
+  !>            statistically processed values at a horizontal level
+  !>            or in a horizontal layer in a continuous or
+  !>            non-continuous time interval for aerosol.
+  !> 
!> !> @param[in] icatg - Parameter category (see Code table 4.1) !> @param[in] iparm - Parameter number (see Code table 4.2) @@ -2098,28 +2101,33 @@ end subroutine g2sec4_temp44 !> @param[in] hour_intvl - Hour Time of end of overall time interval !> @param[in] min_intvl - Minute Time of end of overall time interval !> @param[in] sec_intvl - Second Time of end of overall time interval - !> @param[in] num_time_range - n number of time ranges specifications describing - !> the time intervals used to calculate the - !> statistically-processed field - !> @param[in] stat_miss_val - Total number of data values missing in statistical process - !> Specification of the outermost (or only) time range over - !> which statistical processing is done - !> @param[in] type_of_stat_proc - Statistical process used to calculate the processed - !> field from the field at each time increment during the - !> time range (see Code Table 4.10) - !> @param[in] type_of_time_inc - Type of time increment between successive fields - !> used in the statistical processing (see Code Table 4.11) - !> @param[in] stat_unit_time_key - Indicator of unit of time for time range over which - !> statistical processing is done (see Code Table 4.4) - !> @param[in] leng_time_range_stat - Length of the time range over which statistical processing - !> is done, in units defined by the previous octet - !> @param[in] stat_unit_time_key_succ - Indicator of unit of time for the increment between the - !> successive fields used (see Code table 4.4) - !> @param[in] time_inc_betwn_succ_fld - Time increment between successive fields, - !> in units defined by the previous octet (see Notes 3 & 4) + !> @param[in] num_time_range - n number of time ranges + !> specifications describing the time intervals used to calculate + !> the statistically-processed field + !> @param[in] stat_miss_val - Total number of data values missing in + !> statistical process Specification of the outermost (or only) time + !> range over which statistical processing is done + !> @param[in] type_of_stat_proc - Statistical process used to + !> calculate the processed field from the field at each time + !> increment during the time range (see Code Table 4.10) + !> @param[in] type_of_time_inc - Type of time increment between + !> successive fields used in the statistical processing (see Code + !> Table 4.11) + !> @param[in] stat_unit_time_key - Indicator of unit of time for + !> time range over which statistical processing is done (see Code + !> Table 4.4) + !> @param[in] leng_time_range_stat - Length of the time range over + !> which statistical processing is done, in units defined by the + !> previous octet + !> @param[in] stat_unit_time_key_succ - Indicator of unit of time + !> for the increment between the successive fields used (see Code + !> table 4.4) + !> @param[in] time_inc_betwn_succ_fld - Time increment between + !> successive fields, in units defined by the previous octet (see + !> Notes 3 & 4) !> @param[out] ipdstmpl46 - GRIB2 PDS Template 4.46 listing !> - !> @author E. JAMES ORG: NOAA/GSL @date 2024-04-02 + !> @author E. JAMES, NOAA/GSL @date 2024-04-02 subroutine g2sec4_temp46(icatg, iparm, aer_type, typ_intvl_size, & scale_fac1_size, scale_val1_size, scale_fac2_size, & scale_val2_size, typ_gen_proc_key, gen_proc_or_mod_key, & From 1c1a64066b7fcb744c526c09be00fac73199fa2f Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 16 Apr 2024 08:11:25 -0600 Subject: [PATCH 2/4] turned on -Werror --- .github/workflows/developer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/developer.yml b/.github/workflows/developer.yml index 38f55bf..09f5a56 100644 --- a/.github/workflows/developer.yml +++ b/.github/workflows/developer.yml @@ -37,7 +37,7 @@ jobs: cd g2tmpl mkdir build cd build - cmake -DENABLE_DOCS=ON -DCMAKE_C_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -fsanitize=address -Wall -Werror" -DCMAKE_Fortran_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -fsanitize=address -Wall" -DCMAKE_BUILD_TYPE=Debug .. + cmake -DENABLE_DOCS=ON -DCMAKE_C_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -fsanitize=address -Wall -Werror" -DCMAKE_Fortran_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -fsanitize=address -Wall -Werror" -DCMAKE_BUILD_TYPE=Debug .. make -j2 VERBOSE=1 - name: test From 8a8450358822479275e312b32a13dadb586454e9 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 16 Apr 2024 08:32:37 -0600 Subject: [PATCH 3/4] fixed warnings --- src/grib2_all_tables_module.F90 | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/grib2_all_tables_module.F90 b/src/grib2_all_tables_module.F90 index f843f7a..01b6afa 100644 --- a/src/grib2_all_tables_module.F90 +++ b/src/grib2_all_tables_module.F90 @@ -220,7 +220,7 @@ module grib2_all_tables_module data table1_4(8) /type_of_data('proc_rad_obs',7)/ data table1_4(9) /type_of_data('event_prob',8)/ data table1_4(10) /type_of_data('missing',255)/ - data table1_4(11) /type_of_data('experimental_products',192)/ + data table1_4(11) /type_of_data('experimental_product',192)/ ! ! type type_of_gen_proc @@ -1172,7 +1172,7 @@ module grib2_all_tables_module data on388_tablea(112) /gen_proc('extra_trop_storm_surge_pacific',17)/ data on388_tablea(113) /gen_proc('prob_extra_trop_storm_surge',18)/ data on388_tablea(114) /gen_proc('linmit_fine_mesh_anal',19)/ - data on388_tablea(115) /gen_proc('extra_trop_storm_surge_micronesia',20)/ + data on388_tablea(115) /gen_proc('extra_trop_storm_surge_microne',20)/ data on388_tablea(116) /gen_proc('hur_weather_res_and_fcst',71)/ data on388_tablea(117) /gen_proc('hur_non-hydro_multi',72)/ ! @@ -1188,7 +1188,7 @@ module grib2_all_tables_module ! data on388_tablea(120) /gen_proc('extra_trop_storm_surge_atl_3d',21)/ data on388_tablea(121) /gen_proc('extra_trop_storm_surge_pac_3d',22)/ - data on388_tablea(122) /gen_proc('extra_trop_storm_surge_micro_3d',23)/ + data on388_tablea(122) /gen_proc('extra_trop_storm_surge_micro_3',23)/ contains ! @@ -1401,6 +1401,7 @@ subroutine get_g2_fixedsurfacetypes(key, value, ierr) character(len=*) :: key integer :: value, n, ierr ! + ierr = 0 do n=1, MAXFIXEDSURFACETYPES if (trim(table4_5(n)%fixedsurfacetypeskey).eq.trim(key)) then value=table4_5(n)%fixedsurfacetypesval @@ -2034,9 +2035,9 @@ subroutine g2sec4_temp44(icatg, iparm, aer_type, typ_intvl_size, & call get_g2_typeofintervals(typ_intvl_size, value, ierr) ipdstmpl44(4) = value ipdstmpl44(5) = scale_fac1_size - ipdstmpl44(6) = scale_val1_size + ipdstmpl44(6) = int(scale_val1_size) ipdstmpl44(7) = scale_fac2_size - ipdstmpl44(8) = scale_val2_size + ipdstmpl44(8) = int(scale_val2_size) ! call get_g2_typeofgenproc(typ_gen_proc_key, value, ierr) ipdstmpl44(9) = value @@ -2417,7 +2418,6 @@ subroutine g2sec5_temp0(dec_scale_fac, bin_scale_fac, tlnumbits, ifield5) integer(4), intent(in) :: bin_scale_fac, dec_scale_fac, tlnumbits integer(4), intent(out) :: ifield5(5) ! character(len=50) :: type_of_field - integer(4) :: value, ierr ! ifield5(1) = 0 ! Any value. Will be later overwritten ifield5(2) = bin_scale_fac @@ -2447,8 +2447,6 @@ subroutine g2sec5_temp2(dec_scale_fac, bin_scale_fac, ifield5) integer(4), intent(inout) :: ifield5(16) integer(4), intent(in) :: dec_scale_fac, bin_scale_fac ! - integer(4) :: value, ierr - ! ifield5=0 ifield5(1) = 0 ! Any value. Will be later overwritten ifield5(2) = bin_scale_fac @@ -2527,8 +2525,6 @@ subroutine g2sec5_temp40(dec_scale_fac, bin_scale_fac, tlnumbits, !--- local variable integer(4) :: value, ierr integer, parameter :: MAX_NUMBIT=16 - integer ibm - integer, allocatable :: mg(:) ! ifield5(1) = 0 ! Any value. Will be later overwritten ifield5(2) = bin_scale_fac From 19405eb7ec3f3714be416069957a4d4b4c5d6bf5 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 16 Apr 2024 08:34:33 -0600 Subject: [PATCH 4/4] fixed warnings --- src/grib2_all_tables_module.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/grib2_all_tables_module.F90 b/src/grib2_all_tables_module.F90 index 01b6afa..710cde5 100644 --- a/src/grib2_all_tables_module.F90 +++ b/src/grib2_all_tables_module.F90 @@ -2035,9 +2035,9 @@ subroutine g2sec4_temp44(icatg, iparm, aer_type, typ_intvl_size, & call get_g2_typeofintervals(typ_intvl_size, value, ierr) ipdstmpl44(4) = value ipdstmpl44(5) = scale_fac1_size - ipdstmpl44(6) = int(scale_val1_size) + ipdstmpl44(6) = scale_val1_size ipdstmpl44(7) = scale_fac2_size - ipdstmpl44(8) = int(scale_val2_size) + ipdstmpl44(8) = scale_val2_size ! call get_g2_typeofgenproc(typ_gen_proc_key, value, ierr) ipdstmpl44(9) = value