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

GitFlow: Merge Develop Into Main for 2.52 release #3346

Merged
merged 74 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
1184b1b
major updates for upper_air restart regrid/remap to fix vector regrid…
wmputman Mar 5, 2024
e7db9cf
patches from WMP
wmputman Mar 11, 2024
2338c52
hand-merge develop into feature/wmputman/KM_v11_5_1_remap_upper
sdrabenh Apr 5, 2024
958b125
updates so it builds
bena-nasa Apr 5, 2024
fa8c5b3
change allreduce bill put in to barriers
bena-nasa Apr 5, 2024
52bfc94
remove commented out code
bena-nasa Apr 5, 2024
e9343aa
restore version without spaces
bena-nasa Apr 5, 2024
5e907d8
Merge branch 'develop' into feature/sdrabenh/gcm_v12-rc1
mathomp4 Apr 10, 2024
b889e07
Merge branch 'develop' into feature/sdrabenh/gcm_v12-rc1
mathomp4 Apr 11, 2024
610d1ae
Update CHANGELOG.md
mathomp4 Apr 11, 2024
e65cfe8
latest updates for HWT SFE 2024
wmputman Apr 22, 2024
8f7fc9e
hand-resolve merge conflicts from feature/wmputman/KM_v11_5_1_HWT_SFE…
sdrabenh Apr 26, 2024
f1fd67a
Removed loop-level timer barriers
wmputman Jul 30, 2024
493149f
Hand-merge v2.47.1
sdrabenh Aug 14, 2024
6786b54
Turn off default write/read of weights
mathomp4 Aug 22, 2024
957c6d8
hand merge v2.50.1 into feature/sdrabenh/gcm_v12
sdrabenh Oct 21, 2024
abf70cd
Merge tag 'v2.51.0' into feature/sdrabenh/gcm_v12
mathomp4 Dec 9, 2024
d59bdbb
Remove stray changelog entry
mathomp4 Dec 9, 2024
4a16f59
Add loggers when reading and writing weights
mathomp4 Dec 9, 2024
ff54749
Fix typo
mathomp4 Dec 9, 2024
b134aa2
Merge branch 'develop' into feature/mathomp4/weight-logger
mathomp4 Dec 10, 2024
1ff3ceb
Merge tag 'v2.51.1' into feature/sdrabenh/gcm_v12
mathomp4 Dec 10, 2024
4dbc5e3
Merge pull request #3233 from GEOS-ESM/feature/mathomp4/weight-logger
mathomp4 Dec 10, 2024
28f389c
fixes #3242
bena-nasa Dec 11, 2024
f97ca09
change i5 to i0
bena-nasa Dec 11, 2024
6ef3cfe
Merge pull request #3243 from GEOS-ESM/feature/bmauer/fixes-#3242
bena-nasa Dec 11, 2024
ef32c48
Fix for bug with udunits2f return code and macros
darianboggs Dec 18, 2024
0e0a5fa
Merge branch 'main' into develop
mathomp4 Dec 19, 2024
249b45c
include files and MAPL_ExceptionHandling
darianboggs Dec 19, 2024
b1d7b02
Merge branch 'develop' into bugfix/wdboggs/udsystem_bug_3253
tclune Dec 19, 2024
e1f18d4
Merge pull request #3258 from GEOS-ESM/bugfix/wdboggs/udsystem_bug_3253
darianboggs Dec 19, 2024
6f34fe8
Remove comments in UDSystem.F90
darianboggs Dec 19, 2024
84190d2
Merge pull request #3260 from GEOS-ESM/bugfix/wdboggs/remove_comments…
darianboggs Dec 19, 2024
10fdb48
fixes #3262
bena-nasa Dec 23, 2024
9c51eb8
update changelog
bena-nasa Dec 23, 2024
5971a94
change name of option
bena-nasa Dec 23, 2024
fa140bb
update changelog
bena-nasa Dec 23, 2024
d4ab188
Merge pull request #3269 from GEOS-ESM/feature/bmauer/fixes-#3262
mathomp4 Dec 23, 2024
d777b8d
Added start_date and start_time for each collection.
atrayano Dec 27, 2024
828adae
Fixed logic for start alarm if the start date/time is before the
atrayano Jan 2, 2025
ec7e897
Modified CHANGELOG. Fixed the behavior for "backwards" running History
atrayano Jan 2, 2025
0f22f6b
Merge branch 'develop' into feature/atrayano/history_start_stop
atrayano Jan 2, 2025
42037f0
Update CHANGELOG.md
mathomp4 Jan 3, 2025
180c032
fixes #3280
bena-nasa Jan 6, 2025
17a4fd0
a new utility to simulate GEOS for ExtData using ExtDataDriver.x
bena-nasa Jan 6, 2025
181dcb7
typo
bena-nasa Jan 6, 2025
774bbd9
code cleanup
bena-nasa Jan 6, 2025
65b0002
Merge pull request #3282 from GEOS-ESM/feature/bmauer/geos_simulator
mathomp4 Jan 6, 2025
e5a6a53
Adopted suggestions from the PR review
atrayano Jan 6, 2025
447b933
Merge branch 'develop' into feature/bmauer/fixes-#3280
bena-nasa Jan 6, 2025
573e6b7
update changelog
bena-nasa Jan 6, 2025
35e774a
Merge branch 'develop' into feature/atrayano/history_start_stop
atrayano Jan 6, 2025
8a14993
Merge pull request #3278 from GEOS-ESM/feature/atrayano/history_start…
atrayano Jan 6, 2025
86f90f2
Merge branch 'develop' into feature/bmauer/fixes-#3280
bena-nasa Jan 6, 2025
c8ad63f
Merge pull request #3281 from GEOS-ESM/feature/bmauer/fixes-#3280
bena-nasa Jan 6, 2025
02f81aa
Fixes #3289. This commit fixes the behavior of MAPL_MaxMin in presence
atrayano Jan 7, 2025
02f3794
Merge branch 'develop' into bugfix/atrayano/maxmin_support_for_nan
atrayano Jan 7, 2025
b3cc556
Merge branch 'main' into develop
mathomp4 Jan 7, 2025
4916c93
Adopted suggestions from PR review
atrayano Jan 7, 2025
65f9f56
Update base/MAPL_MaxMinMod.F90
tclune Jan 7, 2025
d452ea3
Merge branch 'develop' into bugfix/atrayano/maxmin_support_for_nan
atrayano Jan 7, 2025
116fb6f
Merge pull request #3290 from GEOS-ESM/bugfix/atrayano/maxmin_support…
atrayano Jan 7, 2025
6334057
Properly freeing MPI communicators after reading or writing restarts
atrayano Jan 10, 2025
99b1564
Merge pull request #3303 from GEOS-ESM/bugfix/atrayano/#3302_free_mpi…
mathomp4 Jan 11, 2025
eede063
Fixes #3307. Fixed more MPI communicator assignments
atrayano Jan 13, 2025
5e3f8f9
Merge pull request #3310 from GEOS-ESM/bugfix/atrayano/fix_of_mpi_com…
mathomp4 Jan 13, 2025
0361120
Added protection for null mpi communicator
atrayano Jan 14, 2025
3e18fc4
Merge pull request #3316 from GEOS-ESM/bugfix/atrayano/#3314_protect_…
tclune Jan 14, 2025
452b583
Update GitHub Actions to use blobless clones (#3318)
mathomp4 Jan 14, 2025
45bdba5
Trajectory sampler: use a single obs file at each Epoch time and rest…
metdyn Jan 16, 2025
76f3be0
Added subroutine to read NC4 tile file (#3321)
weiyuan-jiang Jan 16, 2025
b49832a
Move to use Baselibs 7.29.0 (#3327)
mathomp4 Jan 16, 2025
ca04152
fixed kind=8 (#3340)
weiyuan-jiang Jan 17, 2025
16b7f41
Prepare for 2.52.0 Release (#3335)
mathomp4 Jan 17, 2025
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ parameters:

# Anchors to prevent forgetting to update a version
os_version: &os_version ubuntu24
baselibs_version: &baselibs_version v7.27.0
baselibs_version: &baselibs_version v7.29.0
bcs_version: &bcs_version v11.6.0
tag_build_arg_name: &tag_build_arg_name maplversion

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none

- name: Build and Deploy Docs
uses: ./.github/actions/deploy-ford-docs
Expand All @@ -34,6 +37,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none

- name: Build and Deploy Dev Docs
uses: ./.github/actions/deploy-ford-docs
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/push-to-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none
- name: Run the action
uses: devops-infra/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none
- name: Run the action
uses: devops-infra/[email protected]
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/validate_yaml_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ jobs:
validate-YAML:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none
- id: yaml-lint
name: yaml-lint
uses: ibiqlik/action-yamllint@v3
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none

- name: Build and Deploy Docs
uses: ./.github/actions/deploy-ford-docs
Expand All @@ -35,7 +38,7 @@ jobs:
name: Build and Test MAPL GNU
runs-on: ubuntu-latest
container:
image: gmao/ubuntu24-geos-env-mkl:v7.27.0-openmpi_5.0.5-gcc_14.2.0
image: gmao/ubuntu24-geos-env-mkl:v7.29.0-openmpi_5.0.5-gcc_14.2.0
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
# It seems like we might not need secrets on GitHub Actions which is good for forked
# pull requests
Expand Down Expand Up @@ -86,7 +89,7 @@ jobs:
name: Build and Test MAPL Intel
runs-on: ubuntu-latest
container:
image: gmao/ubuntu24-geos-env:v7.27.0-intelmpi_2021.13-ifort_2021.13
image: gmao/ubuntu24-geos-env:v7.29.0-intelmpi_2021.13-ifort_2021.13
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
# It seems like we might not need secrets on GitHub Actions which is good for forked
# pull requests
Expand All @@ -102,6 +105,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
filter: blob:none
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [2.52.0] - 2025-01-17

### Added

- Added subroutine to read nc4 tile file
- Added optional `start_date` and `start_time` to control the output window for each History collection. No output will be written before then. If not specified, these default to the beginning of the experiment.
- Added utility to prepare inputs for `ExtDataDriver.x` so that ExtData can simulate a real GEOS run
- Added loggers when writing or reading weight files
- Added new option to AGCM.rc `overwrite_checkpoint` to allow checkpoint files to be overwritten. By default still will not overwrite checkpoints
- The trajectory sampler netCDF output variable `location_index_in_iodafile` can be turned off, after we add two control variables: `use_NWP_1_file` and `restore_2_obs_vector` for users. When set to true, the two options will select only one obs file at each Epoch interval, and will rotate the output field index back to the location vector inthe obs file before generating netCDF output.
- Support `splitfield: 1` in HISTORY.rc for trajectory sampler

### Changed

- Changed `MAPL_ESMFRegridder` to require the dstMaskValues to be added as grid attribute to use fixed masking, fixes UFS issue
- Increased formatting width of time index in ExtData2G diagnostic print
- Updated GitHub checkout action to use blobless clones
- Update CI to use Baselibs 7.29.0 by default
- This provides ESMF 8.8.0
- Update `components.yaml`
- `ESMA_env` v4.34.0
- Update to MPT 2.30 at NAS
- Update to Baselibs 7.29.0 (ESMF 8.8.0)
- `ESMA_cmake` v3.56.0
- Use `LOCATION` Python `FIND_STRATEGY`

### Fixed

- Free MPI communicators after reading and/or writing of restarts
- Fixed the behavior of `MAPL_MaxMin` in presence of NaN
- Fixed bug with return codes and macros in udunits2f

## [2.51.2] - 2024-12-19

### Changed
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif ()

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

# Set the possible values of build type for cmake-gui
Expand Down
58 changes: 58 additions & 0 deletions Tests/generate_extdatadriver_input.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Introduction
This is a simple utility to generate inputs for ExtDataDriver.x so that ExtData can simulate a real GEOS run. It requires 3 things that are passed in
- A list of items ExtData needs to fill. This can be found by looking at the GEOS log
- The import spec of the GCM component from using the printspec option to GEOS
- all the needed yaml files in a directory, name of directory is passed

This will generate the import and optionally the export (as well as History) defition for ExtDataDriver.x to spare the human the tedious work.

# Example Inputs
To get the list of ExtDate items, just grab all the lines that look like this to a file:
```
EXTDATA: INFO: ---- 00001: BC_AIRCRAFT
EXTDATA: INFO: ---- 00002: BC_ANTEBC1
EXTDATA: INFO: ---- 00003: BC_ANTEBC2
EXTDATA: INFO: ---- 00004: BC_AVIATION_CDS
EXTDATA: INFO: ---- 00005: BC_AVIATION_CRS
EXTDATA: INFO: ---- 00006: BC_AVIATION_LTO
EXTDATA: INFO: ---- 00007: BC_BIOFUEL
EXTDATA: INFO: ---- 00008: BC_BIOMASS
EXTDATA: INFO: ---- 00009: BC_SHIP
EXTDATA: INFO: ---- 00010: BRC_AIRCRAFT
EXTDATA: INFO: ---- 00011: BRC_ANTEBRC1
EXTDATA: INFO: ---- 00012: BRC_ANTEBRC2
EXTDATA: INFO: ---- 00013: BRC_AVIATION_CDS
EXTDATA: INFO: ---- 00014: BRC_AVIATION_CRS
EXTDATA: INFO: ---- 00015: BRC_AVIATION_LTO
EXTDATA: INFO: ---- 00016: BRC_BIOFUEL
EXTDATA: INFO: ---- 00017: BRC_BIOMASS
EXTDATA: INFO: ---- 00018: BRC_SHIP
EXTDATA: INFO: ---- 00019: BRC_TERPENE
```

To get the GCM component spec, run with `PRINTSPEC: 1` in the `CAP.rc` and copy lines out that look like this:
```
#IMPORT spec for GCM
#COMPONENT, SHORT_NAME, LONG_NAME, UNIT, DIMS, CONTAINER_TYPE
GENERIC: INFO: GCM, WSUB_CLIM, stdev in vertical velocity, m s-1, 3, esmf_field
GENERIC: INFO: GCM, MEGAN_ORVC, MEGAN_ORVC, kgC/m2/s, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_CROP, CLM4_PFT_CROP, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_C4_GRSS, CLM4_PFT_C4_GRSS, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_C3_NARC_GRSS, CLM4_PFT_C3_NARC_GRSS, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_C3_ARCT_GRSS, CLM4_PFT_C3_ARCT_GRSS, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_BDLF_DECD_BORL_SHRB, CLM4_PFT_BDLF_DECD_BORL_SHRB, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_BDLF_DECD_TMPT_SHRB, CLM4_PFT_BDLF_DECD_TMPT_SHRB, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_BDLF_EVGN_SHRB, CLM4_PFT_BDLF_EVGN_SHRB, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_BDLF_DECD_BORL_TREE, CLM4_PFT_BDLF_DECD_BORL_TREE, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_BDLF_DECD_TMPT_TREE, CLM4_PFT_BDLF_DECD_TMPT_TREE, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_BDLF_DECD_TROP_TREE, CLM4_PFT_BDLF_DECD_TROP_TREE, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_BDLF_EVGN_TMPT_TREE, CLM4_PFT_BDLF_EVGN_TMPT_TREE, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_BDLF_EVGN_TROP_TREE, CLM4_PFT_BDLF_EVGN_TROP_TREE, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_NDLF_DECD_BORL_TREE, CLM4_PFT_NDLF_DECD_BORL_TREE, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_NDLF_EVGN_BORL_TREE, CLM4_PFT_NDLF_EVGN_BORL_TREE, 1, 2, esmf_field
GENERIC: INFO: GCM, CLM4_PFT_NDLF_EVGN_TMPT_TREE, CLM4_PFT_NDLF_EVGN_TMPT_TREE, 1, 2, esmf_field
```

Finally just grab the right yaml files for ExtData.

To run you will of course need to do some further editing of the produced files and link in the acutal data using the same convention `gcm_run.j` does.
167 changes: 167 additions & 0 deletions Tests/generate_extdatadriver_input.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
#!/usr/bin/env python3
from yaml import load,dump
import argparse
import os
import yaml
import glob

dims_dict = {"2":"xy", "3":"xyz"}

def get_dims(component_map, name):
for comp in component_map:
if name in component_map[comp]:
dims = component_map[comp][name]["dims"]
return dims

def get_vars_needed(input_file):

output_list = []
f = open(input_file,"r")
lines = f.readlines()
f.close()
for line in lines:
temp = line.split()
output_list.append(temp[4])

return output_list

def get_extdata_map(input_dir):

input_files = glob.glob(input_dir+"/*.yaml")
export_list = {}
for input_file in input_files:
f = open(input_file,'r')
extdata_def = yaml.safe_load(f)
f.close()
for short_name in extdata_def["Exports"]:
export_list.update({short_name:extdata_def["Exports"][short_name]})
return export_list

def get_block(cvs_file):

temp = cvs_file[0].split(' ')
state_type = temp[1][1:].strip()
component = temp[4].strip()
i=2
for line in cvs_file[2:]:
if "spec for" in line:
break
i=i+1
return component,state_type,i


def get_component_map(cvs_file):

i_start = 0
i_end = 0
n_lines = len(cvs_file)
components = {}
while i_start < n_lines-1:

comp_name,state_type,i_end = get_block(cvs_file[i_start:])
comp_map = {}
for i in range(i_end-2):
line = cvs_file[i_start+2+i]
values = line.split(',')
short_name = values[1].strip()
long_name = values[2].strip()
units = values[3].strip()
dims = values[4].strip()
item_type = values[5].strip()
comp_map.update({short_name:{"long_name":long_name,"units":units,"item_type":item_type,"dims":dims}})
components.update({comp_name+"_"+state_type:comp_map})
i_start = i_start + i_end

return components

def parse_args():
p = argparse.ArgumentParser(description='Generarte input files for ExtDataDriver to simulate GEOS')
p.add_argument('extdata_provided',type=str,help='a list of items ExtData should fill',default=None)
p.add_argument('spec_def',type=str,help='the GEOS gcm import state from the printspec',default=None)
p.add_argument('extdata_dir',type=str,help='diretory with all the yaml imputs for extdata',default=None)
p.add_argument('-e','--export',action='store_true',help='also include exports for corresponding imports')

return vars(p.parse_args())

if __name__ == '__main__':

args = parse_args()

extdata_list = args['extdata_provided']
do_exports = args['export']
input_file = args['spec_def']
f = open(input_file,"r")
input_rc = f.readlines()
f.close()

extdata_directory = args['extdata_dir']
extdata_def = get_extdata_map(extdata_directory)

f_agcm = open("AGCM.rc",'w')
# component
component_map = {}
component_map = get_component_map(input_rc)

vars_needed = get_vars_needed(extdata_list)

nl = "\n"
cm = " , "

# Import state
written = []
f_agcm.write("IMPORT_STATE::"+nl)

for item in vars_needed:
if item in extdata_def:
long_name = "NA"
units = "NA"
dims = get_dims(component_map, item)
cdims = dims_dict[dims]

if item not in written:
f_agcm.write(item+cm+long_name+cm+units+cm+cdims+cm+"c"+nl)
written.append(item)

f_agcm.write("::"+nl)

# Export state
if do_exports:
written = []
f_agcm.write("EXPORT_STATE::"+nl)
for item in vars_needed:
if item in extdata_def:
long_name = "NA"
units = "NA"
dims = get_dims(component_map, item)
cdims = dims_dict[dims]

if item not in written:
f_agcm.write(item+cm+long_name+cm+units+cm+cdims+cm+"c"+nl)
written.append(item)

f_agcm.write("::"+nl)

f_hist = open("HISTORY.rc",'w')
f_hist.write("GRID_LABELS:"+nl)
f_hist.write("::"+nl)
f_hist.write("COLLECTIONS: my_collection"+nl)
f_hist.write("::"+nl)
f_hist.write("my_collection.template: 'nc4'"+nl)
f_hist.write("my_collection.format: 'CFIO'"+nl)
f_hist.write("my_collection.frequency: '240000'"+nl)
first = True
written = []
for item in vars_needed:
if item in extdata_def:
if item not in written:
if first:
first = False
f_hist.write("my_collection.fields:'"+item+"' , 'Root',"+"\n")
else:
f_hist.write("'"+item+"' , 'Root',"+"\n")
written.append(item)
f_hist.write("::")

f_hist.close()
f_agcm.close()

Loading
Loading