-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.rfeng.edited
147 lines (124 loc) · 6.18 KB
/
README.rfeng.edited
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# ran's dir: cesm_root=/glade/scratch/ranfeng/cesm1_2_0
cesm_root=/glade/u/home/chrgeiger/cesm1_2_0
mapping_dir=$cesm_root/tools/mapping
popt_dir=/gpfs/fs1/p/cgd/ccr/people/ranfeng/plio_bnd/PlioMIP_enh/cpl_mapping/scrip1.4/grids/
! =======
Input file:
ocean grid: $mapping_dir/gen_mapping_files/horiz_grid_plioenh_070820.ieeer8
gx1v6 kmt: $mapping_dir/gen_mapping_files/topography_plio_enh_gx1v6_190619.CESM2_modMed.ieeei4
! =======
! Begin generating coupler mapping file
!! ------------------------------
Step 1: create SCRIP mapping file
src1: !! uses myConvertPOPT to create SCRIP grid file
(NOTE: myConvertPOPT must be compiled with big_endian flag)
# Run .csh file, not myconverPOPT
SrcDir for executable: $popt_dir/myconvertPOPT
RunDir: $mapping_dir/gen_mapping_files
src: $mapping_dir/gen_mapping_files/mk_SCRIPgridplio_enh.csh
in1: nx, ny
in2: horiz_grid_wais_070820.ieeer8
# Had to do some digging to find this
# is this the same file as /glade/u/home/ranfeng/setup_tools_cesm1/release/expand_ccsm4_extra_pub.2012mar16_nr/cpl_mapping/fv0.9x1.25_070727.nc ?
# actually it looks like it would be better to pull this from /glade/p/cesm/cseg/mapping/grids/fv0.9x1.25_070727.nc
# can I generate this file some way, or should I just grab it? Did I grab the right file?
in3: fv0.9x1.25_070727.nc !! default atm grid
in4: topography_plio_enh_gx1v6_190619.CESM2_modMed.ieeei4
# Format of "date": yymmdd
out1: gx1v6plioenh_"date".nc (ocn SCRIP mapping file: center_lat, center_lon)
# check if out1 is created
# check size of file...
Step 2 :
SrcDir: $mapping_dir/gen_mapping_files
runDir: $mapping_dir/gen_mapping_files
src: $mapping_dir/gen_mapping_files/gen_cesm_maps.sh !! do not modify!
# Created mytool2.sh file
Usage: ./gen_cesm_maps.sh -fatm /glade/p/cesm/cseg/mapping/grids/fv0.9x1.25_070727.nc -natm fv09_1.25 -focn /glade/scratch/ranfeng/cesm1_2_0/tools/mapping/gen_mapping_files/gx1v6plioenh_"date".nc -nocn gx1v6plioenh --nogridcheck
out2:
map_fv09_1.25_TO_gx1v6plioenh_aave."date".nc
map_fv09_1.25_TO_gx1v6plioenh_blin."date".nc
map_fv09_1.25_TO_gx1v6plioenh_patc."date".nc
map_gx1v6plioenh_TO_fv09_1.25_aave."date".nc
map_gx1v6plioenh_TO_fv09_1.25_blin."date".nc
# check if out2 is created
!!! ======================
!!! gen_domain
!!! ======================
# mytool3.sh
wkdir: $mapping_dir/gen_domain_files
./gen_domain -m ../gen_mapping_files/map_gx1v6plioenh_TO_fv09_25_aave."date".nc -o gx1v6plioenh -l fv1.9_2.5 -c plioenh -p 2
# Gives error not found for the -m input file
# Should the file be ../gen_mapping_files/map_gx1v6plioenh_TO_fv09_1.25_aave.191017.nc ?
# Produced different ofiles: e.g. domain.ocn.fv19_1.25_gx1v6plioenh."date".nc
ofiles:
domain.ocn.gx1v6plioenh."date".nc
domain.lnd.fv09_1.25_gx1v6plioenh."date".nc ! 90 to 90
domain.ocn.fv09_1.25_gx1v6plioenh."date".nc
! ===============================
-- Runoff mapping
Step 1:
------------------------
wkdir: $mapping_dir/gen_mapping_files/runoff_to_ocn
# mytool4.sh
vi runoff_map_r05_gx1v6_plioenh.nml
&input_nml
gridtype = 'rtm'
file_roff = '/glade/p/cesm/cseg/inputdata/lnd/clm2/rtmdata/rdirc.05.061026'
file_ocn = 'gx1v6plioenh_"date".nc'
file_nn = 'map_r05_to_gx1v6plioenh_nn_"date".nc '
file_smooth = 'map_gx1v6_to_gx1v6plioenh_sm_e1000r300_"date".nc '
file_new = 'map_r05_to_gx1v6plioenh_nnsm_e1000r300_"date".nc'
title = 'runoff map: r05 -> gx1v6, nearest neighbor and smoothed '
eFold = 1000000.0
rMax = 300000.0
step1 = .true.
step2 = .true.
step3 = .true.
/
# I changed file_ocn to
# file_ocn = '../gx1v6plioenh_"date".nc'
# and got output
% ln -s runoff_map_r05_gx1v6_plioenh.nml ./runoff_map.nml
% ./runoff_map < runoff_map.nml
out:
map_r05_to_gx1v6plioenh_nn_"date".nc
map_gx1v6_to_gx1v6plioenh_sm_e1000r300_"date".nc
map_r05_to_gx1v6plioenh_nnsm_e1000r300_"date".nc
; ======================================================================
; Runoff mapping Step 2: create ROF2OCN_FMAPNAME (aave) runoff mapping file
; ======================================================================
; ======================================================================
SrcDir: $mapping_dir/gen_mapping_files/gen_ESMF_mapping_file
runDir: $mapping_dir/gen_mapping_files/gen_ESMF_mapping_file
in1: /glade/p/cesm/cseg/mapping/grids/r05_nomask_070925.nc ! default 05x05 degree no-mask
in2: /glade/scratch/ranfeng/cesm1_2_0/tools/mapping/gen_mapping_files/gx1v6plioenh_"date".nc ! gx1 ocn grid
# mytool5.sh
% Usage:
./create_ESMF_map.sh -fsrc /glade/p/cesm/cseg/mapping/grids/r05_nomask_070925.nc -nsrc r05_nomask -fdst ../gx1v6plioenh_"date".nc -ndst gx1v6plioenh -map aave
out: map_r05_nomask_TO_gx1v6plioenh_aave."date".nc ! runoff with no-mask land
! ----------------------
! ----------------------
!! END coupler mapping files
! ----------------------
! ----------------------
! ----------------------
! ----------------------
! BEGIN LAND MAPPING FILES
! ----------------------
input file:
/glade/scratch/ranfeng/cesm1_2_0/models/lnd/clm/tools/shared/mkmapgrids/mksrf_lanwat_plioenh_190801_new.nc
! ----------------------
1. Create SCRIP grid for land
wkdir: /glade/scratch/ranfeng/cesm1_2_0/models/lnd/clm/tools/shared/mkmapgrids/
src: mkscripgrid_plioenh.ncl
in1: mksrf_lanwat_plioenh_190801_new.nc
out: SCRIPclmgrid_plioenh_360x720."date".nc
ncl mkscripgrid_plioenh.ncl
2. Map the scripclmGRID to the CLM land
wkdir: /glade/scratch/ranfeng/cesm1_2_0/models/lnd/clm/tools/shared/mkmapdata/
runscript: regridbatch_plioenh.sh !! point to mkmapdata_plioenh.sh
src: mkmapdata_plioenh.sh !! point to SCRIPgrid_plioenh_360x720."date".nc
in1: SCRIPclmgrid_plioenh_360x720."date".nc
out: map_0.5x0.5_plioenh_to_0.9x1.25_nomask_aave_da_c"date".nc
usage: ./regridbatch_plioenh.sh
! ===============================