コード例 #1
0
[bld_dir, out_dir] = homme_utils.get_bld_and_out_dirs("sweqx", sub_dir)

# Configure HOMME
homme.config(exe="sweqx",
             np=np,
             plev=plev,
             pio=pio,
             mesh=True,
             bld_dir=bld_dir)
# Build namelist
homme.makenamelist(test_case=test_case,
                   nu=nu,
                   hypervis_power=hypervis_power,
                   hypervis_subcycle=hypervis_subcycle,
                   ne=0,
                   fine_ne=ne * ref,
                   ndays=ndays,
                   tstep=tstep,
                   statefreq=statefreq,
                   LFTfreq=1,
                   smooth=0,
                   interp_nlon=interp_nlon,
                   interp_nlat=interp_nlat,
                   out_dir=out_dir,
                   mesh_file=mesh_file,
                   max_hypervis_courant=max_hypervis_courant,
                   exe="sweqx")

# Run HOMME
homme.execute(exe="sweqx", bld_dir=bld_dir, out_dir=out_dir, ncpu=ncpu)
コード例 #2
0
    np=4,  # 4 x 4 GLL nodes on each element
    plev=1,  # Only 1 vertical level
    pio=False,  # Interpolate output, don't output on native grid
    mesh=False)  # Do not need to read an Exodus mesh file

## (4) Generate namelist
##    Note that any variable that can be adjusted in the namelist is an
##    allowable argument, but the majority of them can be set to default
##    values or omitted entirely. If a variable _is_ missing, please add
##    it to the makenamelist routine in homme.py
homme.makenamelist(
    test_case="swtc2",  # steady-state flow
    ne=10,  # uniform cube-sphere mesh (10x10x6)
    ndays=5,  # run for 5 days
    nu=0,  # no viscosity
    tstep=270,  # 270s timestep
    statefreq=320,  # output to screen every 320 timesteps
    interp_nlon=256,  # interpolate output onto a
    interp_nlat=128,  # 256 x 128 grid
    out_dir=out_dir,  # output to directory specified above
    exe="sweqx")  # setup output for shallow water tests

# (5) Run HOMME
##   Everything except ncpu is required here, if omitted ncpu will be set to
##   globalvars.default_ncpu
homme.execute(
    exe="sweqx",  # run shallow water SEM executable
    bld_dir=bld_dir,  # location of executable
    out_dir=out_dir,  # output to directory specified above
    ncpu=4)  # run on this many cores
コード例 #3
0
    pnetcdf=False,  # Do not compile with pnetcdf
    pio=False,  # Interpolate output, don't output on native grid
    mesh=False)  # Do not need to read an Exodus mesh file

## (4) Generate namelist
##    Note that any variable that can be adjusted in the namelist is an
##    allowable argument, but the majority of them can be set to default
##    values or omitted entirely. If a variable _is_ missing, please add
##    it to the makenamelist routine in homme.py
homme.makenamelist(
    test_case="swtc2",  # steady-state flow
    ne=10,  # uniform cube-sphere mesh (10x10x6)
    ndays=5,  # run for 5 days
    nu=0,  # no viscosity
    tstep=270,  # 270s timestep
    statefreq=320,  # output to screen every 320 timesteps
    interp_nlon=256,  # interpolate output onto a
    interp_nlat=128,  # 256 x 128 grid
    out_dir=out_dir,  # output to directory specified above
    exe="sweqx")  # setup output for shallow water tests

# (5) Run HOMME
##   Everything except ncpu is required here, if omitted ncpu will be set to
##   globalvars.default_ncpu
homme.execute(
    exe="sweqx",  # run shallow water SEM executable
    bld_dir=bld_dir,  # location of executable
    out_dir=out_dir,  # output to directory specified above
    ncpu=4,  # run on this many cores
    mach="bluefire")  # Run on bluefire (other options: redsky, generic)