@@ -17,6 +17,13 @@ def main():
17
17
# Instantiate the Archive object
18
18
archive = Archive (config )
19
19
20
+ # update these keys to be 3 digits if they are part of archive.task_config.keys
21
+ for key in ['OCNRES' , 'ICERES' ]:
22
+ try :
23
+ archive .task_config [key ] = f"{ archive .task_config [key ]:03d} "
24
+ except KeyError as ee :
25
+ logger .info (f"key ({ key } ) not found in archive.task_config!" )
26
+
20
27
# Pull out all the configuration keys needed to run the rest of archive steps
21
28
keys = ['ATARDIR' , 'current_cycle' , 'FHMIN' , 'FHMAX' , 'FHOUT' , 'RUN' , 'PDY' ,
22
29
'DO_VERFRAD' , 'DO_VMINMON' , 'DO_VERFOZN' , 'DO_ICE' , 'DO_PREP_OBS_AERO' ,
@@ -37,16 +44,15 @@ def main():
37
44
38
45
archive_dict = AttrDict ()
39
46
for key in keys :
40
- archive_dict [key ] = archive .task_config .get (key )
41
- if archive_dict [key ] is None :
42
- print (f"Warning: key ({ key } ) not found in task_config!" )
47
+ try :
48
+ archive_dict [key ] = archive .task_config [key ]
49
+ except KeyError as ee :
50
+ logger .warning (f"WARNING: key ({ key } ) not found in archive.task_config!" )
43
51
44
52
# Also import all COMIN* and COMOUT* directory and template variables
45
53
for key in archive .task_config .keys ():
46
- if key .startswith ("COM_" ) or key . startswith ( "COMIN_" ) or key . startswith ( "COMOUT_" ):
54
+ if key .startswith (( "COM_" , "COMIN_" , "COMOUT_" ) ):
47
55
archive_dict [key ] = archive .task_config .get (key )
48
- if archive_dict [key ] is None :
49
- print (f"Warning: key ({ key } ) not found in task_config!" )
50
56
51
57
with chdir (config .ROTDIR ):
52
58
0 commit comments