forked from katiedagon/CLM5_ParameterUncertainty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_paramset_clm5
executable file
·88 lines (64 loc) · 2.21 KB
/
run_paramset_clm5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
# Clone latest development branch from CTSM repository
#git clone --origin escomp https://github.com/ESCOMP/ctsm.git ctsm_ParamEns
#cd ctsm_ParamEns
#git checkout -b ctsm_ParamEns master
#./manage_externals/checkout_externals
# Note: do not run this while in python 3 env
# CESM builds and submit need to be on python 2
export USER="kdagon"
#export CODENAME="clm5.0"
export CODENAME="ctsm_ParamEns"
export NAME="hydro_ensemble_LHC"
cd /glade/work/$USER/$CODENAME
pwd
cd cime/scripts
pwd
cd $NAME
pwd
## IMPORTANT TO MODIFY THIS EACH TIME ##
#export EXPTNAME=${NAME}_$i
#export EXPTNAME=${NAME}_${i}_hybrid
#export EXPTNAME="${NAME}_default_params"
#export EXPTNAME="test_paramset_SVD_v4"
export EXPTNAME="test_paramset_SVD_v5"
echo $EXPTNAME
# Remove existing output
#rm -rf /glade/scratch/$USER/$EXPTNAME
#rm -rf /glade/scratch/$USER/archive/$EXPTNAME
# Remove existing working directories
#rm -rf $EXPTNAME
../create_newcase --run-unsupported --compset I2000Clm50Sp --res f45_f45 --case $EXPTNAME --project P08010000
#../create_newcase --run-unsupported --compset I2000Clm50Sp --res f45_f45 --case $EXPTNAME --project P54048000
cd $EXPTNAME
./xmlchange JOB_QUEUE=regular
./xmlchange JOB_WALLCLOCK_TIME=3:00:00
./xmlchange NTASKS_CPL=-4
./xmlchange NTASKS_OCN=-4
./xmlchange NTASKS_WAV=-4
./xmlchange NTASKS_GLC=-4
./xmlchange NTASKS_ICE=-4
./xmlchange NTASKS_ROF=-4
./xmlchange NTASKS_LND=-4
./xmlchange CONTINUE_RUN=FALSE
./xmlchange RESUBMIT=0
./xmlchange STOP_N=20
./xmlchange STOP_OPTION=nyears
./xmlchange BUILD_COMPLETE="TRUE"
./xmlchange EXEROOT="/glade/work/kdagon/CLM5_PPE/codebase_$NAME/bld/"
./xmlchange DATM_CLMNCEP_YR_START=2000
./xmlchange DATM_CLMNCEP_YR_END=2004
# Setup case (creates user_nl_* files)
./case.setup
# Generate param files for PFT-dependent params - do this ahead (for now)
# Set params file
pftfile="/glade/u/home/$USER/pft_files/${NAME}/${EXPTNAME}.nc"
# Make changes to netcdf file through ncl script pft_var_2.ncl
# Set params file in namelist
uclm="paramfile='$pftfile'"
echo $uclm >> user_nl_clm
# If not PFT-dependent, edit the namelist appropriately
echo "fff=0.02" >> user_nl_clm
echo "dint=0.86" >> user_nl_clm
echo "baseflow_scalar=0.0005" >> user_nl_clm
./case.submit