-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake_surfacedata_file
108 lines (82 loc) · 3.11 KB
/
make_surfacedata_file
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
https://confluence.pnnl.gov/confluence/display/~lili400/Prepare+mapping+file
NCL function
## set the environment
source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_pm-cpu.sh
#######
mapping data
/global/cfs/cdirs/e3sm/inputdata/lnd/clm2/mappingdata/grids
######
salloc --nodes 1 --qos interactive --time 00:30:00 --constraint cpu --account=e3sm
#######
CDATE="c"`date +%y%m%d`
srun -n 1 \
ESMF_RegridWeightGen \
--ignore_unmapped \
-s /global/cfs/cdirs/e3sm/inputdata/lnd/clm2/mappingdata/grids/SCRIPgrid_0.1x0.1_nomask_c110712.nc \
-d /global/cfs/cdirs/e3sm/inputdata/lnd/clm2/mappingdata/grids/SCRIPgrid_ne30np4_nomask_c101123.nc \
-m conserve \
-w map_0.1x0.1_nomask_to_ne30np4_nomask_aave_da_${CDATE}.nc \
--src_type SCRIP --dst_type SCRIP
srun -n 1 \
ESMF_RegridWeightGen \
--ignore_unmapped \
-s /global/cfs/cdirs/e3sm/inputdata/lnd/clm2/mappingdata/grids/SCRIPgrid_0.1x0.1_nomask_c110712.nc \
-d /global/cfs/cdirs/e3sm/inputdata/lnd/clm2/mappingdata/grids/SCRIPgrid_0.9x1.25_GRDC_c130307.nc \
-m conserve \
-w map_0.1x0.1_nomask_to_0.9x1.25_GRDC_aave_da_${CDATE}.nc \
--src_type SCRIP --dst_type SCRIP
cp /global/cfs/cdirs/e3sm/daleihao/mapping_file/map_0.1x0.1_nomask_to_ne30np4_nomask_aave_da_c231218.nc /global/cfs/cdirs/e3sm/inputdata/lnd/clm2/mappingdata/maps/ne30np4
## issues
0.1x0.1 ->
0.1x0.1 -> ne120pg4
## make surface data
1. On Perlmutter, load appropriate modules
module -q unload cray-hdf5-parallel
module -q unload cray-netcdf-hdf5parallel
module -q unload cray-parallel-netcdf
module -q unload cray-netcdf
module -q unload cray-hdf5
module -q unload PrgEnv-gnu
module -q unload PrgEnv-intel
module -q unload PrgEnv-nvidia
module -q unload PrgEnv-cray
module -q unload PrgEnv-aocc
module -q unload intel
module -q unload intel-oneapi
module -q unload nvidia
module -q unload aocc
module -q unload cudatoolkit
module -q unload climate-utils
module -q unload craype-accel-nvidia80
module -q unload craype-accel-host
module -q unload perftools-base
module -q unload perftools
module -q unload darshan
module load PrgEnv-intel/8.3.3
module load intel/2023.1.0
module load cray-libsci/23.02.1.1
module load craype-accel-host
module load craype/2.7.20
module load cray-mpich/8.1.25
module load cray-hdf5-parallel/1.12.2.3
module load cray-netcdf-hdf5parallel/4.9.0.3
module load cray-parallel-netcdf/1.12.3.3
module load cmake/3.24.3
2. Compile the mksurfdata_map
cd /global/cfs/cdirs/e3sm/daleihao/model_code/e3sm
cd components/elm/tools/mksurfdata_map/src
USER_FC=ifort LIB_NETCDF="`nc-config --libdir`" INC_NETCDF="`nf-config --includedir`" USER_LDFLAGS="-L`nc-config --libdir` -lnetcdf -lnetcdff" make VERBOSE=1
3. Now, generate a namelist file via mksurfdata.pl using the debug mode option (`-d`)
cd ..
./mksurfdata.pl \
-res ne30np4 \
-y 1850 \
-dinlc /global/cfs/cdirs/e3sm/inputdata \
-d
4. Get access to interactive queue
salloc --nodes 1 --qos interactive --time 01:00:00 --constraint cpu --account=e3sm
cd components/elm/tools/mksurfdata_map
# Make sure you have loaded the same modules that were used when compiling mksurfdata_map
# Run mksurfdata_map
srun -n 1 ./mksurfdata_map < namelist
exit