Skip to content

Commit

Permalink
Working wheel and 3 failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
makepath-alex committed Feb 3, 2025
1 parent 0b6217d commit dfe513c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
28 changes: 15 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,25 @@ endif()

include(ExternalProject REQUIRED)

if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(BUILD_COMMAND_STRING "set FC=%CMAKE_Fortran_COMPILER% && cd build && nmake /A")
else()
set(BUILD_COMMAND_STRING "FC=${CMAKE_Fortran_COMPILER} FCFLAGS='-fPIC' make -C build -j ${N}")
endif()

ExternalProject_Add(
rte-rrtmgp
GIT_REPOSITORY https://github.com/earth-system-radiation/rte-rrtmgp.git
GIT_TAG 06ea8284071b80d393ff8df659a2ef4b4bfb2aa8
GIT_CONFIG "advice.detachedHead=false"
# GIT_SHALLOW TRUE
# For development only
GIT_REPOSITORY https://github.com/makepath-alex/rte-rrtmgp.git
GIT_TAG use-cbool-dev
GIT_SHALLOW TRUE
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/rte-rrtmgp
CONFIGURE_COMMAND ""
CMAKE_ARGS
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}
-DCMAKE_Fortran_FLAGS=${FFLAGS}
-DRTE_ENABLE_SP=OFF
-DKERNEL_MODE=default
-DBUILD_TESTING=OFF
-DFAILURE_THRESHOLD=7.e-4
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/rte-rrtmgp/
BUILD_IN_SOURCE TRUE
BUILD_COMMAND eval ${BUILD_COMMAND_STRING}
INSTALL_COMMAND ""
BUILD_COMMAND ${CMAKE_COMMAND} --build . --target all --parallel
INSTALL_COMMAND ${CMAKE_COMMAND} --install .
)

# Compile C bindings
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
log_cli_level = "INFO"
filterwarnings = ["error"]
testpaths = ["tests"]
testpaths = ["pyrte_rrtmgp/tests"]

[tool.cibuildwheel]
test-command = "pytest {project}/tests"
Expand Down
2 changes: 1 addition & 1 deletion pyrte_rrtmgp/kernels/rrtmgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def compute_planck_source(
- sfc_src_jac: Surface emission Jacobian with shape (ncol, ngpt)
"""
sfc_lay = nlay if top_at_1 else 1
gpoint_bands = []
gpoint_bands = np.ndarray((ngpt), dtype=np.int32, order="F")
totplnk_delta = (temp_ref_max - temp_ref_min) / (nPlanckTemp - 1)

# Initialize output arrays
Expand Down

0 comments on commit dfe513c

Please sign in to comment.