Skip to content

Commit 05bbcca

Browse files
Merge develop into main in prep for release v1.0.2 (#38)
2 parents fc074ba + d0a542e commit 05bbcca

File tree

8 files changed

+230
-225
lines changed

8 files changed

+230
-225
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ workflows:
2222
repo: GEOSldas
2323
checkout_fixture: true
2424
mepodevelop: false
25+
# This is needed due to the LDAS BRIDGE workflow
26+
checkout_if_exists: false
2527
persist_workspace: false # Needs to be true to run fv3/gcm experiment, costs extra

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,3 @@
55
*#
66
.#*
77
**/CVS/
8-
9-
/@GEOSgcm_GridComp
10-
/GEOSgcm_GridComp
11-
/GEOSgcm_GridComp@

CHANGELOG.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,50 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12-
-----------------------------
12+
### Added
1313

14-
## [v1.0.1] - 2024-04-10
14+
### Changed
1515

1616
### Fixed
1717

18-
- ldas_setup: Changed entry 'slurm' to 'slurm_pbs' to match remap_params.tpl
18+
### Removed
19+
20+
### Deprecated
1921

2022
-----------------------------
2123

22-
## [v1.0.0] - 2024-03-26
24+
## [v1.0.2] - 2024-04-12
2325

24-
- Inaugural version. 0-diff vs. GEOSldas v18.0.0.
26+
- 0-diff vs. v1.0.1.
2527

26-
-----------------------------
28+
### Fixed
2729

28-
### Added
30+
- Bug fix for state increment array referencing in update_type=13 ([PR #26](https://github.com/GEOS-ESM/GEOSldas_GridComp/pull/26)).
31+
- Fixed CI for LDAS workflow ([PR #34](https://github.com/GEOS-ESM/GEOSldas_GridComp/pull/34)).
2932

3033
### Changed
3134

35+
- Moved external `GEOSgcm_GridComp` repository to under `GEOSldas/src/Components` for
36+
consistency with directory structure of GEOSgcm and GEOSadas ([PR #27](https://github.com/GEOS-ESM/GEOSldas_GridComp/pull/27), [PR #30](https://github.com/GEOS-ESM/GEOSldas_GridComp/pull/30)).
37+
- Changed lenkf.j.template to python string ([PR #16](https://github.com/GEOS-ESM/GEOSldas_GridComp/pull/16)).
38+
39+
40+
-----------------------------
41+
42+
## [v1.0.1] - 2024-04-10
43+
44+
- 0-diff vs. v1.0.0.
45+
3246
### Fixed
3347

34-
### Removed
48+
- ldas_setup: Changed entry 'slurm' to 'slurm_pbs' to match remap_params.tpl ([PR #17](https://github.com/GEOS-ESM/GEOSldas_GridComp/pull/17)).
49+
50+
-----------------------------
51+
52+
## [v1.0.0] - 2024-03-26
53+
54+
- Inaugural version. 0-diff vs. GEOSldas v18.0.0.
55+
56+
-----------------------------
3557

36-
### Deprecated
3758

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
esma_set_this ()
22

3-
esma_add_subdirectory(GEOSgcm_GridComp)
4-
53
set (alldirs
64
GEOSmetforce_GridComp
75
GEOSlandpert_GridComp

GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4805,21 +4805,21 @@ subroutine cat_enkf_increments( &
48054805
State_incr(1,:) = cat_progn( kk,:)%srfexc/scale_srfexc
48064806
State_incr(2,:) = cat_progn( kk,:)%rzexc /scale_rzexc
48074807

4808-
State_incr(4,:) = cat_progn( kk,:)%tc1 /scale_temp
4809-
State_incr(5,:) = cat_progn( kk,:)%tc2 /scale_temp
4810-
State_incr(6,:) = cat_progn( kk,:)%tc4 /scale_temp
4811-
State_incr(7,:) = cat_progn( kk,:)%ght(1)/scale_ght1
4808+
State_incr(3,:) = cat_progn( kk,:)%tc1 /scale_temp
4809+
State_incr(4,:) = cat_progn( kk,:)%tc2 /scale_temp
4810+
State_incr(5,:) = cat_progn( kk,:)%tc4 /scale_temp
4811+
State_incr(6,:) = cat_progn( kk,:)%ght(1)/scale_ght1
48124812

48134813
else
48144814

48154815
State_incr(1,:) = cat_progn( kk,:)%srfexc/scale_srfexc
48164816
State_incr(2,:) = cat_progn( kk,:)%rzexc /scale_rzexc
48174817
State_incr(3,:) = cat_progn( kk,:)%catdef/scale_catdef ! catdef in State
48184818

4819-
State_incr(3,:) = cat_progn( kk,:)%tc1 /scale_temp
4820-
State_incr(4,:) = cat_progn( kk,:)%tc2 /scale_temp
4821-
State_incr(5,:) = cat_progn( kk,:)%tc4 /scale_temp
4822-
State_incr(6,:) = cat_progn( kk,:)%ght(1)/scale_ght1
4819+
State_incr(4,:) = cat_progn( kk,:)%tc1 /scale_temp
4820+
State_incr(5,:) = cat_progn( kk,:)%tc2 /scale_temp
4821+
State_incr(6,:) = cat_progn( kk,:)%tc4 /scale_temp
4822+
State_incr(7,:) = cat_progn( kk,:)%ght(1)/scale_ght1
48234823

48244824
end if
48254825

@@ -4863,21 +4863,21 @@ subroutine cat_enkf_increments( &
48634863
cat_progn_incr(kk,:)%srfexc = State_incr(1,:)*scale_srfexc
48644864
cat_progn_incr(kk,:)%rzexc = State_incr(2,:)*scale_rzexc
48654865

4866-
cat_progn_incr(kk,:)%tc1 = State_incr(4,:)*scale_temp
4867-
cat_progn_incr(kk,:)%tc2 = State_incr(5,:)*scale_temp
4868-
cat_progn_incr(kk,:)%tc4 = State_incr(6,:)*scale_temp
4869-
cat_progn_incr(kk,:)%ght(1) = State_incr(7,:)*scale_ght1
4866+
cat_progn_incr(kk,:)%tc1 = State_incr(3,:)*scale_temp
4867+
cat_progn_incr(kk,:)%tc2 = State_incr(4,:)*scale_temp
4868+
cat_progn_incr(kk,:)%tc4 = State_incr(5,:)*scale_temp
4869+
cat_progn_incr(kk,:)%ght(1) = State_incr(6,:)*scale_ght1
48704870

48714871
else
48724872

48734873
cat_progn_incr(kk,:)%srfexc = State_incr(1,:)*scale_srfexc
48744874
cat_progn_incr(kk,:)%rzexc = State_incr(2,:)*scale_rzexc
48754875
cat_progn_incr(kk,:)%catdef = State_incr(3,:)*scale_catdef ! catdef in State
48764876

4877-
cat_progn_incr(kk,:)%tc1 = State_incr(3,:)*scale_temp
4878-
cat_progn_incr(kk,:)%tc2 = State_incr(4,:)*scale_temp
4879-
cat_progn_incr(kk,:)%tc4 = State_incr(5,:)*scale_temp
4880-
cat_progn_incr(kk,:)%ght(1) = State_incr(6,:)*scale_ght1
4877+
cat_progn_incr(kk,:)%tc1 = State_incr(4,:)*scale_temp
4878+
cat_progn_incr(kk,:)%tc2 = State_incr(5,:)*scale_temp
4879+
cat_progn_incr(kk,:)%tc4 = State_incr(6,:)*scale_temp
4880+
cat_progn_incr(kk,:)%ght(1) = State_incr(7,:)*scale_ght1
48814881

48824882
end if
48834883

GEOSldas_App/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ set (scripts
2727
ens_forcing/regrid_forc.csh
2828
ens_forcing/enpert_forc.csh
2929
util/config/rewind_GEOSldas.csh
30+
lenkf_j_template.py
3031
)
3132

3233
install (
@@ -42,7 +43,7 @@ file(GLOB rc_files GEOSldas_*rc)
4243
file(GLOB nml_files LDASsa_DEFAULT*nml)
4344

4445
install(
45-
FILES ${rc_files} ${nml_files} lenkf.j.template
46+
FILES ${rc_files} ${nml_files}
4647
DESTINATION etc
4748
)
4849

GEOSldas_App/ldas_setup

Lines changed: 41 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ from dateutil.relativedelta import relativedelta
2121
from remap_utils import *
2222
from remap_catchANDcn import *
2323
from remap_config_ldas import *
24-
24+
from lenkf_j_template import *
2525
"""
2626
This script is intended to be run from any installed directory with GEOSldas.x and ldas_setup
2727
(The default setup is ../install/bin)
@@ -166,9 +166,10 @@ class LDASsetup:
166166
assert not os.path.isdir(_mydir), 'Dir [%s] already exists!' % _mydir
167167
_mydir = None
168168
self.ladas_coupling = int(self.rqdExeInp.get('LADAS_COUPLING',0))
169+
self.adas_expdir =''
169170
if self.ladas_coupling > 0:
170171
assert 'ADAS_EXPDIR' in self.rqdExeInp, " need ADAS_EXPDIR in the input file %s" %(self.exeinpfile)
171-
172+
self.adas_expdir = self.rqdExeInp['ADAS_EXPDIR']
172173
self.first_ens_id = int(self.rqdExeInp.get('FIRST_ENS_ID',0))
173174
self.perturb = int(self.rqdExeInp.get('PERTURBATIONS',0))
174175
if self.nens > 1:
@@ -1294,8 +1295,6 @@ class LDASsetup:
12941295
status = False
12951296

12961297
os.chdir(self.rundir)
1297-
lenkf=self.blddir+'/etc/lenkf.j.template'
1298-
shutil.copy(lenkf,'lenkf.j')
12991298

13001299
my_qos='allnccs'
13011300
if self.GEOS_SITE == 'NAS': my_qos = 'normal'
@@ -1330,71 +1329,45 @@ class LDASsetup:
13301329
'.'.join([expid, 'ldas_err', myDateTime, 'txt']),
13311330
]),
13321331
self.rundir)
1333-
with open(lenkf,'rt') as fin:
1334-
with open('lenkf.j','wt') as fout :
1335-
for line in fin :
1336-
if self.GEOS_SITE == 'NAS':
1337-
if '#SBATCH' in line:
1338-
continue
1339-
if 'sbatch $HOMDIR/lenkf.j' in line:
1340-
continue
1341-
1342-
if self.GEOS_SITE == 'NCCS':
1343-
if '#PBS' in line:
1344-
continue
1345-
if 'qsub $HOMDIR/lenkf.j' in line:
1346-
continue
1347-
1348-
if 'MY_ACCOUNT' in line :
1349-
fout.write(line.replace('MY_ACCOUNT',self.rqdRmInp['account']))
1350-
elif 'MY_WALLTIME' in line :
1351-
fout.write(line.replace('MY_WALLTIME',self.rqdRmInp['walltime']))
1352-
elif 'MY_NODES' in line :
1353-
line_ = line.replace('MY_NODES',str(self.optRmInp['nodes']))
1354-
line_ = line_.replace('MY_NTASKS_PER_NODE',str(self.rqdRmInp['ntasks-per-node']))
1355-
line_ = line_.replace('MY_CONSTRAINT', 'cas_ait')
1356-
fout.write(line_)
1357-
if self.GEOS_SITE == "NCCS" :
1358-
if self.BUILT_ON_SLES15 :
1359-
fout.write("#SBATCH --constraint=mil\n")
1360-
else:
1361-
assert int(self.rqdRmInp['ntasks-per-node']) <= 46, 'ntasks-per-node should be <=46 for cas'
1362-
fout.write("#SBATCH --constraint=cas\n")
1363-
1364-
elif 'MY_OSERVER_NODES' in line :
1365-
fout.write(line.replace('MY_OSERVER_NODES',str(self.optRmInp['oserver_nodes'])))
1366-
elif 'MY_WRITERS_NPES' in line :
1367-
fout.write(line.replace('MY_WRITERS_NPES', str(self.optRmInp['writers-per-node'])))
1368-
elif 'MY_QOS' in line :
1369-
if 'allnccs' not in my_qos or 'normal' not in my_qos:
1370-
fout.write(line.replace('MY_QOS',my_qos))
1371-
elif 'MY_JOB' in line :
1372-
fout.write(line.replace('MY_JOB',my_job))
1373-
elif 'MY_EXPID' in line :
1374-
fout.write(line.replace('MY_EXPID',self.rqdExeInp['EXP_ID']))
1375-
elif 'MY_EXPDOMAIN' in line :
1376-
fout.write(line.replace('MY_EXPDOMAIN',self.rqdExeInp['EXP_DOMAIN']))
1377-
elif 'MY_LOGFILE' in line :
1378-
fout.write(line.replace('MY_LOGFILE',my_logfile))
1379-
elif 'MY_ERRFILE' in line :
1380-
fout.write(line.replace('MY_ERRFILE',my_errfile))
1381-
elif 'MY_MODEL' in line :
1382-
fout.write(line.replace('MY_MODEL',self.catch))
1383-
elif 'MY_POSTPROC_HIST' in line :
1384-
fout.write(line.replace('MY_POSTPROC_HIST',str(self.rqdExeInp['POSTPROC_HIST'])))
1385-
elif 'MY_FIRST_ENS_ID' in line :
1386-
fout.write(line.replace('MY_FIRST_ENS_ID',str(self.first_ens_id)))
1387-
elif 'MY_LADAS_COUPLING' in line :
1388-
fout.write(line.replace('MY_LADAS_COUPLING',str(self.ladas_coupling)))
1389-
elif 'MY_ENSEMBLE_FORCING' in line :
1390-
fout.write(line.replace('MY_ENSEMBLE_FORCING',self.rqdExeInp.get('ENSEMBLE_FORCING', 'NO').upper()))
1391-
elif 'MY_ADAS_EXPDIR' in line :
1392-
if self.ladas_coupling > 0:
1393-
fout.write(line.replace('MY_ADAS_EXPDIR', self.rqdExeInp['ADAS_EXPDIR']))
1394-
else :
1395-
my_expdir = self.exphome + '/' + self.rqdExeInp['EXP_ID']
1396-
fout.write(line.replace('MY_EXPDIR',my_expdir))
1332+
constraint='cas'
1333+
if self.GEOS_SITE == "NAS":
1334+
constraint = 'cas_ait'
1335+
elif self.BUILT_ON_SLES15:
1336+
constraint = 'mil'
1337+
else:
1338+
assert int(self.rqdRmInp['ntasks-per-node']) <= 46, 'ntasks-per-node should be <=46 for cas'
1339+
1340+
SBATCHQSUB = 'sbatch'
1341+
if self.GEOS_SITE == 'NAS':
1342+
SBATCHQSUB = 'qsub'
13971343

1344+
job_head = job_directive[self.GEOS_SITE]
1345+
lenkf_str= (job_head+job_body).format(
1346+
SBATCHQSUB = SBATCHQSUB,
1347+
MY_ACCOUNT = self.rqdRmInp['account'],
1348+
MY_WALLTIME = self.rqdRmInp['walltime'],
1349+
MY_NODES = str(self.optRmInp['nodes']),
1350+
MY_NTASKS_PER_NODE = str(self.rqdRmInp['ntasks-per-node']),
1351+
MY_CONSTRAINT = constraint,
1352+
MY_OSERVER_NODES = str(self.optRmInp['oserver_nodes']),
1353+
MY_WRITERS_NPES = str(self.optRmInp['writers-per-node']),
1354+
MY_QOS = my_qos,
1355+
MY_JOB = my_job,
1356+
MY_EXPID = self.rqdExeInp['EXP_ID'],
1357+
MY_EXPDOMAIN = self.rqdExeInp['EXP_DOMAIN'],
1358+
MY_LOGFILE = my_logfile,
1359+
MY_ERRFILE = my_errfile,
1360+
MY_MODEL = self.catch,
1361+
MY_POSTPROC_HIST = str(self.rqdExeInp['POSTPROC_HIST']),
1362+
MY_FIRST_ENS_ID = str(self.first_ens_id),
1363+
MY_LADAS_COUPLING = str(self.ladas_coupling),
1364+
MY_ENSEMBLE_FORCING= self.rqdExeInp.get('ENSEMBLE_FORCING', 'NO').upper(),
1365+
MY_ADAS_EXPDIR = self.adas_expdir,
1366+
MY_EXPDIR = self.exphome + '/' + self.rqdExeInp['EXP_ID']
1367+
)
1368+
1369+
with open('lenkf.j','wt') as fout :
1370+
fout.write(lenkf_str)
13981371
sp.call(['chmod', '755', 'lenkf.j'])
13991372

14001373
expdir = '/'.join(self.rundir.rstrip('/').split('/')[:-1])

0 commit comments

Comments
 (0)