Subversion Repositories lagranto.um

Rev

Rev 16 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16 Rev 17
Line 4... Line 4...
4
echo
4
echo
5
echo "Output will be in folder JOBIDYYYYMMDD"
5
echo "Output will be in folder JOBIDYYYYMMDD"
6
echo "inputppfile should include full path"
6
echo "inputppfile should include full path"
7
echo
7
echo
8
echo "NOTE: Ensure this dimensions of your UM files are correct in"
8
echo "NOTE: Ensure this dimensions of your UM files are correct in"
9
echo "      ${LAGRANTO}/ppconvert/um_dims.inc & pp2cdf.f"
9
echo "      ${LAGRANTO}/convert/um_dims.inc & pp2cdf.f"
10
echo "Changes will require recompiling this component of lagranto"
10
echo "Changes will require recompiling this component of lagranto"
11
exit 1
11
exit 1
12
fi
12
fi
13
callingdir=`pwd`
13
callingdir=`pwd`
14
#cd ${LAGRANTO}/ppconvert
14
#cd ${LAGRANTO}/convert
15
YMD=$1
15
YMD=$1
16
DFILE=$2
16
DFILE=$2
17
# set the following 8 parameters
17
# set the following 8 parameters
18
JOBYYYY=`echo $YMD | cut -c 1-4` # set jobref Year YYYY
18
JOBYYYY=`echo $YMD | cut -c 1-4` # set jobref Year YYYY
19
JOBYY=`echo $YMD | cut -c 3-4`
19
JOBYY=`echo $YMD | cut -c 3-4`
20
JOBMM=`echo $YMD | cut -c 5-6` # set jobref Month MM
20
JOBMM=`echo $YMD | cut -c 5-6` # set jobref Month MM
21
JOBDD=`echo $YMD | cut -c 7-8` # set jobref Day DD
21
JOBDD=`echo $YMD | cut -c 7-8` # set jobref Day DD
22
CONSTS_FILE=${JOBYYYY}${JOBMM}${JOBDD}_cst
22
CONSTS_FILE=${JOBYYYY}${JOBMM}${JOBDD}_cst
-
 
23
echo 'CONSTS_FILE' ${CONSTS_FILE}
23
DTYPE=USER          # set to LAM or UKMM or USER for data type
24
DTYPE=USER          # set to LAM or UKMM or USER for data type
-
 
25
echo 'DTYPE' ${DTYPE}
24
 
26
 
25
#TSTASH=4004                 # set Stash code of T field in $DFILE
27
#TSTASH=4004                 # set Stash code of T field in $DFILE
26
TSTASH=90002                # set Stash code of T field in $DFILE
28
TSTASH=90002                # set Stash code of T field in $DFILE
27
#QSTASH=4010                 # set Stash code of Q field in $DFILE
29
#QSTASH=4010                 # set Stash code of Q field in $DFILE
28
QSTASH=90077                # set Stash code of Q field in $DFILE
30
QSTASH=90077                # set Stash code of Q field in $DFILE
29
PSTASH=409                  # set Stash code of PS field in $DFILE
31
#PSTASH=409                  # set Stash code of PS field in $DFILE
30
#PSTASH=90120
32
PSTASH=90120
31
Pmin=1000.0                 # set Stash code of PS field in $DFILE
33
Pmin=1000.0                 # set Stash code of PS field in $DFILE
32
Pmax=160.0                  # set Stash code of PS field in $DFILE
34
Pmax=160.0                  # set Stash code of PS field in $DFILE
33
Pdiff=15.0                  # set Stash code of PS field in $DFILE
35
Pdiff=15.0                  # set Stash code of PS field in $DFILE
34
NewDyn=.TRUE.               # set to true for New Dynamics code
36
NewDyn=.TRUE.               # set to true for New Dynamics code
35
IGNORET0=1                  # set to 1 to ignore T+0 data
37
IGNORET0=1                  # set to 1 to ignore T+0 data
36
 
38
 
37
# set USER_EXEC if DTYPE=USER
39
# set USER_EXEC if DTYPE=USER
38
USER_EXEC=${LAGRANTO}/ppconvert/pp2cdf
40
USER_EXEC=${LAGRANTO}/convert/pp2cdf
39
# USER_EXEC=pp2cdf
41
# USER_EXEC=pp2cdf
40
# N.B Do not change following creation of fort.15
42
# N.B Do not change following creation of fort.15
41
 
43
 
42
#fort.15 is a input file in the above executable file.
44
#fort.15 is a input file in the above executable file.
43
# any changes made for the following creation will changs made 
45
# any changes made for the following creation will changs made 
Line 64... Line 66...
64
#$Pmax
66
#$Pmax
65
#$Pdiff
67
#$Pdiff
66
 
68
 
67
if [ "$DTYPE" = "LAM" ]
69
if [ "$DTYPE" = "LAM" ]
68
then
70
then
69
  $LAGRANTO/ppconvert/ppf2cdf_lam.x          # LAM data converter
71
  $LAGRANTO/convert/ppf2cdf_lam.x          # LAM data converter
70
elif [ "$DTYPE" = "UKMM" ]
72
elif [ "$DTYPE" = "UKMM" ]
71
then
73
then
72
  $LAGRANTO/ppconvert/ppf2cdf_ukmm_new.x         # UKMM data converter
74
  $LAGRANTO/convert/ppf2cdf_ukmm_new.x         # UKMM data converter
73
elif [ "$DTYPE" = "USER" ]
75
elif [ "$DTYPE" = "USER" ]
74
then
76
then
75
  $USER_EXEC                                  # USER data converter
77
  $USER_EXEC                                  # USER data converter
76
else
78
else
77
  echo "Data type: $DTYPE not recognised - Exiting"
79
  echo "Data type: $DTYPE not recognised - Exiting"
Line 82... Line 84...
82
# N.B use only year and month for filter as could go into next day
84
# N.B use only year and month for filter as could go into next day
83
list=`ls P${JOBYYYY}${JOBMM}*`
85
list=`ls P${JOBYYYY}${JOBMM}*`
84
# now create the S-files
86
# now create the S-files
85
for file in $list
87
for file in $list
86
do
88
do
87
  $LAGRANTO/ppconvert/p2s.csh $file 1
89
  $LAGRANTO/convert/p2s.csh $file 1
88
  #p2s.csh $file 5
90
  #p2s.csh $file 5
89
done
91
done
90
 
92
 
91
# edit here if you want to move files
93
# edit here if you want to move files
92
chmod g+r P${JOBREF}*
94
chmod g+r P${JOBREF}*