#! /usr/local/bin/tcsh -fvx # Set Loadleveler options #----------------------------------------------------------------------- ## IBM ##------------ #@ job_name = newsstclim06 #@ class = csl_reg #@ shell = /usr/local/bin/tcsh #@ job_type = parallel #@ network.MPI = css0,shared,us #@ output = newsstclim06.out #@ error = newsstclim06.err #@ total_tasks = 16 #@ node = 16 #@ node_usage = not_shared #@ queue ## Base code is: cam1_8_dev2 set caseid = newsstclim06 set rootdir = /fs/cgd/data0/rosinski/cam1.8.dev4/cam1 set srcdir = $rootdir/models set submitdir = /fs/cgd/home0/rosinski/control_runs set outdir = /fs/cgd/data0/rosinski set nelapse = -500 set nsrest = 1 set rundir = /ptmp/$LOGNAME/$caseid set builddir = /ptmp/$LOGNAME/$caseid set absems_data = abs_ems_factors_fastvx.052001.nc set bndtvo = noaao3.1990.21999.nc set bndtvs = amipbc_sst_T42_clim.nc ## Make the run and build directories mkdir -p $rundir mkdir -p $builddir ## Build then run the model cd $builddir || exit 1 ## Set Rootdir file for ESMF echo $rootdir >! Rootdir ## Set search path for standalone CCM (i.e. uncoupled) run with Eularian ## dynamics. cat >! Filepath << EOF || exit 1 $srcdir/atm/cam/src/dynamics/eul $srcdir/atm/cam/src/advection/slt $srcdir/atm/cam/src/control $srcdir/atm/cam/src/physics/cam1 $srcdir/csm_share $srcdir/utils/timing $srcdir/atmlnd_share $srcdir/atm/cam/src/ocnsice/dom $srcdir/lnd/clm2/src/main $srcdir/lnd/clm2/src/biogeophys $srcdir/lnd/clm2/src/biogeochem $srcdir/lnd/clm2/src/mksrfdata $srcdir/lnd/clm2/src/ecosysdyn $srcdir/lnd/clm2/src/riverroute $srcdir/atm/cam/src/utils $srcdir/ice/csim4 EOF ## Build appropriate misc.h, params.h, and preproc.h files for standalone, ## T42, 26-level model. ## ## Any additional source code mods should probably go here as well. This is ## because when gmake is run, it will look in the directory from which it is ## run (i.e. $TMPDIR/$caseid) for source files *before* the directories ## specified in Filepath. if ( ! -e misc.h ) then cat >! misc.h << EOF || exit 1 #ifndef MISC_SET #define MISC_SET #define AIX #define SPMD #define FORTFFT #define SHELL_MSS #endif EOF endif if ( ! -e params.h ) then cat >! params.h << EOF || exit 1 #ifndef PARAMS_SET #define PARAMS_SET #define PCNST 1 #define PNATS 1 #define PLEV 26 #define PLEVR 26 #define PLON 128 #define PLAT 64 #define PTRM 42 #define PTRN 42 #define PTRK 42 #define PCOLS 16 #endif EOF endif if ( ! -e preproc.h ) then cat >! preproc.h << EOF || exit 1 #ifndef PREPROC_SET #define PREPROC_SET #define SHELL_MSS #define COUP_CAM #define SPMD #define LSMLON 128 #define LSMLAT 64 #endif EOF endif ## Build the model setenv EXENAME ccm3bin setenv LIB_NETCDF /usr/local/lib32/r4i4 setenv MODEL_EXEDIR $rundir setenv SPMD TRUE cp $srcdir/atm/cam/bld/Makefile . env DEBUG=FALSE NEWBUILD=TRUE timex gnumake -j6 >&! out.gmake || exit 1 ## Build a namelist and run the model cd $rundir cat >! namelist << EOF || exit 1 &camexp absems_data= '$absems_data' bndtvo = '$bndtvo' bndtvs = '$bndtvs' caseid = '$caseid' ctitle = '$caseid fractional with SST dataset from Jim Hurrell' kmxhdc = 5 ncdata = '/fs/cgd/data0/jet/JAN1.T42L26.navytopo.FRAC.ross.c020305.nc' fincl1 = 'TSICE','TSICE1','TSICE2','TSICE3','TSICE4','ICETIME' nelapse = $nelapse nsrest = $nsrest iyear_ad = 1950 start_ymd = 00000101 / &clmexp fpftcon = '/fs/cgd/csm/inputdata/lnd/clm2/pftdata/pft-physiology-vegdyn-cleanup-ratio' fsurdat = '/fs/cgd/csm/inputdata/lnd/clm2/srfdata/cam/surface-data.128x064.topo.nc' finidat = ' ' mksrf_fglacier= '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_glacier.nc' mksrf_flai = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_lai.nc' mksrf_flanwat = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_lanwat.nc' mksrf_fsoicol = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_soicol_clm2.nc' mksrf_fsoitex = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_soitex.10level.nc' mksrf_furban = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_urban.nc' mksrf_fvegtyp = '/fs/cgd/csm/inputdata/lnd/clm2/rawdata/mksrf_pft.nc' / EOF if ( ! -e $absems_data ) then cp /fs/cgd/csm/inputdata/atm/cam1/rad/$absems_data . endif if ( ! -e $bndtvo ) then cp /fs/cgd/csm/inputdata/atm/cam1/ozone/$bndtvo . endif if ( ! -e $bndtvs ) then cp /fs/cgd/csm/people/rosinski/datasets/$bndtvs . endif setenv XLSMPOPTS "stack=86000000" limit stacksize unlimited set modelret = good if ( $nsrest == 0 ) then set outfile = out.${caseid}.init else set outfile = out.${caseid}.rest.$$ endif poe ./ccm3bin < namelist >&! $outfile || set modelret = bad ## Tar up the source code for the case and write to the mass store cd $builddir || exit 1 set curdate = `date +%y-%m-%d.%H:%M` set tarname = $caseid.$curdate.tar tar cf $tarname *.[Fch] *.F90 $srcdir Makefile $rundir/namelist $rundir/$outfile set mslogname = `echo $LOGNAME | tr '[a-z]' '[A-Z]'` mswrite -w passwd -t 1000 $tarname /$mslogname/csm/$caseid/atm/$tarname; \rm $tarname & cp $rundir/$outfile $outdir ## Resubmit if ( $modelret == good && $nsrest == 1 ) then cd $submitdir set thisscript = $0:t llsubmit $thisscript endif sleep 30 exit 0