From 87ba565d6a591135cd34b981361625ec8a52db0e Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 4 Oct 2023 18:00:21 -0600 Subject: [PATCH] Get the Makefile and the python script synchronized to do things in terms of low, medium(ne16), and high (ne120 and hi-res) resolutions --- tools/mksurfdata_esmf/Makefile.data | 76 +++++++++---------- .../gen_mksurfdata_jobscript_multi.py | 47 ++++++------ 2 files changed, 58 insertions(+), 65 deletions(-) diff --git a/tools/mksurfdata_esmf/Makefile.data b/tools/mksurfdata_esmf/Makefile.data index 0cd86e618a..5c4757f176 100644 --- a/tools/mksurfdata_esmf/Makefile.data +++ b/tools/mksurfdata_esmf/Makefile.data @@ -57,41 +57,33 @@ URBALPHA_FNAME := surfdata_1x1_urbanc_alpha_hist_2000_78pfts_c$(CDAT SUBSETDATA_1X1_MEXICOCITY := --lat 19.5 --lon 260.5 --site 1x1_mexicocityMEX --out-surface $(MEXICOCITY_TMP_FNAME) SUBSETDATA_1X1_VANCOUVER := --lat 49.5 --lon 236.5 --site 1x1_vancouverCAN --out-surface $(VANCOUVER_TMP_FNAME) SUBSETDATA_1X1_URBALPHA := --lat -37.7308 --lon 0 --site 1x1_urbanc_alpha --out-surface $(URBALPHA_TMP_FNAME) -# f19 and f09 are standard resolutions, f10 is used for testing, f45 is used for FATES -# ne30np4 is standard resolution for SE dycore in CAM, C96 is standard for fv3 dycore -# The ne30np4 series (including pg2, pg3, pg4) are standard for SE dycore -# The variable resolution grids for ARCTIC, ARCTICGRIS and CONUS are also standard -STANDARD_RES_NO_CROP = 0.9x1.25,1.9x2.5,10x15 -STANDARD_RES = 0.9x1.25,1.9x2.5,10x15,4x5,ne30np4,C96,ne30pg2,ne30pg3,ne30pg4,ne120np4pg3,ne0np4ARCTICGRISne30x8,ne0np4ARCTICne30x4,ne0np4CONUSne30x8,ne3np4.pg3,ne5np4.pg3,ne16np4.pg3,mpasa480,mpasa120 - -# For future CMIP6 scenarios: SSP-RCP's -FUTURE_RES = 0.9x1.25,1.9x2.5,10x15 -# For historical transient cases (TRY TO KEEP THIS LIST AS SHORT AS POSSIBLE) -TRANS_RES = 0.9x1.25,1.9x2.5,10x15,ne30np4,ne0np4ARCTICGRISne30x8,ne0np4ARCTICne30x4,ne0np4CONUSne30x8 - -# ne120np4 is for high resolution SE dycore, ne16 is for testing SE dycore + +# ne120np4 and hi-res are for high resolution, ne16 is for mid-resolution testing +# low-res is for low resolutions for testing # nldas is for NWP working with WRF STANDARD = \ global-present \ + global-present-low-res \ global-present-nldas TROPICS = \ - crop-tropics-present \ - crop-tropics-historical \ - crop-tropics-transient + crop-tropics-present CROP = \ crop-global-present \ + crop-global-present-low-res \ crop-global-present-ne16np4 \ crop-global-present-ne120np4 \ + crop-global-1850 \ + crop-global-1850-low-res \ + crop-global-1850-ne16np4 \ + crop-global-1850-ne120np4 \ crop-numa-present \ crop-numa-historical \ crop-smallville \ crop-smallville-historical \ - crop-global-historical \ - crop-global-transient \ crop-global-future -all : standard tropics crop urban landuse-timeseries +all : standard tropics crop urban landuse-timeseries all-subset all-subset : \ 1x1_brazil-tropics-present \ @@ -122,6 +114,10 @@ global-present : FORCE $(MKSURFDATA) --number-of-nodes 24 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 $(BATCHJOBS) $@.sh +global-present-low-res : FORCE + $(MKSURFDATA) --number-of-nodes 10 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 + $(BATCHJOBS) $@.sh + global-present-nldas : FORCE $(MKSURFDATA) --number-of-nodes 24 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 $(BATCHJOBS) $@.sh @@ -131,14 +127,13 @@ global-present-nldas : FORCE # tropics : $(TROPICS) -crop-tropics-present : 1x1_brazil-tropics-present - $(MKSURFDATA) --number-of-nodes 4 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 +crop-tropics-present : FORCE + $(MKSURFDATA) --number-of-nodes 1 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 $(BATCHJOBS) $@.sh 1x1_brazil-tropics-present : FORCE $(SUBSETDATA_POINT_ALLLU) --create-surface $(SUBSETDATA_1X1_BRAZIL) - crop-tropics-historical : FORCE $(SUBSETDATA_POINT_ALLLU) --create-surface $(SUBSETDATA_1X1_BRAZIL) --cfg-file default_data_1850.cfg @@ -151,9 +146,17 @@ crop-tropics-transient : FORCE crop : $(CROP) crop-global-present : FORCE + $(MKSURFDATA) --number-of-nodes 48 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 + $(BATCHJOBS) $@.sh + +crop-global-present-ne16 : FORCE $(MKSURFDATA) --number-of-nodes 24 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 $(BATCHJOBS) $@.sh +crop-global-present-ne120 : FORCE + $(MKSURFDATA) --number-of-nodes 96 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 + $(BATCHJOBS) $@.sh + crop-global-present-0.125 : FORCE $(MKSURFDATA) --number-of-nodes 48 --scenario $@ --jobscript-file $@.sh --walltime 04:00:00 $(BATCHJOBS) $@.sh @@ -168,7 +171,7 @@ crop-smallville : FORCE $(SUBSETDATA_POINT) --create-surface $(SUBSETDATA_1X1_SMALL) crop-global-present-ne16np4 : FORCE - $(MKSURFDATA) --number-of-nodes 12 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 + $(MKSURFDATA) --number-of-nodes 24 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 $(BATCHJOBS) $@.sh crop-global-present-ne120np4 : FORCE @@ -182,32 +185,23 @@ crop-global-present-ne120np4 : FORCE crop-smallville-historical : FORCE $(SUBSETDATA_POINT) --create-surface $(SUBSETDATA_1X1_SMALL1850) --cfg-file default_data_1850.cfg -# Setup the historical case for SSP5-8.5 so that historical can be used to go into the future. -crop-global-historical : FORCE - $(MKSURFDATA) --number-of-nodes 24 --scenario $@ --jobscript-file $@.sh --walltime 03:00:00 - $(BATCHJOBS) $@.sh - -crop-global-historical-ne120np4 : FORCE - $(MKSURFDATA) --number-of-nodes 96 --scenario $@ --jobscript-file $@.sh --walltime 06:00:00 - $(BATCHJOBS) $@.sh - -crop-global-transient: FORCE - $(MKSURFDATA) --number-of-nodes 24 --scenario $@ --jobscript-file $@.sh --walltime 03:00:00 - $(BATCHJOBS) $@.sh - -crop-global-transient-ne120np4 : FORCE - $(MKSURFDATA) --number-of-nodes 96 --scenario $@ --jobscript-file $@.sh --walltime 06:00:00 - $(BATCHJOBS) $@.sh - # # Crop with future scenarios # -crop-global-future : crop-global-SSP2-4.5 +crop-global-future : crop-global-SSP2-4.5 crop-global-SSP2-4.5-low-res crop-global-SSP2-4.5-hi-res crop-global-SSP2-4.5 : FORCE $(MKSURFDATA) --number-of-nodes 24 --scenario $@ --jobscript-file $@.sh --walltime 04:00:00 $(BATCHJOBS) $@.sh +crop-global-SSP2-4.5-low-res : FORCE + $(MKSURFDATA) --number-of-nodes 24 --scenario $@ --jobscript-file $@.sh --walltime 04:00:00 + $(BATCHJOBS) $@.sh + +crop-global-SSP2-4.5-hi-res : FORCE + $(MKSURFDATA) --number-of-nodes 96 --scenario $@ --jobscript-file $@.sh --walltime 04:00:00 + $(BATCHJOBS) $@.sh + # # urban # diff --git a/tools/mksurfdata_esmf/gen_mksurfdata_jobscript_multi.py b/tools/mksurfdata_esmf/gen_mksurfdata_jobscript_multi.py index cc1c6247cf..1206359ebe 100755 --- a/tools/mksurfdata_esmf/gen_mksurfdata_jobscript_multi.py +++ b/tools/mksurfdata_esmf/gen_mksurfdata_jobscript_multi.py @@ -12,9 +12,9 @@ valid_scenarios=["all", "standard", "global-present", + "global-present-low-res", "global-present-nldas", "global-hist-4x5", - "tropics", "crop-tropics-present", "crop", "crop-global-present", @@ -29,6 +29,8 @@ "crop-global-SSP3-7.0", "crop-global-SSP5-3.4", "crop-global-SSP2-4.5", + "crop-global-SSP2-4.5-low-res", + "crop-global-SSP2-4.5-hi-res", "crop-global-SSP1-1.9", "crop-global-SSP4-3.4", "crop-global-SSP4-6.0", @@ -121,11 +123,7 @@ def main (): target_list = [] if scenario == 'all': target_list = ["global-present", - "global-present-nldas", - "global-hist-4x5", "crop-global-present", - "crop-global-present-ne16np4", - "crop-global-present-ne120np4", "crop-global-1850", "crop-global-hist", "crop-tropics-present", @@ -136,16 +134,13 @@ def main (): "crop-global-SSP1-1.9", "crop-global-SSP4-3.4", "crop-global-SSP4-6.0", - "crop-global-SSP5-8.5", - "crop-global-SSP5-8.5-other"] + "crop-global-SSP5-8.5"], elif scenario == 'standard': target_list = ["global-present", "global-present-nldas", - "global-hist-4x5"] + ], elif scenario == "crop": target_list = ["crop-global-present", - "crop-global-present-ne16np4", - "crop-global-present-ne120np4", "crop-global-1850", "crop-global-hist"] elif scenario == "crop-global-future": @@ -167,44 +162,48 @@ def main (): # Determine resolution sets that are referenced in commands # -------------------------- resolution_dict = { - "standard_res_no_crop" : ["0.9x1.25","1.9x2.5","10x15","4x5"], - "most_res" : ['0.9x1.25','1.9x2.5','10x15','4x5','C96', - 'ne30np4','ne30np4.pg2','ne30np4.pg3','ne30np4.pg4','ne120np4.pg3', - 'ne0np4.ARCTICGRIS.ne30x8','ne0np4.ARCTIC.ne30x4', 'ne0np4CONUS.ne30x8', - 'ne3np4.pg3','ne5np4.pg3','ne16np4.pg3','mpasa480','mpasa120'], - "standard_res" : ["0.9x1.25","1.9x2.5","10x15"], - "ssp585_res" : ['C96','ne30np4','ne0np4.ARCTICGRIS.ne30x8', - 'ne0np4.ARCTIC.ne30x4','ne0np4CONUS.ne30x8','ne120np4'], - "4x5_res" : ['4x5'], + "standard_res_no_crop" : ["0.9x1.25","1.9x2.5"], + "low_res_no_crop" : ["10x15"], + "low_res_all" : ['10x15', 'ne3np4.pg3'], + "hi_res_all" : ['ne120np4.pg3'], + "standard_res" : ['0.9x1.25','1.9x2.5','C96', 'ne30np4.pg3', 'mpasa120'], + "low_res" : ['10x15', '4x5', 'ne3np4.pg3', 'ne5np4.pg3', 'C24', 'mpasa480'], + "4x5_res" : ['10x15', '4x5', 'C24', 'mpasa480'], "nldas_res" : ['0.125nldas2'], "5x5_amazon_res" : ['5x5_amazon'], - "ne16np4_res" : ['ne16np4'], - "ne120np4_res" : ['ne120np4'], + "ne16np4_res" : ['C48', 'ne16np4'], + "ne120np4_res" : ['ne120np4.pg3', + 'ne0np4.ARCTICGRIS.ne30x8','ne0np4.ARCTIC.ne30x4', 'ne0np4CONUS.ne30x8'], } # -------------------------- # Determine commands for each target list # -------------------------- dataset_dict={"global-present" : ("--start-year 2000 --end-year 2000 --nocrop --vic --res", "standard_res_no_crop"), + "global-present-low-res" : ("--start-year 2000 --end-year 2000 --nocrop --vic --res", "low_res_no_crop"), "global-present-nldas" : ("--start-year 2000 --end-year 2000 --nocrop --vic --res", "nldas_res"), "global-hist-4x5" : ("--start-year 1850 --end-year 2015 --nocrop --res", "4x5_res"), "crop-tropics-present" : ("--start-year 2000 --end-year 2000 --res", "5x5_amazon_res"), - "crop-global-present" : ("--start-year 2000 --end-year 2000 --res", "most_res"), + "crop-global-present" : ("--start-year 2000 --end-year 2000 --res", "standard_res"), + "crop-global-present-low-res" : ("--start-year 2000 --end-year 2000 --res", "low_res"), "crop-global-present-ne16np4" : ("--start-year 2000 --end-year 2000 --res", "ne16np4_res"), "crop-global-present-ne120np4" : ("--start-year 2000 --end-year 2000 --res", "ne120np4_res"), "crop-global-present-0.125" : ("--start-year 2000 --end-year 2000 --hirespft --res", "nldas_res"), - "crop-global-1850" : ("--start-year 1850 --end-year 1850 --res", "most_res"), + "crop-global-1850" : ("--start-year 1850 --end-year 1850 --res", "standard_res"), + "crop-global-1850-low-res" : ("--start-year 1850 --end-year 1850 --res", "low_res"), + "crop-global-1850-ne16np4" : ("--start-year 1850 --end-year 1850 --res", "ne16np4_res"), "crop-global-1850-ne120np4" : ("--start-year 1850 --end-year 1850 --res", "ne120np4_res"), "crop-global-hist" : ("--start-year 1850 --end-year 2015 --nosurfdata --res", "standard_res"), "crop-global-SSP1-1.9" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP1-1.9 --res", "standard_res"), "crop-global-SSP1-2.6" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP1-2.6 --res", "standard_res"), "crop-global-SSP2-4.5" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP2-4.5 --res", "standard_res"), + "crop-global-SSP2-4.5-low-res" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP2-4.5 --res", "low_res_all"), + "crop-global-SSP2-4.5-hi-res" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP2-4.5 --res", "hi_res_all"), "crop-global-SSP3-7.0" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP3-7.0 --res", "standard_res"), "crop-global-SSP4-3.4" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP4-3.4 --res", "standard_res"), "crop-global-SSP4-6.0" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP4-6.0 --res", "standard_res"), "crop-global-SSP5-3.4" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP5-3.4 --res", "standard_res"), "crop-global-SSP5-8.5" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP5-8.5 --res", "standard_res"), - "crop-global-SSP5-8.5-other" : ("--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP5-8.5 --res", "ssp585_res") } # --------------------------