Skip to content

Commit c7c922f

Browse files
authored
Merge pull request NCAR#436 from climbfuji/update_master_from_dtc_develop_20200414
Merge dtc/develop into master 2020/04/14
2 parents b5765fc + 0aa8984 commit c7c922f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+11556
-205
lines changed

.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "physics/rte-rrtmgp"]
2+
path = physics/rte-rrtmgp
3+
url = https://github.com/RobertPincus/rte-rrtmgp
4+
branch = dtc/ccpp

CMakeLists.txt

+26-47
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,14 @@ if(NOT PROJECT)
55
endif (NOT PROJECT)
66

77
#------------------------------------------------------------------------------
8-
cmake_minimum_required(VERSION 2.8.11)
8+
cmake_minimum_required(VERSION 3.0)
9+
10+
project(ccppphys
11+
VERSION 3.0.0
12+
LANGUAGES C CXX Fortran)
913

1014
# Use rpaths on MacOSX
1115
set(CMAKE_MACOSX_RPATH 1)
12-
13-
if(POLICY CMP0048)
14-
cmake_policy(SET CMP0048 NEW)
15-
project(ccppphys VERSION 3.0.0)
16-
else(POLICY CMP0048)
17-
project(ccppphys)
18-
set(PROJECT_VERSION 3.0.0)
19-
set(PROJECT_VERSION_MAJOR 3)
20-
set(PROJECT_VERSION_MINOR 0)
21-
set(PROJECT_VERSION_PATCH 0)
22-
endif(POLICY CMP0048)
23-
2416
if(POLICY CMP0042)
2517
cmake_policy(SET CMP0042 NEW)
2618
endif(POLICY CMP0042)
@@ -29,17 +21,6 @@ endif(POLICY CMP0042)
2921
set(PACKAGE "ccpp-physics")
3022
set(AUTHORS "Grant J. Firl" "Dom Heinzeller")
3123

32-
#------------------------------------------------------------------------------
33-
# Enable Fortran
34-
enable_language(Fortran)
35-
36-
if (PROJECT STREQUAL "CCPP-SCM")
37-
#------------------------------------------------------------------------------
38-
# CMake Modules
39-
# Set the CMake module path
40-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../framework/cmake")
41-
endif (PROJECT STREQUAL "CCPP-SCM")
42-
4324
#------------------------------------------------------------------------------
4425
# Set OpenMP flags for C/C++/Fortran
4526
if (OPENMP)
@@ -85,33 +66,38 @@ else(STATIC)
8566
endif(STATIC)
8667

8768
#------------------------------------------------------------------------------
88-
# Add the CCPP include/module directory
89-
set(CCPP_INCLUDE_DIRS "" CACHE FILEPATH "Path to ccpp includes")
90-
set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES ${CCPP_INCLUDE_DIRS})
91-
92-
#------------------------------------------------------------------------------
93-
# Add the CCPP library
94-
set(CCPP_LIB_DIRS "" CACHE FILEPATH "Path to ccpp library")
95-
link_directories(${CCPP_LIB_DIRS})
96-
list(APPEND LIBS "ccpp")
69+
# Set the sources: physics type definitions
70+
set(TYPEDEFS $ENV{CCPP_TYPEDEFS})
71+
if(TYPEDEFS)
72+
message(STATUS "Got CCPP TYPEDEFS from environment variable: ${TYPEDEFS}")
73+
else(TYPEDEFS)
74+
include(./CCPP_TYPEDEFS.cmake)
75+
message(STATUS "Got CCPP TYPEDEFS from cmakefile include file: ${TYPEDEFS}")
76+
endif(TYPEDEFS)
77+
78+
# Generate list of Fortran modules from the CCPP type
79+
# definitions that need need to be installed
80+
foreach(typedef_module ${TYPEDEFS})
81+
list(APPEND MODULES_F90 ${CMAKE_CURRENT_BINARY_DIR}/${typedef_module})
82+
endforeach()
9783

9884
#------------------------------------------------------------------------------
9985
# Set the sources: physics schemes
10086
set(SCHEMES $ENV{CCPP_SCHEMES})
10187
if(SCHEMES)
102-
message(INFO "Got CCPP_SCHEMES from environment variable: ${SCHEMES}")
88+
message(STATUS "Got CCPP SCHEMES from environment variable: ${SCHEMES}")
10389
else(SCHEMES)
10490
include(./CCPP_SCHEMES.cmake)
105-
message(INFO "Got SCHEMES from cmakefile include file: ${SCHEMES}")
91+
message(STATUS "Got CCPP SCHEMES from cmakefile include file: ${SCHEMES}")
10692
endif(SCHEMES)
10793

10894
# Set the sources: physics scheme caps
10995
set(CAPS $ENV{CCPP_CAPS})
11096
if(CAPS)
111-
message(INFO "Got CAPS from environment variable: ${CAPS}")
97+
message(STATUS "Got CCPP CAPS from environment variable: ${CAPS}")
11298
else(CAPS)
11399
include(./CCPP_CAPS.cmake)
114-
message(INFO "Got CAPS from cmakefile include file: ${CAPS}")
100+
message(STATUS "Got CCPP CAPS from cmakefile include file: ${CAPS}")
115101
endif(CAPS)
116102

117103
# Create empty lists for schemes with special compiler optimization flags
@@ -340,12 +326,7 @@ elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "PGI")
340326
set_property(SOURCE ${CAPS} APPEND_STRING PROPERTY COMPILE_FLAGS " -Mnobounds ")
341327
endif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
342328

343-
if (PROJECT STREQUAL "CCPP-SCM")
344-
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/framework/src)
345-
endif (PROJECT STREQUAL "CCPP-SCM")
346-
347329
#------------------------------------------------------------------------------
348-
349330
if(STATIC)
350331
add_library(ccppphys STATIC ${SCHEMES} ${SCHEMES_SFX_OPT} ${CAPS})
351332
# Generate list of Fortran modules from defined sources
@@ -398,9 +379,7 @@ if (PROJECT STREQUAL "CCPP-FV3")
398379
FILE ccppphys-config.cmake
399380
DESTINATION lib/cmake
400381
)
401-
if(STATIC)
402-
# Define where to install the C headers and Fortran modules
403-
#install(FILES ${HEADERS_C} DESTINATION include)
404-
install(FILES ${MODULES_F90} DESTINATION include)
405-
endif(STATIC)
382+
# Define where to install the C headers and Fortran modules
383+
#install(FILES ${HEADERS_C} DESTINATION include)
384+
install(FILES ${MODULES_F90} DESTINATION include)
406385
endif (PROJECT STREQUAL "CCPP-FV3")

README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1-
# GMTB GFS Physics
1+
# CCPP Physics
22

3-
This repository contains the GFS Physics scheme.
3+
The Common Community Physics Package (CCPP) is designed to facilitate the implementation of physics innovations in state-of-the-art atmospheric models, the use of various models to develop physics, and the acceleration of transition of physics innovations to operational NOAA models.
44

5+
Please see more information about the CCPP at the locations below.
56

7+
- [CCPP website hosted by the Developmental Testbed Center (DTC)](https://dtcenter.org/ccpp)
8+
- [CCPP public release information](https://dtcenter.org/community-code/common-community-physics-package-ccpp/ccpp-scm-version-4-0)
9+
- [CCPP Technical Documentation](https://ccpp-techdoc.readthedocs.io/en/latest/)
10+
- [CCPP Scientific Documentation](https://dtcenter.org/GMTB/v4.0/sci_doc/)
11+
- [CCPP Physics GutHub wiki](https://github.com/NCAR/ccpp-physics/wiki)
12+
- [CCPP Framework GitHub wiki](https://github.com/NCAR/ccpp-framework/wiki)
13+
14+
For the use of CCPP with its Single Column Model, see the [Single Column Model User's Guide](https://dtcenter.org/GMTB/v4.0/scm-ccpp-guide-v4.0.pdf).
15+
16+
For the use of CCPP with NOAA's Unified Forecast System (UFS), see the [UFS Medium-Range Application User's Guide](https://ufs-mrweather-app.readthedocs.io/en/latest/) and the [UFS Weather Model User's Guide](https://ufs-weather-model.readthedocs.io/en/latest/).
17+
18+
Questions can be directed to the [CCPP Help Desk](mailto:gmtb-help@ucar.edu). When using the CCPP with NOAA's UFS, questions can be posted in the [UFS Weather Model](https://forums.ufscommunity.org/forum/ufs-weather-model) section of the [UFS Forum](https://forums.ufscommunity.org/)

physics/GFS_PBL_generic.meta

+2-2
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@
747747
intent = in
748748
optional = F
749749
[htrsw]
750-
standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep
750+
standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step
751751
long_name = total sky sw heating rate
752752
units = K s-1
753753
dimensions = (horizontal_dimension,vertical_dimension)
@@ -756,7 +756,7 @@
756756
intent = in
757757
optional = F
758758
[htrlw]
759-
standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep
759+
standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step
760760
long_name = total sky lw heating rate
761761
units = K s-1
762762
dimensions = (horizontal_dimension,vertical_dimension)

physics/GFS_phys_time_vary.fv3.F90

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
6161
integer :: nb, nblks, nt
6262
integer :: i, j, ix
6363
logical :: non_uniform_blocks
64-
6564
! Initialize CCPP error handling variables
6665
errmsg = ''
6766
errflg = 0
@@ -167,7 +166,7 @@ subroutine GFS_phys_time_vary_init (Data, Model, Interstitial, nthrds, errmsg, e
167166
! If Model%iaerclm is .true., then ntrcaer == ntrcaerm
168167
ntrcaer = size(Data(1)%Tbd%aer_nm, dim=3)
169168
! Read aerosol climatology
170-
call read_aerdata (Model%me,Model%master,Model%iflip,Model%idate)
169+
call read_aerdata (Model%me,Model%master,Model%iflip,Model%idate,errmsg,errflg)
171170
endif
172171
else
173172
! Update the value of ntrcaer in aerclm_def with the value defined

physics/GFS_phys_time_vary.scm.F90

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ subroutine GFS_phys_time_vary_init (Grid, Model, Interstitial, Tbd, errmsg, errf
110110
! If Model%iaerclm is .true., then ntrcaer == ntrcaerm
111111
ntrcaer = size(Tbd%aer_nm, dim=3)
112112
! Read aerosol climatology
113-
call read_aerdata (Model%me,Model%master,Model%iflip,Model%idate)
113+
call read_aerdata (Model%me,Model%master,Model%iflip,Model%idate,errmsg,errflg)
114+
if (errflg/=0) return
114115
endif
115116
else
116117
! Update the value of ntrcaer in aerclm_def with the value defined

physics/GFS_rrtmg_post.F90

+12-6
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,18 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, &
7575
if (Model%lssav) then
7676
if (Model%lsswr) then
7777
do i=1,im
78-
Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm
79-
Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm
80-
Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm
81-
Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm
82-
Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm
83-
Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm
78+
! Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm
79+
! Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm
80+
! Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm
81+
! Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm
82+
! Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm
83+
! Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm
84+
Diag%fluxr(i,34) = aerodp(i,1) ! total aod at 550nm
85+
Diag%fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm
86+
Diag%fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm
87+
Diag%fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm
88+
Diag%fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm
89+
Diag%fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm
8490
enddo
8591
endif
8692

0 commit comments

Comments
 (0)