Skip to content

Commit

Permalink
Update gsl/develop from develop 2021/02/22 (NOAA-EMC#73)
Browse files Browse the repository at this point in the history
* Fix for updating stochastic physics on separate time-step. (NOAA-EMC#199)

This bug fix allows the random patterns in the stochastic physics persist the for a period of time (defined as SKEBINT,SPPTINT, etc.) before calculating new patterns.
The fix is to move the allocation of the saved variables into the init section of stochastic_physics_wrapper, and remove the deallocates in the run section.

* Bug fixes in (1) running with frac_grid=T and GFDL MP and (2) restarting with frac_grid=T (NOAA-EMC#204)

* -- Pointing to Moorthi's modifications in ccpp/physics, which fixed the crash when running GFDL MP with frac_grid=T;
-- Not setting fice to zero in order to leave lake ice untouched;
-- Restart in the coupled model with the default physics is reproducible, if bad water temperature is only filtered at initial time;
Co-authored-with: Shrinivas Moorthi <[email protected]>
Co-authored-with: Denise Worthen <[email protected]>

* jedi-ufs with ccpp-physics submodule update (contains NOAA-EMC#201) (NOAA-EMC#211)

* updated CMakeLists.txt
* Changes for JEDI linking/control
* Update .gitmodules and submodule pointer for ccpp-physics for code review and testing
* Revert change to .gitmodules and update submodule pointer for ccpp-physics

Co-authored-by: Mark Potts <[email protected]>

* Final-final GFS v16 updates / restart reproducibility bugfixes (NOAA-EMC#212)

* updates the submodule pointer for ccpp-physics for the final-final (!) GFS v16 physics updates
* fixes a bug in io/FV3GFS_io.F90 to obtain restart reproducibility for uncoupled and coupled runs - contributed by @SMoorthi-emc

Co-authored-by: Shrinivas.Moorthi <[email protected]>

* RRTMGP coupling to Thompson MP in ccpp-physics (NOAA-EMC#208)

* Updated physics. Added infrastructure to FV3 to handle new GP capabilities. Thompson MP, LW scattering, Use of LW-jacobian to update surface tendencies.
* Some small changes to work with physics improvements to RRTMGP.
* RRTMGP working with Thompson MP.
* Updated .gitmodules.
* Updated physics. New interstitials.
* Synced with NCAR/master
* Updated ccpp-physics
* Updated physics submodule.
* Cleanup
* Update physics
* Updated physics submodule pointer.
* Updated physics submodule hash.

* Minor bug fixes to CCPP UGWP (update submodule pointer for ccpp-physics) (NOAA-EMC#216)

Update the submodule pointer for ccpp-physics for minor bugfixes in CCPP's Unified Gravity Wave Drag parameterization.

* Remove IPD (step 1) (NOAA-EMC#215)

Remove all IPD source files that are not needed to compile with CCPP. Update gfsphysics/CMakeLists.txt and gfsphysics/GFS_layer/GFS_driver.F90 so that the code compiles after removing IPD sources.

Also: update submodule pointer for GFDL_atmos_cubed_sphere to include PR NOAA-EMC/GFDL_atmos_cubed_sphere#48 ("Removed use of mpp_node for use with FMS 2020.04").

* Update submodule pointers for ccpp-framework (ccpp_prebuild bugfix) and ccpp-physics (RRTMGP GFDL-MP bugfix) (NOAA-EMC#218)

Update the submodule pointers for ccpp-framework and ccpp-physics for the changes described in
NCAR/ccpp-framework#343 and NCAR/ccpp-physics#536.

* Remove unnecessary SIMD instruction sets from ccpp/CMakeLists.txt (NOAA-EMC#220)

* Remove additional/unnecessary SIMD instruction sets from ccpp/CMakeLists.txt

* Implementation of CCPP timestep_init and timestep_final phases (NOAA-EMC#217)

- replace calls to CCPP step `time_vary` with `timestep_init` in `atmos_model.F90`, add call to CCPP step `timestep_final` 
- update `ccpp/driver/CCPP_driver.F90` with calls to CCPP `timestep_init` and `timestep_final`
- add `h2o_def.f` and `ozne_def.` to `ccpp_prebuild_config.py`
- update of `gfsphysics/GFS_layer/GFS_typedefs.F90`: cleanup work for o3 and h2o physics (required by the updates to the CCPP time vary physics)
- update metadata in `gfsphysics/GFS_layer/GFS_typedefs.meta` for the above changes, and clean up the index used for the surface wind enhancement due to convection in the `phy_f2d` array (use proper index, not just the last entry in the array)

* add radiation_clouds_thompson_dependency in ccpp physics  (NOAA-EMC#225)

* using radiation_clouds_thompson_dependency ccpp physics branch
* point to ccpp master branch

* Remove IPD steps 3 and 5 (NOAA-EMC#224)

* Implementation of CCPP timestep_init and timestep_final phases in fv3atm; cleanup work in GFS_typedefs for o3 and h2o physics as a result of the changes to the time vary physics in CCPP
* Use proper index variable for surface wind enhancement due to convection in phy_f2d array in GFS_typedefs.{F90,meta}, move code to clear diagnostic buckets using GFS DDT bound procedures from atmos_model.F90 to CCPP_driver.F90
* First step of cleanup process: remove CCPP preprocessor directives, remove parts of unused IPD code, update cmake build system, Delete IPD source code, Replace IPD DDTs with GFS DDTs, Bugfix in atmos_model.F90; add missing call to GFS_externaldiag_populate, Move contents of gfsphysics/{CCPP_layer,GFS_layer} to ccpp/{data,driver}, entirely deleted IPD typedefs, Rename module GFS_driver to GFS_init
* Fix indentation in ccpp/data/CMakeLists.txt and ccpp/driver/CMakeLists.txt
* Add logic to set DYN32 depending on 32BIT setting
* Pass preprocessor directive GFS_TYPES to dycore to enable use of GFS data types
* Compile GFS_diagnostics.F90 without optimization, this leads to out of memory errors on wcoss_dell_p3

* Add CCPP rrtmgp fix (NOAA-EMC#237)

* ccpp physics merged with top of master
* point back to ccpp master branch

* Update develop from NOAA-GSL: RUC ice, MYNN sfclay, stochastic land perturbations (NOAA-EMC#239)

* Update .gitmodules and submodule pointers for ccpp-framework and ccpp-physics for gsl/develop branch
* RUC ice for gsl/develop (replaces NOAA-EMC#54 and NOAA-EMC#56) (NOAA-EMC#60) Implementation of RUC LSM ice model in CCPP
* Fix bug in gfsphysics/GFS_layer/GFS_typedefs.F90 from merge
* Remove lsm_ruc_sfc_sice from suite FV3_GSD_v0_unified_ugwp_suite and update submodule pointer for ccpp-physics
* Remove sfc_sice from ccpp/suites/suite_FV3_GSD_v0_unified_ugwp_suite.xml
* Update gsl/develop from develop 2020/12/08 (NOAA-EMC#61)
* Fix for updating stochastic physics on separate time-step. (NOAA-EMC#199)
This bug fix allows the random patterns in the stochastic physics persist the for a period of time (defined as SKEBINT,SPPTINT, etc.) before calculating new patterns.
The fix is to move the allocation of the saved variables into the init section of stochastic_physics_wrapper, and remove the deallocates in the run section.
* Bug fixes in (1) running with frac_grid=T and GFDL MP and (2) restarting with frac_grid=T (NOAA-EMC#204)
* -- Pointing to Moorthi's modifications in ccpp/physics, which fixed the crash when running GFDL MP with frac_grid=T;
-- Not setting fice to zero in order to leave lake ice untouched;
-- Restart in the coupled model with the default physics is reproducible, if bad water temperature is only filtered at initial time;
Co-authored-with: Shrinivas Moorthi <[email protected]>
Co-authored-with: Denise Worthen <[email protected]>
* Revert change to .gitmodules and update submodule pointer for ccpp-physics
* Update submodule pointer for ccpp-physics - MYNN surface layer updates and bugfixes (NOAA-EMC#63)
* Land stochastic perturbations (wrapper PR for NOAA-EMC#65) (NOAA-EMC#68)
* Move initialization of stochastic physics after the physics
initialization in CCPP.
* Add albedo variables to land perturbations with lndp_type=2 option. Change to accommodate soil perturbations with RUC LSM.
* Max/min soil moisture variables are introduced via GFS_Control_type
variables instead of through the use of namelist_soilveg*. This is a
more flexible way for different LSMs.
* Added pores and resid variables for max/min soil moisture to GFS_typedefs.f90.
* Remove tracer_sanitizer from all suites and from CCPP prebuild config
* Add namelist option to apply land surface perturbations at every time step, clean up stochastic_physics/stochastic_physics_wrapper.F90
* Stochastic land perturbations: add roughness length over land to the perturbed variables (NOAA-EMC#70)
* Added roughness length over land to the perturbed variables.
* Bugfix in gfsphysics/GFS_layer/GFS_typedefs.F90: remove Diag%cldcov, in particular the reset call because the variable is not allocated
* Update .gitmodules and submodule pointer for GFDL_atmos_cubed_sphere for code review and testing
* Revert change to .gitmodules for ccpp-physics, update submodule pointer for ccpp-physics
* Revert change to .gitmodules and update submodule pointer for GFDL_atmos_cubed_sphere
Co-authored-by: DomHeinzeller <[email protected]>
Co-authored-by: Phil Pegion <[email protected]>
Co-authored-by: shansun6 <[email protected]>
Co-authored-by: tanyasmirnova <[email protected]>

* Dycore change to add an option to zero-gradient BC for height advection and change dz_min as a namelist input (NOAA-EMC#232)

* Point dycore to a personal branch
* Point to new version of dycore
* Update the dycore version
* Update the dycore version
* Point to NOAA-EMC dev/emc dycore branch

* Remove gnumake build remnants, change v16beta to v16 (NOAA-EMC#234)

* Remove gnumake files
* Replace v16beta with v16 for all CCPP suites
* Remove unused CCPP_INCLUDE_DIRS/CCPP_LIB_DIRS from ccpp/CMakeLists.txt

* Move LSM vegetation lookup tables into CCPP, clean up RUC snow cover on ice initialization  (remove IPD step 2) (NOAA-EMC#244)

* Move LSM vegetation lookup tables into CCPP, clean up RUC snow cover on ice initialization
* Revert change to .gitmodules and update submodule pointer for ccpp-physics

* UGWP v0 v1 combined (NOAA-EMC#241)

* .gitmodules/gsl atmos-cubed cccp-fram cccp/physics
* update fv3atm from NOAA-EMC Jan 9
* new suite_FV3_GFS_v16b_ugwpv1.xml and modifications Jan 11/2021
* Added new logical flag do_ugwp_v0_nst_only which allows non-stationary drag from ugwp_v0 to be run with GSL drag suite
* Fix formatting in ccpp/data/GFS_typedefs.*
* Clean up allocation of arrays in ccpp/data/GFS_typedefs.F90, add active attribute (pass 1) to ccpp/data/GFS_typedefs.meta, strip trailing whitespaces from both
* Update and cleanup of metadata for UGWPv0, UGWPv1, drag suite
* Reorganize UGWP diagnostic variables in data/GFS_typedefs.{F90,meta}
* Bugfix for uninitialized data in ccpp/data/GFS_typedefs.F90
* Update submodule pointer for ccpp-physics
* Allocate 3d diagnostic arrays as dummy arrays if not used

Co-authored-by: valery.yudin <[email protected]>
Co-authored-by: Michael Toy <[email protected]>

* SDF for GFSv16 with Thompson (NOAA-EMC#238)

* SDF for GFSv16 with Thompson
* Delete suite_FV3_GFS_v16beta_thompson.xml
* update to new commit of Thompson MP in ccpp physics

Co-authored-by: Phil Pegion <[email protected]>
Co-authored-by: shansun6 <[email protected]>
Co-authored-by: Mark Potts <[email protected]>
Co-authored-by: Shrinivas.Moorthi <[email protected]>
Co-authored-by: dustinswales <[email protected]>
Co-authored-by: Jun Wang <[email protected]>
Co-authored-by: XiaqiongZhou-NOAA <[email protected]>
Co-authored-by: valery.yudin <[email protected]>
Co-authored-by: Michael Toy <[email protected]>
Co-authored-by: XiaSun-NOAA <[email protected]>
  • Loading branch information
11 people committed Feb 23, 2021
1 parent fa070c8 commit c48b45a
Show file tree
Hide file tree
Showing 195 changed files with 2,259 additions and 234,540 deletions.
114 changes: 51 additions & 63 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,28 @@
if(CCPP)

if(DEBUG)
set(_ccpp_debug_arg "--debug")
endif()
if(DEFINED CCPP_SUITES)
set(_ccpp_suites_arg "--suites=${CCPP_SUITES}")
message("Calling CCPP code generator (ccpp_prebuild.py) for suites ${_ccpp_suites_arg} ...")
else()
message("Calling CCPP code generator (ccpp_prebuild.py) for all available suites ...")
endif()
execute_process(COMMAND ${Python_EXECUTABLE}
"ccpp/framework/scripts/ccpp_prebuild.py"
"--config=ccpp/config/ccpp_prebuild_config.py"
"--builddir=${CMAKE_CURRENT_BINARY_DIR}" ${_ccpp_suites_arg} ${_ccpp_debug_arg}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.out
ERROR_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.err
RESULT_VARIABLE RC)
# Check return code from ccpp_prebuild.py
if(NOT RC EQUAL 0)
message(FATAL_ERROR "An error occured while running ccpp_prebuild.py, check ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.{out,err}")
endif()
# this should not be necessary; including CCPP_*.cmake here and passing
# SCHEMES, CAPS and TYPEDEFS via environment variables to CCPP build.
# CCPP should be able to directly include those three .cmake files.
include(${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics/CCPP_SCHEMES.cmake)
include(${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics/CCPP_CAPS.cmake)
include(${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics/CCPP_TYPEDEFS.cmake)
set(ENV{CCPP_SCHEMES} "${SCHEMES}")
set(ENV{CCPP_CAPS} "${CAPS}")
set(ENV{CCPP_TYPEDEFS} "${TYPEDEFS}")

# Call to CCPP code generator
if(DEBUG)
set(_ccpp_debug_arg "--debug")
endif()
if(DEFINED CCPP_SUITES)
set(_ccpp_suites_arg "--suites=${CCPP_SUITES}")
message("Calling CCPP code generator (ccpp_prebuild.py) for suites ${_ccpp_suites_arg} ...")
else()
message("Calling CCPP code generator (ccpp_prebuild.py) for all available suites ...")
endif()
execute_process(COMMAND ${Python_EXECUTABLE}
"ccpp/framework/scripts/ccpp_prebuild.py"
"--config=ccpp/config/ccpp_prebuild_config.py"
"--builddir=${CMAKE_CURRENT_BINARY_DIR}" ${_ccpp_suites_arg} ${_ccpp_debug_arg}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.out
ERROR_FILE ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.err
RESULT_VARIABLE RC)
# Check return code from ccpp_prebuild.py
if(NOT RC EQUAL 0)
message(FATAL_ERROR "An error occured while running ccpp_prebuild.py, check ${CMAKE_CURRENT_BINARY_DIR}/ccpp_prebuild.{out,err}")
endif()

add_subdirectory(cpl)
add_subdirectory(gfsphysics)
add_subdirectory(ipd)
add_subdirectory(io)

###############################################################################
Expand Down Expand Up @@ -82,15 +69,12 @@ list(APPEND _fv3dycore_srcs
atmos_cubed_sphere/driver/fvGFS/fv_nggps_diag.F90
atmos_cubed_sphere/driver/fvGFS/atmosphere.F90)

if(NOT CCPP)
list(APPEND _fv3dycore_srcs atmos_cubed_sphere/model/fv_cmp.F90)
endif()

add_library(fv3dycore ${_fv3dycore_srcs})

list(APPEND _fv3dycore_defs_private SPMD
use_WRTCOMP
GFS_PHYS
GFS_TYPES
USE_GFSL63
MOIST_CAPPA
USE_COND)
Expand All @@ -100,13 +84,14 @@ if(MULTI_GASES)
endif()

if(32BIT)
set(DYN32 ON CACHE BOOL "Enable support for 32bit fast physics in CCPP")
list(APPEND _fv3dycore_defs_private OVERLOAD_R4
OVERLOAD_R8)
else()
set(DYN32 OFF CACHE BOOL "Disable support for 32bit fast physics in CCPP")
endif()

if(CCPP)
list(APPEND _fv3dycore_defs_private CCPP)
endif()
list(APPEND _fv3dycore_defs_private CCPP)

if(OpenMP_Fortran_FOUND)
list(APPEND _fv3dycore_defs_private OPENMP)
Expand All @@ -118,32 +103,35 @@ set_property(SOURCE atmos_cubed_sphere/model/fv_mapz.F90 APPEND_STRING PROPERTY
set_target_properties(fv3dycore PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)

target_compile_definitions(fv3dycore PRIVATE "${_fv3dycore_defs_private}")
target_include_directories(fv3dycore PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/atmos_cubed_sphere)
target_include_directories(fv3dycore PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/atmos_cubed_sphere
${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver/mod)
target_include_directories(fv3dycore INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)

target_link_libraries(fv3dycore PUBLIC fms
gfsphysics
ipd
esmf)
if(OpenMP_Fortran_FOUND)
target_link_libraries(fv3dycore PUBLIC OpenMP::OpenMP_Fortran)
endif()

###############################################################################
### ccpp
### CCPP
###############################################################################
if(CCPP)
add_subdirectory(ccpp)
add_subdirectory(ccpp/driver)
add_dependencies(gfsphysics ccpp ccppphys)
add_dependencies(ccppdriver ccpp ccppphys)
add_dependencies(ccppphys ccpp)
target_include_directories(fv3dycore PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/framework/src
${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver)
target_link_libraries(ccppphys PRIVATE sp::sp_d
w3nco::w3nco_d)
endif()

add_subdirectory(ccpp)
add_subdirectory(ccpp/data)
add_subdirectory(ccpp/driver)
add_dependencies(ccppphys ccpp)
add_dependencies(gfsphysics ccpp ccppphys)
add_dependencies(ccppdata ccpp ccppphys gfsphysics)
add_dependencies(ccppdriver ccpp ccppphys ccppdata gfsphysics)
add_dependencies(fv3dycore ccppdriver ccpp ccppphys ccppdata gfsphysics)
target_include_directories(fv3dycore PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/framework/src
${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics
${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver)
target_link_libraries(ccppphys PUBLIC sp::sp_d
w3nco::w3nco_d)

###############################################################################
### stochastic_physics
Expand All @@ -170,13 +158,13 @@ set_target_properties(fv3atm PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT
target_include_directories(fv3atm INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)

if(CCPP)
list(APPEND _fv3atm_defs_private CCPP)
target_include_directories(fv3atm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver/mod)
set(CCPP_LIBRARIES ccppdriver ccppphys ccpp)
add_dependencies(fv3atm ccppdriver ccppphys ccpp)
target_link_libraries(fv3atm PUBLIC ccppdriver ccppphys ccpp)
endif()
list(APPEND _fv3atm_defs_private CCPP)
target_include_directories(fv3atm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics
${CMAKE_CURRENT_BINARY_DIR}/ccpp/driver/mod)
set(CCPP_LIBRARIES ccppdriver ccppdata ccppphys ccpp)
add_dependencies(fv3atm ccppdriver ccppdata ccppphys ccpp)
target_link_libraries(fv3atm PUBLIC ccppdriver ccppdata ccppphys ccpp)

target_include_directories(fv3atm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/stochastic_physics)
target_compile_definitions(fv3atm PRIVATE "${_fv3atm_defs_private}")

Expand Down Expand Up @@ -205,7 +193,7 @@ endif()
### Install
###############################################################################
install(
TARGETS fv3atm fv3dycore io ipd gfsphysics ${CCPP_LIBRARIES} cpl stochastic_physics stochastic_physics_wrapper
TARGETS fv3atm fv3dycore io gfsphysics ${CCPP_LIBRARIES} cpl stochastic_physics stochastic_physics_wrapper
EXPORT fv3atm-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
Expand Down
Loading

0 comments on commit c48b45a

Please sign in to comment.