Skip to content

Commit

Permalink
Merge pull request NOAA-GFDL#86 from NOAA-GFDL/master
Browse files Browse the repository at this point in the history
Sync with NOAA-GFDL main branch
  • Loading branch information
wrongkindofdoctor committed Dec 17, 2020
2 parents 7dd1814 + 6a7563a commit d0eeefd
Show file tree
Hide file tree
Showing 28 changed files with 107 additions and 206 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build_ubuntu_gnu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build libFMS test

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
distcheck-conf-flags: [--enable-openmp, --disable-openmp, --enable-mixed-mode, --disable-setting-flags]
fcflags: ["-I/usr/include", "-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include"]
exclude:
- distcheck-conf-flags: --disable-setting-flags
fcflags: -I/usr/include
- distcheck-conf-flags: --enable-mixed-mode
fcflags: "-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include"
container:
image: underwoo/ubuntu_libfms_gnu
env:
FCFLAGS: "${{ matrix.fcflags }}"

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare GNU autoconf for build
run: autoreconf -if
- name: Configure the build
run: ./configure ${{ matrix.distcheck-conf-flags }}
env:
DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.distcheck-conf-flags }}"
- name: Build the library
run: make -j distcheck
12 changes: 12 additions & 0 deletions .github/workflows/lint_fms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: libFMS lint tests

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run Lint
uses: NOAA-GFDL/simple_lint@v1
143 changes: 0 additions & 143 deletions .travis.yml

This file was deleted.

14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ sequential patch number (starting from `01`).
- AMIP_INTERP: A namelist flag called `use_mpp_io` if set to .true. will use mpp_io. The default is .false. and will use fms2_io.
- TOPOGRAPHY: A namelist flag called `use_mpp_io` if set to .true. will use mpp_io. The default is .false. and will use fms2_io.
- DATA_OVERRIDE: A namelist flag called `use_mpp_bug` if set to .true. will use mpp_io. The default is .false. and will use fms2_io.
- DATA_OVERRIDE: A namelist flag called `reproduce_null_char_bug_flag` if set to .true. and fms2_io is being used, it will reproduce the mpp_io bug where the axis bounds were calculated instead of read. The default is .false.
- DATA_OVERRIDE: A namelist flag called `reproduce_null_char_bug_flag` if set to .true. and fms2_io is being used, it will reproduce the mpp_io bug where the axis bounds were calculated instead of read. The default is .false.
A unit test was added to test the functionality of `get_grid_version_1`
- FMS2_IO: A unit test was added to test the functionality of `get_valid` and `is_valid`
### Changed
- The autotools build has been changed to copy each subdirectory module (.mod) files to a common .mod directory located at the top of the source directory. This change simplifies the include path specifications.
- The autotools build has been changed to copy each subdirectory module (.mod) files to a common .mod directory located at the top of the source directory. This change simplifies the include path specifications.
- Use F90 module files for external libraries (MPI and NetCDF) for improved interface checking, thereby removing the reliance on library header include files.
### Removed
- LIBFMS: The flag -Duse_mpp_io should not be used and will cause a crash
Expand All @@ -38,15 +38,15 @@ The fms2_io unit tests were modified so they can work with the AOCC compiler
- 2020.04-alpha2 (ad9915d83a2f34610cd748fd85889ba1f0f1fc02)
- 2020.04-alpha3 (e7e48839ab25cc9405abe5d8418e1b6ee6fb2d69)
- 2020.04-beta1 (6d3ac620423e7ede412e4bb1b36c338775d95193)

## [2020.03] - 2020-10-08
### Added
- FMS2_IO: Adds header_buffer_val to the fms2io namelist which sets the netcdf header size in bytes. The default value is 16kb
- FMS2_IO: Adds netcdf_default_format to the fms2io namelist which allows the user to change the netcdf file type. The default value is 64bit.
- FMS2_IO: Adds support to read netcdf string global attributes
- FMS2_IO: Adds an optional argument to open_file, `dont_add_res_to_filename`, which indicates that the filename should not be modified (default adds .res to restart file name)
- FMS2_IO: Modifies the `register_variable_attribute` and `register_global_attribute` interfaces by adding str_len as an argument. This is a workaround to get fms2io to work with PGI because they don't support class (*) with len=*.
- FMS2_IO: Adds unit test that tests `write_data` and `read_data` when using a domain with a mask table
- FMS2_IO: Adds unit test that tests `write_data` and `read_data` when using a domain with a mask table
- FMS2_IO: Adds fms2io’s version of get_mosaic_tile_grid
- MPP_IO: Adds `-Duse_mpp_io` compile option for data_override, interpolator, amip_interp, diag_manager, topography, and xgrid to select using mpp_io instead of fms2_io
- MPP_INIT: Adds unit tests for routines/functions that are called in mpp_init
Expand All @@ -57,9 +57,9 @@ The fms2_io unit tests were modified so they can work with the AOCC compiler

### Fixed
- DATA_OVERRIDE[2]: Fixes a crash when doing ongrid data_override calls with a domain with halos
- DIAG_MANAGER[2]: Fixes an issue where time_bnds were written incorrectly for the last time stamp
- DIAG_MANAGER[2]: Fixes an issue where time_bnds were written incorrectly for the last time stamp
- DIAG_MANAGER: Regional diagnostics with a mask table now work
- FMS2_IO: Unit test includes fms2io_init call to improve functionality
- FMS2_IO: Unit test includes fms2io_init call to improve functionality
- MPP: BOZ literals that are used in variable declaration are converted to integers using the int() function.
- MPP_DOMAINS2: Fixed unit test
- FMS_IO: Changes the logic in get_tile_string to fix bug where tile numbers 9 and 99 produce an inappropriate error
Expand All @@ -86,7 +86,7 @@ The fms2_io unit tests were modified so they can work with the AOCC compiler

### Removed
- GENERAL: References to the macro _ALLOCATABLE have been replaced with “allocatable”, _ALLOCATED has been replaced with “allocated”, and _NULL has been removed. It is now assumed that all compilers support the Fortran 2003 standard. The macros still exist in fms_platforms.h for compatibility within other components.
- DIAG_MANAGER: “fms_platform.h” is no longer included in any of the diag_manager routines. Instead, fms_platform_mod is now being use-associated where necessary. This fixes an issue for debuggers not providing correct line numbers.
- DIAG_MANAGER: “fms_platform.h” is no longer included in any of the diag_manager routines. Instead, fms_platform_mod is now being use-associated where necessary. This fixes an issue for debuggers not providing correct line numbers.

### Tag Commit Hashes
- 2020.02-beta1 (bbc6f8d33cfb75a411bbcd3f8423fa74b8b7cdfd)
Expand Down
6 changes: 3 additions & 3 deletions axis_utils/axis_utils2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ subroutine axis_edges(fileobj, name, edge_data, reproduce_null_char_bug_flag)

buffer = ""
if (variable_att_exists(fileobj, name, "edges")) then
!! If the reproduce_null_char_bug flag is turned on fms2io will not remove the null character
!! If the reproduce_null_char_bug flag is turned on fms2io will not remove the null character
call get_variable_attribute(fileobj, name, "edges", buffer, reproduce_null_char_bug_flag=reproduce_null_char_bug)

!! Check for a null character here, if it exists *_bnds will be calculated instead of read in
Expand All @@ -189,13 +189,13 @@ subroutine axis_edges(fileobj, name, edge_data, reproduce_null_char_bug_flag)
if (i > 0) buffer = ""
endif
elseif (variable_att_exists(fileobj, name, "bounds")) then
!! If the reproduce_null_char_bug flag is turned on fms2io will not remove the null character
!! If the reproduce_null_char_bug flag is turned on fms2io will not remove the null character
call get_variable_attribute(fileobj, name, "bounds", buffer, reproduce_null_char_bug_flag=reproduce_null_char_bug)

!! Check for a null character here, if it exists *_bnds will be calculated instead of read in
if (reproduce_null_char_bug) then
i = 0
i = index(buffer, char(0))
i = index(buffer, char(0))
if (i > 0) buffer = ""
endif
endif
Expand Down
2 changes: 1 addition & 1 deletion block_control/block_control.F90
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module block_control_mod
integer, dimension(:), allocatable :: ibs , & !< block extents for mpp-style
ibe , & !! decompositions
jbs , &
jbe
jbe
type(ix_type), dimension(:), allocatable :: ix !< dereference packed index from global index
!--- packed blocking fields
integer, dimension(:), allocatable :: blksz !< number of points in each individual block
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ fi
AC_MSG_CHECKING([if netCDF 4.7.4 is loaded])
if [ test "`nc-config --version`" == "netCDF 4.7.4" ]; then
AM_CONDITIONAL([SKIP_FMS2_IO_TESTS], true )
AC_MSG_RESULT([yes])
AC_MSG_RESULT([yes])
else
AM_CONDITIONAL([SKIP_FMS2_IO_TESTS], false )
AC_MSG_RESULT([no])
Expand Down
6 changes: 3 additions & 3 deletions diag_manager/diag_manager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ INTEGER FUNCTION register_diag_field_array(module_name, field_name, axes, init_t
& Contact the developers.'
register_diag_field_array = -1
RETURN
ELSE
ELSE
CALL error_mesg ('diag_manager_mod::register_diag_field', 'module/output_field '&
&//TRIM(module_name)//'/'// TRIM(field_name)//' AREA and VOLUME CANNOT be the same variable.&
& Contact the developers.',&
Expand All @@ -636,7 +636,7 @@ INTEGER FUNCTION register_diag_field_array(module_name, field_name, axes, init_t
& Contact the model liaison.'
register_diag_field_array = -1
RETURN
ELSE
ELSE
CALL error_mesg ('diag_manager_mod::register_diag_field', 'module/output_field '&
&//TRIM(module_name)//'/'// TRIM(field_name)//' AREA measures field NOT found in diag_table.&
& Contact the model liaison.',&
Expand All @@ -652,7 +652,7 @@ INTEGER FUNCTION register_diag_field_array(module_name, field_name, axes, init_t
& Contact the model liaison.'
register_diag_field_array = -1
RETURN
ELSE
ELSE
CALL error_mesg ('diag_manager_mod::register_diag_field', 'module/output_field '&
&//TRIM(module_name)//'/'// TRIM(field_name)//' VOLUME measures field NOT found in diag_table.&
& Contact the model liaison.',&
Expand Down
10 changes: 5 additions & 5 deletions diag_manager/diag_output.F90
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ SUBROUTINE write_axis_meta_data_fms2_io(file_unit, axes, fileob, time_ops, time_
call mpp_get_global_domain(domain, begin=gstart, end=gend) !< Get the global indicies
call mpp_get_compute_domain(domain, begin=cstart, end=cend, size=clength) !< Get the compute indicies
iend = cend - gstart + 1 !< Get the array indicies for the axis data
istart = cstart - gstart + 1
istart = cstart - gstart + 1
call register_axis(fptr, axis_name, dimension_length=clength)
call register_field(fptr, axis_name, "double", (/axis_name/) )
call register_variable_attribute(fptr, axis_name, "long_name", trim(axis_long_name), str_len=len_trim(axis_long_name))
Expand Down Expand Up @@ -579,9 +579,9 @@ SUBROUTINE write_axis_meta_data_fms2_io(file_unit, axes, fileob, time_ops, time_
endif

ELSE
!> @note Check if the time variable is registered. It's possible that is_time_axis_registered is set to true if using
!! time-templated files because they aren't closed when done writing. An alternative to this set up would be to put
!! variable_exists into the if statement with an .or. so that it gets registered.
!> @note Check if the time variable is registered. It's possible that is_time_axis_registered is set to true if using
!! time-templated files because they aren't closed when done writing. An alternative to this set up would be to put
!! variable_exists into the if statement with an .or. so that it gets registered.
is_time_axis_registered = variable_exists(fptr,trim(axis_name),.true.)
if (allocated(fptr%pelist) .and. .not. is_time_axis_registered) then
select type (fptr)
Expand Down Expand Up @@ -2110,7 +2110,7 @@ SUBROUTINE diag_flush(file_unit)

CALL mpp_flush (file_unit)
END SUBROUTINE diag_flush
!> End of use_mpp_io = true routines/functions
!> End of use_mpp_io = true routines/functions
!! everything else is shared by both
! </SUBROUTINE>

Expand Down
4 changes: 2 additions & 2 deletions diag_manager/diag_util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ SUBROUTINE init_output_field(module_name, field_name, output_name, output_file,&
END SUBROUTINE init_output_field
! </SUBROUTINE>

!> \brief Open file for output.
!> \brief Open file for output.
SUBROUTINE opening_file(file, time, use_mpp_io)
! WARNING: Assumes that all data structures are fully initialized
INTEGER, INTENT(in) :: file !< File ID.
Expand Down Expand Up @@ -2840,7 +2840,7 @@ SUBROUTINE write_static(file, use_mpp_io)
CALL mpp_close(files(file)%file_unit)
files(file)%file_unit = -1
END IF
endif !< use_mpp_io
endif !< use_mpp_io
END SUBROUTINE write_static
! </SUBROUTINE>

Expand Down
8 changes: 4 additions & 4 deletions docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.

EXTENSION_MAPPING = f90=Fortran
EXTENSION_MAPPING = f90=Fortran

# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
Expand Down Expand Up @@ -687,7 +687,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.

LAYOUT_FILE =
LAYOUT_FILE =

# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
Expand Down Expand Up @@ -810,7 +810,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE =
EXCLUDE =

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down Expand Up @@ -1103,7 +1103,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET =
HTML_EXTRA_STYLESHEET =

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
Expand Down
Loading

0 comments on commit d0eeefd

Please sign in to comment.