source: trunk/SCRIPTS/lim1d_ispol.nqs @ 50

Last change on this file since 50 was 4, checked in by vancop, 8 years ago

initial import /Users/ioulianikolskaia/Boulot/CODES/LIM1D/ARCHIVE/TMP/LIM1D_v3.20/

File size: 4.6 KB
Line 
1#/bin/bash
2#######################################################################################
3# Launching scripts for LIM1D
4#######################################################################################
5# v2.1, Sep 2009, Martin Vancoppenolle
6
7echo " ------------------------------------------------------------------------------------------------"
8# Adjust this section
9USERNICK="Martouf"            # user nickname
10
11EXP_ID="test_3.20_ISPOL_a"      # name of the experiment ### CHANGE
12SOURCE="source_3.20"          # version of the sources
13TS="1d"                       # time step (1h or 1d)
14CONF="ISPOL"                  # site at which we run the model
15MESSAGE="Test run"            # Little message to know what is the run about
16
17SUBDIR=`pwd`
18
19MAINDIR="$HOME/Boulot/CODES/LIM1D/2015_v3.20" ### CHANGE
20
21SCRATCHDIR="$MAINDIR/SCRATCH/$EXP_ID"        # SCRATCH - temporary directory on which code is run
22OUTDIR="$MAINDIR/RUN/$EXP_ID"                # STORE - repository where we put the output files in the end
23SOURCEDIR="$MAINDIR/MAKE"                    # EXECUTABLE - exectuable & sources
24INFILEDIR="$MAINDIR/INPUT/$CONF/$SOURCE"     # INPUT - initialization, forcing & param files
25
26GRAPHDIR="$HOME/Boulot/SCIENCE/PLOT_SCRIPTS/LIM1D_BIO/IDL/$CONF" # IDL plots
27
28#######################################################################################
29
30#prints commands on output
31#set -x
32
33echo " ------------------------------------------------------------------------------------------------"
34echo " 1- Dear $USERNICK, the run is being prepared, please do something else"
35echo " ------------------------------------------------------------------------------------------------"
36#creates the experiment directory in run and scratch
37rm -rf $OUTDIR
38rm -rf $SCRATCHDIR
39
40mkdir $OUTDIR
41mkdir $SCRATCHDIR
42
43#goes to the scratch
44cd $SCRATCHDIR
45echo $MESSAGE > README
46mv README $OUTDIR
47
48#copies the executable
49cp $SOURCEDIR/lim1d.x $SCRATCHDIR/lim1d_$EXP_ID
50
51#copies the forcing and initialization files
52cp $INFILEDIR/* $SCRATCHDIR
53
54ls "forcing_"$CONF"_hybrid.nc."$TS
55ls forcing.param.$TS
56ls run.param.$TS
57
58mv "forcing_"$CONF"_hybrid.nc."$TS forcing.nc
59mv forcing.param.$TS               forcing.param
60mv run.param.$TS                   run.param
61mv init_$CONF.nc                   init.nc
62#mv run.param.summer.$TS            run.param
63#mv "init_"$CONF"_summer".nc        init.nc
64
65# get time step and biological model
66DT=`sed -n 9,9p run.param`         # time step in seconds
67CMOD=`sed -n '21,21p' run.param`   # biological model
68
69#list the directory content
70ls -lt
71
72echo " ------------------------------------------------------------------------------------------------"
73echo " 2- Dear $USERNICK, everything is copied on the scratch, I am gonna start "
74echo " the run, bordel, and it may take a while depending on the number of iterations you bastard chose"
75echo " ------------------------------------------------------------------------------------------------"
76
77#runs the code
78nice ./lim1d_$EXP_ID > output.run.$EXP_ID
79ls -lt
80
81echo " ------------------------------------------------------------------------------------------------"
82echo " 3- I'm done and bored, $USERNICK, have to put everything in $OUTDIR "
83echo " ------------------------------------------------------------------------------------------------"
84
85#copies the relevant files in the run directory
86cp $SCRATCHDIR/lim1d_$EXP_ID $OUTDIR
87cp $SCRATCHDIR/*.param $OUTDIR
88cp $SCRATCHDIR/ice.out.nc  $OUTDIR/ice.out.nc.$EXP_ID
89cp $SCRATCHDIR/run.out.txt $OUTDIR/run.out.txt.$EXP_ID
90cp $SCRATCHDIR/cons_bio.out.txt $OUTDIR/cons_bio.out.txt.$EXP_ID
91cp $SCRATCHDIR/forcing.out.txt $OUTDIR/forcing.out.txt.$EXP_ID
92
93cp $SCRATCHDIR/output.run.$EXP_ID $OUTDIR
94cp $SCRATCHDIR/output.run.$EXP_ID $SUBDIR
95cp $SCRATCHDIR/time.step $OUTDIR/time.step.$EXP_ID
96
97echo " ------------------------------------------------------------------------------------------------"
98echo " 4- Everything copied, $USERNICK, is this fine ? "
99ls -lt $OUTDIR
100echo " If problem go to $OUTDIR and check "
101echo " thanks a lot for using LIM1D, (c) martouf 2008 "
102
103#rm -rf $SCRATCHDIR
104
105echo " ------------------------------------------------------------------------------------------------"
106echo " 5- Graphics "
107
108# read the time step and biological model in the namelists
109
110cd $GRAPHDIR
111echo $EXP_ID > exp_id.dat
112echo $OUTDIR/ >> exp_id.dat
113echo $OUTDIR/ >> exp_id.dat
114echo $DT >> exp_id.dat
115echo $CMOD >> exp_id.dat
116echo $CONF  >> exp_id.dat
117echo
118echo AAAAAAAAAAAAAAAAHHHHHHHHHHHHH
119echo
120cat exp_id.dat
121cp exp_id.dat ..
122echo
123echo
124idl < plots_$CONF.exec
125
126cd $OUTDIR
127gv -swap $EXP_ID'_contours.ps' &
128gv -swap $EXP_ID'_stocks.ps' &
129gv -swap $EXP_ID'_profiles.ps' &
Note: See TracBrowser for help on using the repository browser.