Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/csh
- ## Installing SMOKE model
- ## IMPORTANT:: Please run this script on csh / tcsh shell (bash shell will not work)
- ## This script has been modified to run on Eddy@gcm1.gist.ac.kr
- ## Make proper changes in the linking section
- ##_____________________________________________________________________________________________________________
- echo "The SMOKE model home directory will be -"
- mkdir SMOKE
- cd SMOKE/
- echo $cwd
- ## Downloading the required scripts, Source code and Data
- echo "Downloading required files and this should not take long."
- echo "Thank you for understanding."
- wget ftp://ftp.unc.edu/pub/cmas/SOFTWARE/MODELS/SMOKE/3.5/smoke_install.csh
- wget ftp://ftp.unc.edu/pub/cmas/SOFTWARE/MODELS/SMOKE/3.5/MOVES_Processing_Scripts_SMOKEv35_Mar2013.zip
- wget ftp://ftp.unc.edu/pub/cmas/SOFTWARE/MODELS/SMOKE/3.5/smoke_v35.nctox.data.tar.gz
- wget ftp://ftp.unc.edu/pub/cmas/SOFTWARE/MODELS/SMOKE/3.5/smoke_v35.Linux2_x86_64pg.tar.gz
- ## setting important env variable
- setenv SMK_HOME $cwd
- source smoke_install.csh
- cd $SMK_HOME/scripts/
- ## Determining OS for compilation
- cat > platform << EOF
- #!/bin/csh -f
- #***************************************************************************
- #
- # COPYRIGHT (C) 2006, Carolina Environmental Program - UNC Chapel Hill
- # All Rights Reserved
- #
- # See file COPYRIGHT for conditions of use.
- #
- # Center for Environmental Modeling for Policy Development
- # Carolina Environmental Program
- # University of North Carolina
- # 137 E. Franklin St., CB# 6116
- # Chapel Hill, NC 27599-6116
- #
- # smoke@unc.edu
- #
- # Last Updated: 9-25-06
- #***************************************************************************
- #
- # Purpose: Configure platform settings for running and compiling SMOKE
- #
- # Usage Notes: <include hardware and operating system restrictions>
- #
- # Script must be executed by "source platform" to set
- # the environment variables in the parent.
- #
- # History of Major Revisions: (in reverse chronological order)
- #
- # Date: Unknown
- # Ted Smith Environmental Programs - MCNC
- # 919 248 9232 smith_w@mcnc.org
- # creation
- # Date: September 25, 2006
- # Zac Adelman CEMPD - UNC
- # zac@unc.edu
- # updated to remove all references to EDSS
- # generalized for non-Linux O/S
- # Date: March 15, 2011
- # BH Baek CEMPD - UNC
- # bbaek@unc.edu
- # removed M6FLAG : no more support of MOBILE6
- #
- # %W% %P% %G% %U%
- # Determine operating system for compiling SMOKE
- # Set executable format, making allowances for 64-bit architecture
- setenv SMOKE_EXE Linux2_x86_64pg
- # Set default compiler flags for Linux; if using other O/S override by setting env variables manually
- if ( $SMOKE_EXE == Linux2_x86_64pg ) then
- setenv FC pgf90
- setenv FFLAG "-O2 -Msave -Mbackslash -Mbyteswapio -Kieee -Mextend -Bstatic "
- setenv DBGFLAG "-g -Mbounds -Msave -Mbackslash -Mbyteswapio -Kieee -Mextend -Bstatic"
- else
- if ( ! $?FC || ! $?FFLAG || ! $?DBGFLAG ) then
- echo ""
- if ( ! $?FC ) echo "--> Compiler variable FC undefined..."
- if ( ! $?FFLAG ) echo "--> Compiler flag variable FFLAG undefined..."
- if ( ! $?DBGFLAG ) echo "--> Compiler flag variable DBGFLAG undefined..."
- echo ""
- echo "--> Set the variables above to proceed..."
- echo ""
- exit( 1 )
- endif
- endif
- exit( 0 )
- EOF
- source platform
- ## Linking proper Libraries
- #cd $SMK_HOME/subsys/ioapi/Linux2_x86_64pg
- ln -s /usr/local/lib/Linux2_x86_64pg_gcc_nomp/libioapi.a libioapi.a
- ln -s /usr/local/ioapi_3.1/Linux2_x86_64pg/libioapi.a libioapi.a
- mkdir $SMK_HOME/subsys/ioapi_includes/
- cd $SMK_HOME/subsys/ioapi_includes/
- cp /work7/CMAQ/ioapi/fixed_src/*.EXT ./
- #cp /home/guest/CMAQ/ioapi/fixed_src/*.EXT ./
- cd $SMK_HOME/subsys/netcdf/$SMOKE_EXE/
- ln -s /usr/local/lib/libnetcdf.a libnetcdf.a
- cd $SMK_HOME/subsys/smoke/assigns
- source ASSIGNS.nctox.cmaq.cb05_soa.us12-nc
- ## Make SMOKE
- cd $SCRIPTS/make/
- Makeall
- ## VERIFICATION-01:: Verify Installation bychecking if the required files were created
- cd $SMK_BIN
- echo "Installation went fine; if These following files exist"
- find aggwndw beld3to2 bluesky2inv cemscan cntlmat elevpoint extractida geofac grdmat grwinven invsplit layalloc laypoint met4moves metcombine metscan movesmrg mrgelev mrggrid normbeis3 pktreduc rawbio smk2emis smkinven smkmerge smkreport spcmat surgtool temporal tmpbeis3 tmpbio uam2ncf
- ## VERIFICATION-02:: Verify Installation by running the model for test case
- echo "**Verify Installation by running the model for test case**"
- echo "In this step, several scripts will run."
- echo "This step of verification may take some time."
- echo "Would you still be willing to go through it?"
- echo "Put 'y' for Continuing or 'n' for Exit"
- set WISH = $<
- if ($WISH == "y") then
- echo "Please standby while the whole process completes:"
- cd $SMK_HOME
- source smoke_install.csh
- cd $SMK_HOME/subsys/smoke/scripts/run
- smk_area_nctox.csh
- smk_bg_nctox.csh
- smk_nonroad_nctox.csh
- smk_point_nctox.csh
- smk_rateperdistance_noRFL_nctox.csh
- smk_rateperdistance_RFLonly_nctox.csh
- smk_ratepervehicle_noRFL_nctox.csh
- smk_ratepervehicle_RFLonly_nctox.csh
- smk_rateperprofile_nctox.csh
- smk_mrgall_nctox.csh
- cd $LOGS
- echo "The test case run is over."
- echo "Please check carefully for any error"
- grep ERROR *
- cd $SCRIPTS/install/
- check_smk_install
- endif
- if ($WISH == "n") then
- echo "You can run the test case anytime you want."
- echo "you've chosen not to run it now."
- echo "Have a nice day!"
- endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement