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

Add libFMS module #705

Merged
merged 20 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ list(APPEND fms_fortran_src_files
topography/topography.F90
tracer_manager/tracer_manager.F90
tridiagonal/tridiagonal.F90
libFMS.F90
)

# Collect FMS C source files
Expand Down
16 changes: 15 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ SUBDIRS = \
mpp \
memutils \
fms2_io \
fms affinity \
fms \
affinity \
mosaic \
time_manager \
axis_utils \
Expand Down Expand Up @@ -72,6 +73,19 @@ include_HEADERS = include/file_version.h include/fms_platform.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = FMS.pc

## Build libFMS module
AM_CPPFLAGS = -I${top_srcdir}/include -I${top_srcdir}/mpp/include
AM_FCFLAGS = $(FC_MODINC). $(FC_MODOUT)$(MODDIR)

noinst_LTLIBRARIES = libFMS_mod.la
libFMS_mod_la_SOURCES = libFMS.F90

fms.$(FC_MODEXT): .mods/*_mod.$(FC_MODEXT)

nodist_include_HEADERS = libFMS_mod.la

include $(top_srcdir)/mkmods.mk

# Prepare CMake files for installation. This is to help
# packages build using CMake to more easily use the libFMS
# library.
Expand Down
20 changes: 20 additions & 0 deletions data_override/get_grid_version_fms2io.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
!***********************************************************************
!* GNU Lesser General Public License
!*
!* This file is part of the GFDL Flexible Modeling System (FMS).
!*
!* FMS is free software: you can redistribute it and/or modify it under
!* the terms of the GNU Lesser General Public License as published by
!* the Free Software Foundation, either version 3 of the License, or (at
!* your option) any later version.
!*
!* FMS is distributed in the hope that it will be useful, but WITHOUT
!* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
!* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
!* for more details.
!*
!* You should have received a copy of the GNU Lesser General Public
!* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
!***********************************************************************
!> @file
!! @brief fms2_io implementations of grid routines
module get_grid_version_fms2io_mod
use constants_mod, only: PI
use mpp_mod, only : mpp_error,FATAL,NOTE, mpp_min, mpp_max
Expand Down
20 changes: 20 additions & 0 deletions data_override/get_grid_version_mpp.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
!***********************************************************************
!* GNU Lesser General Public License
!*
!* This file is part of the GFDL Flexible Modeling System (FMS).
!*
!* FMS is free software: you can redistribute it and/or modify it under
!* the terms of the GNU Lesser General Public License as published by
!* the Free Software Foundation, either version 3 of the License, or (at
!* your option) any later version.
!*
!* FMS is distributed in the hope that it will be useful, but WITHOUT
!* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
!* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
!* for more details.
!*
!* You should have received a copy of the GNU Lesser General Public
!* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
!***********************************************************************
!> @file
!! @brief mpp_io implementations of grid routines
module get_grid_version_mpp_mod
use constants_mod, only: PI
use mpp_mod, only : mpp_error,FATAL,WARNING,NOTE, mpp_min, mpp_max
Expand Down
423 changes: 423 additions & 0 deletions libFMS.F90

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions mpp/mpp_efp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module mpp_efp_mod
public :: mpp_reproducing_sum, mpp_efp_list_sum_across_PEs
public :: mpp_efp_plus, mpp_efp_minus, mpp_efp_to_real, mpp_real_to_efp, mpp_efp_real_diff
public :: operator(+), operator(-), assignment(=)
public :: mpp_query_efp_overflow_error, mpp_reset_efp_overlow_error
public :: mpp_query_efp_overflow_error, mpp_reset_efp_overflow_error

integer, parameter :: NUMBIT = 46 !< number of bits used in the 64-bit signed integer representation.
integer, parameter :: NUMINT = 6 !< The number of long integers to use to represent
Expand Down Expand Up @@ -560,9 +560,9 @@ function mpp_query_efp_overflow_error()
mpp_query_efp_overflow_error = overflow_error
end function mpp_query_efp_overflow_error

subroutine mpp_reset_efp_overlow_error()
subroutine mpp_reset_efp_overflow_error()
overflow_error = .false.
end subroutine mpp_reset_efp_overlow_error
end subroutine mpp_reset_efp_overflow_error

function mpp_efp_plus(EFP1, EFP2)
type(mpp_efp_type) :: mpp_efp_plus
Expand Down
Loading