-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from NCAR/features/schemes_lib
Features/schemes lib
- Loading branch information
Showing
40 changed files
with
1,511 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<suite name="EXAMPLE"> | ||
<ipd part="1"> | ||
<subcycle loop="1"> | ||
<scheme lib="exmaple" ver="0.2">test</scheme> | ||
</subcycle> | ||
</ipd> | ||
</suite> | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#------------------------------------------------------------------------------ | ||
# Add all the physics schemes in their own sub-directory (a.k.a repos) | ||
#------------------------------------------------------------------------------ | ||
|
||
include(ExternalProject) | ||
|
||
#------------------------------------------------------------------------------ | ||
# The checker scheme | ||
ExternalProject_Add( | ||
check | ||
DEPENDS ccpp | ||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/check" | ||
PREFIX "check" | ||
DOWNLOAD_COMMAND "" | ||
UPDATE_COMMAND "" | ||
INSTALL_COMMAND "" | ||
CMAKE_ARGS -DCCPP_INCLUDE_DIRS=${CCPP_INCLUDE_DIRS} | ||
-DCCPP_LIB_DIRS=${CCPP_LIB_DIRS} | ||
) | ||
|
||
#------------------------------------------------------------------------------ | ||
# The dummy SCM scheme | ||
ExternalProject_Add( | ||
scm | ||
DEPENDS ccpp | ||
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/scm" | ||
PREFIX "scm" | ||
DOWNLOAD_COMMAND "" | ||
UPDATE_COMMAND "" | ||
INSTALL_COMMAND "" | ||
CMAKE_ARGS -DCCPP_INCLUDE_DIRS=${CCPP_INCLUDE_DIRS} | ||
-DCCPP_LIB_DIRS=${CCPP_LIB_DIRS} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#------------------------------------------------------------------------------ | ||
cmake_minimum_required(VERSION 2.8.11) | ||
|
||
if(POLICY CMP0048) | ||
cmake_policy(SET CMP0048 NEW) | ||
project(check VERSION 0.0.1) | ||
else(POLICY CMP0048) | ||
project(check) | ||
set(PROJECT_VERSION 0.0.1) | ||
set(PROJECT_VERSION_MAJOR 0) | ||
set(PROJECT_VERSION_MINOR 0) | ||
set(PROJECT_VERSION_PATCH 1) | ||
endif(POLICY CMP0048) | ||
|
||
#------------------------------------------------------------------------------ | ||
set(PACKAGE "check") | ||
set(AUTHORS "Timothy Brown") | ||
string(TIMESTAMP YEAR "%Y") | ||
|
||
#------------------------------------------------------------------------------ | ||
# Enable Fortran | ||
enable_language(Fortran) | ||
|
||
#------------------------------------------------------------------------------ | ||
# Set a default build type if none was specified | ||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
message(STATUS "Setting build type to 'Debug' as none was specified.") | ||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) | ||
|
||
# Set the possible values of build type for cmake-gui | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" | ||
"MinSizeRel" "RelWithDebInfo") | ||
endif() | ||
|
||
#------------------------------------------------------------------------------ | ||
# By default we want a shared library | ||
option(BUILD_SHARED_LIBS "Build a shared library" ON) | ||
|
||
#------------------------------------------------------------------------------ | ||
# Add the CCPP include/module directory | ||
set(CCPP_INCLUDE_DIRS "" CACHE FILEPATH "Path to ccpp includes") | ||
set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES ${CCPP_INCLUDE_DIRS}) | ||
|
||
#------------------------------------------------------------------------------ | ||
# Add the CCPP library | ||
set(CCPP_LIB_DIRS "" CACHE FILEPATH "Path to ccpp library") | ||
link_directories(${CCPP_LIB_DIRS}) | ||
list(APPEND LIBS "ccpp") | ||
|
||
#------------------------------------------------------------------------------ | ||
# Set the sources | ||
set(SOURCES | ||
test.f90 | ||
noop.f90 | ||
) | ||
|
||
add_library(check ${SOURCES}) | ||
target_link_libraries(check LINK_PUBLIC ${LIBS}) | ||
set_target_properties(check PROPERTIES VERSION ${PROJECT_VERSION} | ||
SOVERSION ${PROJECT_VERSION_MAJOR}) | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
!> | ||
!! @brief A NO-OP physics modules. | ||
!! | ||
! | ||
module check_noop | ||
|
||
use, intrinsic :: iso_c_binding, & | ||
only: c_f_pointer, c_ptr | ||
use :: ccpp_types, & | ||
only: ccpp_t, STR_LEN | ||
use :: ccpp_fields, & | ||
only: ccpp_fields_get | ||
implicit none | ||
|
||
private | ||
public :: noop_cap | ||
|
||
contains | ||
|
||
subroutine noop_cap(ptr) bind(c) | ||
implicit none | ||
type(c_ptr), intent(inout) :: ptr | ||
|
||
type(ccpp_t), pointer :: cdata | ||
|
||
call c_f_pointer(ptr, cdata) | ||
|
||
print *, 'In noop_cap' | ||
print *, cdata%suite%ipds(1)%subcycles(1)%schemes(1)%name | ||
|
||
end subroutine noop_cap | ||
|
||
end module check_noop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#------------------------------------------------------------------------------ | ||
cmake_minimum_required(VERSION 2.8.11) | ||
|
||
if(POLICY CMP0048) | ||
cmake_policy(SET CMP0048 NEW) | ||
project(check VERSION 0.0.1) | ||
else(POLICY CMP0048) | ||
project(check) | ||
set(PROJECT_VERSION 0.0.1) | ||
set(PROJECT_VERSION_MAJOR 0) | ||
set(PROJECT_VERSION_MINOR 0) | ||
set(PROJECT_VERSION_PATCH 1) | ||
endif(POLICY CMP0048) | ||
|
||
#------------------------------------------------------------------------------ | ||
set(PACKAGE "scm") | ||
set(AUTHORS "Grant J. Firl") | ||
|
||
#------------------------------------------------------------------------------ | ||
# Enable Fortran | ||
enable_language(Fortran) | ||
|
||
#------------------------------------------------------------------------------ | ||
# Set a default build type if none was specified | ||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
message(STATUS "Setting build type to 'Debug' as none was specified.") | ||
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) | ||
|
||
# Set the possible values of build type for cmake-gui | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" | ||
"MinSizeRel" "RelWithDebInfo") | ||
endif() | ||
|
||
#------------------------------------------------------------------------------ | ||
# By default we want a shared library | ||
option(BUILD_SHARED_LIBS "Build a shared library" ON) | ||
|
||
#------------------------------------------------------------------------------ | ||
# Add the CCPP include/module directory | ||
set(CCPP_INCLUDE_DIRS "" CACHE FILEPATH "Path to ccpp includes") | ||
set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES ${CCPP_INCLUDE_DIRS}) | ||
|
||
#------------------------------------------------------------------------------ | ||
# Add the CCPP library | ||
set(CCPP_LIB_DIRS "" CACHE FILEPATH "Path to ccpp library") | ||
link_directories(${CCPP_LIB_DIRS}) | ||
list(APPEND LIBS "ccpp") | ||
|
||
#------------------------------------------------------------------------------ | ||
# Set the sources | ||
set(SOURCES | ||
dummy_scm.f90 | ||
dummy_scm2.f90 | ||
) | ||
|
||
add_library(scm ${SOURCES}) | ||
target_link_libraries(scm LINK_PUBLIC ${LIBS}) | ||
set_target_properties(scm PROPERTIES VERSION ${PROJECT_VERSION} | ||
SOVERSION ${PROJECT_VERSION_MAJOR}) | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.