diff --git a/cime_config/buildlib b/cime_config/buildlib new file mode 100755 index 000000000..06747a2dd --- /dev/null +++ b/cime_config/buildlib @@ -0,0 +1,214 @@ +#!/usr/bin/env python + +""" +build fv3gfs library +""" +import sys, os + +_CIMEROOT = os.environ.get("CIMEROOT") +if _CIMEROOT is None: + raise SystemExit("ERROR: must set CIMEROOT environment variable") + +_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools") +sys.path.append(_LIBDIR) + +from standard_script_setup import * +from CIME.buildlib import parse_input +from CIME.case import Case +from CIME.utils import run_cmd, expect, new_lid, stringify_bool, safe_copy +from CIME.build import get_standard_makefile_args + +logger = logging.getLogger(__name__) + +def _build_ccpp_cmake_files(ccpp_blddir, ccpp_srcmods): + """ + Set env variables CCPP_SCHEMES and CCPP_CAPS to the full path list of files to be compiled. + Check the case SourceMods/src.fv3gfs for files and update the env variables if required. + """ + needs_update = False + for ccppfile in ("SCHEMES","CAPS"): + ccpp_srcfiles = [] + current_settings_fname = os.path.join(ccpp_blddir,"cime_cmake_{}.txt".format(ccppfile)) + current_settings = None + if os.path.isfile(current_settings_fname): + with open(current_settings_fname,"r") as fcs: + current_settings = fcs.read() + + with open(os.path.join(ccpp_blddir,"physics","CCPP_{}.cmake").format(ccppfile)) as fd: + env_var = "CCPP_{}".format(ccppfile) + for line in fd: + line = line.strip() + if os.path.isfile(line): + tfile = os.path.basename(line) + if os.path.isfile(os.path.join(ccpp_srcmods,tfile)): + line = os.path.join(ccpp_srcmods,tfile) + ccpp_srcfiles.append(line) + os.environ[env_var] = ";".join(ccpp_srcfiles) + if not current_settings or current_settings != os.environ[env_var]: + needs_update = True + with open(current_settings_fname,"w") as fw: + fw.write(os.environ[env_var]) + + return needs_update + +def _install_configure_file(case, srcroot, bldroot, ccpp): + """ + Create a file configure.fv3 used by the fv3 build system + """ + machine = case.get_value("MACH") + compiler = case.get_value("COMPILER") + debug = case.get_value("DEBUG") + openmp = case.get_value("BUILD_THREADED") + mpilib = case.get_value("MPILIB") + caseroot = case.get_value("CASEROOT") + + conf_template_dir = os.path.join(srcroot,"src","model","conf") + expect(os.path.isdir(conf_template_dir),"ERROR: conf dir {} not found".format(conf_template_dir)) + conf_file = "configure.fv3.{}.{}".format(machine,compiler) + if not os.path.isfile(os.path.join(conf_template_dir,conf_file)): + # try generic + conf_file = "configure.fv3.linux.{}".format(compiler) + + expect(os.path.isfile(os.path.join(conf_template_dir,conf_file)),"ERROR no configuration file found for {} {} {}".format(machine,compiler,mpilib)) + conf_file = os.path.join(conf_template_dir, conf_file) + conf_dir = os.path.join(bldroot,"conf") + if not os.path.isdir(conf_dir): + os.makedirs(os.path.join(bldroot,"conf")) + with open(conf_file) as finp, open(os.path.join(conf_dir,"configure.fv3"), 'w') as fout: + for s in finp.xreadlines(): + if s.startswith("SHELL"): + fout.write(s) + fout.write("-include {}\n".format(os.path.join(caseroot,"Macros.make"))) + fout.write("CPPDEFS += -DSTATIC\n") + fout.write("FPPFLAGS += -DSTATIC\n") + continue + if s.startswith("DEBUG ="): + fout.write("DEBUG = {}\n".format("Y" if debug else "N")) + continue + if s.startswith("OPENMP ="): + fout.write("OPENMP = {}\n".format("Y" if openmp else "N")) + continue + if s.startswith("CCPP ="): + fout.write("CCPP = {}\n".format("Y" if ccpp else "N")) + continue + if s.startswith("LDFLAGS :="): + fout.write(s.rstrip()+"-L$(ESMF_LIBSDIR) -lesmf -L. -lfv3cap\n") + continue + if s.startswith("INCLUDE ="): + if ccpp: + s = s.rstrip()+" -I{} ".format(os.path.join(bldroot,"ccpp","physics")) + s+= "-I{}\n".format(os.path.join(bldroot,"gfsphysics")) + fout.write(s) + return conf_dir + +def _create_dir_structure(srcdir,targetdir, sourcemods=None): + """ + Reproduce the directory structure of srcdir in targetdir with + links to the files of srcdir. If a sourcemods dir is provided and + a file in the source tree matchs a file in the sourcemods directory + link the sourcemods file instead + """ + for dirpath, _, filenames in os.walk(srcdir): + structure = targetdir + dirpath[len(srcdir):] + if not os.path.isdir(structure): + os.mkdir(structure) + for fname in filenames: + # ignore some files + if fname.startswith('.') or fname.startswith('#') or fname.startswith('~'): + continue + newfullpath = os.path.join(structure,fname) + if sourcemods and os.path.isfile(os.path.join(sourcemods,fname)): + # If file exists in case sourcemods use it + linkto = os.path.join(sourcemods,fname) + else: + # otherwise link original file + linkto = os.path.join(dirpath,fname) + + # Broken link or link to wrong path - remove it + if (os.path.lexists(newfullpath) and not os.path.exists(newfullpath)) or \ + (os.path.exists(newfullpath) and not os.path.samefile(linkto,newfullpath)): + os.unlink(newfullpath) + # Create new link + if not os.path.exists(newfullpath): + os.symlink(linkto,newfullpath) + + + +############################################################################### +def buildlib(caseroot, libroot, bldroot): +############################################################################### + + with Case(caseroot) as case: + # retrieve variables + srcroot = case.get_value("SRCROOT") + srcdir = os.path.join(srcroot,"src","model") + # fv3_bldroot = os.path.join(bldroot,"FV3") + + _create_dir_structure(srcdir,bldroot, + sourcemods=os.path.join(caseroot,"SourceMods","src.fv3gfs")) + + #Now build ccpp if needed + ccpp = case.get_value("BUILD_CCPP") #__CCPP__ Y/N + gmake = case.get_value("GMAKE") + gmake_j = case.get_value("GMAKE_J") + cmake_flags = " -DCOMPILER={} ".format(case.get_value("COMPILER")) + cmake_flags += " -DMPILIB={} ".format(case.get_value("MPILIB")) + cmake_flags += " -DDEBUG={} ".format(stringify_bool(case.get_value("DEBUG"))) + + if ccpp: + ccpp_srcmods = os.path.join(caseroot,"SourceMods","src.fv3gfs") + ccpp_suites = case.get_value("CCPP_SUITES") + + ccpp_srcroot = os.path.join(srcdir,"FV3","ccpp") + ccpp_blddir=os.path.join(bldroot,"FV3","ccpp") + if not os.path.exists(os.path.join(ccpp_blddir,"cime_cmake_CAPS.txt")): + ccpp_preconfig = os.path.join(ccpp_srcroot,"framework","scripts","ccpp_prebuild.py") + ccpp_config = os.path.join(ccpp_srcroot,"config","ccpp_prebuild_config.py") + + run_cmd("{} --config {} --static --suites={} --builddir {}" + .format(ccpp_preconfig, ccpp_config, ccpp_suites, + os.path.join(bldroot,"FV3"),verbose=True, + from_dir=srcdir)) + _build_ccpp_cmake_files(ccpp_blddir,os.path.join(caseroot,"SourceMods","src.fv3gfs")) + cmake_flags += " -DCCPP=ON -DSUITES={} ".format(ccpp_suites) + cmake_flags += " -DMPI=ON " + cmake_flags += " -DSTATIC=ON " + + if case.get_value("BUILD_THREADED"): + cmake_flags += " -DOPENMP=ON -Dcompile_threaded=TRUE " + mklroot = os.environ.get("MKLROOT") + if mklroot: + cmake_flags += " -DMKL_DIR={}".format(mklroot) + for name in ("NETCDF", "NETCDF_DIR", "NETCDF_PATH", "TACC_NETCDF_DIR", "NETCDFROOT"): + netcdf = os.environ.get(name) + if netcdf: + cmake_flags += " -DNETCDF_DIR={} ".format(netcdf) + break + if not netcdf: + # one last try + from distutils.spawn import find_executable + netcdf = find_executable("ncdump") + if netcdf: + netcdf = os.path.dirname(netcdf).parent + cmake_flags += " -DNETCDF_DIR={} ".format(netcdf) +# cmake_flags += " -DCMAKE_INSTALL_PREFIX={} ".format(libroot) + os.environ["CMAKE_C_COMPILER"]="mpicc" + os.environ["CMAKE_CXX_COMPILER"]="mpicxx" + os.environ["CMAKE_Fortran_COMPILER"]="mpif90" + os.environ["CMAKE_Platform"]="cime" + safe_copy(os.path.join(srcroot,"src","model","FV3","cime","cime_config","configure_cime.cmake"), + os.path.join(srcroot,"src","model","cmake")) + run_cmd("cmake {} {} ".format(cmake_flags,os.path.join(srcroot,"src","model")),from_dir=bldroot,verbose=True) + gmake_args = "-j {} ".format(gmake_j)+get_standard_makefile_args(case) + gmake_args += " VERBOSE=1 " + stat, out, err = run_cmd("{} {}".format(gmake,gmake_args),from_dir=bldroot,verbose=True) + expect(stat==0,"Build error from fv3 {}".format(err)) + +def _main_func(): + caseroot, libroot, bldroot = parse_input(sys.argv) + buildlib(caseroot, libroot, bldroot) + +############################################################################### + +if __name__ == "__main__": + _main_func() diff --git a/cime_config/buildnml b/cime_config/buildnml new file mode 100755 index 000000000..8005a3ef3 --- /dev/null +++ b/cime_config/buildnml @@ -0,0 +1,593 @@ +#!/usr/bin/env python + +"""FV3GFS namelist creator +""" + +# Typically ignore this. +# pylint: disable=invalid-name + +# Disable these because this is our standard setup +# pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-position + +import os, shutil, sys, glob, stat, filecmp, imp, re + +CIMEROOT = os.environ.get("CIMEROOT") +if CIMEROOT is None: + raise SystemExit("ERROR: must set CIMEROOT environment variable") +sys.path.append(os.path.join(CIMEROOT, "scripts", "Tools")) + +from standard_script_setup import * +from CIME.case import Case +from CIME.nmlgen import NamelistGenerator +from CIME.utils import expect, get_model +from CIME.buildnml import create_namelist_infile, parse_input +from CIME.utils import run_cmd, safe_copy + +logger = logging.getLogger(__name__) + +# find factors of a number +def factors(n): + return set(x for tup in ([i, n//i] for i in range(1, int(n**0.5)+1) if n % i == 0) for x in tup) + +# check if all elements in a list are same +def checkList(lst): + ele = lst[0] + chk = True + # Comparing each element with first item + for item in lst: + if ele != item: + chk = False + break + return chk + +# prepares the input files of a case and places in rundir: +def prep_input(case): + casename = case.get_value("CASE") + caseroot = case.get_value("CASEROOT") + Buildconf = case.get_value("CASEBUILD") + rundir = case.get_value("RUNDIR") + atm_grid = case.get_value("ATM_GRID") + testcase = case.get_value("TEST") + model = get_model() + +# This section below is how input files +# are copied in NEMS and is just for reference +# +# # Specify input files. +# filters input { +# # WORK FILE <=filter= SOURCE FILE +# 'input.nml' <=atparse= " @[PARMnems]/input.mom6.nml.IN" +# 'model_configure' <=atparse= " @[PARMnems]/model_configure.IN" +# 'aerosol.dat' <=copyfrom= " @[FV3_input_data]/INPUT" +# 'co2historicaldata_201*.txt' <=copyfrom= " @[FV3_input_data]/INPUT" +# 'global_o3prdlos.f77' <=copyfrom= " @[FV3_input_data]/INPUT" +# 'sfc_emissivity_idx.txt' <=copyfrom= " @[FV3_input_data]/INPUT" +# 'solarconstant_noaa_an.txt' <=copyfrom= " @[FV3_input_data]/INPUT" +# '*grb' <=copyfrom= " @[FV3_input_data]" +# '*_table' <=copyfrom= " @[FV3_input_data]" +# '*configure' <=copyfrom= " @[FV3_input_data]" +# 'INPUT' <=copy= " @[FV3_input_data]/INPUT" +# 'INPUT/C96_mosaic.nc' <=copy= " @[FV3_input_data]/INPUT/grid_spec.nc" +# 'nems.configure' <=atparse= " @[PARMnems]/nems.configure.@[nems_configure].IN" +# 'INPUT/*' <=copyfrom= " @[UGCS_input_data]/MOM6_FIX_025deg" +# 'INPUT/MOM6_IC_TS.nc' <=copy= " @[UGCS_input_data]/MOM6_IC/MOM6_IC_TS.nc" +# '*' <=copyfrom= " @[UGCS_input_data]/CICE" +# '*' <=copyfrom= " @[UGCS_input_data]/MEDIATOR_atm_flux" +# 'INPUT/grid_spec.nc' <=copy= " @[UGCS_input_data]/COUPLED/grid_spec.nc" +# 'diag_table' <=copy= " @[UGCS_input_data]/COUPLED/diag_table" +# } + + # Determine fv3 inputdata directory (xml variable in env_mach_specific.xml) + ugcs_input_dir = os.environ.get("UGCSINPUTPATH") + expect((ugcs_input_dir is not None), "You must set the UGCSINPUTPATH to your input directory location.") + + # Determine fv3 fixed files directory (xml variable in env_mach_specific.xml) + ugcs_fixed_file_dir = os.environ.get("UGCSFIXEDFILEPATH") + expect((ugcs_fixed_file_dir is not None), "You must set the UGCSFIXEDFILEPATH to your fixed files directory location.") + + # Determine fv3 addtional files directory (xml variable in env_mach_specific.xml) + ugcs_addon_dir = os.environ.get("UGCSADDONPATH") + expect((ugcs_addon_dir is not None), "You must set the UGCSADDONPATH to your grid spec and diag_table files directory location.") + + # fv3 input directory + fv3_input_dir = ugcs_input_dir + + # maps input file -> output file + # if output file is "", then keep same name + fv3_input_files = { + "aerosol.dat" : "", + "co2historicaldata_201*.txt" : "", + "global_o3prdlos.f77" : "", + "global_h2oprdlos.f77" : "", + "sfc_emissivity_idx.txt" : "", + "solarconstant_noaa_an.txt" : "", + "*grb" : "", + "*_table" : "", + "*configure" : "", + "INPUT/*" : "INPUT", + "input.nml" : "", + "diag_table" : "", + "itaga.0*" : "", + "postxconfig-NT.txt" : "", + "params_grib2_tbl_new" : "", + } + + # additional files for run + ugcs_input_files = { + os.path.join(ugcs_addon_dir, atm_grid, "grid_spec.nc") : "INPUT/grid_spec.nc", + } + #os.path.join(ugcs_addon_dir, atm_grid, "diag_table.cmeps") : "diag_table", + + # create symbolic links for these dirs + input_dirs_to_link = [] + + # resolution dependent parameters (need to manage fixed files) + if (atm_grid == 'C96'): + res_str = "t126.384.190" + if (model == "ufs"): + res_str = "t1534.3072.1536" + elif (atm_grid == 'C384'): + res_str = "t766.1536.768" + else: + expect(False, "Given resolution " + atm_grid + " currently not supported!") + + # create symbolic links for these files + input_files_to_link = { + os.path.join(ugcs_fixed_file_dir, "global_glacier.2x2.grb") : "global_glacier.2x2.grb", + os.path.join(ugcs_fixed_file_dir, "global_maxice.2x2.grb") : "global_maxice.2x2.grb", + os.path.join(ugcs_fixed_file_dir, "RTGSST.1982.2012.monthly.clim.grb") : "RTGSST.1982.2012.monthly.clim.grb", + os.path.join(ugcs_fixed_file_dir, "global_snoclim.1.875.grb") : "global_snoclim.1.875.grb", + os.path.join(ugcs_fixed_file_dir, "global_snowfree_albedo.bosu." + res_str + ".rg.grb") : "global_snowfree_albedo.bosu." + res_str + ".rg.grb", + os.path.join(ugcs_fixed_file_dir, "global_albedo4.1x1.grb") : "global_albedo4.1x1.grb", + os.path.join(ugcs_fixed_file_dir, "CFSR.SEAICE.1982.2012.monthly.clim.grb") : "CFSR.SEAICE.1982.2012.monthly.clim.grb", + os.path.join(ugcs_fixed_file_dir, "global_tg3clim.2.6x1.5.grb") : "global_tg3clim.2.6x1.5.grb", + os.path.join(ugcs_fixed_file_dir, "global_vegfrac.0.144.decpercent.grb") : "global_vegfrac.0.144.decpercent.grb", + os.path.join(ugcs_fixed_file_dir, "global_vegtype.igbp." + res_str + ".rg.grb") : "global_vegtype.igbp." + res_str + ".rg.grb", + os.path.join(ugcs_fixed_file_dir, "global_soiltype.statsgo." + res_str + ".rg.grb") : "global_soiltype.statsgo." + res_str + ".rg.grb", + os.path.join(ugcs_fixed_file_dir, "global_soilmgldas." + res_str + ".grb") : "global_soilmgldas." + res_str + ".grb", + os.path.join(ugcs_fixed_file_dir, "seaice_newland.grb") : "seaice_newland.grb", + os.path.join(ugcs_fixed_file_dir, "global_shdmin.0.144x0.144.grb") : "global_shdmin.0.144x0.144.grb", + os.path.join(ugcs_fixed_file_dir, "global_shdmax.0.144x0.144.grb") : "global_shdmax.0.144x0.144.grb", + os.path.join(ugcs_fixed_file_dir, "global_slope.1x1.grb") : "global_slope.1x1.grb", + os.path.join(ugcs_fixed_file_dir, "global_zorclim.1x1.grb") : "global_zorclim.1x1.grb", + os.path.join(ugcs_fixed_file_dir, "global_slmask." + res_str + ".grb") : "global_slmask." + res_str + ".grb", + os.path.join(ugcs_fixed_file_dir, "global_mxsnoalb.uariz." + res_str + ".rg.grb") : "global_mxsnoalb.uariz." + res_str + ".rg.grb" + } + + #if (atm_grid == 'C384'): + # input_files_to_link[os.path.join(ugcs_fixed_file_dir, "global_soilmgldas.statsgo." + res_str + ".grb")] = "global_soilmgldas.statsgo." + res_str + ".grb" + input_files_to_link[os.path.join(ugcs_fixed_file_dir, "global_soilmgldas.statsgo." + res_str + ".grb")] = "global_soilmgldas.statsgo." + res_str + ".grb" + + # Make sure that rundir exists. If not, make it: + if not os.path.exists(rundir): + os.makedirs(rundir) + + # create INPUT and RESTART directories + logger.info("\tCreating INPUT and RESTART directory") + run_cmd("mkdir " + os.path.join(rundir, "INPUT")) + run_cmd("mkdir " + os.path.join(rundir, "RESTART")) + + # copy template input files: + logger.info("\tCopying input files") + + for input_file_name in fv3_input_files: + input_file_path = os.path.join(fv3_input_dir, input_file_name) + if "*" not in input_file_name and not os.path.exists(input_file_path): + expect(False, "Couldn't find input file path: " + input_file_path) + logger.info("cp " + input_file_path + " " + os.path.join(rundir, fv3_input_files[input_file_name])) + run_cmd("cp " + input_file_path + " " + os.path.join(rundir, fv3_input_files[input_file_name])) + + for input_file_name in ugcs_input_files: + input_file_path = os.path.join(ugcs_input_dir, input_file_name) + if not os.path.exists(input_file_path): + expect(False, "Couldn't find input file path: " + input_file_path) + logger.info("cp " + input_file_path + " " + os.path.join(rundir, ugcs_input_files[input_file_name])) + run_cmd("cp " + input_file_path + " " + os.path.join(rundir, ugcs_input_files[input_file_name])) + + logger.info("\tLinking input directories") + for input_dir_name in input_dirs_to_link: + input_dir_path = os.path.join(input_templates_dir, input_dir_name) + if not os.path.exists(input_dir_path): + expect(False, "Couldn't find input direcory " + input_dir_path) + run_cmd("ln -s " + input_dir_path + " " + os.path.join(rundir, input_dir_name)) + + logger.info("\tLinking input static input files") + for input_file_name in input_files_to_link: + if not os.path.isfile(input_file_name): + expect(False, "Couldn't find file " + input_file_name) + run_cmd("ln -s " + input_file_name + " " + os.path.join(rundir, input_files_to_link[input_file_name])) + + # do replacements in diag_table + if os.path.exists(os.path.join(caseroot,"SourceMods","src.fv3gfs","diag_table")): + safe_copy(os.path.join(caseroot,"SourceMods","src.fv3gfs","diag_table"), rundir) + if os.path.exists(os.path.join(rundir, "diag_table")): + with open(os.path.join(rundir,"diag_table"), 'r') as diag_table_in: + with open(os.path.join(rundir,"diag_table.tmp"), 'w') as diag_table: + for line in diag_table_in: + line = line.replace('CASENAME', casename) + # Use cesm style file names + line = line.replace("%4yr-%3dy", "%4yr-%2mo-%2dy-%5sc") + if testcase: + # this makes all real fields double precision + if line.endswith('2\n'): + line = line[:-2] + "1\n" + # this changes output frequency and number of records per file + # using HIST_N and HIST_OPTION from case + if line.startswith("\""+casename): + parts = line.split(',') + if len(parts) > 7: + parts[1] = "1" + parts[2] = "days" + parts[6] = parts[1] + parts[7] = parts[2] + line = ','.join(parts)+"\n" + diag_table.writelines(line) + os.rename(os.path.join(rundir,"diag_table.tmp"), os.path.join(rundir,"diag_table")) + +# pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements +#################################################################################### +def _create_namelist3(case, confdir, infile, nmlgen): +#################################################################################### + """Write out the namelist for this component. + + Most arguments are the same as those for `NamelistGenerator`. + The `confdir` argument is used to specify the directory in which output files will be placed. + """ + #---------------------------------------------------- + # Clear out old data. + #---------------------------------------------------- + data_list_path = os.path.join(case.get_case_root(), "Buildconf", "fv3gfs.input_data_list") + + #---------------------------------------------------- + # Create config dictionary + #---------------------------------------------------- + config = {} + + #---------------------------------------------------- + # Initialize namelist defaults + #---------------------------------------------------- + nmlgen.init_defaults(infile, config) + + #---------------------------------------------------- + # Write out model.configure namelist + #---------------------------------------------------- + namelist_file = os.path.join(confdir, "config.nml") + print(namelist_file) + nmlgen.write_output_file(namelist_file, data_list_path, sorted_groups=False) + +# pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements +#################################################################################### +def _create_namelist2(case, confdir, infile, nmlgen1, nmlgen2): +#################################################################################### + """Write out the namelist for this component. + + Most arguments are the same as those for `NamelistGenerator`. + The `confdir` argument is used to specify the directory in which output files will be placed. + """ + #---------------------------------------------------- + # Clear out old data. + #---------------------------------------------------- + data_list_path = os.path.join(case.get_case_root(), "Buildconf", "fv3gfs.input_data_list") + + #---------------------------------------------------- + # Create config dictionary + #---------------------------------------------------- + config = {} + + #---------------------------------------------------- + # Initialize namelist defaults + #---------------------------------------------------- + nmlgen2.init_defaults(infile, config) + + #---------------------------------------------------- + # Modify namelist defaults + #---------------------------------------------------- + + # modify layout namelist option to be consistent with given number of task + atm_grid = case.get_value("ATM_GRID") + ntask_atm = int(case.get_value('NTASKS_ATM')) + ntask_write = int(nmlgen1.get_value('write_tasks_per_group')) + n_write_groups = int(nmlgen1.get_value('write_groups')) + ntiles = int(nmlgen2.get_value('ntiles')) + + if ((ntask_atm-ntask_write)%ntiles != 0): + expect(False, "(ntask_atm-write_tasks_per_group*write_groups)%%ntiles must equal to 0! (%d-%d)/%d = %d" % + (ntask_atm,ntask_write,ntiles,(ntask_atm-(ntask_write*n_write_groups))%ntiles)) + else: + # get default value + layout = nmlgen2.get_value('layout') + layout_x = int(layout[0]) + layout_y = int(layout[1]) + + # check it + if (((layout_x*layout_y)*ntiles+(ntask_write*n_write_groups)) != ntask_atm): + logger.info("\tWARNING: (layout(1)*layout(2)*ntiles+write_tasks_per_group*write_groups) must equal to %d but it is %d!" % + (ntask_atm,(layout_x*layout_y)*ntiles+(ntask_write*n_write_groups))) + + # calculate total number of task + ntask = (ntask_atm-(ntask_write*n_write_groups))/ntiles + # calculate dividers + fact1 = sorted(list(factors(ntask))) + fact2 = [ntask/i for i in fact1] + # get differencies + res = [abs(x1 - x2) for (x1, x2) in zip(fact1, fact2)] + # check values + for i in xrange(len(res)): + if (atm_grid == 'C96'): + if (96%fact1[i] != 0 or 96%fact2[i] != 0): + res[i] = 999 + elif (atm_grid == 'C384'): + if (384%fact1[i] != 0 or 384%fact2[i] != 0): + res[i] = 999 + else: + expect(False, "Given resolution " + atm_grid + " currently not supported!") + # check there is a suitable option for layout or not? + if (checkList(res) and res[0] == 999): + expect(False, "You must provide a resonable layout pair! The resolution (" + atm_grid[1:] + ") need to be divided evenly with layouts. To fix the issue, 1) the total number of PEs assigned to ATM component or 2) modify write_tasks_per_group (in user_nl_fv3gfs) can be modified.") + # find indices of smallest diff + i = res.index(min(res)) + # set layout + nmlgen2.set_value('layout', value=[fact1[i],fact2[i],]) + # print out new factors + logger.info("\tusing automatically generated layout configuration %s x %s" % (fact1[i], fact2[i])) + + # modify file names based on selected resolution + res_dict = {'384x190':'t126', '1536x768':'t766'} + + for var in nmlgen2.get_group_variables('namsfc'): + var_str = str(nmlgen2.get_value(var)) + if re.search('.t[1-9][1-9]', var_str): + lst = var_str.split(".") + indx = [i for i, item in enumerate(lst) if re.search('t[1-9][1-9]', item)] + key = "%sx%s" % (nmlgen1.get_value('imo'), nmlgen1.get_value('jmo')) + lst[indx[0]] = res_dict[key] + lst[indx[0]+1] = nmlgen1.get_value('imo') + lst[indx[0]+2] = nmlgen1.get_value('jmo') + var_str_out = ".".join(lst) + nmlgen2.set_value(var, value=var_str_out) + + #---------------------------------------------------- + # Write out namelist groups + #---------------------------------------------------- + groups=['amip_interp_nml', + 'atmos_model_nml', + 'diag_manager_nml', + 'fms_io_nml', + 'fms_nml', + 'fv_core_nml', + 'external_ic_nml', + 'gfs_physics_nml', + 'gfdl_cloud_microphysics_nml', + 'interpolator_nml', + 'namsfc', + 'fv_grid_nml', + 'nam_stochy', + 'nam_sfcperts', + 'MOM_input_nml'] + + namelist_file = os.path.join(confdir, "atm_in") + nmlgen2.write_output_file(namelist_file, data_list_path, groups=groups, sorted_groups=False) + +# pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements +#################################################################################### +def _create_namelist1(case, confdir, infile, nmlgen): +#################################################################################### + """Write out the namelist for this component. + + Most arguments are the same as those for `NamelistGenerator`. + The `confdir` argument is used to specify the directory in which output files will be placed. + """ + #---------------------------------------------------- + # Clear out old data. + #---------------------------------------------------- + data_list_path = os.path.join(case.get_case_root(), "Buildconf", "fv3gfs.input_data_list") + if os.path.exists(data_list_path): + os.remove(data_list_path) + + #---------------------------------------------------- + # Create config dictionary + #---------------------------------------------------- + config = {} + + #---------------------------------------------------- + # Initialize namelist defaults + #---------------------------------------------------- + nmlgen.init_defaults(infile, config) + + #---------------------------------------------------- + # Modify namelist defaults + #---------------------------------------------------- + + # modify start date + run_start_date = case.get_value('RUN_STARTDATE').split('-') + yyyy = int(run_start_date[0]) + mm = int(run_start_date[1]) + dd = int(run_start_date[2]) + nmlgen.set_value('start_year', value=yyyy) + nmlgen.set_value('start_month', value=mm) + nmlgen.set_value('start_day', value=dd) + + run_start_tod = case.get_value('START_TOD') + hh = int(run_start_tod//3600) + mi = int((run_start_tod-hh*3600)//60) + ss = int(run_start_tod-hh*3600-mi*60) + nmlgen.set_value('start_hour', value=hh) + nmlgen.set_value('start_minute', value=mi) + nmlgen.set_value('start_second', value=ss) + + # TODO: modify forecast lenght ? need to use dateutil.relativedelta.relativedelta to simplify the code + #cal_option = case.get_value('CALENDAR') + #stop_option = case.get_value('STOP_OPTION') + #stop_n = int(case.get_value('STOP_N')) + #if 'nyear' in stop_option: + # if cal_option == 'NO_LEAP': + # nmlgen.set_value('nhours_fcst', value=stop_n*365*24) + # elif cal_option == 'GREGORIAN': + # nmlgen.set_value('nhours_fcst', value=(datetime.datetime(yyyy+stop_n,mm,dd)-datetime.datetime(yyyy, mm, dd)).hours) + #elif 'nmonth' in stop_option: + # ddif = (datetime.datetime(yyyy+(stop_n/12), mm+(stop_n%12)+1, dd, hh, mi, ss)-datetime.datetime(yyyy, mm, dd, hh, mi, ss)).days + # if cal_option == 'NO_LEAP': + # nleap = 0 + # for i in xrange(yyyy, yyyy+(stop_n/12)+1): + # nleap = nleap+calendar.isleap(i) + # nmlgen.set_value('nhours_fcst', value=(ddif-nleap)*24) + # elif cal_option == 'GREGORIAN': + # nmlgen.set_value('nhours_fcst', value=ddif*24) + #elif 'nday' in stop_option: + # #ddif = (datetime.datetime(yyyy+(stop_n/12), mm+(stop_n%12)+1, dd, hh, mi, ss)-datetime.datetime(yyyy, mm, dd, hh, mi, ss)).days + + # modify restart option + if case.get_value('MEDIATOR_READ_RESTART'): + nmlgen.set_value('RUN_CONTINUE', value=True) + else: + nmlgen.set_value('RUN_CONTINUE', value=False) + + # resolution dependent parameters + atm_grid = case.get_value("ATM_GRID") + if (atm_grid == 'C96'): + nmlgen.set_value('imo', value=384) + nmlgen.set_value('jmo', value=190) + elif (atm_grid == 'C384'): + nmlgen.set_value('imo', value=1536) + nmlgen.set_value('jmo', value=768) + else: + expect(False, "Given resolution " + atm_grid + " currently not supported!") + + #---------------------------------------------------- + # Write out model.configure namelist + #---------------------------------------------------- + model_config_file = os.path.join(confdir, "model_configure") + nmlgen.write_nuopc_config_file(model_config_file, data_list_path) + +############################################################################### +def buildnml(case, caseroot, compname): +############################################################################### + + # Build the component namelist + if compname != "fv3gfs": + raise AttributeError + srcroot = case.get_value("SRCROOT") + rundir = case.get_value("RUNDIR") + + # copy/link input files + prep_input(case) + + # determine the confdir directory + #confdir = os.path.join(caseroot,"Buildconf","fv3gfsconf") + #if not os.path.isdir(confdir): + # os.makedirs(confdir) + + #---------------------------------------------------- + # Construct the namelist generator/s + #---------------------------------------------------- + # user definition *replaces* existing definition. + #namelist_xml_dir = os.path.join(srcroot, "components", "fv3", "cime_config") + + # determine directory for user modified namelist_definitions.xml and namelist_defaults.xml for + #user_xml_dir = os.path.join(caseroot, "SourceMods", "src.fv3gfs") + #expect (os.path.isdir(user_xml_dir), + # "user_xml_dir %s does not exist " %user_xml_dir) + + #definition_file = [os.path.join(namelist_xml_dir, "namelist_definition_fv3.xml")] + #user_definition = os.path.join(user_xml_dir, "namelist_definition_fv3.xml") + #if os.path.isfile(user_definition): + # definition_file = [user_definition] + #for file_ in definition_file: + # expect(os.path.isfile(file_), "Namelist XML file %s not found!" % file_) + + # create the namelist generator object for model_configure - independent of instance + #nmlgen1 = NamelistGenerator(case, definition_file) + + # create the namelist generator object for input.nml - independent of instance + #nmlgen2 = NamelistGenerator(case, definition_file) + + # create namelist_infile using user_nl_file as input + #user_nl_file = os.path.join(caseroot, "user_nl_fv3gfs") + #expect(os.path.isfile(user_nl_file), + # "Missing required user_nl_file %s " %(user_nl_file)) + #infile = os.path.join(confdir, "namelist_infile") + #create_namelist_infile(case, user_nl_file, infile) + #namelist_infile = [infile] + + # create namelist model_configure + #_create_namelist1(case, confdir, namelist_infile, nmlgen1) + + # copy namelist files to rundir + #if os.path.isdir(rundir): + # file1 = os.path.join(confdir, "model_configure") + # file2 = os.path.join(rundir, "model_configure") + # logger.debug("FV3 model configuration copy: file1 %s file2 %s " %(file1, file2)) + # shutil.copy2(file1, file2) + + # create namelist input.nml + #_create_namelist2(case, confdir, namelist_infile, nmlgen1, nmlgen2) + + # copy namelist files to rundir + #if os.path.isdir(rundir): + # file1 = os.path.join(confdir, "atm_in") + # file2 = os.path.join(rundir, "atm_in") + # logger.debug("FV3 namelist copy: file1 %s file2 %s " %(file1, file2)) + # shutil.copy2(file1, file2) + + # link file + #logger.info("\tLinking input namelist for FV3GFS") + #if not os.path.exists(rundir): + # expect(False, "Couldn't find run direcory " + rundir) + #run_cmd("ln -sf " + file2 + " " + os.path.join(rundir, "input.nml")) + + # create the namelist generator object for chgres + #definition_file = [os.path.join(namelist_xml_dir, "namelist_definition_chgres.xml")] + #user_definition = os.path.join(user_xml_dir, "namelist_definition_chgres.xml") + #if os.path.isfile(user_definition): + # definition_file = [user_definition] + #for file_ in definition_file: + # expect(os.path.isfile(file_), "Namelist XML file %s not found!" % file_) + #nmlgen3 = NamelistGenerator(case, definition_file) + + # create namelist for chgres + #_create_namelist3(case, confdir, namelist_infile, nmlgen3) + + # copy namelist files to rundir + #chgres_nml = os.environ.get("CHGRES_NML") + #expect((chgres_nml is not None), "You must set the CHGRES_NML to process data.") + + #if os.path.isdir(rundir): + # file1 = chgres_nml + # file2 = os.path.join(rundir, "fort.41") + # logger.debug("Chgres namelist copy: file1 %s file2 %s " %(file1, file2)) + # print("Chgres namelist copy: file1 %s file2 %s " %(file1, file2)) + # shutil.copy2(file1, file2) + + # copy chgres binary to rundir + #chgres_bin = os.environ.get("CHGRES_BIN") + #expect((chgres_bin is not None), "You must set the CHGRES_BIN to process data.") + + #if os.path.isdir(rundir): + # file1 = chgres_bin + # file2 = os.path.join(rundir, "chgres_cube.exe") + # logger.debug("Chgres executable copy: file1 %s file2 %s " %(file1, file2)) + # print("Chgres executable copy: file1 %s file2 %s " %(file1, file2)) + # shutil.copy2(file1, file2) + + # copy gfs.post binary to rundir + #ncep_post_bin = os.environ.get("NCEP_POST_BIN") + #expect((ncep_post_bin is not None), "You must set the NCEP_POST_BIN to process data.") + + #if os.path.isdir(rundir): + # file1 = chgres_bin + # file2 = os.path.join(rundir, "ncep_post") + # logger.debug("Post-processing executable copy: file1 %s file2 %s " %(file1, file2)) + # print("Post-processing executable copy: file1 %s file2 %s " %(file1, file2)) + # shutil.copy2(file1, file2) + + return + +############################################################################### +def _main_func(): + + caseroot = parse_input(sys.argv) + with Case(caseroot) as case: + buildnml(case, caseroot, "fv3gfs") + +if __name__ == "__main__": + _main_func() diff --git a/cime_config/config_archive.xml b/cime_config/config_archive.xml new file mode 100644 index 000000000..7dc47cfe5 --- /dev/null +++ b/cime_config/config_archive.xml @@ -0,0 +1,27 @@ + + + + r + rh\d* + rs + atmos_4xdaily.tile[123456].nc$ + i\..*\.nc$ + e + nhfil + + rpointer.atm$NINST_STRING + $CASE.fv3gfs$NINST_STRING.r.$DATENAME.nc + + + rpointer.atm + rpointer.atm_9999 + + casename.atmos_4xdaily.tile2.nc + + + + diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml new file mode 100644 index 000000000..77eb8085d --- /dev/null +++ b/cime_config/config_component.xml @@ -0,0 +1,66 @@ + + + + + + + + FV3GFS Atmosphere + + + + char + fv3gfs + fv3gfs + case_comp + env_case.xml + FV3GFS Atmosphere component + + + + logical + TRUE + case_comp + env_case.xml + Option for FV3GFS CCPP feature + + + + char + + FV3_GFS_v15 + + FV3_GFS_v15 + FV3_GFS_v15,FV3_GFS_v16beta + + case_comp + env_case.xml + Suite option for CCPP physics package + + + + + + ========================================= + Say something + ========================================= + + + diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml new file mode 100644 index 000000000..079fdc923 --- /dev/null +++ b/cime_config/config_compsets.xml @@ -0,0 +1,69 @@ + + + + + + ========================================= + compset naming convention + ========================================= + The compset longname below has the specified order + atm, lnd, ice, ocn, river, glc wave cesm-options + + The notation for the compset longname is + TIME_ATM[%phys]_LND[%phys]_ICE[%phys]_OCN[%phys]_ROF[%phys]_GLC[%phys]_WAV[%phys][_BGC%phys] + Where for the CAM specific compsets below the following is supported + TIME = Time period (e.g. 2000, HIST, RCP8...) + ATM = [CAM4, CAM5] + LND = [CLM40, CLM45, CLM50, SLND] + ICE = [CICE, DICE, SICE] + OCN = [DOCN, ,AQUAP, SOCN] + ROF = [RTM, SROF] + GLC = [CISM1, CISM2, SGLC] + WAV = [SWAV] + BGC = optional BGC scenario + + The OPTIONAL %phys attributes specify submodes of the given system + For example DOCN%DOM is the data ocean model for DOCN + ALL the possible %phys choices for each component are listed + with the -list command for create_newcase + ALL data models must have a %phys option that corresponds to the data model mode + + Each compset node is associated with the following elements + - lname + - alias + - support (optional description of the support level for this compset) + Each compset node can also have the following attributes + - grid (optional regular expression match for grid to work with the compset) + + + + + + F2000fv3gfs + 2000_FV3GFS_SLND_CICE%PRES_DOCN%DOM_SROF_SGLC_SWAV + + + + UFS_Weather + 2000_FV3GFS_SLND_SICE_SOCN_SROF_SGLC_SWAV + + + + UFS_S2S + 2000_FV3GFS_SLND_CICE_MOM6_SROF_SGLC_SWAV + + + + + ATM + CPL,ATM,OCN,ICE + CPL,ATM,OCN,ICE + + + + + FALSE + + + + diff --git a/cime_config/config_pes.xml b/cime_config/config_pes.xml new file mode 100644 index 000000000..3e1964489 --- /dev/null +++ b/cime_config/config_pes.xml @@ -0,0 +1,156 @@ + + + + + + + none + + 150 + 1 + 144 + 144 + 150 + 1 + 1 + 1 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 0 + 0 + 0 + 150 + 0 + 0 + 0 + 0 + + + + + + + + + none + + 150 + 1 + 360 + 360 + 150 + 1 + 1 + 1 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 0 + 0 + 0 + 360 + 0 + 0 + 0 + 0 + + + + + + + + + none + + 336 + 1 + 360 + 360 + 336 + 1 + 1 + 1 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 0 + 0 + 696 + 336 + 0 + 0 + 0 + 0 + + + + + + + + + none + + 150 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + diff --git a/cime_config/configure_cime.cmake b/cime_config/configure_cime.cmake new file mode 100644 index 000000000..9715438ac --- /dev/null +++ b/cime_config/configure_cime.cmake @@ -0,0 +1,98 @@ +message("") +message("Setting configuration for $ENV{CMAKE_Platform}") +message("") +include( $ENV{CASEROOT}/Macros.cmake ) + +get_filename_component (C_COMPILER_NAME ${CMAKE_C_COMPILER} NAME) +get_filename_component (CXX_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME) +get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME) +message("C compiler: ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION} (${C_COMPILER_NAME})") +message("CXX compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} (${CXX_COMPILER_NAME})") +message("Fortran compiler: ${CMAKE_Fortran_COMPILER_ID} ${CMAKE_Fortran_COMPILER_VERSION} (${Fortran_COMPILER_NAME})") +message("") + +option(DEBUG "Enable DEBUG mode" OFF) +option(REPRO "Enable REPRO mode" OFF) +option(VERBOSE "Enable VERBOSE mode" OFF) +option(32BIT "Enable 32BIT (single precision arithmetic in dycore)" OFF) +option(OPENMP "Enable OpenMP threading" ON) +option(AVX2 "Enable AVX2 instruction set" OFF) + +option(INLINE_POST "Enable inline post" OFF) + +message("1: CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS}") +set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FFLAGS}") +message("2: CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS}") + +if(32BIT) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FC_32BIT}") + add_definitions(-DOVERLOAD_R4) + add_definitions(-DOVERLOAD_R8) +else() + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FC_64BIT}") + if(NOT REPRO) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -no-prec-div -no-prec-sqrt") + endif() +endif() +message("3: CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS}") + +if(REPRO) + add_definitions(-DREPRO) + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${FC_REPRO}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CC_REPRO}") +endif() +message("4: CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS}") + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__IFC ${CFLAGS}") +set (CMAKE_EXE_LINKER_FLAGS "${LDFLAGS} ${SLIBS}") +# print build options + +if(DEBUG) + message("DEBUG is ENABLED") +else() + message("DEBUG is disabled") +endif() + +if(REPRO) + message("REPRO is ENABLED") +else() + message("REPRO is disabled") +endif() + +if(32BIT) + message("32BIT is ENABLED") +else() + message("32BIT is disabled") +endif() + +if(OPENMP) + message("OPENMP is ENABLED") +else() + message("OPENMP is disabled") +endif() + +if(AVX2) + message("AVX2 is ENABLED") +else() + message("AVX2 is disabled") +endif() + +if(INLINE_POST) + message("INLINE_POST is ENABLED") +else() + message("INLINE_POST is disabled") +endif() + + +set(NEMSIO_INC $ENV{NEMSIO_INC}) +set(POST_INC $ENV{POST_INC}) +set(NCEP_LIBS $ENV{POST_LIB} $ENV{NEMSIO_LIB} $ENV{G2_LIB4} $ENV{G2TMPL_LIB} $ENV{BACIO_LIB4} $ENV{SP_LIBd} $ENV{W3EMC_LIBd} $ENV{W3NCO_LIBd} $ENV{CRTM_LIB} $ENV{PNG_LIB} $ENV{JASPER_LIB} $ENV{Z_LIB}) + +set(ESMF_MOD ${ESMF_F90COMPILEPATHS}) +set(ESMF_LIBS "${ESMF_F90ESMFLINKRPATHS} ${ESMF_F90ESMFLINKPATHS} ${ESMF_F90ESMFLINKLIBS}") + +set(NETCDF_INC_DIR $ENV{NETCDF}/include) +set(NETCDF_LIBDIR $ENV{NETCDF}/lib) +set(NETCDF_LIBS -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf) + +message("") diff --git a/cime_config/cpl/atm_comp_nuopc.F90 b/cime_config/cpl/atm_comp_nuopc.F90 new file mode 100644 index 000000000..a8842e5f3 --- /dev/null +++ b/cime_config/cpl/atm_comp_nuopc.F90 @@ -0,0 +1,3 @@ +module atm_comp_nuopc + use fv3gfs_cap_mod, only : SetServices +end module atm_comp_nuopc diff --git a/cime_config/namelist_definition_chgres.xml b/cime_config/namelist_definition_chgres.xml new file mode 100644 index 000000000..012b45902 --- /dev/null +++ b/cime_config/namelist_definition_chgres.xml @@ -0,0 +1,216 @@ + + + + + + + + char + chgres + config + + + + INPUT/C96_mosaic.nc + + + + + char + chgres + config + + + + /glade/scratch/turuncu/fv3gfs/chgres/fix_sfc + + + + + char + chgres + config + + + + INPUT + + + + + char(6) + chgres + config + + + + oro_data.tile1.nc,oro_data.tile2.nc,oro_data.tile3.nc,oro_data.tile4.nc,oro_data.tile5.nc,oro_data.tile6.nc + + + + + char + chgres + config + + + + /glade/scratch/turuncu/fv3gfs/chgres/global_hyblev.l65.txt + + + + + char + chgres + config + + + + /glade/scratch/turuncu/fv3gfs/chgres/gfs.20190909 + + + + + char + chgres + config + + + + gfs.t00z.atmanl.nemsio + + + + + char + chgres + config + + + + gfs.t00z.sfcanl.nemsio + + + + + integer + chgres + config + + + + 9 + + + + + integer + chgres + config + + + + 9 + + + + + integer + chgres + config + + + + 0 + + + + + logical + chgres + config + + + + .true. + + + + + logical + chgres + config + + + + .true. + + + + + logical + chgres + config + + + + .true. + + + + + char + chgres + config + + + + gaussian + + + + + char(7) + chgres + config + + + + sphum,liq_wat,o3mr,ice_wat,rainwat,snowwat,graupel + + + + + char(7) + chgres + config + + + + spfh,clwmr,o3mr,icmr,rwmr,snmr,grle + + + + diff --git a/cime_config/namelist_definition_fv3.xml b/cime_config/namelist_definition_fv3.xml new file mode 100644 index 000000000..369ba5468 --- /dev/null +++ b/cime_config/namelist_definition_fv3.xml @@ -0,0 +1,3649 @@ + + + + + + + + + + + + logical + amip + amip_interp_nml + + + + .true. + + + + + logical + amip + amip_interp_nml + + + + .true. + + + + + logical + amip + amip_interp_nml + + + + .false. + + + + + logical + amip + amip_interp_nml + + + + .false. + + + + + char + amip + amip_interp_nml + + + + reynolds_oi + + + + + char + amip + amip_interp_nml + + + + climo + + + + + + + + + integer + fv3gfs + atmos_model_nml + + number of columns in each block sent to the physics. OpenMP threading is done over the number of blocks + + + 32 + + + + + logical + fv3gfs + atmos_model_nml + + whether to compute checksums for all variables passed into the GFS physics, before and after each physics timestep + + + .false. + + + + + logical + fv3gfs + atmos_model_nml + + whether only the dynamical core (and not the GFS physics) is executed when running the model, essentially running the model as a solo dynamical core + + + .false. + + + + + real(1028) + fv3gfs + atmos_model_nml + + array listing the diagnostic output times (in hours) for the GFS physics + + + 6.0 + + + + + real + fv3gfs + atmos_model_nml + + + + 840.0 + + + + + real + fv3gfs + atmos_model_nml + + + + 6.0 + + + + + real + fv3gfs + atmos_model_nml + + + + 0.0 + + + + + real + fv3gfs + atmos_model_nml + + + + -1.0 + + + + + + + + + logical + fv3gfs + diag_manager_nml + + + + .false. + + + + + + + + + logical + fmsio + fms_io_nml + + set checksum_required to true to compare checksums stored in the attribute of a field against the checksum after reading in the data + + + .false. + + + + + integer + fmsio + fms_io_nml + + + + 100 + + + + + integer + fmsio + fms_io_nml + + + + 100 + + + + + + + + + char + fms + fms_nml + + the level of clock granularity used for performance timing sections of code + + NONE,COMPONENT,SUBCOMPONENT,MODULE_DRIVER,MODULE,ROUTINE,LOOP,INFRA + + ROUTINE + + + + + integer + fms + fms_nml + + the size in words of the MPP_DOMAINS user stack + + + 3000000 + + + + + logical + fms + fms_nml + + if set to true, memory usage statistics will be printed at various points in the code + + + .false. + + + + + + + + + integer(2) + required + fv_core_nml + + processor layout on each tile. + + + 6,8 + + + + + integer(2) + io + fv_core_nml + + layout of output files on each tile. + + + 1,1 + + + + + integer + required + fv_core_nml + + number of tiles on the domain + + + 6 + + + + + integer + required + fv_core_nml + + number of grid corners in the x­direction on one tile of the domain + + + 385 + + + + + integer + required + fv_core_nml + + number of grid corners in the x­direction on one tile of the domain + + + 385 + + + + + integer + required + fv_core_nml + + number of vertical levels + + + 64 + + + + + integer + grid + fv_core_nml + + which type of grid to use. + + + -1 + + + + + logical + nonhydrostatic + fv_core_nml + + whether to re­initialize the nonhydrostatic state, by re­computing dz from hydrostatic balance and setting w to 0 + + + .true. + + + + + logical + diagnostic + fv_core_nml + + whether to turn on additional diagnostics in fv_dynamics + + + .false. + + + + + logical + diagnostic + fv_core_nml + + checks whether the values of a number of variables are within a reasonable range at the end of a dynamics time step, and prints a warning if not + + + .false. + + + + + logical + initialization + fv_core_nml + + whether to reset the model vertical levels on startup to the values hard­coded in fv_eta.F90, instead of using the values in the restart files + + + .false. + + + + + integer + damping + fv_core_nml + + controls behavior of sponge layers at the upper boundary + + + 10 + + + + + logical + initialization + fv_core_nml + + whether to nudge the stratospheric water vapor back to an analytic approximation of HALOE climatology + + + .true. + + + + + logical + initialization + fv_core_nml + + during the adiabatic initialization (na_init > 0), if set to .true., delz is nudged back to the value specified in the initial conditions, instead of nudging the temperature back to the initial value. + + + .false. + + + + + real + solver + fv_core_nml + + time scale (in days) for Rayleigh friction applied to horizontal and vertical winds + + + 10.0 + + + + + real + solver + fv_core_nml + + pressure below which no Rayleigh damping is applied if tau > 0 + + + 7.5e2 + + + + + real + damping + fv_core_nml + + strength of second­order diffusion in the top sponge layer + + + 0.15 + + + + + real + damping + fv_core_nml + + strength of second­order diffusion in the second sponge layer from the model top + + + 0.02 + + + + + integer + solver + fv_core_nml + + vertical remapping scheme for temperature + + + -9 + + + + + integer + solver + fv_core_nml + + vertical remapping scheme for the winds + + + 9 + + + + + integer + solver + fv_core_nml + + vertical remapping scheme for vertical velocity in nonhydrostatic simulations + + + 9 + + + + + integer + solver + fv_core_nml + + vertical remapping scheme for tracers + + + 9 + + + + + logical + nonhydrostatic + fv_core_nml + + whether to use the hydrostatic or nonhydrostatic solver + + + .false. + + + + + logical + tracers + fv_core_nml + + option to enable hydrostatic application of heating from the physics in a nonhydrostatic simulation + + + .false. + + + + + logical + tracers + fv_core_nml + + whether to compute hydrostatic pressure for input to the physics + + + .false. + + + + + real + solver + fv_core_nml + + parameter specifying fraction of time­off­centering for backwards evaluation of the pressure gradient force + + + 0.0 + + + + + real + nonhydrostatic + fv_core_nml + + controls behavior of the non­hydrostatic solver + + + 1.0 + + + + + real + nonhydrostatic + fv_core_nml + + safety factor for minimum nonhydrostatic pressures, which will be limited so the full pressure is no less than p_fac times the hydrostatic pressure + + + 0.1 + + + + + integer + timestep + fv_core_nml + + number of vertical remappings per dt_atmos (physics time step) + + + 2 + + + + + integer + timestep + fv_core_nml + + number of small dynamics (acoustic) timesteps between vertical remapping + + + 6 + + + + + integer + tracers + fv_core_nml + + number of water species to be included in condensate and water vapor loading + + + 6 + + + + + integer + initialization + fv_core_nml + + number of forward­backward dynamics steps used to initialize adiabatic solver + + + 1 + + + + + real + damping + fv_core_nml + + coefficient for external (barotropic) mode damping + + + 0.0 + + + + + integer + tracers + fv_core_nml + + the number of tracers which are not to be advected by the dynamical core, but still passed into the dynamical core; the last dnats+pnats tracers in field_table are not advected + + + 1 + + + + + real + solver + fv_core_nml + + timescale (in seconds) at which to remove two­delta­z instability when the local (between two adjacent levels) Richardson number is less than 1 + + + 450.0 + + + + + real + damping + fv_core_nml + + coefficient for background second­order divergence damping + + + 0.0 + + + + + integer + damping + fv_core_nml + + order of divergence damping (0 = second­order, 1 = fourth­order, 2 = sixth­order, 3 = eighth­order) + + + 2 + + + + + real + damping + fv_core_nml + + dimensionless coefficient for the second­order Smagorinsky­type divergence damping + + + 0.1 + + + + + real + damping + fv_core_nml + + dimensionless coefficient for background higher­order divergence damping + + + 0.12 + + + + + real + damping + fv_core_nml + + coefficient for background other­variable damping + + + 0.02 + + + + + real + damping + fv_core_nml + + limit on heating from damped kinetic energy (K/s) + + + 0.002 + + + + + real + damping + fv_core_nml + + background KE production (m^2/s^3) over a small step + + + 0.0 + + + + + logical + damping + fv_core_nml + + whether to apply damping (of strength governed by vtdm4) to the other dynamical variables: vorticity, and nonhydrostatic vertical velocity, but not to the tracers + + + .true. + + + + + logical + initialization + fv_core_nml + + whether to initialize the model state using the data in an externally specified file, given in res_latlon_dynamics + + + .true. + + + + + logical + initialization + fv_core_nml + + read vertical level coefficients (ak, bk) from restarts instead of hard-coded values + + + .true. + + + + + logical + solver + fv_core_nml + + if it is set to true, compute geopotential inside of GFS physics + + + .false. + + + + + logical + initialization + fv_core_nml + + if external_ic = .true., reads in vapor, liquid, and ice phases of water and ozone from the NCEP analysis or reanalysis file. ncep_ic must be false + + + .true. + + + + + logical + initialization + fv_core_nml + + takes topography into account when initializing the model + + + .false. + + + + + logical + initialization + fv_core_nml + + if external_ic = .true., this variable says whether the file in res_latlon_dynamics is an NCEP analysis or reanalysis file + + + .false. + + + + + real + solver + fv_core_nml + + fraction of kinetic energy lost to net damping (divergence and vorticity) to be converted to heat + + + 1.0 + + + + + integer + solver + fv_core_nml + + horizontal advection scheme for momentum fluxes + + + 6 + + + + + integer + solver + fv_core_nml + + horizontal advection scheme for absolute vorticity and for vertical velocity in nonhydrostatic simulations + + + 6 + + + + + integer + solver + fv_core_nml + + horizontal advection scheme for potential temperature and layer thickness in nonhydrostatic simulations + + + 6 + + + + + integer + solver + fv_core_nml + + horizontal advection scheme for mass + + + -6 + + + + + integer + solver + fv_core_nml + + horizontal advection scheme for tracers + + + 8 + + + + + logical + initialization + fv_core_nml + + whether to adjust the global dry­air mass to the value set by dry_mass + + + .false. + + + + + real + solver + fv_core_nml + + fraction of total energy lost during one full dynamic step to be added back globally as heat; essentially the strength of the energy fixer in the physics + + + 1.0 + + + + + logical + initialization + fv_core_nml + + + + .true. + + + + + logical + solver + fv_core_nml + + whether to enable Angular momentum fixer + + + .false. + + + + + logical + tracers + fv_core_nml + + whether to enable Angular momentum fixer + + + .true. + + + + + logical + tracers + fv_core_nml + + whether to use a simpler and faster algorithm for interpolating the A­grid (cell­centered) wind tendencies computed from the physics to the D­grid + + + .false. + + + + + integer + diagnostic + fv_core_nml + + number of hours between print out of max/min and air/tracer mass diagnostics to standard output + + + 6 + + + + + logical + initialization + fv_core_nml + + whether to start from restart files, instead of cold­starting the model + + + .false. + + + + + logical + solver + fv_core_nml + + disables execution of the dynamical core, only running the initialization, diagnostic, and I/O routines, and any physics that may be enabled + + + .false. + + + + + logical + tracers + fv_core_nml + + whether to transport sub­cycled tracers layer­by­layer, each with its own computed sub­cycling timestep (if q_split = 0) + + + .true. + + + + + logical + diagnostics + fv_core_nml + + write out interpolated A-grid winds to restart files + + + .true. + + + + + logical + initialization + fv_core_nml + + whether to read a DA increment from an external file and apply it in an FV-consistent way + + + .false. + + + + + char + initialization + fv_core_nml + + if external_ic = .true. gives the filename of the input IC file + + + + + + + + + + + + logical + ic + external_ic_nml + + use orography maker filtered terrain mapping + + + .true. + + + + + integer + ic + external_ic_nml + + number of pressure levels + + + 65 + + + + + logical + ic + external_ic_nml + + + + .true. + + + + + logical + ic + external_ic_nml + + + + .false. + + + + + integer + ic + external_ic_nml + + + + 0 + + + + + + + + + real + gfs + gfs_physics_nml + + seconds between clearing of diagnostic buckets + + + 6.0 + + + + + logical + gfs + gfs_physics_nml + + flag for stratosphere h2o + + + .true. + + + + + logical + gfs + gfs_physics_nml + + flag for 3d diagnostic fields + + + .false. + + + + + real + gfs + gfs_physics_nml + + frequency for surface data cycling (s) + + + 24.0 + + + + + logical + gfs + gfs_physics_nml + + flag for gcycle surface option + + + .true. + + + + + logical + gfs + gfs_physics_nml + + flag for testing purpose + + + .false. + + + + + integer + gfs + gfs_physics_nml + + + + 5 + + + + + integer + gfs + gfs_physics_nml + + cloud microphysics scheme control flag + + + 11 + + + + + logical + gfs + gfs_physics_nml + + + + .false. + + + + + real + gfs + gfs_physics_nml + + frequency for shortwave radiation (s) + + + 3600.0 + + + + + real + gfs + gfs_physics_nml + + frequency for longwave radiation (s) + + + 3600.0 + + + + + integer + gfs + gfs_physics_nml + + use climatology alb, based on sfc type + + + 1 + + + + + integer + gfs + gfs_physics_nml + + use climatology alb, based on sfc type + + + 1 + + + + + integer + gfs + gfs_physics_nml + + 4-digit aerosol flag (dabc for aermdl,volc,lw,sw) + + + 111 + + + + + integer + gfs + gfs_physics_nml + + use prescribed global mean co2 + + + 2 + + + + + integer + gfs + gfs_physics_nml + + sub-column cloud approx flag in shortwave radiation + + + 2 + + + + + integer + gfs + gfs_physics_nml + + sub-column cloud approx flag in longwave radiation + + + 2 + + + + + integer + gfs + gfs_physics_nml + + use the old fixed solar constant in physcon + + + 2 + + + + + logical + gfs + gfs_physics_nml + + flag to output longwave heating rate + + + .true. + + + + + logical + gfs + gfs_physics_nml + + flag to output shortwave heating rate + + + .true. + + + + + logical + gfs + gfs_physics_nml + + flag for convective gravity wave drag + + + .true. + + + + + logical + gfs + gfs_physics_nml + + flag for calling shallow convection + + + .true. + + + + + logical + gfs + gfs_physics_nml + + flag controls preciptation type algorithm + + + .false. + + + + + logical + gfs + gfs_physics_nml + + reduced drag coefficent flag for high wind over sea + + + .true. + + + + + logical + gfs + gfs_physics_nml + + flag for tke dissipative heating + + + .true. + + + + + logical + gfs + gfs_physics_nml + + flag for hybrid edmf pbl scheme + + + .true. + + + + + logical + gfs + gfs_physics_nml + + flag controls whether clouds are random + + + .false. + + + + + logical + gfs + gfs_physics_nml + + flag for convective transport of tracers (RAS, CS, or SAMF) + + + .true. + + + + + logical + gfs + gfs_physics_nml + + + + .true. + + + + + integer + gfs + gfs_physics_nml + + flag for mass-flux shallow convection scheme + + + 2 + + + + + integer + gfs + gfs_physics_nml + + flag for mass-flux deep convection scheme + + + 2 + + + + + real(2) + gfs + gfs_physics_nml + + multiplication factors for cdmb and gwd + + + 1.0,1.2 + + + + + real + gfs + gfs_physics_nml + + pressure level above which to apply Rayleigh damping + + + 0.0 + + + + + integer + gfs + gfs_physics_nml + + sfc veg type data source (0 = USGS, 1 = IGBP, 2 = UMD) + + + 1 + + + + + integer + gfs + gfs_physics_nml + + flag for soil type data source (0 = Zobler soil type, 1 = STATSGO soil type) + + + 1 + + + + + logical + gfs + gfs_physics_nml + + for debugging purpose + + + .false. + + + + + integer(5) + gfs + gfs_physics_nml + + NSST related parameters (0 = no NST, 1 = uncoupled NST, 2 = coupled NST) + + + 0,0,0,0,0 + + + + + logical + gfs + gfs_physics_nml + + flag for NSSTM analysis in gcycle/sfcsub + + + .false. + + + + + real(2) + gfs + gfs_physics_nml + + auto conversion coeff from ice to snow + + + 0.0008,0.0005 + + + + + real(2) + gfs + gfs_physics_nml + + auto conversion coeff from cloud to rain + + + 0.00015,0.00015 + + + + + logical + gfs + gfs_physics_nml + + + + .true. + + + + + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + transport of momentum in sedimentation + + + .true. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + transport of heat in sedimentation + + + .false. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + consider snow in cloud fraciton calculation + + + .true. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + consider graupel in cloud fraction calculation + + + .true. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + consider rain in cloud fraciton calculation + + + .true. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + if it is true, the constants are specified by v * _fac + + + .false. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + if it is true, the constants are specified by v * _fac + + + .false. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + if it is true, the constants are specified by v * _fac + + + .false. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + if it is true, the constants are specified by v * _fac + + + .false. + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + max fall speed for ice + + + 1.0 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + max fall speed for snow + + + 2.0 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + max fall speed for graupel + + + 12.0 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + max fall speed for rain + + + 12.0 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + cloud ice limiter to prevent large ice build up + + + 1.0 + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + do prognostic ccn (yi ming's method) + + + .false. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + do inline cloud fraction + + + .true. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + has fast saturation adjustments + + + .true. + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + cloud water to water vapor (evaporation) + + + 225.0 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + water vapor to cloud water (condensation) + + + 150.0 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + graupel sublimation + + + 900.0 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + critical cloud drop radius (micro m) + + + 10.0e-6 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + base value for subgrid deviation / variability over land + + + 0.16 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + base value for subgrid deviation / variability over ocean + + + 0.10 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + max cloud water generation during remapping step if fast_sat_adj is set to true + + + 1.0e-3 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + max value of cloud water allowed from melted cloud ice + + + 1.0e-3 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + cloud ice to snow autoconversion threshold. it is highly dependent on horizontal resolution + + + 8.0E-5 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + snow to graupel density threshold (0.6e-3 in purdue lin scheme) + + + 1.0e-3 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + cloud ice to snow auto-conversion + + + 1000.0 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + accretion: cloud ice to snow (was 0.1 in zetac) + + + 0.05 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + snow to graupel accretion eff. (was 0.1 in zetac) + + + 0.01 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + rh increment for complete evaporation of cloud water and cloud ice + + + 0.30 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + rh increment for minimum evaporation of rain + + + 0.30 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + rh increment for sublimation of snow + + + 0.30 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + ccn over land (cm^-3) + + + 300.0 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + ccn over ocean (cm^-3) + + + 100.0 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + autoconversion cloud water to rain (use 0.5 to reduce autoconversion) + + + 0.5 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + rain accretion efficiency + + + 0.8 + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + use ppm fall scheme + + + .false. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + must be true when prog_ccn is false + + + .true. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + perform terminal fall with mono ppm scheme + + + .true. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + use linear mono slope for liquid autocconversions + + + .true. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + use linear mono slope for ice autocconversions + + + .true. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + to prevent excessive build up of cloud ice from external sources + + + .false. + + + + + logical + gfdl + gfdl_cloud_microphysics_nml + + fix negative water species + + + .true. + + + + + integer + gfdl + gfdl_cloud_microphysics_nml + + cloud scheme + + + 1 + + + + + real + gfdl + gfdl_cloud_microphysics_nml + + maximum micro - physics time step (s) + + + 150.0 + + + + + + + + + char + interpolation + interpolator_nml + + + + conserve_great_circle + + + + + + + + + char + nam + namsfc + + + + global_glacier.2x2.grb + + + + + char + nam + namsfc + + + + global_maxice.2x2.grb + + + + + char + nam + namsfc + + + + RTGSST.1982.2012.monthly.clim.grb + + + + + char + nam + namsfc + + + + global_snoclim.1.875.grb + + + + + char + nam + namsfc + + + + igbp + + + + + char + nam + namsfc + + + + global_snowfree_albedo.bosu.t766.1536.768.rg.grb + + + + + char + nam + namsfc + + + + global_albedo4.1x1.grb + + + + + char + nam + namsfc + + + + CFSR.SEAICE.1982.2012.monthly.clim.grb + + + + + char + nam + namsfc + + + + global_tg3clim.2.6x1.5.grb + + + + + char + nam + namsfc + + + + global_vegfrac.0.144.decpercent.grb + + + + + char + nam + namsfc + + + + global_vegtype.igbp.t766.1536.768.rg.grb + + + + + char + nam + namsfc + + + + global_soiltype.statsgo.t766.1536.768.rg.grb + + + + + char + nam + namsfc + + + + global_soilmgldas.statsgo.t766.1536.768.grb + + + + + char + nam + namsfc + + + + seaice_newland.grb + + + + + char + nam + namsfc + + + + + + + + + char + nam + namsfc + + + + + + + + + char + nam + namsfc + + + + + + + + + char + nam + namsfc + + + + global_shdmin.0.144x0.144.grb + + + + + char + nam + namsfc + + + + global_shdmax.0.144x0.144.grb + + + + + char + nam + namsfc + + + + global_slope.1x1.grb + + + + + char + nam + namsfc + + + + global_mxsnoalb.uariz.t766.1536.768.rg.grb + + + + + logical + nam + namsfc + + + + .false. + + + + + real(25) + nam + namsfc + + + + 99999 + + + + + real + nam + namsfc + + + + 90.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + real + nam + namsfc + + + + 99999.0 + + + + + + + + + char + fv3 + fv_grid_nml + + + + INPUT/grid_spec.nc + + + + + + + + + + + + + + + + + + + char + mominput + MOM_input_nml + + + + ./ + + + + + char + mominput + MOM_input_nml + + + + ./ + + + + + char + mominput + MOM_input_nml + + + + ./ + + + + + char(2) + mominput + MOM_input_nml + + + + INPUT/MOM_input,INPUT/MOM_override + + + + + + + + + integer + esmf_config + _no_group_var + + + + 1 + + + + + logical + esmf_config + _no_group_var + + + + .true. + + + + + integer + esmf_config + _no_group_var + + + + 480 + + + + + integer + esmf_config + _no_group_var + + + + 2012 + + + + + integer + esmf_config + _no_group_var + + + + 1 + + + + + integer + esmf_config + _no_group_var + + + + 2012 + + + + + integer + esmf_config + _no_group_var + + + + 0 + + + + + integer + esmf_config + _no_group_var + + + + 0 + + + + + integer + esmf_config + _no_group_var + + + + 0 + + + + + integer + esmf_config + _no_group_var + + + + 840 + + + + + logical + esmf_config + _no_group_var + + + + .true. + + + + + logical + esmf_config + _no_group_var + + + + .false. + + + + + integer + esmf_config + _no_group_var + + + + 450 + + + + + char + esmf_config + _no_group_var + + + julian,noleap,thirty_day,no_calendar + + julian + + + + + logical + esmf_config + _no_group_var + + + + .true. + + + + + logical + esmf_config + _no_group_var + + + + .false. + + + + + integer + esmf_config + _no_group_var + + + + 1 + + + + + logical + esmf_config + _no_group_var + + + + .false. + + + + + integer + esmf_config + _no_group_var + + + + 24 + + + + + integer + esmf_config + _no_group_var + + + + 0 + + + + + logical + esmf_config + _no_group_var + + + + .true. + + + + + integer + esmf_config + _no_group_var + + + + 1 + + + + + integer + esmf_config + _no_group_var + + + + 48 + + + + + integer + esmf_config + _no_group_var + + + + 2 + + + + + char + esmf_config + _no_group_var + + + + dyn sfc + + + + + char + esmf_config + _no_group_var + + + gaussian_grid,regional_latlon,rotated_latlon,lambert_conformal + + gaussian_grid + + + + + char + esmf_config + _no_group_var + + + netcdf,netcdf_esmf,nemsio + + netcdf + + + + + logical + esmf_config + _no_group_var + + + + .false. + + + + + logical + esmf_config + _no_group_var + + + + .false. + + + + + integer + esmf_config + _no_group_var + + + + 1536 + + + + + integer + esmf_config + _no_group_var + + + + 768 + + + + + integer + esmf_config + _no_group_var + + + + 3 + + + + + integer + esmf_config + _no_group_var + + + + 12 + + + + + integer + esmf_config + _no_group_var + + + + 1 + + + + + integer + esmf_config + _no_group_var + + + + -1 + + + + + logical + esmf_config + _no_group_var + + + + .false. + + + + + + + + + char + chgres + config + + Target grid mosaic file + + + INPUT/C96_mosaic.nc + + + + + char + chgres + config + + Directory containing target grid pre-computed fixed data (ex: soil type) + + + /glade/scratch/turuncu/fv3gfs/chgres/fix_sfc + + + + + char + chgres + config + + Directory containing the target grid orography files + + + INPUT + + + + + char(6) + chgres + config + + Target grid orography files. + + + oro_data.tile1.nc,oro_data.tile2.nc,oro_data.tile3.nc,oro_data.tile4.nc,oro_data.tile5.nc,oro_data.tile6.nc + + + + + + + char(6) + chgres + config + + File names containing input surface data + + + gfs.t00z.sfcanl.nemsio + + + + + char(6) + chgres + config + + File names of input atmospheric data + + + gfs.t00z.atmanl.nemsio + + + + + + + char + chgres + config + + Directory containing input atm or sfc files + + + /glade/scratch/turuncu/fv3gfs/chgres/gfs.20190909 + + + + + char + chgres + config + + Vertical coordinate definition file + + + /glade/scratch/turuncu/fv3gfs/chgres/global_hyblev.l65.txt + + + + + integer + chgres + config + + Cycle month + + + 9 + + + + + integer + chgres + config + + Cycle day + + + 9 + + + + + integer + chgres + config + + Cycle hour + + + 0 + + + + + logical + chgres + config + + Convert atmospheric data when true + + + .true. + + + + + logical + chgres + config + + Convert nst data when true + + + .true. + + + + + logical + chgres + config + + Convert sfc data when true + + + .true. + + + + + + + char + chgres + config + + Input data type: "restart" for fv3 tiled restart files; "history" for fv3 tiled history files; "gaussian" for fv3 gaussian nemsio files; "gfs_gaussian" for spectral gfs gaussian nemsio files. + + restart,history,gaussian,gfs_gaussian + + gaussian + + + + + + + char(100) + chgres + config + + Name of each atmos tracer to be processed. These names will be used to identify the tracer records in the output files. Follows the convention in the field table. + + + sphum,liq_wat,o3mr,ice_wat,rainwat,snowwat,graupel + + + + + char(100) + chgres + config + + Name of each atmos tracer record in the input file. May be different from value in 'tracers'. + + + spfh,clwmr,o3mr,icmr,rwmr,snmr,grle + + + + + + + + + + + integer + ncep_post + nampgb + + + + 50 + + + + + real(70) + ncep_post + nampgb + + + + 1000.,975.,950.,925.,900.,875.,850.,825.,800.,775.,750.,725.,700.,675.,650.,625.,600.,575.,550.,525.,500.,475.,450.,425.,400.,375.,350.,325.,300.,275.,250.,225.,200.,175.,150.,125.,100.,70.,50.,40.,30.,20.,15.,10.,7.,5.,3.,2.,1.,0.4 + + + + + + + char + ncep_post + freeform + + Output file name + + + nemsfile + + + + + char + ncep_post + freeform + + Input file format + + netcdf,binary,binarympiio,grib,binarynemsiompiio,sigio,binarynemsio + + binarynemsiompiio + + + + + char + ncep_post + freeform + + Output file format + + grib1,grib2 + + grib2 + + + + + char + ncep_post + freeform + + Model name + + GFS,FV3R,RAPR,RSM,NMM,NCAR + + GFS + + + + + char + ncep_post + freeform + + Flux file name + + + flxfile + + + + diff --git a/cime_config/user_nl_fv3gfs b/cime_config/user_nl_fv3gfs new file mode 100644 index 000000000..c3858ecba --- /dev/null +++ b/cime_config/user_nl_fv3gfs @@ -0,0 +1,7 @@ +!---------------------------------------------------------------------------------- +! Users should add all user specific namelist changes below in the form of +! namelist_var = new_namelist_value +! Note - that it does not matter what namelist group the namelist_var belongs to +!---------------------------------------------------------------------------------- + +