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

Merge CAM ew-develop into ew-main for EarthWorks v2.4 Release #36

Merged
merged 840 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
840 commits
Select commit Hold shift + click to select a range
4f7adf3
update submodule directories
brian-eaton Jul 12, 2024
e9e7304
Merge branch 'rm-mct' of https://github.com/brian-eaton/CAM into rm-mct
brian-eaton Jul 12, 2024
5c748de
start ChangeLog entry
brian-eaton Jul 12, 2024
c6e636c
additional review comments addressed
cacraigucar Jul 15, 2024
50fe0dc
Add comment for clubb_intr
cacraigucar Jul 15, 2024
42aad5e
update ChangeLog
brian-eaton Jul 15, 2024
ed64016
update ChangeLog
brian-eaton Jul 15, 2024
0e00ef5
update to cam6_4_009
brian-eaton Jul 15, 2024
6625e4d
update externals
cacraigucar Jul 16, 2024
d141d8f
addressed CS and CS1 variables and outputs
JulioTBacmeister Jul 16, 2024
7a3886e
Change index variables to be integers
cacraigucar Jul 16, 2024
4b879d0
Use CAM4 BAM dust sizes; pass in aero_props from aero_model; misc cle…
fvitt Jul 18, 2024
5158909
Final ChangeLog for cam6_4_010
cacraigucar Jul 18, 2024
7f30c82
Merge pull request #1057 from JulioTBacmeister/gw_movmtn_devel
cacraigucar Jul 18, 2024
da47c9c
Change CAM7 runs to use CLM60
cacraigucar Jul 18, 2024
12fca51
Merge tag 'cam6_4_010' into rm-mct
cacraigucar Jul 18, 2024
e988f4f
Wrap MPAS longitude values to [0,2pi) range
gdicker1 Jul 17, 2024
7edc1db
Add initial ChangeLog after making PR
gdicker1 Jul 18, 2024
8c94dae
Add FHIST_BDRD test to prealpha
cacraigucar Jul 18, 2024
eee17cd
Revert back testlist
cacraigucar Jul 18, 2024
fbca9ea
improve checks on number and mass fluxes to avoid divide by zero
fvitt Jul 18, 2024
f5806ea
ChangeLog for cam6_4_011
cacraigucar Jul 18, 2024
e8bb669
add src/atmos_phys
jtruesdal Jul 19, 2024
ba79b2d
update to cam6_4_010
jtruesdal Jul 19, 2024
fb7f4b6
Merge pull request #1089 from brian-eaton/rm-mct
cacraigucar Jul 19, 2024
6bd2913
Merge remote-tracking branch 'ESCOMP/cam_development' into climchem
fvitt Jul 19, 2024
fddd312
use CLM60 in the new FCts4MTHIST compset
fvitt Jul 19, 2024
0c65f23
ChangeLog draft
fvitt Jul 19, 2024
f3dfa51
Remove unused nCells from cam_mpas_read_static
gdicker1 Jul 19, 2024
a897759
ChangeLog update
fvitt Jul 20, 2024
662a6f0
Merge pull request #1074 from fvitt/climchem
fvitt Jul 20, 2024
1cf52c3
Merge remote-tracking branch 'ESCOMP/cam_development' into aerosol_co…
fvitt Jul 20, 2024
32333a2
ChangeLog draft
fvitt Jul 20, 2024
ebe9e8f
ChangeLog update
fvitt Jul 21, 2024
094aa35
Merge pull request #1085 from fvitt/aerosol_convproc_fixes
fvitt Jul 21, 2024
31f5918
Merge remote-tracking branch 'ESCOMP/cam_development' into waccmx_nuopc
fvitt Jul 21, 2024
6cdccab
update to cam6_4_013
brian-eaton Jul 22, 2024
c8ab8c8
ChangeLog draft
fvitt Jul 22, 2024
28e55c3
ChangeLog update
fvitt Jul 22, 2024
87f3b5d
Merge pull request #1069 from fvitt/waccmx_nuopc
fvitt Jul 22, 2024
098c4e4
update to cam6_4_014
brian-eaton Jul 23, 2024
de6fff9
revert #1043; update ChangeLog
brian-eaton Jul 23, 2024
9f5bd87
update ChangeLog
brian-eaton Jul 23, 2024
fe60b8d
Merge pull request #1072 from brian-eaton/misc02
brian-eaton Jul 23, 2024
7a83d6b
dz fix in convproc
fvitt Jul 23, 2024
c230fa9
mods to RRTMGP for MT configs
brian-eaton Jul 24, 2024
622f957
update HEMCO in .gitmodules; start ChangeLog entry
brian-eaton Jul 24, 2024
0322253
Merge remote-tracking branch 'origin/soil_erod_switch' into dust_emis…
fvitt Jul 24, 2024
353e372
update ChangeLog
brian-eaton Jul 24, 2024
92b6bac
use Erik's CTSM branch
fvitt Jul 24, 2024
288f3ed
Add kind to number literal in lonCell_arr adjustment
gdicker1 Jul 24, 2024
bfb1886
use shr_dust_emis_mod inquiry functions
fvitt Jul 25, 2024
e8e7b08
update ChangeLog
brian-eaton Jul 25, 2024
3e9a281
Merge pull request #1100 from brian-eaton/rrtmgp-mt
brian-eaton Jul 25, 2024
376de0e
update git-fleximod to 8.4 and add fleximod-test workflow
Jul 25, 2024
995899c
fix cice url in .gitmodules
Jul 25, 2024
31e33fe
remove variable initialization, not necessary for bfb
jtruesdal Jul 25, 2024
91de96c
Merge remote-tracking branch 'ESCOMP/cam_development' into dadadj_ccpp
jtruesdal Jul 25, 2024
b0b79b2
update gitmodules for new atmospheric_physics tag
jtruesdal Jul 25, 2024
9cb0551
add checking for consistent settings; old atm/zender method b4b
fvitt Jul 25, 2024
f7b9e5d
define and set default namelist variables
fvitt Jul 25, 2024
b01294f
fix issue with aqua-planet
fvitt Jul 26, 2024
fabe37a
Move lonCell wrap code to dyn_grid.F90 from cam_mpas_subdriver.F90
gdicker1 Jul 26, 2024
b608af1
Rename cam_dev to cam7 for files added in this branch
gdicker1 Jul 23, 2024
7faef52
implement AOA1MF age-of-air tracer
fvitt Jul 26, 2024
005e7f4
Replace .ge. with >= in lonCell loop condition
gdicker1 Jul 26, 2024
1325911
Update comment on lonCell wrap code
gdicker1 Jul 26, 2024
55db0bb
Addressing first review comments
Katetc Jul 29, 2024
2ea3531
fix #1087 and #1103
brian-eaton Jul 29, 2024
afde46e
A few more review comments
Katetc Jul 29, 2024
b4df86b
Bug fixes
Katetc Jul 29, 2024
5a33200
update ChangeLog
brian-eaton Jul 30, 2024
d723056
Merge pull request #1112 from brian-eaton/misc03
brian-eaton Jul 30, 2024
7f08bd3
Merge remote-tracking branch 'ESCOMP/cam_development' into fleximod-test
Jul 30, 2024
29e2430
Merge pull request #12 from cacraigucar/cam_derecho_test
Katetc Jul 30, 2024
a251e59
Update ChangeLog template to include nvhpc tests on Derecho
Katetc Jul 30, 2024
0d85504
add changelog
Jul 31, 2024
0921f39
Merge pull request #1107 from peverwhee/fleximod-test
peverwhee Jul 31, 2024
b52730b
Bug fix for runs where CLUBB_SGS is not defined
Katetc Jul 31, 2024
efcd22b
Merge up to cam6_4_018
Katetc Jul 31, 2024
e0beb4e
remove ndep stream from aquaplanet and simple model runs
brian-eaton Aug 1, 2024
89b4f10
correct tendency calc
fvitt Aug 5, 2024
393d516
update to cam6_4_018
brian-eaton Aug 5, 2024
37fae81
use new ctsm tag
fvitt Aug 5, 2024
a972f69
merge up to cam6_4_018
jtruesdal Aug 5, 2024
2ae76b0
cycle forcings over appropriate year
fvitt Aug 5, 2024
dcc636d
PR updates: comments,typo, and replace hard coded length with shr_kin…
jtruesdal Aug 6, 2024
73d5ded
remove drydep_srf_file for aquap runs on unstructured grids
brian-eaton Aug 6, 2024
282501c
Merge remote-tracking branch 'ESCOMP/cam_development' into aerosol_de…
fvitt Aug 7, 2024
bbfc576
tweak a comment
fvitt Aug 8, 2024
2abc5a0
Update to new new new CLUBB external (_gpufix_PosInf) and new CDEPS
Katetc Aug 9, 2024
8e05c34
Update to newest CDEPS tag cdeps1.0.45
Katetc Aug 9, 2024
86ba7de
Update ChangeLog with Derecho test results before machine goes down
Katetc Aug 9, 2024
e393c66
use Leung_2023 for cam7 phys
fvitt Aug 12, 2024
ed684d2
Final updates
Katetc Aug 12, 2024
eb27509
Merge pull request #1086 from Katetc/katetc/new_clubb_061424
Katetc Aug 12, 2024
84be7fd
Merge remote-tracking branch 'ESCOMP/cam_development' into aeroconv_dz
fvitt Aug 13, 2024
14efd5b
Merge remote-tracking branch 'origin/waccm_forcings' into aeroconv_dz
fvitt Aug 13, 2024
44952cc
Add compiler name to derecho baseline directories
cacraigucar Aug 13, 2024
18aa3ef
Merge remote-tracking branch 'cacraigucar/fix_archive_baselines' into…
fvitt Aug 13, 2024
f675c40
ChangeLog draft
fvitt Aug 13, 2024
d434571
ChangeLog update
fvitt Aug 14, 2024
e23526f
Merge pull request #1111 from fvitt/aeroconv_dz
fvitt Aug 14, 2024
f5c1ab0
Remove 0.5*timestep logic from call to zm
cacraigucar Aug 14, 2024
0b68f22
Merge dadadj_ccpp up to cam6_4_020
jtruesdal Aug 15, 2024
06378c3
fix nans in psl
brian-eaton Aug 15, 2024
a396571
Add mpasa120_32L ncdata for analytic-ic with cam6 and cam7 physics
gdicker1 Aug 15, 2024
82fbdd0
Replace mpas L32 analytic IC files with v8 files
gdicker1 Aug 15, 2024
6a75648
Add mpasa 58L and 93L files for analytic ICs
gdicker1 Aug 15, 2024
c823836
Add real-data files {mpasa480,mpasa120} x {58L,93L}
gdicker1 Aug 15, 2024
c45fd68
Update ChangeLog after adding L58 and L93 files
gdicker1 Aug 15, 2024
03b3a18
Ensure v8 mpasa ncdata matches with correct bnd_topo
gdicker1 Aug 15, 2024
df17112
Actual changes for last commit...
gdicker1 Aug 15, 2024
0a09ac0
Update atmos_phys tag
cacraigucar Aug 15, 2024
4cb6a52
Merge tag 'cam6_4_020' into zm_cleanup3a
cacraigucar Aug 15, 2024
e0efbee
update ChangeLog
brian-eaton Aug 16, 2024
cdf7228
Update atmos_phys tag
cacraigucar Aug 16, 2024
d36b4ed
update ChangeLog and add back # to first line of test_driver.sh
jtruesdal Aug 17, 2024
cf34bea
fix date of ChangeLog entry
jtruesdal Aug 17, 2024
782f134
Merge pull request #1026 from jtruesdal/dadadj_ccpp
jtruesdal Aug 17, 2024
a916ae6
Merge tag 'cam6_4_021' into zm_cleanup3a
cacraigucar Aug 19, 2024
e381582
Remove project checks from issue-closing script.
nusbaume Aug 19, 2024
2b900af
Fix comment to remove CAMDEN reference.
nusbaume Aug 19, 2024
a08e8c4
Merge pull request #1130 from nusbaume/issue_close_fix
nusbaume Aug 19, 2024
939a92d
Remove mpasa120_L32_topo ncdata for analytic_ic
gdicker1 Aug 19, 2024
9afb3cd
Default L32,L58,L93 mpasa real-data cases to new files
gdicker1 Aug 19, 2024
24012df
Update ChangeLog after replacing bnd_topo and L32 ncdata
gdicker1 Aug 19, 2024
a642e33
Remove dt from call to ZM convtran
cacraigucar Aug 19, 2024
3335f4b
ChangeLog for cam6_4_022
cacraigucar Aug 19, 2024
fc29092
Merge pull request #1127 from cacraigucar/zm_cleanup3a
cacraigucar Aug 20, 2024
e004f55
Merge scam_dev_exp up to cam6_4_022
jtruesdal Aug 20, 2024
cb72d70
fix issue #1108, merge PR#1101
brian-eaton Aug 20, 2024
d4cb5e8
Merge tag cam6_3_160 from ESCOMP/CAM into 'ew-develop' (PR #28)
gdicker1 Aug 20, 2024
55bfe02
Merge tag cam6_3_161 from ESCOMP/CAM into 'ew-develop'
gdicker1 Aug 20, 2024
c01d641
Merge tag cam6_3_162 from ESCOMP/CAM into 'ew-develop'
gdicker1 Aug 20, 2024
d1e19d4
Keep v7.3 MPAS-A for EarthWorks
gdicker1 Aug 20, 2024
c5884d9
replace RuntimeError exception by log message in buildnml
brian-eaton Aug 21, 2024
e6a215e
update ChangeLog
brian-eaton Aug 21, 2024
04ceba6
remove smaw and turbtype from pbuf
brian-eaton Aug 22, 2024
712dead
Use Erik's CTSM hash; fix issues in build-namelist
fvitt Aug 22, 2024
54a0ba9
update cice and cdeps for regression failures,Changelog for PR,scam t…
jtruesdal Aug 22, 2024
a125750
fix logic in SE interpolate_vector routines
brian-eaton Aug 23, 2024
b88c67e
need scam_mandatory to set COLDSTART until CLM scam mods tagged
jtruesdal Aug 23, 2024
ba285ec
fix issue in build-namelist
fvitt Aug 23, 2024
282fcfc
remove cam3 from configure and namelist settings
brian-eaton Aug 23, 2024
e6d302c
fix bug in emis scaling when Leung is used
fvitt Aug 23, 2024
40f6c5c
update mpace regression test and ChangeLog
jtruesdal Aug 25, 2024
c50362c
update ChangeLog, pull hvcoord addition
jtruesdal Aug 26, 2024
6e32d03
Merge pull request #958 from jtruesdal/scam_dev_exp
jtruesdal Aug 26, 2024
eab5ffc
remove cam3 references from src code
brian-eaton Aug 26, 2024
d3df08c
update to cam6_4_023
brian-eaton Aug 26, 2024
1cec1c5
update ChangeLog
brian-eaton Aug 27, 2024
972d0f8
Merge tag 'cam6_4_016' from ESCOMP/CAM into 'ew-develop'
gdicker1 Aug 27, 2024
a79d38f
Switch MPAS submodule to EarthWorksOrg non-OpenACC version
gdicker1 Aug 27, 2024
ccd5ff8
remove cam3 refs from src; remove fcrit2 from namelist
brian-eaton Aug 27, 2024
f7153a6
update ChangeLog
brian-eaton Aug 28, 2024
265425a
Merge pull request #1120 from brian-eaton/ndep-ddep
brian-eaton Aug 28, 2024
1c8c132
update ChangeLog
brian-eaton Aug 28, 2024
fa39af0
merge to cam6_4_024
brian-eaton Aug 28, 2024
536e7cb
add error checking and comments
fvitt Aug 28, 2024
eb03efe
Merge remote-tracking branch 'ESCOMP/cam_development' into aerosol_de…
fvitt Aug 28, 2024
e7f1ea1
ChangeLog draft
fvitt Aug 28, 2024
c9d17f1
ChangeLog update
fvitt Aug 28, 2024
7a63a3c
Neglected to remove the 0.5*timestep call from zm_convr_run - done now
cacraigucar Aug 28, 2024
1fad549
ChangeLog update
fvitt Aug 28, 2024
2f8ec4d
Merge pull request #1096 from fvitt/aerosol_deposition_fluxes
fvitt Aug 28, 2024
6020b86
Merge tag 'cam6_4_025' into zm_cleanup3a
cacraigucar Aug 28, 2024
eb6518a
Default Zender for all configs; use tag ctsm5.2.027
fvitt Aug 29, 2024
62b248c
Merge remote-tracking branch 'ESCOMP/cam_development' into dust_emiss…
fvitt Aug 29, 2024
95c159b
regression test Leung dust emis scheme
fvitt Aug 29, 2024
caa1bd3
correct typo in testlist_cam
fvitt Aug 29, 2024
3fcced6
Add ChangeLog for cam6_4_026
cacraigucar Aug 29, 2024
7decb60
Merge pull request #1137 from cacraigucar/zm_cleanup3a
cacraigucar Aug 29, 2024
ccc4d3d
remove old AOA tracers
fvitt Aug 29, 2024
fb7f2ac
Merge remote-tracking branch 'ESCOMP/cam_development' into age_of_air
fvitt Aug 29, 2024
cb36898
include a regression test for cam7 phys with age of air tracers
fvitt Aug 29, 2024
f9f5ccd
Merge branch 'update/cesm3_0_beta01/cam6_3_162' into ew-develop (PR #29)
gdicker1 Aug 29, 2024
baec6e4
improve years calc
fvitt Aug 30, 2024
d45ac20
Merge branch 'age_of_air' of github.com:fvitt/CAM into age_of_air
fvitt Aug 30, 2024
aab7bc0
update ctsm tag to ctsm5.2.027
fvitt Aug 30, 2024
67a0042
Merge branch 'update/cesm3_0_beta02/cam6_4_016' into 'ew-develop' (PR…
gdicker1 Aug 30, 2024
0f09026
fix initialization of vert
fvitt Aug 30, 2024
2914c55
Merge tag cam6_4_019 from ESCOMP/CAM into 'ew-develop'
gdicker1 Aug 30, 2024
c87b956
ChangeLog draft
fvitt Aug 30, 2024
734501a
ChangeLog update
fvitt Sep 2, 2024
defecea
ChangeLog update
fvitt Sep 3, 2024
29f2795
Merge pull request #1140 from fvitt/ctsm_update
fvitt Sep 3, 2024
01c9a7a
Merge remote-tracking branch 'ESCOMP/cam_development' into dust_emiss…
fvitt Sep 3, 2024
6836220
remove obsolete AOA1 and AOA2 history fields from use cases
fvitt Sep 3, 2024
28e02f1
Increase time for HEMCO test
fvitt Sep 3, 2024
1ea1baa
Remove soil_erod setting when Leung is used in buld dust; ChangeLog d…
fvitt Sep 3, 2024
556f4f2
remove zero cflx settings
fvitt Sep 3, 2024
a950fae
change megan setting appease the atm lnd drv_flds_in compare
fvitt Sep 3, 2024
c424825
Override LND_SETS_DUST_EMIS_DRV_FLDS only for cam7/clm6
fvitt Sep 4, 2024
a14ab88
Add a usermod namelist for performance CLUBB options
gdicker1 Sep 4, 2024
e7627ac
update ChangeLog
fvitt Sep 4, 2024
d125217
Merge pull request #1104 from fvitt/dust_emissions
fvitt Sep 4, 2024
7974fb6
Merge remote-tracking branch 'ESCOMP/cam_development' into age_of_air
fvitt Sep 4, 2024
536f4f9
Remove fleximod_test.yaml GitHub workflow from EarthWorksOrg/CAM
gdicker1 Sep 5, 2024
ddee772
Merge branch 'update/post_beta02/cam6_4_019' into 'ew-develop' (PR #31)
gdicker1 Sep 5, 2024
bb461b4
ChangeLog draft
fvitt Sep 5, 2024
0551e65
Increase wall clock time for AOA test
fvitt Sep 5, 2024
b294063
Update UBC file for FLTHIST compset
fvitt Sep 5, 2024
cef4761
remove debug write statement
fvitt Sep 5, 2024
e4adee0
ChangeLog update
fvitt Sep 5, 2024
536a7b8
merge to head of cam_development
peverwhee Sep 5, 2024
9208a6e
bring submodules up to date
peverwhee Sep 5, 2024
773a6f6
New mpasa120_L70 ncdata for waccm, remove now unused mpas120 bnd_topo
gdicker1 Sep 5, 2024
1fcdd78
Update ChangeLog after replacing waccm ncdata
gdicker1 Sep 5, 2024
0e2ae4a
ChangeLog update
fvitt Sep 6, 2024
665aae9
Merge pull request #1110 from fvitt/age_of_air
fvitt Sep 6, 2024
36fefbd
Merge tag 'cam6_4_029' into psl
cacraigucar Sep 6, 2024
688faa5
ChangeLog for cam6_4_030
cacraigucar Sep 6, 2024
06d91f7
Merge pull request #1128 from brian-eaton/psl
cacraigucar Sep 6, 2024
85df2b1
Make changes found during code review.
nusbaume Sep 8, 2024
4291cb0
Merge remote-tracking branch 'upstream/cam_development' into misc05
nusbaume Sep 8, 2024
a4608fd
Fix typo.
nusbaume Sep 9, 2024
1f213cc
Finalize ChangeLog.
nusbaume Sep 9, 2024
9f0cb73
Merge pull request #1131 from brian-eaton/misc05
nusbaume Sep 9, 2024
ae3a2b8
merge to head of cam_development; initial changelog
peverwhee Sep 9, 2024
4396829
Updated detailed timers to recent CAM tag.
johnmauff Sep 10, 2024
6b00a9e
final changelog
peverwhee Sep 10, 2024
98c35fc
Merge pull request #1084 from brian-eaton/cosp-cwat2
peverwhee Sep 10, 2024
c097775
Missing use statement.
johnmauff Sep 10, 2024
87a4b80
Merge branch 'gdicker1/mpas_loncell_wrapto2pi' into add_v8mpasfiles (…
gdicker1 Sep 10, 2024
a0db53f
Merge tag 'cam6_4_030' into add_v8mpasfiles
gdicker1 Sep 11, 2024
8306f7f
Merge tag 'cam6_4_032' into add_v8mpasfiles
gdicker1 Sep 11, 2024
b36ac16
Use the correct name for the mpasa480 notopo file
gdicker1 Sep 12, 2024
d559861
Merge branch 'ew-develop-timersB' into ew-develop (PR #32)
gdicker1 Sep 13, 2024
e00a073
Use the correct name for the mpasa480 notopo file
gdicker1 Sep 12, 2024
33b9e69
Merge tag 'cam-ew2.3.005' into add_v8mpasfiles_eworg2
gdicker1 Sep 13, 2024
2bce233
Add EarthWorks-specific files
gdicker1 Sep 11, 2024
9102a27
Correct some EW-specific filenames
gdicker1 Sep 13, 2024
123d0fc
Remove mpasa30 L58 and L93 ncdata files
gdicker1 Sep 13, 2024
3c63318
Update ChangeLog with Derecho and Izumi tests
gdicker1 Sep 13, 2024
fa94177
Merge pull request #1029 from gdicker1/add_v8mpasfiles
gdicker1 Sep 13, 2024
440e40d
Add back mpasa30 L58,L93 notopo as EarthWorks specific
gdicker1 Sep 13, 2024
1409359
Add missing use statement for perf_mod in cam7/micro_pumas.F90
gdicker1 Sep 15, 2024
6344fe3
Merge remote-tracking branch 'gdicker1/add_v8mpasfiles_eworg2' into e…
gdicker1 Sep 20, 2024
5d0a989
Incorporate fixes to MPAS-A to get correct CPU results
gdicker1 Oct 4, 2024
28ea31b
Merge tag cam6_4_033 from ESCOMP/CAM into 'ew-develop'
gdicker1 Oct 14, 2024
64bdf16
Merge branch 'update/cesm3_0_beta03/cam6_4_033' into 'ew-develop' (PR…
gdicker1 Oct 15, 2024
f4e84e7
WIP add routines to try to ensure data consistency
gdicker1 Oct 16, 2024
2d63c74
WIP Update mpasa submodule to a (hopefully) fixed OpenACC version
gdicker1 Oct 25, 2024
3e36b32
Merge tag 'cam-ew2.3.007' into 'fix/mpasa-oacc_ansdiffs'
gdicker1 Nov 8, 2024
9c9c370
Use merged tag for mpas PR to fix GPU simple physics compsets
gdicker1 Nov 11, 2024
f2ff5c1
Merge branch 'update/cesm3_0_beta03/cam6_4_033' into 'ew-develop' (PR…
gdicker1 Oct 15, 2024
478fa2a
Merge branch 'gdicker1/fix/mpasa-oacc_ansdiffs' into 'ew-develop' (PR…
gdicker1 Nov 11, 2024
71e4528
Update to use a merged EW v2.4 release tag for MPAS-A
gdicker1 Dec 2, 2024
acba0fc
Merge branch 'ew-develop' into 'ew-main' for v2.4 release (PR#36)
gdicker1 Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
254 changes: 31 additions & 223 deletions .github/scripts/branch_pr_issue_closer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

import re
import sys
import subprocess
import shlex
import argparse

from github import Github
Expand All @@ -31,42 +29,6 @@
#HELPER FUNCTIONS
#################

#+++++++++++++++++++++++++++++++++++++++++
#Curl command needed to move project cards
#+++++++++++++++++++++++++++++++++++++++++

def project_card_move(oa_token, column_id, card_id):

"""
Currently pyGithub doesn't contain the methods required
to move project cards from one column to another, so
the unix curl command must be called directly, which is
what this function does.

The specific command-line call made is:

curl -H "Authorization: token OA_token" -H \
"Accept: application/vnd.github.inertia-preview+json" \
-X POST -d '{"position":"top", "column_id":<column_id>}' \
https://api.github.com/projects/columns/cards/<card_id>/moves

"""

#create required argument strings from inputs:
github_oa_header = ''' "Authorization: token {0}" '''.format(oa_token)
github_url_str = '''https://api.github.com/projects/columns/cards/{0}/moves'''.format(card_id)
json_post_inputs = ''' '{{"position":"top", "column_id":{}}}' '''.format(column_id)

#Create curl command line string:
curl_cmdline = '''curl -H '''+github_oa_header+''' -H "Accept: application/vnd.github.inertia-preview+json" -X POST -d '''+\
json_post_inputs+''' '''+github_url_str

#Split command line string into argument list:
curl_arg_list = shlex.split(curl_cmdline)

#Run command using subprocess:
subprocess.run(curl_arg_list, check=True)

#++++++++++++++++++++++++++++++
#Input Argument parser function
#++++++++++++++++++++++++++++++
Expand Down Expand Up @@ -101,7 +63,7 @@ def end_script(msg):
"""
Prints message to screen, and then exits script.
"""
print("\n{}\n".format(msg))
print(f"\n{msg}\n")
print("Issue closing check has completed successfully.")
sys.exit(0)

Expand Down Expand Up @@ -137,11 +99,10 @@ def _main_prog():

ghub = Github(token)

#++++++++++++++++++++
#+++++++++++++++++++++
#Open ESCOMP/CAM repo
#++++++++++++++++++++
#+++++++++++++++++++++

#Official CAM repo:
cam_repo = ghub.get_repo("ESCOMP/CAM")

#+++++++++++++++++++++++++++++
Expand All @@ -162,6 +123,9 @@ def _main_prog():
#Search for merge text, starting at beginning of message:
commit_msg_match = pr_merge_pattern.match(commit_message)

#Initialize variables:
pr_num = 0

#Check if match exists:
if commit_msg_match is not None:
#If it does then pull out text immediately after message:
Expand All @@ -174,7 +138,7 @@ def _main_prog():
first_word = post_msg_word_list[0]

#Print merged pr number to screen:
print("Merged PR: {}".format(first_word))
print(f"Merged PR: {first_word}")

try:
#Try assuming the word is just a number:
Expand Down Expand Up @@ -251,27 +215,28 @@ def _main_prog():
pr_msg_lower = merged_pull.body.lower()

#search for at least one keyword:
word_matches = []
if keyword_pattern.search(pr_msg_lower) is not None:
#If at least one keyword is found, then determine location of every keyword instance:
word_matches = keyword_pattern.finditer(pr_msg_lower)
else:
endmsg = "Pull request was merged without using any of the keywords. Thus there are no issues to close."
end_script(endmsg)

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Extract issue and PR numbers associated with found keywords in merged PR message
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Extract issue and PR numbers associated with found keywords in merged PR message
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#create issue pattern ("the number symbol {#} + a number"),
#which ends with either a space, a comma, a period, or
#the end of the string itself:
issue_pattern = re.compile(r'#[0-9]+(\s|,|$)|.')

#Create new "close" issues list:
close_issues = list()
close_issues = []

#Create new "closed" PR list:
close_pulls = list()
close_pulls = []

#Search text right after keywords for possible issue numbers:
for match in word_matches:
Expand Down Expand Up @@ -299,13 +264,13 @@ def _main_prog():
#so set the issue number to one that will never be found:
issue_num = -9999

#Check that number is actually for an issue (as opposed to a PR):
if issue_num in open_issues:
#Add issue number to "close issues" list:
close_issues.append(issue_num)
elif issue_num in open_pulls:
#If in fact a PR, then add to PR list:
#Check if number is actually for a PR (as opposed to an issue):
if issue_num in open_pulls:
#Add PR number to "close pulls" list:
close_pulls.append(issue_num)
elif issue_num in open_issues:
#If in fact an issue, then add to "close issues" list:
close_issues.append(issue_num)

#If no issue numbers are present after any of the keywords, then exit script:
if not close_issues and not close_pulls:
Expand All @@ -322,183 +287,26 @@ def _main_prog():
print("PRs referenced by the merged PR: "+", ".join(\
str(pull) for pull in close_pulls))

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Determine name of project associated with merged Pull Request
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#Pull-out all projects from repo:
projects = cam_repo.get_projects()

#Initalize modified project name:
proj_mod_name = None

#Loop over all repo projects:
for project in projects:
#Pull-out columns from each project:
proj_columns = project.get_columns()

#Loop over columns:
for column in proj_columns:

#check if column name is "Completed Tags"
if column.name == "Completed tags":
#If so, then extract cards:
cards = column.get_cards()

#Loop over cards:
for card in cards:
#Extract card content:
card_content = card.get_content()

#Next, check if card number exists and matches merged PR number:
if card_content is not None and card_content.number == pr_num:
#If so, and if Project name is None, then set string:
if proj_mod_name is None:
proj_mod_name = project.name
#Break out of card loop:
break

#If already set, then somehow merged PR is in two different projects,
#which is not what this script is expecting, so just exit:
endmsg = "Merged Pull Request found in two different projects, so script will do nothing."
end_script(endmsg)

#Print project name associated with merged PR:
print("merged PR project name: {}".format(proj_mod_name))

#++++++++++++++++++++++++++++++++++++++++
#Extract repo project "To do" card issues
#++++++++++++++++++++++++++++++++++++++++

#Initalize issue counting dictionary:
proj_issues_count = dict()

#Initalize issue id to project card id dictionary:
proj_issue_card_ids = dict()

#Initialize list for issues that have already been closed:
already_closed_issues = list()

#Loop over all repo projects:
for project in projects:

#Next, pull-out columns from each project:
proj_columns = project.get_columns()

#Loop over columns:
for column in proj_columns:
#Check if column name is "To do"
if column.name == "To do":
#If so, then extract cards:
cards = column.get_cards()

#Loop over cards:
for card in cards:
#Extract card content:
card_content = card.get_content()

#Next, check if card issue number matches any of the "close" issue numbers from the PR:
if card_content is not None and card_content.number in close_issues:

#If so, then check if issue number is already in proj_issues_count:
if card_content.number in proj_issues_count:
#Add one to project issue counter:
proj_issues_count[card_content.number] += 1

#Also add issue id and card id to id dictionary used for card move, if in relevant project:
if project.name == proj_mod_name:
proj_issue_card_ids[card_content.number] = card.id

else:
#If not, then append to project issues count dictionary:
proj_issues_count[card_content.number] = 1

#Also add issue id and card id to id dictionary used for card move, if in relevant project:
if project.name == proj_mod_name:
proj_issue_card_ids[card_content.number] = card.id

#Otherwise, check if column name matches "closed issues" column:
elif column.name == "closed issues" and project.name == proj_mod_name:
#Save column id:
column_target_id = column.id

#Extract cards:
closed_cards = column.get_cards()

#Loop over cards:
for closed_card in closed_cards:
#Extract card content:
closed_card_content = closed_card.get_content()

#Check if card issue number matches any of the "close" issue numbers from the PR:
if closed_card_content is not None and closed_card_content.number in close_issues:
#If issue number matches, then it likely means the same
#commit message or issue number reference was used in multiple
#pushes to the same repo (e.g., for a PR and then a tag). Thus
#the issue should be marked as "already closed":
already_closed_issues.append(closed_card_content.number)

#Remove all issues from issue dictionary that are "already closed":
for already_closed_issue_num in already_closed_issues:
if already_closed_issue_num in proj_issues_count:
proj_issues_count.pop(already_closed_issue_num)

#If no project cards are found that match the issue, then exit script:
if not proj_issues_count:
endmsg = "No project cards match the issue being closed, so the script will do nothing."
end_script(endmsg)
#++++++++++++++++++++++++++++++++++++++++++++++
#Attempt to close all referenced issues and PRs
#++++++++++++++++++++++++++++++++++++++++++++++

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Check if the number of "To-do" project cards matches the total number
#of merged PRs for each 'close' issue.
#
#Then, close all issues for which project cards equals merged PRs
#
#If not, then simply move the project card to the relevant project's
#"closed issues" column.
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#Loop over project issues and counts that have been "closed" by merged PR:
for issue_num, issue_count in proj_issues_count.items():

#If issue count is just one, then close issue:
if issue_count == 1:
#Extract github issue object:
cam_issue = cam_repo.get_issue(number=issue_num)
#Close issue:
cam_issue.edit(state='closed')
print("Issue #{} has been closed.".format(issue_num))
else:
#Extract card id from id dictionary:
if issue_num in proj_issue_card_ids:
card_id = proj_issue_card_ids[issue_num]
else:
#If issue isn't in dictionary, then it means the issue
#number was never found in the "To do" column, which
#likely means the user either referenced the wrong
#issue number, or the issue was never assigned to the
#project. Warn user and then exit with a non-zero
#error so that the Action fails:
endmsg = 'Issue #{} was not found in the "To Do" Column of the "{}" project.\n' \
'Either the wrong issue number was referenced, or the issue was never ' \
'attached to the project.'.format(issue_num, proj_mod_name)
print(endmsg)
sys.exit(1)

#Then move the card on the relevant project page to the "closed issues" column:
project_card_move(token.strip(), column_target_id, card_id)

#++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Finally, close all Pull Requests in "close_pulls" list:
#++++++++++++++++++++++++++++++++++++++++++++++++++++++
#Loop over referenced issues:
for issue_num in close_issues:
#Extract github issue object:
cam_issue = cam_repo.get_issue(number=issue_num)
#Close issue:
cam_issue.edit(state='closed')
print(f"Issue #{issue_num} has been closed.")

#Loop over referenced PRs:
for pull_num in close_pulls:
#Extract Pull request object:
cam_pull = cam_repo.get_pull(number=pull_num)

#Close Pull Request:
cam_pull.edit(state='closed')
print("Pull Request #{} has been closed.".format(pull_num))
print(f"Pull Request #{pull_num} has been closed.")

#++++++++++
#End script
Expand Down
24 changes: 0 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
# Ignore externals
ccs_config
chem_proc
cime
components
manage_externals.log
src/physics/ali_arms/
src/physics/carma/base
src/physics/clubb
src/physics/cosp2/src
src/physics/silhs
src/chemistry/geoschem/geoschem_src
src/physics/pumas
src/physics/pumas-frozen
src/physics/rrtmgp/data
src/physics/rrtmgp/ext
src/dynamics/fv3/atmos_cubed_sphere
libraries/FMS
libraries/mct
libraries/parallelio
src/atmos_phys
src/dynamics/mpas/dycore
share
src/hemco
# Ignore compiled python
buildnmlc
buildcppc
Expand Down
Loading
Loading