Skip to content

Commit 7110ca9

Browse files
authored
Merge pull request #914 from GEOS-ESM/feature/borescan_ease_mo1_exit
Enable EASE M01 option in Boundary Conditions Package
2 parents b5aea62 + 6b486f8 commit 7110ca9

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs_ease.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,35 @@
2222
def make_bcs_ease(config):
2323
bin_dir = os.getcwd()
2424
if '/bin' not in bin_dir:
25-
print("please run this program in installed bin directory")
26-
return
25+
print(" ")
26+
print("******************************************************************")
27+
print("ERROR: Must run this program in installed bin directory. ")
28+
print("******************************************************************")
29+
return
2730

2831
grid_type = config['grid_type']
32+
resolution = config['resolution']
33+
GRIDNAME = grid_type+'_'+ resolution
34+
2935
if 'EASEv' not in grid_type :
30-
print('This is not a EASE grid')
36+
print(" ")
37+
print("******************************************************************")
38+
print("ERROR: " + GRIDNAME + " is not an EASE grid. ")
39+
print("******************************************************************")
3140
return
3241

33-
resolution = config['resolution']
42+
# if resolution is M01 in EASEv1 or EASEv2, do not execute
43+
# Instead, exist and print an on-screen message to the user
44+
if resolution == "M01":
45+
print(" ")
46+
print("******************************************************************")
47+
print("WARNING: Job for " + GRIDNAME + " not submitted! ")
48+
print(" EASEv[x]_M01 (~1 km) resolution requires custom process. ")
49+
print(" Contact GMAO Land Group for assistance. ")
50+
print("******************************************************************")
51+
print(" ")
52+
return
3453

35-
GRIDNAME = grid_type+'_'+ resolution
3654
now = datetime.now()
3755
tmp_dir = now.strftime("%Y%m%d%H%M%S")
3856
tmp_dir = f"{resolution}_{tmp_dir}"

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs_questionary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def ask_questions(default_grid="Cubed-Sphere"):
279279
"name": "EASEv1",
280280
"message": "Select EASEv1 grid resolution: \n ",
281281
"choices": [ \
282-
#"M01 -- 1km $34668x14688$", \
282+
"M01 -- 1km $34668x14688$", \
283283
"M03 -- 3km $11556x4896$", \
284284
"M09 -- 9km $3852x1632$", \
285285
"M25 -- 25km $1383x586$", \
@@ -292,7 +292,7 @@ def ask_questions(default_grid="Cubed-Sphere"):
292292
"name": "EASEv2",
293293
"message": "Select EASEv2 grid resolution: \n ",
294294
"choices": [ \
295-
#"M01 -- 1km $34704x14616$", \
295+
"M01 -- 1km $34704x14616$", \
296296
"M03 -- 3km $11568x4872$", \
297297
"M09 -- 9km $3856x1624$", \
298298
"M25 -- 25km $1388x584$", \

0 commit comments

Comments
 (0)