From 982dc34fa568a5637d2ef83e749798b29cfe746f Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Mon, 10 Jul 2023 14:28:35 -0400 Subject: [PATCH 1/3] Backport bugfixes to 2.35 This release backports fixes for ExtData2G handling of climatologies in weird circumstances and a fix for HISTORY handling of 1-bin output from GOCART. --- CHANGELOG.md | 7 +++++++ CMakeLists.txt | 2 +- base/Base/Base_Base_implementation.F90 | 1 - gridcomps/ExtData2G/ExtDataClimFileHandler.F90 | 17 +++++++++-------- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a5158286872..3ed000a48219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated +## [2.35.4] - 2023-07-11 + +### Fixed + +- Added bug fix when using climatology option in ExtData2G under certain scenarios (see [#2192](https://github.com/GEOS-ESM/MAPL/issues/2192) for more information) +- Fixed logic in generating the names of the split fields. If the alias field in the History.rc has separators (;), each substring is used to name the resulting fields. If there are no separators, this will be the exact name of the first split field + ## [2.35.3] - 2023-03-17 ### Fixed diff --git a/CMakeLists.txt b/CMakeLists.txt index 436b84ff8161..e9bf42ba68de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_policy (SET CMP0054 NEW) project ( MAPL - VERSION 2.35.3 + VERSION 2.35.4 LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF # Set the default build type to release diff --git a/base/Base/Base_Base_implementation.F90 b/base/Base/Base_Base_implementation.F90 index ba3da7a2f233..c4225c9e3e8b 100644 --- a/base/Base/Base_Base_implementation.F90 +++ b/base/Base/Base_Base_implementation.F90 @@ -3924,7 +3924,6 @@ subroutine genAlias(name, n, splitNameArray, aliasName, rc) deallocate(tmp) ! if the user did no supply enough separated alias field names, ! append 00i to the original field name - if (n==1) nn=0 do i=nn+1,n write(splitNameArray(i),'(A,I3.3)') trim(name), i end do diff --git a/gridcomps/ExtData2G/ExtDataClimFileHandler.F90 b/gridcomps/ExtData2G/ExtDataClimFileHandler.F90 index d6121adade33..8b012d3e5e4f 100644 --- a/gridcomps/ExtData2G/ExtDataClimFileHandler.F90 +++ b/gridcomps/ExtData2G/ExtDataClimFileHandler.F90 @@ -13,6 +13,7 @@ module MAPL_ExtdataClimFileHandler use MAPL_StringTemplate use MAPL_ExtDataBracket use MAPL_ExtDataConstants + use MAPL_CommsMod implicit none private public ExtDataClimFileHandler @@ -59,10 +60,10 @@ subroutine get_file_bracket(this, input_time, source_time, bracket, fail_on_miss allocate(source_years(2)) call ESMF_TimeGet(source_time(1),yy=source_years(1),_RC) call ESMF_TimeGet(source_time(2),yy=source_years(2),_RC) - _ASSERT(source_years(1) >= valid_years(1),'source time outide valid range') - _ASSERT(source_years(1) <= valid_years(2),'source time outide valid range') - _ASSERT(source_years(2) >= valid_years(1),'source time outide valid range') - _ASSERT(source_years(2) <= valid_years(2),'source time outide valid range') + _ASSERT(source_time(1) >= this%valid_range(1),'source time outside valid range') + _ASSERT(source_time(1) <= this%valid_range(2),'source time outside valid range') + _ASSERT(source_time(2) >= this%valid_range(1),'source time outside valid range') + _ASSERT(source_time(2) <= this%valid_range(2),'source time outside valid range') end if ! shift target year to request source time if specified @@ -72,20 +73,20 @@ subroutine get_file_bracket(this, input_time, source_time, bracket, fail_on_miss !if (size(source_years)>0) then if (allocated(source_years)) then - if (target_year < source_years(1)) then + if (input_time < source_time(1)) then target_year = source_years(1) this%clim_year = target_year - else if (target_year >= source_years(2)) then + else if (input_time >= source_time(2)) then target_year = source_years(2) this%clim_year = target_year end if call swap_year(target_time,target_year,_RC) else - if (target_year < valid_years(1)) then + if (input_time <= this%valid_range(1)) then target_year = valid_years(1) this%clim_year = target_year call swap_year(target_time,target_year,_RC) - else if (target_year >= valid_years(2)) then + else if (input_time >= this%valid_range(2)) then target_year = valid_years(2) this%clim_year = target_year call swap_year(target_time,target_year,_RC) From c06886d475e87d89f3fee8d52f1a6d147a359ad5 Mon Sep 17 00:00:00 2001 From: Benjamin Auer Date: Wed, 27 Mar 2024 15:55:17 -0400 Subject: [PATCH 2/3] changes needed for R21C --- griddedio/GriddedIO.F90 | 9 +++++++++ pfio/Variable.F90 | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/griddedio/GriddedIO.F90 b/griddedio/GriddedIO.F90 index cea3383893fe..b7582842887c 100644 --- a/griddedio/GriddedIO.F90 +++ b/griddedio/GriddedIO.F90 @@ -126,6 +126,7 @@ subroutine CreateFileMetaData(this,items,bundle,timeInfo,vdata,ogrid,global_attr integer :: metadataVarsSize type(StringStringMapIterator) :: s_iter character(len=:), pointer :: attr_name, attr_val + class(Variable), pointer :: coord_var integer :: status this%items = items @@ -155,6 +156,14 @@ subroutine CreateFileMetaData(this,items,bundle,timeInfo,vdata,ogrid,global_attr factory => get_factory(this%output_grid,rc=status) _VERIFY(status) call factory%append_metadata(this%metadata) + coord_var => this%metadata%get_variable('lons') + if (associated(coord_var)) call coord_var%set_deflation(this%deflateLevel) + coord_var => this%metadata%get_variable('lats') + if (associated(coord_var)) call coord_var%set_deflation(this%deflateLevel) + coord_var => this%metadata%get_variable('corner_lons') + if (associated(coord_var)) call coord_var%set_deflation(this%deflateLevel) + coord_var => this%metadata%get_variable('corner_lats') + if (associated(coord_var)) call coord_var%set_deflation(this%deflateLevel) if (present(vdata)) then this%vdata=vdata diff --git a/pfio/Variable.F90 b/pfio/Variable.F90 index 170ec8088da0..6bedd8c6043b 100644 --- a/pfio/Variable.F90 +++ b/pfio/Variable.F90 @@ -49,6 +49,7 @@ module pFIO_VariableMod procedure :: get_chunksizes procedure :: get_deflation + procedure :: set_deflation procedure :: get_quantize_algorithm procedure :: get_quantize_level procedure :: is_attribute_present @@ -282,6 +283,12 @@ function get_deflation(this) result(deflateLevel) deflateLevel=this%deflation end function get_deflation + subroutine set_deflation(this,deflate_level) + class (Variable), target, intent(inout) :: this + integer, intent(in) :: deflate_level + this%deflation = deflate_level + end subroutine + function get_quantize_algorithm(this) result(quantizeAlgorithm) class (Variable), target, intent(In) :: this integer :: quantizeAlgorithm From 18362778dd1a3d51a9855440a34ebbfcc35eadb9 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 28 Mar 2024 08:57:58 -0400 Subject: [PATCH 3/3] Update changelog --- .circleci/config.yml | 108 ++----------------------------------------- CHANGELOG.md | 8 +++- 2 files changed, 12 insertions(+), 104 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b9ee045f4865..2c91163110d9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -97,7 +97,8 @@ workflows: baselibs_version: *baselibs_version repo: GEOSgcm checkout_fixture: true - mepodevelop: true + fixture_branch: R21C + mepodevelop: false checkout_mapl_branch: true persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra, retained for one day @@ -116,43 +117,10 @@ workflows: baselibs_version: *baselibs_version repo: GEOSgcm checkout_fixture: true - mepodevelop: true - checkout_mapl_branch: true - persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra, retained for one day - - # Build GEOSldas on ifort - - ci/build: - name: build-GEOSldas-on-<< matrix.compiler >> - context: - - docker-hub-creds - matrix: - parameters: - compiler: [ifort] - baselibs_version: *baselibs_version - repo: GEOSldas - mepodevelop: false - checkout_fixture: true - fixture_branch: develop - checkout_mapl_branch: true - - # Build GEOSldas on gfortran -- only to main - - ci/build: - filters: - branches: - only: - - main - name: build-GEOSldas-on-<< matrix.compiler >> - context: - - docker-hub-creds - matrix: - parameters: - compiler: [gfortran] - baselibs_version: *baselibs_version - repo: GEOSldas + fixture_branch: R21C mepodevelop: false - checkout_fixture: true - fixture_branch: develop checkout_mapl_branch: true + persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra, retained for one day # Build GEOSadas (ifort only, needs a couple develop branches) -- only to main - ci/build: @@ -170,9 +138,7 @@ workflows: baselibs_version: *baselibs_version repo: GEOSadas checkout_fixture: true - # This branch on GEOSadas will be used to track subrepos needed - # for GEOSadas + MAPL develop much like how we do with MAPL 3 - fixture_branch: feature/mathomp4/mapldevelop + fixture_branch: R21C checkout_mapl_branch: true mepodevelop: false rebuild_procs: 1 @@ -214,67 +180,3 @@ workflows: bcs_version: *bcs_version gcm_ocean_type: MOM6 change_layout: false - - # Run MAPL Tutorials -- only to main - - ci/run_mapl_tutorial: - filters: - branches: - only: - - main - name: run-<< matrix.tutorial_name >>-Tutorial-with-<< matrix.compiler >> - context: - - docker-hub-creds - matrix: - parameters: - #compiler: [gfortran, ifort] - compiler: [ifort] - tutorial_name: - - hello_world - - parent_no_children - - parent_one_child_import_via_extdata - - parent_one_child_no_imports - - parent_two_siblings_connect_import_export - # We will only run the tutorials with GNU make. No need to double up - # as Ninja is a build test only - requires: - - build-and-test-MAPL-on-<< matrix.compiler >>-using-Unix Makefiles - baselibs_version: *baselibs_version - - build-and-publish-docker: - when: - equal: [ "release", << pipeline.parameters.GHA_Event >> ] - jobs: - - ci/publish-docker: - filters: - tags: - only: /^v.*$/ - name: publish-intel-docker-image - context: - - docker-hub-creds - - ghcr-creds - os_version: *os_version - baselibs_version: *baselibs_version - container_name: mapl - mpi_name: intelmpi - mpi_version: 2021.6.0 - compiler_name: intel - compiler_version: 2022.1.0 - image_name: geos-env - tag_build_arg_name: *tag_build_arg_name - - ci/publish-docker: - filters: - tags: - only: /^v.*$/ - name: publish-gcc-docker-image - context: - - docker-hub-creds - - ghcr-creds - os_version: *os_version - baselibs_version: *baselibs_version - container_name: mapl - mpi_name: openmpi - mpi_version: 4.1.4 - compiler_name: gcc - compiler_version: 12.1.0 - image_name: geos-env-mkl - tag_build_arg_name: *tag_build_arg_name diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ed000a48219..22ae8a1e7f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated -## [2.35.4] - 2023-07-11 +## [v2.35.3+R21C_v1.1.0] - 2024-03-28 + +### Fixed + +- Fix inconsistency in History output so that multi-dimensional coordinate variables are also compressed if requested in the collection + +## [v2.35.3+R21C_v1.0.0] - 2024-02-16 ### Fixed