diff --git a/CHANGELOG.md b/CHANGELOG.md index 7224d4c..478eb22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed +- Remove restart options F and G + ### Deprecated ----------------------------- diff --git a/GEOSldas_App/CMakeLists.txt b/GEOSldas_App/CMakeLists.txt index c6189b5..f13954e 100644 --- a/GEOSldas_App/CMakeLists.txt +++ b/GEOSldas_App/CMakeLists.txt @@ -21,7 +21,6 @@ ecbuild_add_executable ( set (scripts process_hist.csh - remap_config_ldas.py ens_forcing/average_ensemble_forcing.py ens_forcing/ensemble_forc.py ens_forcing/regrid_forc.csh diff --git a/GEOSldas_App/ldas_setup b/GEOSldas_App/ldas_setup index 2252391..a49cf5e 100755 --- a/GEOSldas_App/ldas_setup +++ b/GEOSldas_App/ldas_setup @@ -20,7 +20,6 @@ from collections import OrderedDict from dateutil.relativedelta import relativedelta from remap_utils import * from remap_catchANDcn import * -from remap_config_ldas import * from lenkf_j_template import * """ This script is intended to be run from any installed directory with GEOSldas.x and ldas_setup @@ -881,8 +880,31 @@ class LDASsetup: config['output']['surface']['surflay'] = dzsf config['output']['surface']['wemin'] = wemin_out - config = remap_config_ldas( config, RESTART_str, self.rqdExeInp['RESTART_PATH'], self.rqdExeInp['RESTART_ID']) - + if RESTART_str == "M" : # restart from merra2 + yyyymm = int(YYYYMMDDHH[0:6]) + merra2_expid = "d5124_m2_jan10" + if yyyymm < 197901 : + exit("Error. MERRA-2 data < 1979 not available\n") + elif (yyyymm < 199201): + merra2_expid = "d5124_m2_jan79" + elif (yyyymm < 200106): + merra2_expid = "d5124_m2_jan91" + elif (yyyymm < 201101): + merra2_expid = "d5124_m2_jan00" + elif (yyyymm < 202106): + merra2_expid = "d5124_m2_jan10" + # There was a rewind in MERRA2 from Jun 2021 to Sept 2021 + elif (yyyymm < 202110): + merra2_expid = "d5124_m2_jun21" + config['input']['shared']['expid'] = merra2_expid + config['input']['shared']['rst_dir'] = mk_outdir+ '/merra2_tmp_'+ YYYYMMDDHH + config['input']['surface']['wemin'] = 26 + config['input']['shared']['bc_base'] = '/discover/nobackup/projects/gmao/bcs_shared/fvInput/ExtData/esm/tiles' + config['input']['shared']['bc_version'] = 'GM4' + config['input']['shared']['agrid'] = 'C180' + config['input']['shared']['ogrid'] = '1440x720' + config['input']['shared']['omodel'] = 'data' + catch_obj = catchANDcn(config_obj = config) catch_obj.remap() @@ -1444,12 +1466,6 @@ def _printExeInputKeys(rqdExeInpKeys): print ('# RESTART: M #') print ('# Re-tile from archived MERRA-2 restart file. #') print ('# #') - print ('# RESTART: F #') - print ('# Re-tile from FP (Forward Processing) restart file. #') - print ('# #') - print ('# RESTART: G #') - print ('# Re-tile from any AGCM catch[cnclmxx]_internal_rst file.#') - print ('# #') print ('# -------------------------------------------------------- #') print ('# IMPORTANT: #') print ('# Except for RESTART=1, SPIN-UP is REQUIRED in almost #') @@ -1464,15 +1480,10 @@ def _printExeInputKeys(rqdExeInpKeys): print ('# restarts stored as follows: #') print ('# RESTART_PATH/RESTART_ID/output/RESTART_DOMAIN/rs/ #') print ('# #') - print ('# For RESTART=0 or RESTART=M or RESTART=F: #') + print ('# For RESTART=0 or RESTART=M: #') print ('# There is no need to specify RESTART_ID, RESTART_PATH, #') print ('# and RESTART_DOMAIN. #') print ('# #') - print ('# For RESTART=G: #') - print ('# RESTART_ID : full_path_to_AGCM_experiment_directory #') - print ('# RESTART_PATH : full_path_of_the_AGCM_restart_file #') - print ('# RESTART_DOMAIN is NOT required. #') - print ('# #') print ('############################################################') print () print ('RESTART:') diff --git a/GEOSldas_App/remap_config_ldas.py b/GEOSldas_App/remap_config_ldas.py deleted file mode 100644 index 9848916..0000000 --- a/GEOSldas_App/remap_config_ldas.py +++ /dev/null @@ -1,103 +0,0 @@ -import os -import sys -import subprocess -import shutil -import glob -import ruamel.yaml -import shlex -from remap_utils import * - -def remap_config_ldas(config, RESTART_str, RESTART_PATH, RESTART_ID): - yyyymmddhh = config['input']['shared']['yyyymmddhh'] - MODEL = config['input']['surface']['catch_model'] - out_dir = config['output']['shared']['out_dir'] - # MERRA2 - if RESTART_str == "M" : - config['input']['shared'] = merra2_expid(config['input']['shared']) - config['input']['shared']['rst_dir'] = out_dir+ '/merra2_tmp_'+ yyyymmddhh - config['input']['surface']['wemin'] = 26 - config['input']['shared']['bc_base'] = '/discover/nobackup/projects/gmao/bcs_shared/fvInput/ExtData/esm/tiles' - config['input']['shared']['bc_version'] = 'GM4' - config['input']['shared']['agrid'] = 'C180' - config['input']['shared']['ogrid'] = '1440x720' - config['input']['shared']['omodel'] = 'data' - - if RESTART_str == "G" : - # WY note: it is a bad idea to overload restart_path and restart_id - config['input']['surface']['catch_tilefile'] = os.path.realpath(RESTART_ID+'scratch/tile.data') - config['input']['shared']['rst_dir'] = os.path.dirname(RESTART_PATH) + '/' - config['input']['surface']['wemin'] = 13 - if 'NLv' in config['input']['surface']['catch_tilefile'] : config['input']['surface']['wemin'] = 26 - - if RESTART_str == "F" : - date_16 = 20170124 - date_17 = 20171101 - date_21 = 20180711 - date_22 = 20190313 - date_25 = 20200130 - date_27 = 20210225 - date_29 = 20220228 - expdata = int(yyyymmddhh[0:8]) - if (expdate < date_16): - print( "WARNING : FP restarts before $date_16 are not availale.") - print( " Please select RESTART: M and use MERRA-2, instead.") - sys.exit(1) - - config['input']['shared']['bc_base'] = '/discover/nobackup/projects/gmao/bcs_shared/fvInput/ExtData/esm/tiles' - config['input']['shared']['bc_version'] = 'ICA' - config['input']['shared']['agrid'] = 'C720' - config['input']['shared']['ogrid'] = 'C720' - - config['input']['surface']['wemin'] = 26 - config['input']['shared']['rst_dir'] = out_dir+'/InData'+ '/' - suffix = '_21z.tar' - - if ((date_16 <= expdate) and (expdate < date_17)): - fpver = 'GEOS-5.16/GEOSadas-5_16/' - fplab = 'f516_fp' - config['input']['shared']['bc_base'] = '/discover/nobackup/projects/gmao/bcs_shared/fvInput/ExtData/esm/tiles' - config['input']['shared']['bc_version'] = 'GM4' - config['input']['shared']['agrid'] = 'C720' - config['input']['shared']['ogrid'] = '2880x1440' - - suffix = '_21z.bin' - - if ((date_17 <= expdate) and (expdate < date_21)): - fpver = 'GEOS-5.17/GEOSadas-5_17/' - fplab = 'f517_fp' - - if ((date_21 <= expdate) and (expdate < date_22)): - fpver = 'GEOS-5.21/GEOSadas-5_21/' - fplab = 'f521_fp' - - if ((date_22 <= expdate) and (expdate < date_25)): - fpver = 'GEOS-5.22/GEOSadas-5_22/' - fplab = 'f522_fp' - - if (date_25 <= expdate and expdate < date_27) : - fpver = 'GEOS-5.25/GEOSadas-5_25/' - fplab = 'f525land_fpp' - config['input']['surface']['wemin'] = 13 - - if (date_27 <= expdate and expdate < date_29) : - fpver = 'GEOS-5.27/GEOSadas-5_27/' - fplab = 'f5271_fpp' - config['input']['surface']['wemin'] = 13 - - if (date_29 <= expdate ) : - fpver = 'GEOS-5.29/GEOSadas-5_29/' - fplab = 'f5293_fpp' - config['input']['surface']['wemin'] = 13 - - - rstfile = '/archive/u/dao_ops/'+fpver+'/'+fplab+'/rs/Y'+YYYY+'/M'+MM+'/'+fplab+'.'+MODEL+'_internal_rst.'+YYYYMMDD + suffix - fname = os.path.basename(rstfile) - dest = out_dir+'/InData'+ '/'+fname - print("Copy file "+ rstfile +" to " + out_dir+'/InData'+ '/') - shutil.copy(rstfile, dest) - - if suffix == "_21z.tar" : - new_rst = out_dir+'/InData'+ '/'+ fplab+'.'+MODEL+'_internal_rst.'+YYYYMMDD+'_21z.nc4' - subprocess.call(['tar', '-xvf', dest, new_rst]) - - return config