Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CoSMIR and AMPR updates #5

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d962be5
modifications to get everything to work with CMake, also renaming som…
BenjaminTJohnson Apr 26, 2024
fb19030
updated ODPS_Regress CMakeLists.txt to include some missing routines
BenjaminTJohnson May 1, 2024
177beab
updating links in Create_CaseDirectory.py
BenjaminTJohnson May 14, 2024
453b08f
Merge branch 'feature/btj_cmake_install_plus' of https://github.com/J…
BenjaminTJohnson May 16, 2024
fefa331
actually adding the CMake version of the CMakeLists.txt file
BenjaminTJohnson May 16, 2024
393f1eb
adding cmake/FindNetCDF.cmake
BenjaminTJohnson May 16, 2024
47a66d2
modification of CMakeLists.txt
BenjaminTJohnson Jun 6, 2024
4847b0f
adding cmake compiler flag support
BenjaminTJohnson Jun 6, 2024
5d9ac91
adding cosmir_air workdir items
BenjaminTJohnson Jun 6, 2024
50c0858
working commit
BenjaminTJohnson Jun 6, 2024
8c48655
rollup for working end-to-end for cosmir_air
BenjaminTJohnson Jun 7, 2024
ec691c5
adding created cosmir_air binary files, for future reference:
BenjaminTJohnson Jun 7, 2024
d7a8974
updated quickstartguide.tex to reflect current workflow
BenjaminTJohnson Jun 7, 2024
b2ca846
quickstartguide update.
BenjaminTJohnson Jun 7, 2024
48cf35e
quickstartguide update.
BenjaminTJohnson Jun 7, 2024
ad8360e
quickstart guide update, removal of all old unnecessary make files.
BenjaminTJohnson Jun 7, 2024
7b84859
oSRF_Create_from_ASCII.f90
BenjaminTJohnson Jun 20, 2024
fca389b
Merge branch 'feature/btj_cosmir-h' of https://github.com/JCSDA/CRTM_…
BenjaminTJohnson Jun 20, 2024
c41bc01
in MW_TauProfile.f90, added ADJUSTL to sinfo%Sensor_id, avoids some s…
BenjaminTJohnson Jun 24, 2024
0c19ff2
adding ampr_air initial effort, not sure if any good regarding polari…
BenjaminTJohnson Jun 24, 2024
59403b6
adding remaining AMPR stuff
BenjaminTJohnson Jun 28, 2024
5e30608
update various coefficients (polsir, tropics_sv5, tropics_sv7) work d…
BenjaminTJohnson Sep 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
63 changes: 31 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# (C) Copyright 2017 - 2022 UCAR
#
# This software is licensed under the terms of the Apache Licence Version 2.0
Expand All @@ -8,51 +7,51 @@
# CRTM_coef bundle
#

cmake_minimum_required( VERSION 3.12 FATAL_ERROR )

project( CRTM_coef VERSION 1.0.0 LANGUAGES Fortran )
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

## Ecbuild integration
find_package( ecbuild QUIET )
include( ecbuild_system NO_POLICY_SCOPE )
ecbuild_declare_project()
list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
set( CMAKE_DIRECTORY_LABELS ${PROJECT_NAME} )
project(CRTM_coef VERSION 1.0.0 LANGUAGES Fortran)

## Configuration options
option( ENABLE_MKL "Use MKL for LAPACK implementation (if available)" OFF )
option(ENABLE_MKL "Use MKL for LAPACK implementation (if available)" OFF)

#include( ${PROJECT_NAME}_compiler_flags )
## Dependencies
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")

include( cmake/${PROJECT_NAME}_compiler_flags.cmake )
include(GNUInstallDirs)

## Dependencies
find_package(ecbuild)
set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_CURRENT_SOURCE_DIR}/ecbuild/cmake;${CMAKE_MODULE_PATH}")
include( ecbuild_bundle )
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -convert little_endian")

find_package(NetCDF REQUIRED COMPONENTS Fortran)

find_package( jedicmake QUIET )
if(OPENMP)
find_package( OpenMP COMPONENTS Fortran )
find_package(OpenMP COMPONENTS Fortran)
endif()

find_package( NetCDF REQUIRED COMPONENTS Fortran )

if( ENABLE_MKL )
find_package( MKL )
if(ENABLE_MKL)
find_package(MKL)
endif()
if( MKL_FOUND )
set( LAPACK_LIBRARIES ${MKL_LIBRARIES} )

if(MKL_FOUND)
set(LAPACK_LIBRARIES ${MKL_LIBRARIES})
else()
find_package( LAPACK REQUIRED )
find_package(LAPACK REQUIRED)
endif()

ecbuild_bundle_initialize()

ecbuild_bundle( PROJECT crtm GIT "https://github.com/JCSDA-internal/crtm.git" BRANCH develop UPDATE )
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}")

ecbuild_bundle_finalize()
## Add CRTM submodule
include(FetchContent)
FetchContent_Declare(
crtm
GIT_REPOSITORY "https://github.com/JCSDA/crtm.git"
GIT_TAG "feature/btj_crtm241_for_crtm_coef"
)
FetchContent_MakeAvailable(crtm)

add_subdirectory( src )
## Add subdirectories
add_subdirectory(src)

#include(cmake/cdash-integration.cmake)
#include(CTest)
## Optional: Include testing and cdash integration if needed
# include(cmake/cdash-integration.cmake)
include(CTest)
46 changes: 0 additions & 46 deletions Makefile

This file was deleted.

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ This repository contains the code to produce instrument transmittance coefficent
See Contributors.txt.
# License
See LICENSE.txt.

#CMake Installation Instructions (only cmake supported for this experimental branch)

mkdir build
cd build
cmake ..
make -j8
make install

contact [email protected] / [email protected] for additional help
28 changes: 28 additions & 0 deletions cmake/CRTM_coef_compiler_flags.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# (C) Copyright 2009-2016 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.

if( NOT CMAKE_BUILD_TYPE MATCHES "Debug" )
add_definitions( -DNDEBUG )
endif( )

#######################################################################################
# Fortran
#######################################################################################

if( CMAKE_Fortran_COMPILER_ID MATCHES "GNU" )
include( compiler_flags_GNU_Fortran )
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" )
include( compiler_flags_Intel_Fortran )
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "XL" )
include( compiler_flags_XL_Fortran )
elseif( CMAKE_Fortran_COMPILER_ID MATCHES "Cray" )
include( compiler_flags_Cray_Fortran )
else()
message( STATUS "Fortran compiler with ID ${CMAKE_CXX_COMPILER_ID} will be used with CMake default options")
endif()

Loading