run-pc.csh

来自「CCSM Research Tools: Community Atmospher」· CSH 代码 · 共 64 行

CSH
64
字号
#! /bin/tcsh -f#-----------------------------------------------------------------------## PC-linux##------------## ntasks is the number of MPI tasks.  On the PC we assume use a pure MPI## configuration which assigns 1 MPI task per processor.set ntasks = 2## Do our best to get sufficient stack memorylimit stacksize unlimited## ROOT OF CAM DISTRIBUTION - probably needs to be customized.## Contains the source code for the CAM distribution.## (the root directory contains the subdirectory "models")set camroot      = /fs/cgd/data0/$LOGNAME/cam2_0## ROOT OF CAM DATA DISTRIBUTION - needs to be customized unless running at NCAR.## Contains the initial and boundary data for the CAM distribution.## (the root directory contains the subdirectories "atm" and "lnd")setenv CSM_ROOT    /fs/cgd/csm/inputdata## Default namelist settings:## $case is the case identifier for this run. It will be placed in the namelist.## $runtype is the run type: initial, restart, or branch.## $nelapse is the number of timesteps to integrate, or number of days if negative.set case         = camrunset runtype      = initialset nelapse      = -1## $wrkdir is a working directory where the model will be built and run.## $blddir is the directory where model will be compiled.## $rundir is the directory where the model will be run.## $cfgdir is the directory containing the CAM configuration scripts.set wrkdir       = /ptmp/$LOGNAMEset blddir       = $wrkdir/$case/bldset rundir       = $wrkdir/$caseset cfgdir       = $camroot/models/atm/cam/bld## Ensure that run and build directories existmkdir -p $rundir                || echo "cannot create $rundir" && exit 1mkdir -p $blddir                || echo "cannot create $blddir" && exit 1## If an executable doesn't exist, build one.if ( ! -x $blddir/cam ) then    cd $blddir                  || echo "cd $blddir failed" && exit 1    $cfgdir/configure -s -spmd  || echo "configure failed" && exit 1    echo "building CAM in $blddir ..."    gmake -j2 >&! MAKE.out      || echo "CAM build failed: see $blddir/out.gmake" && exit 1endif## Create the namelistcd $blddir                      || echo "cd $blddir failed" && exit 1$cfgdir/build-namelist -s -case $case -runtype $runtype -o $rundir/namelist \ -namelist "&camexp nelapse=$nelapse /"  || echo "build-namelist failed" && exit 1## Run CAMcd $rundir                      || echo "cd $rundir failed" && exit 1echo "running CAM in $rundir"mpirun -np $ntasks $blddir/cam < namelist  || echo "CAM run failed" && exit 1exit 0

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?