Skip to content

Commit

Permalink
Updates of ccpp-framework and ccpp-physics (merge ccpp-framework feat…
Browse files Browse the repository at this point in the history
…ure/capgen into main/20240308) (NOAA-EMC#796)

* Update ccpp-framework and ccpp-physics for the prep of capgen transition

* In ccpp/data/GFS_typedefs.meta: change units 'flashes 5 min-1' to 'flashes min-1' and update long name to make clear this is per 5 minutes

* In ccpp/driver/GFS_diagnostics.F90, scale lightning threat from flashes per minute to flashes per 5 minutes to match diagnostic units

* Fix wrong long names for lightning threat indices in ccpp/data/GFS_typedefs.meta
  • Loading branch information
climbfuji authored Mar 18, 2024
1 parent 21744e2 commit fae9bc2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -9954,7 +9954,7 @@
[ltg1_max]
standard_name = lightning_threat_index_1
long_name = lightning threat index 1
units = flashes 5 min-1
units = flashes min-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
Expand All @@ -9963,7 +9963,7 @@
[ltg2_max]
standard_name = lightning_threat_index_2
long_name = lightning threat index 2
units = flashes 5 min-1
units = flashes min-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
Expand All @@ -9972,7 +9972,7 @@
[ltg3_max]
standard_name = lightning_threat_index_3
long_name = lightning threat index 3
units = flashes 5 min-1
units = flashes min-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
Expand Down
6 changes: 6 additions & 0 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5071,6 +5071,8 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%desc = 'Max Lightning Threat 1'
ExtDiag(idx)%unit = 'flashes/(5 min)'
ExtDiag(idx)%mod_name = 'gfs_sfc'
! CCPP physics units are flashes per minute
ExtDiag(idx)%cnvfac = 5.0_kind_phys
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%ltg1_max
Expand All @@ -5082,6 +5084,8 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%desc = 'Max Lightning Threat 2'
ExtDiag(idx)%unit = 'flashes/(5 min)'
ExtDiag(idx)%mod_name = 'gfs_sfc'
! CCPP physics units are flashes per minute
ExtDiag(idx)%cnvfac = 5.0_kind_phys
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%ltg2_max
Expand All @@ -5093,6 +5097,8 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%desc = 'Max Lightning Threat 3'
ExtDiag(idx)%unit = 'flashes/(5 min)'
ExtDiag(idx)%mod_name = 'gfs_sfc'
! CCPP physics units are flashes per minute
ExtDiag(idx)%cnvfac = 5.0_kind_phys
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag(nb)%ltg3_max
Expand Down
2 changes: 1 addition & 1 deletion ccpp/framework
Submodule framework updated 88 files
+17 −0 .github/workflows/capgen_unit_tests.yaml
+1 −1 CMakeLists.txt
+1 −1 CODEOWNERS
+3 −2 doc/HelloWorld/CMakeLists.txt
+50 −10 scripts/ccpp_capgen.py
+87 −0 scripts/ccpp_database_obj.py
+9 −8 scripts/ccpp_datafile.py
+38 −22 scripts/ccpp_suite.py
+9 −18 scripts/code_block.py
+1 −8 scripts/common.py
+240 −118 scripts/constituents.py
+59 −52 scripts/ddt_library.py
+1 −12 scripts/file_utils.py
+160 −40 scripts/fortran_tools/fortran_write.py
+11 −17 scripts/fortran_tools/parse_fortran.py
+37 −21 scripts/fortran_tools/parse_fortran_file.py
+28 −3 scripts/framework_env.py
+132 −83 scripts/host_cap.py
+38 −12 scripts/host_model.py
+26 −34 scripts/metadata_table.py
+180 −56 scripts/metavar.py
+9 −4 scripts/parse_tools/__init__.py
+13 −0 scripts/parse_tools/fortran_conditional.py
+61 −1 scripts/parse_tools/parse_checkers.py
+4 −0 scripts/parse_tools/parse_log.py
+2 −17 scripts/parse_tools/parse_object.py
+41 −56 scripts/parse_tools/parse_source.py
+71 −120 scripts/parse_tools/xml_tools.py
+697 −39 scripts/suite_objects.py
+268 −125 scripts/var_props.py
+1,693 −744 src/ccpp_constituent_prop_mod.F90
+47 −0 src/ccpp_constituent_prop_mod.meta
+1 −0 test/advection_test/CMakeLists.txt
+6 −6 test/advection_test/cld_ice.F90
+4 −2 test/advection_test/cld_ice.meta
+6 −6 test/advection_test/cld_liq.F90
+2 −2 test/advection_test/cld_liq.meta
+6 −1 test/advection_test/run_test
+364 −100 test/advection_test/test_host.F90
+9 −10 test/advection_test/test_host_data.F90
+23 −15 test/advection_test/test_host_mod.F90
+10 −4 test/advection_test/test_reports.py
+1 −0 test/capgen_test/CMakeLists.txt
+4 −0 test/capgen_test/run_test
+2 −2 test/capgen_test/temp_adjust.F90
+1 −0 test/capgen_test/temp_adjust.meta
+3 −1 test/capgen_test/temp_suite.xml
+2 −1 test/capgen_test/test_host.F90
+1 −0 test/capgen_test/test_host_data.meta
+6 −3 test/capgen_test/test_reports.py
+0 −35 test/run_doctest.sh
+14 −18 test/run_fortran_tests.sh
+33 −0 test/unit_tests/sample_files/fortran_files/comments_test.F90
+39 −0 test/unit_tests/sample_files/fortran_files/linebreak_test.F90
+11 −0 test/unit_tests/sample_host_files/data1_mod.F90
+25 −0 test/unit_tests/sample_host_files/data1_mod.meta
+17 −0 test/unit_tests/sample_host_files/ddt1.F90
+20 −0 test/unit_tests/sample_host_files/ddt1.meta
+33 −0 test/unit_tests/sample_host_files/ddt1_plus.F90
+20 −0 test/unit_tests/sample_host_files/ddt1_plus.meta
+24 −0 test/unit_tests/sample_host_files/ddt2.F90
+29 −0 test/unit_tests/sample_host_files/ddt2.meta
+34 −0 test/unit_tests/sample_host_files/ddt2_extra_var.F90
+34 −0 test/unit_tests/sample_host_files/ddt2_extra_var.meta
+30 −0 test/unit_tests/sample_host_files/ddt_data1_mod.F90
+56 −0 test/unit_tests/sample_host_files/ddt_data1_mod.meta
+127 −0 test/unit_tests/test_fortran_write.py
+261 −0 test/unit_tests/test_metadata_host_file.py
+193 −134 test/unit_tests/test_metadata_scheme_file.py
+3 −2 test/unit_tests/test_metadata_table.py
+29 −41 test/unit_tests/test_var_transforms.py
+1 −0 test/var_compatibility_test/.gitignore
+188 −0 test/var_compatibility_test/CMakeLists.txt
+6 −0 test/var_compatibility_test/README.md
+60 −0 test/var_compatibility_test/effr_calc.F90
+120 −0 test/var_compatibility_test/effr_calc.meta
+261 −0 test/var_compatibility_test/run_test
+405 −0 test/var_compatibility_test/test_host.F90
+38 −0 test/var_compatibility_test/test_host.meta
+67 −0 test/var_compatibility_test/test_host_data.F90
+61 −0 test/var_compatibility_test/test_host_data.meta
+86 −0 test/var_compatibility_test/test_host_mod.F90
+42 −0 test/var_compatibility_test/test_host_mod.meta
+161 −0 test/var_compatibility_test/test_reports.py
+1 −0 test/var_compatibility_test/var_compatibility_files.txt
+7 −0 test/var_compatibility_test/var_compatibility_suite.xml
+1 −0 test_prebuild/test_blocked_data/README.md
+1 −1 test_prebuild/test_metadata_parser.py

0 comments on commit fae9bc2

Please sign in to comment.