Skip to content

Commit

Permalink
Merge pull request #44 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Release v2.0.0
  • Loading branch information
patricia-nasa authored May 17, 2023
2 parents bc5c9a6 + 3c9b7ba commit c14bcbc
Show file tree
Hide file tree
Showing 491 changed files with 3,199 additions and 46,264 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/changelog-enforcer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Enforce Changelog"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
changelog:
runs-on: ubuntu-latest
steps:
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: 'CHANGELOG.md'
skipLabels: 'Skip Changelog,0 diff trivial,automatic,dependencies,github_actions'
missingUpdateErrorMessage: >
No update to CHANGELOG.md found! Please add a changelog
entry to it describing your change. Please note that the
keepachangelog (https://keepachangelog.com) format is
used. If your change is very trivial not applicable for a
changelog entry, add a 'Skip Changelog' label to the pull
request to skip the changelog enforcer.
31 changes: 31 additions & 0 deletions .github/workflows/validate_yaml_files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

# Based on code from https://github.com/marketplace/actions/yaml-lint

name: Yaml Lint

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

# This validation is equivalent to running on the command line:
# yamllint -d relaxed --no-warnings
# and is controlled by the .yamllint.yml file
jobs:
validate-YAML:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- id: yaml-lint
name: yaml-lint
uses: ibiqlik/action-yamllint@v3
with:
no_warnings: true
format: colored
config_file: .yamllint.yml

- uses: actions/upload-artifact@v3
if: always()
with:
name: yamllint-logfile
path: ${{ steps.yaml-lint.outputs.logfile }}
29 changes: 29 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---

extends: default

rules:
braces:
level: warning
max-spaces-inside: 1
brackets:
level: warning
max-spaces-inside: 1
colons:
level: warning
commas:
level: warning
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
level: warning
hyphens:
level: warning
indentation:
level: warning
indent-sequences: consistent
line-length:
level: warning
allow-non-breakable-inline-mappings: true
truthy: disable
26 changes: 24 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,29 @@

### Changed


## [v2.0.0] - 2023-05-17

### Added

- Added changelog enforcer

### Changed

- Updated to use latest components (matching GEOSgcm v10.25.0)
- Wholesale conversion to python3. Changes to all python scripts, and CMakelists with f2py compilation
- the components.yaml now imports the GMAOpyobs repository, which replaces the legacy GMAO_pyobs directory
- The GMAO_pyobs3 directory is no longer needed
- A new directory called GMAO_aeropyobs has been added to share. This includes python utilities that require MAPL or GFIO that were previously in GMAO_pyobs.
- There may still be issues related to byte-to-string conversions that require fixing, but will need to be fixed as they are encountered.
- Added GMAOpyobs v1.0.1 to components.yaml
- Updated MAPL to v2.39.9

## [v1.0.0] - 2022-06-17
Converted to mepo, cmake, and v3 giant files

### Changed

- Converted to mepo, cmake, and v3 giant files

### Added

Expand All @@ -18,12 +39,13 @@ Converted to mepo, cmake, and v3 giant files
- legacy MAPL_Base/Python/MAPL into latest MAPL on develop branch

### Fixed

- Moved src/GMAO_Shared to src/Shared/GMAO_Shared
- obs_aod codes now work with v3 giant files

## [0.99.0] - 2020-03-23

Intial GitHub release.
Initial GitHub release.

### Added
- Open source license
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_policy (SET CMP0054 NEW)

project (
AeroApps
VERSION 1.0
VERSION 2.0.0
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

if ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
Expand Down
13 changes: 9 additions & 4 deletions components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,28 @@ AeroApps:
env:
local: ./env@
remote: ../ESMA_env.git
tag: v3.2.2
tag: v4.8.0
develop: main

cmake:
local: ./cmake@
remote: ../ESMA_cmake.git
tag: v3.4.7
tag: v3.28.0
develop: develop

ecbuild:
local: ./cmake@/ecbuild@
remote: ../ecbuild.git
tag: geos/v1.0.6
tag: geos/v1.3.0

MAPL:
local: ./src/Shared/GMAO_Shared/MAPL@
remote: ../MAPL.git
tag: v2.6.9
tag: v2.39.0
develop: develop

GMAOpyobs:
local: ./src/Shared/GMAO_Shared/GMAO_pyobs@
remote: ../GMAOpyobs.git
tag: v1.0.1
develop: develop
12 changes: 6 additions & 6 deletions src/Applications/GAAS_App/aeronet_all.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Splits AERONET into synoptic chunks.
"""
Expand All @@ -17,7 +17,7 @@ def makethis_dir(path):
if path != '':
rc = os.system('mkdir -p '+path)
if rc:
raise IOError, "could not create directory "+path
raise IOError("could not create directory "+path)

if __name__ == "__main__":

Expand All @@ -28,16 +28,16 @@ def makethis_dir(path):
onehour = timedelta(seconds=60*60)

if len(sys.argv)<2:
print "Usage:"
print " aeronet4_all.py year1 [year2]"
print("Usage:")
print(" aeronet4_all.py year1 [year2]")
sys.exit(1)
else:
y1 = sys.argv[1]
if len(sys.argv)>2:
y2 = sys.argv[2]
else:
y2 = y1
Years = range(int(y1),int(y2)+1)
Years = list(range(int(y1),int(y2)+1))

# Loop over years
# ---------------
Expand All @@ -49,7 +49,7 @@ def makethis_dir(path):

today = tyme0 + (doy-1) * oneday

print 'Day: ', today
print('Day: ', today)

# Read AERONET for this day
# -------------------------
Expand Down
12 changes: 6 additions & 6 deletions src/Applications/GAAS_App/aod_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import os, sys

def aod_type(dataID, stdoutFLG=True):
Expand Down Expand Up @@ -115,19 +115,19 @@ def aod_filter(classlist_string, stdoutFLG=True):
scriptname = os.path.basename(sys.argv[0])

if len(sys.argv) < 2:
print("\nusage: {0} routineName input_parameters".format(scriptname))
print( " routineName options = {0}\n\n".format(routineList.keys()))
print(("\nusage: {0} routineName input_parameters".format(scriptname)))
print(( " routineName options = {0}\n\n".format(list(routineList.keys()))))
exit()

routineName = sys.argv[1]
if routineName not in routineList.keys():
if routineName not in list(routineList.keys()):
raise Exception("Error. Unknown routine name: {0}".format(routineName))
routine = routineList[routineName]

if len(sys.argv) < 3:
scriptname = os.path.basename(sys.argv[0])
print("\nusage: {0} {1} input_parameters".format(scriptname, routineName))
print(routineList[routineName].__doc__)
print(("\nusage: {0} {1} input_parameters".format(scriptname, routineName)))
print((routineList[routineName].__doc__))
exit()

routineList[routineName](*sys.argv[2:])
10 changes: 5 additions & 5 deletions src/Applications/GAAS_App/avhrr_all.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Splits AVHRR into synoptic chunks.
"""
Expand All @@ -14,16 +14,16 @@
onehour = timedelta(seconds=60*60)

if len(sys.argv)<2:
print "Usage:"
print " avhrr_all.py year1 [year2]"
print("Usage:")
print(" avhrr_all.py year1 [year2]")
sys.exit(1)
else:
y1 = sys.argv[1]
if len(sys.argv)>2:
y2 = sys.argv[2]
else:
y2 = y1
Years = range(int(y1),int(y2)+1)
Years = list(range(int(y1),int(y2)+1))

# Loop over years
# ---------------
Expand All @@ -42,5 +42,5 @@

cmd = 'python avhrr_l2a.py -v asc %d %d'%(nymd,nhms)

print cmd
print(cmd)
os.system(cmd)
6 changes: 3 additions & 3 deletions src/Applications/GAAS_App/avhrr_l2a.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -W ignore::DeprecationWarning

"""
Expand Down Expand Up @@ -54,10 +54,10 @@
i = 0
for orbit in cf('AVHRR_L2A_ORBITS').split(','):
cmd = "patmosx_l2a.py %s %s %s %s"%(Options,orbit,nymd,nhms)
print cmd
print(cmd)
if not options.dryrun:
if system(cmd):
raise ValueError, "patmosx_l2a.py failed for %s on %s %s"%(orbit,nymd,nhms)
raise ValueError("patmosx_l2a.py failed for %s on %s %s"%(orbit,nymd,nhms))

i += 1

Expand Down
6 changes: 3 additions & 3 deletions src/Applications/GAAS_App/avhrr_nnr.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _getInputs(self):
for inputName in self.net.InputNames:

if self.verbose>0:
print 'Getting NN input ',inputName
print('Getting NN input ',inputName)

# Retrieve input
# --------------
Expand Down Expand Up @@ -114,15 +114,15 @@ def apply(self,nnFile='/nobackup/NNR/Net/nnr_001b.avhrr_Tau.net'):
return # no good data to work with

if len(self.net.TargetNames)>1:
raise ValueError, 'Strange, more than one predictor'
raise ValueError('Strange, more than one predictor')

# Evaluate NN on inputs
# ---------------------
targets = self.net(self._getInputs())

name = self.net.TargetNames[0]
if self.verbose>0:
print "Evaluating NNR for <%s> with Log-AOD = "%name, self.net.laod
print("Evaluating NNR for <%s> with Log-AOD = "%name, self.net.laod)

# Output is always AOD
# --------------------
Expand Down
Loading

0 comments on commit c14bcbc

Please sign in to comment.