17
17
18
18
#During cmake step, the string will be changed according to the system
19
19
20
- BUILT_ON_SLES15 = "NO @BUILT_ON_SLES15@"
20
+ BUILT_ON_SLES15 = "@BUILT_ON_SLES15@"
21
21
GEOS_SITE = "@GEOS_SITE@"
22
22
23
- if BUILT_ON_SLES15 == "NO " :
24
- BUILT_ON_SLES15 = False
23
+ if BUILT_ON_SLES15 == "TRUE " :
24
+ BUILT_ON_SLES15 = True
25
25
else :
26
- BUILT_ON_SLES15 = True
26
+ BUILT_ON_SLES15 = False
27
27
28
28
# top-level directory for BCs (machine-dependent)
29
29
30
30
choices_bc_base = [ "NCCS/Discover : /discover/nobackup/projects/gmao/bcs_shared/fvInput/ExtData/esm/tiles" ,
31
- "NAS : /nobackup/gmao_SIteam/ModelData/bcs_shared/fvInput/ExtData/esm/tiles" ,
31
+ "NAS : /nobackup/gmao_SIteam/ModelData/bcs_shared/fvInput/ExtData/esm/tiles" ,
32
32
"Custom " ]
33
33
34
34
# define "choices", "message" strings, and "validate" lists that are used multiple times
53
53
# the following needs more cleanup; e.g., first define list of SGxxx names and parameters (i.e., STRETCH_GRID),
54
54
# then assemble message_stretch and choices_stretch using this definition
55
55
56
- message_stretch = f'''\n
56
+ message_stretch = f'''\n
57
57
Select parameters of stretched cubed-sphere grid for new restarts:
58
58
59
59
Name Stretch_Factor Focus_Lat Focus_Lon
85
85
BCs version | ADAS tags | GCM tags typically used with BCs version
86
86
-----------------|----------------------|-----------------------------------------
87
87
GM4: Ganymed-4_0 | 5_12_2 ... 5_16_5 | Ganymed-4_0 ... Heracles-5_4_p3
88
- ICA: Icarus | 5_17_0 ... 5_24_0_p1 | Icarus, Jason ... 10.18
88
+ ICA: Icarus | 5_17_0 ... 5_24_0_p1 | Icarus, Jason ... 10.18
89
89
NL3: Icarus-NLv3 | 5_25_1 ... present | Icarus_NL, 10.19 ... present
90
90
----------------------------------------------------------------------------------
91
91
Other: Additional choices used in model or DAS development.
105
105
message_agrid_list = f'''
106
106
C12 C180 C1440
107
107
C24 C360 C2880
108
- C48 C720 C5760
108
+ C48 C720 C5760
109
109
C90 C1000 \n '''
110
110
111
111
message_agrid_in = ("Enter atmospheric grid of input restarts:\n " + message_agrid_list )
@@ -203,7 +203,7 @@ def fvcore_info(x):
203
203
files = glob .glob (rst_dir + '/*fvcore_internal*' + time + '*' )
204
204
fname = files [0 ]
205
205
206
- if len (files ) == 1 :
206
+ if len (files ) == 1 :
207
207
fname = files [0 ]
208
208
209
209
fvrst = nc .Dataset (fname )
@@ -265,7 +265,7 @@ def catch_model(x):
265
265
266
266
def data_ocean_default (resolution ):
267
267
# the default string should match the choice in remapl_question.py
268
- default_ = 'CS (same as atmosphere OSTIA cubed-sphere grid)'
268
+ default_ = 'CS (same as atmosphere OSTIA cubed-sphere grid)'
269
269
if resolution in ['C12' ,'C24' , 'C48' ] : default_ = '360x180 (Reynolds)'
270
270
return default_
271
271
@@ -277,7 +277,7 @@ def get_label(config):
277
277
omodel = config ['output' ]['shared' ]['omodel' ]
278
278
stretch = config ['output' ]['shared' ]['stretch' ]
279
279
EASE_grid = config ['output' ]['surface' ].get ('EASE_grid' , None )
280
-
280
+
281
281
out_resolution = get_resolutions (agrid = agrid , ogrid = ogrid , omodel = omodel , stretch = stretch , grid = EASE_grid )
282
282
283
283
agrid = config ['input' ]['shared' ]['agrid' ]
@@ -296,9 +296,9 @@ def get_label(config):
296
296
297
297
# NOTE: "wemin" is a configurable parameter that can be set to anything, independent
298
298
# of the bcs version. The default set here is simply the "wemin" value that is
299
- # typically used with the bcs version. The user needs to confirm the default
300
- # value or overwrite it with the "wemin" value used in the simulation that is
301
- # associated with the given set of restarts.
299
+ # typically used with the bcs version. The user needs to confirm the default
300
+ # value or overwrite it with the "wemin" value used in the simulation that is
301
+ # associated with the given set of restarts.
302
302
def wemin_default (bc_version ):
303
303
default_ = '13'
304
304
if bc_version == 'GM4' or bc_version == 'ICA' : default_ = '26'
@@ -378,24 +378,24 @@ def print_config( config, indent = 0 ):
378
378
379
379
def get_command_line_from_answers (answers ):
380
380
381
- merra2 = " -merra2 " if answers ["input:shared:MERRA-2" ] else ""
382
- ymdh = " -ymdh " + answers ["input:shared:yyyymmddhh" ]
383
- rst_dir = " -rst_dir " + answers ["input:shared:rst_dir" ]
381
+ merra2 = " -merra2 " if answers ["input:shared:MERRA-2" ] else ""
382
+ ymdh = " -ymdh " + answers ["input:shared:yyyymmddhh" ]
383
+ rst_dir = " -rst_dir " + answers ["input:shared:rst_dir" ]
384
384
385
- grout = ' -grout ' + answers ["output:shared:agrid" ]
386
- levsout = ' -levsout ' + answers ["output:air:nlevel" ]
385
+ grout = ' -grout ' + answers ["output:shared:agrid" ]
386
+ levsout = ' -levsout ' + answers ["output:air:nlevel" ]
387
387
388
388
out_dir = ' -out_dir ' + answers ["output:shared:out_dir" ]
389
- newid = answers ["output:shared:expid" ]
390
-
389
+ newid = answers ["output:shared:expid" ]
390
+
391
391
out_newid = ''
392
392
if newid .strip ():
393
393
out_newid = " -newid " + newid
394
394
395
395
bcvin = ''
396
396
if answers .get ("input:shared:bc_version" ):
397
- bcvin = " -bcvin " + answers ["input:shared:bc_version" ]
398
- bcvout = " -bcvout " + answers ["output:shared:bc_version" ]
397
+ bcvin = " -bcvin " + answers ["input:shared:bc_version" ]
398
+ bcvout = " -bcvout " + answers ["output:shared:bc_version" ]
399
399
400
400
ocnmdlin = '-ocnmdlin data'
401
401
if answers .get ("input:shared:omodel" ):
@@ -416,21 +416,20 @@ def get_command_line_from_answers(answers):
416
416
if ogrid [0 ] == 'C' :
417
417
ogrid = "CS"
418
418
oceanout = ' -oceanout ' + ogrid
419
-
419
+
420
420
nobkg = '' if answers ["output:analysis:bkg" ] else " -nobkg "
421
421
nolcv = '' if answers ["output:analysis:lcv" ] else " -nolcv "
422
422
nonhydrostatic = '' if answers ["input:air:hydrostatic" ] else " -nonhydrostatic "
423
-
424
423
label = ' -lbl ' if answers ["output:shared:label" ] else ""
425
-
424
+
426
425
in_bc_base = ' -in_bc_base ' + answers .get ("input:shared:bc_base" )
427
426
out_bc_base = ' -out_bc_base ' + answers .get ("output:shared:bc_base" )
428
427
429
428
out_stretch = ''
430
- if answers ["output:shared:stretch" ]:
429
+ if answers ["output:shared:stretch" ]:
431
430
out_stretch = ' -out_stretch ' + answers ["output:shared:stretch" ]
432
431
in_stretch = ''
433
- if answers ["input:shared:stretch" ]:
432
+ if answers ["input:shared:stretch" ]:
434
433
in_stretch = ' -in_stretch ' + answers ["input:shared:stretch" ]
435
434
436
435
zoom = " -zoom " + answers ["input:surface:zoom" ]
@@ -440,7 +439,7 @@ def get_command_line_from_answers(answers):
440
439
if answers .get ("input:surface:catch_model" ):
441
440
catch_model = " -catch_model " + answers ["input:surface:catch_model" ]
442
441
443
- out_rs = " -rs "
442
+ out_rs = " -rs "
444
443
rs = 3
445
444
if answers ['output:air:remap' ] and not answers ['output:surface:remap_catch' ]:
446
445
rs = 1
@@ -489,7 +488,7 @@ def get_command_line_from_answers(answers):
489
488
qos + \
490
489
partition
491
490
492
-
491
+
493
492
return cmdl
494
493
495
494
def flatten_nested (nested_dict , result = None , prefix = '' ):
@@ -516,7 +515,7 @@ def get_config_from_answers(answers, config_tpl = False):
516
515
if config_tpl :
517
516
remap_tpl = os .path .dirname (os .path .realpath (__file__ )) + '/remap_params.tpl'
518
517
config = get_config_from_file (remap_tpl )
519
- else :
518
+ else :
520
519
config ['input' ] = {}
521
520
config ['input' ]['air' ] = {}
522
521
config ['input' ]['shared' ] = {}
@@ -549,7 +548,7 @@ def get_resolutions(agrid=None, ogrid=None, omodel=None, stretch=None, grid=None
549
548
if (agrid [0 ].upper () == 'C' ):
550
549
n = int (agrid [1 :])
551
550
aname = 'CF{:04d}x6C' .format (n )
552
-
551
+
553
552
if (ogrid [0 ].upper () == 'C' ):
554
553
oname = aname
555
554
else :
@@ -566,7 +565,7 @@ def get_resolutions(agrid=None, ogrid=None, omodel=None, stretch=None, grid=None
566
565
aname = aname + '-' + stretch
567
566
568
567
resolutions = aname + '_' + oname
569
-
568
+
570
569
return resolutions
571
570
572
571
def get_default_bc_base ():
0 commit comments