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 )
@@ -200,7 +200,7 @@ def fvcore_info(x):
200
200
files = glob .glob (rst_dir + '/*fvcore_internal*' + time + '*' )
201
201
fname = files [0 ]
202
202
203
- if len (files ) == 1 :
203
+ if len (files ) == 1 :
204
204
fname = files [0 ]
205
205
206
206
fvrst = nc .Dataset (fname )
@@ -262,7 +262,7 @@ def catch_model(x):
262
262
263
263
def data_ocean_default (resolution ):
264
264
# the default string should match the choice in remapl_question.py
265
- default_ = 'CS (same as atmosphere OSTIA cubed-sphere grid)'
265
+ default_ = 'CS (same as atmosphere OSTIA cubed-sphere grid)'
266
266
if resolution in ['C12' ,'C24' , 'C48' ] : default_ = '360x180 (Reynolds)'
267
267
return default_
268
268
@@ -274,7 +274,7 @@ def get_label(config):
274
274
omodel = config ['output' ]['shared' ]['omodel' ]
275
275
stretch = config ['output' ]['shared' ]['stretch' ]
276
276
EASE_grid = config ['output' ]['surface' ].get ('EASE_grid' , None )
277
-
277
+
278
278
out_resolution = get_resolutions (agrid = agrid , ogrid = ogrid , omodel = omodel , stretch = stretch , grid = EASE_grid )
279
279
280
280
agrid = config ['input' ]['shared' ]['agrid' ]
@@ -293,9 +293,9 @@ def get_label(config):
293
293
294
294
# NOTE: "wemin" is a configurable parameter that can be set to anything, independent
295
295
# of the bcs version. The default set here is simply the "wemin" value that is
296
- # typically used with the bcs version. The user needs to confirm the default
297
- # value or overwrite it with the "wemin" value used in the simulation that is
298
- # associated with the given set of restarts.
296
+ # typically used with the bcs version. The user needs to confirm the default
297
+ # value or overwrite it with the "wemin" value used in the simulation that is
298
+ # associated with the given set of restarts.
299
299
def wemin_default (bc_version ):
300
300
default_ = '13'
301
301
if bc_version == 'GM4' or bc_version == 'ICA' : default_ = '26'
@@ -375,24 +375,24 @@ def print_config( config, indent = 0 ):
375
375
376
376
def get_command_line_from_answers (answers ):
377
377
378
- merra2 = " -merra2 " if answers ["input:shared:MERRA-2" ] else ""
379
- ymdh = " -ymdh " + answers ["input:shared:yyyymmddhh" ]
380
- rst_dir = " -rst_dir " + answers ["input:shared:rst_dir" ]
378
+ merra2 = " -merra2 " if answers ["input:shared:MERRA-2" ] else ""
379
+ ymdh = " -ymdh " + answers ["input:shared:yyyymmddhh" ]
380
+ rst_dir = " -rst_dir " + answers ["input:shared:rst_dir" ]
381
381
382
- grout = ' -grout ' + answers ["output:shared:agrid" ]
383
- levsout = ' -levsout ' + answers ["output:air:nlevel" ]
382
+ grout = ' -grout ' + answers ["output:shared:agrid" ]
383
+ levsout = ' -levsout ' + answers ["output:air:nlevel" ]
384
384
385
385
out_dir = ' -out_dir ' + answers ["output:shared:out_dir" ]
386
- newid = answers ["output:shared:expid" ]
387
-
386
+ newid = answers ["output:shared:expid" ]
387
+
388
388
out_newid = ''
389
389
if newid .strip ():
390
390
out_newid = " -newid " + newid
391
391
392
392
bcvin = ''
393
393
if answers .get ("input:shared:bc_version" ):
394
- bcvin = " -bcvin " + answers ["input:shared:bc_version" ]
395
- bcvout = " -bcvout " + answers ["output:shared:bc_version" ]
394
+ bcvin = " -bcvin " + answers ["input:shared:bc_version" ]
395
+ bcvout = " -bcvout " + answers ["output:shared:bc_version" ]
396
396
397
397
ocnmdlin = '-ocnmdlin data'
398
398
if answers .get ("input:shared:omodel" ):
@@ -413,20 +413,20 @@ def get_command_line_from_answers(answers):
413
413
if ogrid [0 ] == 'C' :
414
414
ogrid = "CS"
415
415
oceanout = ' -oceanout ' + ogrid
416
-
416
+
417
417
nobkg = '' if answers ["output:analysis:bkg" ] else " -nobkg "
418
418
nolcv = '' if answers ["output:analysis:lcv" ] else " -nolcv "
419
-
419
+
420
420
label = ' -lbl ' if answers ["output:shared:label" ] else ""
421
-
421
+
422
422
in_bc_base = ' -in_bc_base ' + answers .get ("input:shared:bc_base" )
423
423
out_bc_base = ' -out_bc_base ' + answers .get ("output:shared:bc_base" )
424
424
425
425
out_stretch = ''
426
- if answers ["output:shared:stretch" ]:
426
+ if answers ["output:shared:stretch" ]:
427
427
out_stretch = ' -out_stretch ' + answers ["output:shared:stretch" ]
428
428
in_stretch = ''
429
- if answers ["input:shared:stretch" ]:
429
+ if answers ["input:shared:stretch" ]:
430
430
in_stretch = ' -in_stretch ' + answers ["input:shared:stretch" ]
431
431
432
432
zoom = " -zoom " + answers ["input:surface:zoom" ]
@@ -436,7 +436,7 @@ def get_command_line_from_answers(answers):
436
436
if answers .get ("input:surface:catch_model" ):
437
437
catch_model = " -catch_model " + answers ["input:surface:catch_model" ]
438
438
439
- out_rs = " -rs "
439
+ out_rs = " -rs "
440
440
rs = 3
441
441
if answers ['output:air:remap' ] and not answers ['output:surface:remap_catch' ]:
442
442
rs = 1
@@ -482,7 +482,7 @@ def get_command_line_from_answers(answers):
482
482
qos + \
483
483
partition
484
484
485
-
485
+
486
486
return cmdl
487
487
488
488
def flatten_nested (nested_dict , result = None , prefix = '' ):
@@ -509,7 +509,7 @@ def get_config_from_answers(answers, config_tpl = False):
509
509
if config_tpl :
510
510
remap_tpl = os .path .dirname (os .path .realpath (__file__ )) + '/remap_params.tpl'
511
511
config = get_config_from_file (remap_tpl )
512
- else :
512
+ else :
513
513
config ['input' ] = {}
514
514
config ['input' ]['air' ] = {}
515
515
config ['input' ]['shared' ] = {}
@@ -542,7 +542,7 @@ def get_resolutions(agrid=None, ogrid=None, omodel=None, stretch=None, grid=None
542
542
if (agrid [0 ].upper () == 'C' ):
543
543
n = int (agrid [1 :])
544
544
aname = 'CF{:04d}x6C' .format (n )
545
-
545
+
546
546
if (ogrid [0 ].upper () == 'C' ):
547
547
oname = aname
548
548
else :
@@ -559,7 +559,7 @@ def get_resolutions(agrid=None, ogrid=None, omodel=None, stretch=None, grid=None
559
559
aname = aname + '-' + stretch
560
560
561
561
resolutions = aname + '_' + oname
562
-
562
+
563
563
return resolutions
564
564
565
565
def get_default_bc_base ():
0 commit comments