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

Added return to fetch_data #3179

Merged
merged 35 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cf60fdb
check tableEnd efficiently
weiyuan-jiang Nov 13, 2024
25c8a5c
Added return to fetch_data
weiyuan-jiang Nov 13, 2024
84c6832
rename cap_import to more generic name
weiyuan-jiang Nov 14, 2024
ce10328
Update gridcomps/Cap/MAPL_CapGridComp.F90
tclune Nov 14, 2024
ad0a569
Merge pull request #3178 from GEOS-ESM/feature/wjiang/tableEnd
mathomp4 Nov 14, 2024
87695c3
updates
bena-nasa Nov 21, 2024
9153589
more updates
bena-nasa Nov 22, 2024
ded9a8f
more updates
bena-nasa Nov 22, 2024
935a4b8
update changelog
bena-nasa Nov 22, 2024
8ce9c6a
comments
bena-nasa Nov 25, 2024
f05d7af
CI changes for GEOSadas
mathomp4 Nov 27, 2024
fc85e4c
Merge pull request #3197 from GEOS-ESM/bugfix/mathomp4/adas-ci-fix
mathomp4 Nov 27, 2024
5cb22db
fixes #3201
bena-nasa Dec 2, 2024
89e5348
Update for f2py-meson support
mathomp4 Dec 2, 2024
a2cedd1
Update changelog and version for 2.50.3 release
mathomp4 Dec 2, 2024
fbe9af8
protect against 0 length string
bena-nasa Dec 2, 2024
398c9b3
Backport ADAS CI Fix
mathomp4 Dec 3, 2024
6efaf44
Merge pull request #3202 from GEOS-ESM/feature/mathomp4/support-meson…
mathomp4 Dec 3, 2024
7eb7786
Merge pull request #3203 from GEOS-ESM/hotfix/bmauer/fixes-#3201
bena-nasa Dec 3, 2024
d4ff7d1
Merge branch 'main' into develop
mathomp4 Dec 3, 2024
d9b2fbf
fixes #3210
bena-nasa Dec 3, 2024
daab7d7
oops
bena-nasa Dec 3, 2024
5ad02a1
update changelog
bena-nasa Dec 3, 2024
d1b0f0d
more updates
bena-nasa Dec 3, 2024
9778fd3
Merge branch 'develop' into feature/fixes-#3175
bena-nasa Dec 3, 2024
baf3109
Merge branch 'develop' into feature/bmauer/fixes-#3210
bena-nasa Dec 3, 2024
58ddb04
Merge pull request #3211 from GEOS-ESM/feature/bmauer/fixes-#3210
mathomp4 Dec 3, 2024
6a3ea1b
Merge branch 'develop' into feature/fixes-#3175
mathomp4 Dec 3, 2024
9de255b
Fix up CI image code
mathomp4 Dec 3, 2024
b4be92e
Merge branch 'develop' into feture/wjiang/fetch_data_return
mathomp4 Dec 4, 2024
9a2fee5
Update base/MAPL_LatLonGridFactory.F90
tclune Dec 4, 2024
6f84fdb
Merge pull request #3212 from GEOS-ESM/feature/fixes-#3175
mathomp4 Dec 4, 2024
5176304
Merge branch 'develop' into bugfix/mathomp4/ci-image-fix
mathomp4 Dec 4, 2024
c7a38da
Merge pull request #3214 from GEOS-ESM/bugfix/mathomp4/ci-image-fix
mathomp4 Dec 4, 2024
b539f69
Merge branch 'develop' into feture/wjiang/fetch_data_return
mathomp4 Dec 4, 2024
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
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ workflows:
fixture_branch: feature/mathomp4/mapldevelop
checkout_mapl_branch: true
mepodevelop: false
rebuild_procs: 1
rebuild_procs: 4
build_type: Release

build-and-publish-docker:
when:
Expand Down Expand Up @@ -228,8 +229,8 @@ workflows:
baselibs_version: *baselibs_version
container_name: mapl
mpi_name: openmpi
mpi_version: 5.0.2
mpi_version: 5.0.5
compiler_name: gcc
compiler_version: 13.2.0
compiler_version: 14.2.0
image_name: geos-env-mkl
tag_build_arg_name: *tag_build_arg_name
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added macro _RETURN(_SUCCESS) to fetch_data
- Allow update offsets of ±timestep in ExtData2G
- Minor revision (and generalization) of grid-def for GSI purposes
- Trajectory sampler: fix a bug when group_name does not exist in netCDF file and a bug that omitted the first time point
- Allow lat-lon grid factory to detect and use CF compliant lat-lon bounds in a file when making a grid
- PFIO/Variable class, new procedures to retrieve string/reals/int attributes from a variable

### Changed

- Change minimum CMake version to 3.24
- This is needed for f2py and meson support
- Refactored tableEnd check
- Added commandline options to `checkpoint_benchmark.x` and `restart_benchmark.x` to allow for easier testing of different configurations. Note that the old configuration file style of input is allowed via the `--config_file` option (which overrides any other command line options)
- Update ESMF version for Baselibs to match that of Spack for consistency
- Update `components.yaml`
Expand All @@ -27,9 +33,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- GSL 2.8
- jpeg 9f
- Various build fixes
- ESMA_cmake v3.52.0
- ESMA_cmake v3.55.0
- Fixes for using MAPL as a library in spack builds of GEOSgcm
- Various backports from v4
- Code for capturing `mepo status` output
- Fixes for f2py and meson (NOTE: Requires CMake minimum version of 3.24 in project for complete functionality)
- Fixes for `MPI_STACK` code run multiple times
- Updates to CI
- Use v7.27.0 Baselibs
- Use GCC 14 for GNU tests
Expand All @@ -38,11 +47,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Fixed issue of some Baselibs builds appearing to support zstandard. This is not possible due to Baselibs building HDF5 and netCDF as static libraries
- Fixed a bug where the periodicity around the earth of the lat-lon grid was not being set properly when grid did not span from pole to pole

### Removed

### Deprecated

## [2.50.3] - 2024-12-02

### Fixed

- Fixed bug where c null character is not removed from end of string when reading netcdf attribute in NetCDF4\_FileFormatter.F90

## [2.50.2] - 2024-10-30

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.23)
cmake_minimum_required (VERSION 3.24)

get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT is_multi_config AND NOT (CMAKE_BUILD_TYPE OR DEFINED ENV{CMAKE_BUILD_TYPE}))
Expand All @@ -8,7 +8,7 @@ endif ()

project (
MAPL
VERSION 2.50.2
VERSION 2.50.3
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

# Set the possible values of build type for cmake-gui
Expand Down
79 changes: 11 additions & 68 deletions base/FileMetadataUtilities.F90
Original file line number Diff line number Diff line change
Expand Up @@ -116,30 +116,15 @@ function get_var_attr_real32(this,var_name,attr_name,rc) result(attr_real32)
character(len=*), intent(in) :: attr_name
integer, optional, intent(out) :: rc

real(REAL32) :: tmp(1)
real(REAL64) :: tmpd(1)
integer :: status
character(:), allocatable :: fname
type(Attribute), pointer :: attr
type(Variable), pointer :: var
class(*), pointer :: attr_val(:)

fname = this%get_file_name(_RC)
var => this%get_variable(var_name,_RC)
_ASSERT(associated(var),"no variable named "//var_name//" in "//fname)
attr => var%get_attribute(attr_name,_RC)
_ASSERT(associated(attr),"no attribute named "//attr_name//" in "//var_name//" in "//fname)
attr_val => attr%get_values()
select type(attr_val)
type is(real(kind=REAL32))
tmp = attr_val
attr_real32 = tmp(1)
type is(real(kind=REAL64))
tmpd = attr_val
attr_real32 = REAL(tmpd(1))
class default
_FAIL('unsupported subclass (not real32) for units of attribute named '//attr_name//' in '//var_name//' in '//fname)
end select
attr_real32 = var%get_attribute_real32(attr_name, rc=status)
_ASSERT(status == _SUCCESS, 'failed to get attribute named '//attr_name//' in '//var_name//' in '//fname)

_RETURN(_SUCCESS)
end function get_var_attr_real32
Expand All @@ -151,28 +136,17 @@ function get_var_attr_real64(this,var_name,attr_name,rc) result(attr_real64)
character(len=*), intent(in) :: attr_name
integer, optional, intent(out) :: rc

real(REAL64) :: tmp(1)
integer :: status
character(:), allocatable :: fname
type(Attribute), pointer :: attr
type(Variable), pointer :: var
class(*), pointer :: attr_val(:)

fname = this%get_file_name(_RC)
var => this%get_variable(var_name,_RC)
_ASSERT(associated(var),"no variable named "//var_name//" in "//fname)
attr => var%get_attribute(attr_name,_RC)
_ASSERT(associated(attr),"no attribute named "//attr_name//" in "//var_name//" in "//fname)
attr_val => attr%get_values()
select type(attr_val)
type is(real(kind=REAL64))
tmp = attr_val
attr_real64 = tmp(1)
class default
_FAIL('unsupported subclass (not real64) for units of attribute named '//attr_name//' in '//var_name//' in '//fname)
end select

attr_real64 = var%get_attribute_real64(attr_name, rc=status)
_ASSERT(status == _SUCCESS, 'failed to get attribute named '//attr_name//' in '//var_name//' in '//fname)
_RETURN(_SUCCESS)

end function get_var_attr_real64

function get_var_attr_int32(this,var_name,attr_name,rc) result(attr_int32)
Expand All @@ -182,26 +156,15 @@ function get_var_attr_int32(this,var_name,attr_name,rc) result(attr_int32)
character(len=*), intent(in) :: attr_name
integer, optional, intent(out) :: rc

integer(INT32) :: tmp(1)
integer :: status
character(:), allocatable :: fname
type(Attribute), pointer :: attr
type(Variable), pointer :: var
class(*), pointer :: attr_val(:)

fname = this%get_file_name(_RC)
var => this%get_variable(var_name,_RC)
_ASSERT(associated(var),"no variable named "//var_name//" in "//fname)
attr => var%get_attribute(attr_name,_RC)
_ASSERT(associated(attr),"no attribute named "//attr_name//" in "//var_name//" in "//fname)
attr_val => attr%get_values()
select type(attr_val)
type is(integer(kind=INT32))
tmp = attr_val
attr_int32 = tmp(1)
class default
_FAIL('unsupported subclass (not int32) for units of attribute named '//attr_name//' in '//var_name//' in '//fname)
end select
attr_int32 = var%get_attribute_int32(attr_name, rc=status)
_ASSERT(status == _SUCCESS, 'failed to get attribute named '//attr_name//' in '//var_name//' in '//fname)

_RETURN(_SUCCESS)
end function get_var_attr_int32
Expand All @@ -213,26 +176,15 @@ function get_var_attr_int64(this,var_name,attr_name,rc) result(attr_int64)
character(len=*), intent(in) :: attr_name
integer, optional, intent(out) :: rc

integer(INT64) :: tmp(1)
integer :: status
character(:), allocatable :: fname
type(Attribute), pointer :: attr
type(Variable), pointer :: var
class(*), pointer :: attr_val(:)

fname = this%get_file_name(_RC)
var => this%get_variable(var_name,_RC)
_ASSERT(associated(var),"no variable named "//var_name//" in "//fname)
attr => var%get_attribute(attr_name,_RC)
_ASSERT(associated(attr),"no attribute named "//attr_name//" in "//var_name//" in "//fname)
attr_val => attr%get_values()
select type(attr_val)
type is(integer(kind=INT64))
tmp = attr_val
attr_int64 = tmp(1)
class default
_FAIL('unsupported subclass (not int64) for units of attribute named '//attr_name//' in '//var_name//' in '//fname)
end select
attr_int64 = var%get_attribute_int64(attr_name, rc=status)
_ASSERT(status == _SUCCESS, 'failed to get attribute named '//attr_name//' in '//var_name//' in '//fname)

_RETURN(_SUCCESS)
end function get_var_attr_int64
Expand All @@ -246,22 +198,13 @@ function get_var_attr_string(this,var_name,attr_name,rc) result(attr_string)

integer :: status
character(:), allocatable :: fname
type(Attribute), pointer :: attr
type(Variable), pointer :: var
class(*), pointer :: attr_val

fname = this%get_file_name(_RC)
var => this%get_variable(var_name,_RC)
_ASSERT(associated(var),"no variable named "//var_name//" in "//fname)
attr => var%get_attribute(attr_name,_RC)
_ASSERT(associated(attr),"no attribute named "//attr_name//" in "//var_name//" in "//fname)
attr_val => attr%get_value()
select type(attr_val)
type is(character(*))
attr_string = attr_val
class default
_FAIL('unsupported subclass (not string) for units of attribute named '//attr_name//' in '//var_name//' in '//fname)
end select
attr_string = var%get_attribute_string(attr_name, rc=status)
_ASSERT(status == _SUCCESS, 'failed to get attribute named '//attr_name//' in '//var_name//' in '//fname)

_RETURN(_SUCCESS)
end function get_var_attr_string
Expand Down
Loading
Loading