From 203fb39676aade7aeae602ac549f7df24ca17ac6 Mon Sep 17 00:00:00 2001 From: "Benjamin T. Johnson" Date: Mon, 12 Aug 2024 21:17:41 +0000 Subject: [PATCH 1/3] swapping default libcrtm to static instead of shared to test compatibility with fv3-jedi and ufo --- src/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d3d36f7..cb4d90d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -216,16 +216,16 @@ if(((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDe endif() -add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_src_files}) -add_library(${PROJECT_NAME}_static STATIC ${${PROJECT_NAME}_src_files}) +add_library(${PROJECT_NAME}_shared SHARED ${${PROJECT_NAME}_src_files}) +add_library(${PROJECT_NAME} STATIC ${${PROJECT_NAME}_src_files}) # Dependencies target_link_libraries(${PROJECT_NAME} PUBLIC OpenMP::OpenMP_Fortran) target_link_libraries(${PROJECT_NAME} PUBLIC NetCDF::NetCDF_Fortran) # Dependencies -target_link_libraries(${PROJECT_NAME}_static PUBLIC OpenMP::OpenMP_Fortran) -target_link_libraries(${PROJECT_NAME}_static PUBLIC NetCDF::NetCDF_Fortran) +target_link_libraries(${PROJECT_NAME}_shared PUBLIC OpenMP::OpenMP_Fortran) +target_link_libraries(${PROJECT_NAME}_shared PUBLIC NetCDF::NetCDF_Fortran) # Fortran module output directory for build and install interfaces set(MODULE_DIR module/${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}/${CMAKE_Fortran_COMPILER_VERSION}) From c6de9ffa02cb76fdff5a6217e5a5882b2cc0ba8c Mon Sep 17 00:00:00 2001 From: "Benjamin T. Johnson" Date: Mon, 19 Aug 2024 20:12:01 +0000 Subject: [PATCH 2/3] removed version optional from SpcCoeff_netcdf_to_binary -- there's no reason to change version number when converting from netcdf to binary --- src/Coefficients/SpcCoeff/SpcCoeff_NC2BIN/SpcCoeff_NC2BIN.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_NC2BIN/SpcCoeff_NC2BIN.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_NC2BIN/SpcCoeff_NC2BIN.f90 index 2fe0b5c..64c3dbe 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_NC2BIN/SpcCoeff_NC2BIN.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_NC2BIN/SpcCoeff_NC2BIN.f90 @@ -60,8 +60,8 @@ PROGRAM SpcCoeff_NC2BIN CALL Display_Message( PROGRAM_NAME, msg, FAILURE ); STOP END IF - ! Perform the conversion - err_stat = SpcCoeff_netCDF_to_Binary( nc_filename, bin_filename, Version = version ) + ! Perform the conversion (no change to version) + err_stat = SpcCoeff_netCDF_to_Binary( nc_filename, bin_filename ) IF ( err_stat /= SUCCESS ) THEN msg = 'SpcCoeff netCDF -> Binary conversion failed!' CALL Display_Message( PROGRAM_NAME, msg, FAILURE ); STOP From 33dec04e664358e2e2cd21ad9c24bd626991d2bb Mon Sep 17 00:00:00 2001 From: "Benjamin T. Johnson" Date: Tue, 20 Aug 2024 14:05:07 +0000 Subject: [PATCH 3/3] update to SpcCoeeff_Binary_IO to fix version number check - per https://github.com/JCSDA/crtm/pull/43 --- src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 b/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 index 76f1abd..e20ed5f 100644 --- a/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 +++ b/src/Coefficients/SpcCoeff/SpcCoeff_Binary_IO.f90 @@ -418,7 +418,7 @@ FUNCTION SpcCoeff_Binary_ReadFile( & END IF ! ...Read the channel data - IF( dummy%Version > 2 ) THEN + IF( dummy%Version > 3 ) THEN ! Binary coefficient version 3 introduced for TROPICS instrument. ! The SpcCoeff coefficients contain 'PolAngle' as an additional ! array. @@ -435,7 +435,7 @@ FUNCTION SpcCoeff_Binary_ReadFile( & SpcCoeff%Band_C2 , & SpcCoeff%Cosmic_Background_Radiance, & SpcCoeff%Solar_Irradiance - ELSE IF( dummy%Version < 3 ) THEN + ELSE IF( dummy%Version < 4 ) THEN ! Version 2 is the default binary SpcCoeff version for ! REL-2.4.0 and older. READ ( fid, IOSTAT=io_stat, IOMSG=io_msg ) &