-
Notifications
You must be signed in to change notification settings - Fork 1
/
flow.cylc
221 lines (205 loc) · 6.88 KB
/
flow.cylc
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
#!jinja2
########################
# Items that may need changed
<<<<<<< Updated upstream:flow.cylc
{% set EXPS = 'SFS' %}
{% set DATES = 'R5/1994-05-01T00/P1Y, R5/1994-11-01T00/P1Y' %}
{% set AICE_VAR = "aice_h" %}
=======
{% set EXPS = 'EP4' %}
{% set DATES = 'R2/2018-08-15T00/P7D' %}
{% set AICE_VAR = "aice_d" %}
>>>>>>> Stashed changes:suite.rc
{% set ENS_MEMBERS = 10 %}
{% set PARSE_DATA = True %}
########################
# DATES
# SFS 'R5/1994-05-01/T00/P1Y, R5/1994-11-01/T00/P1Y'
# EP miniset 'R8/2018-01-03T00/P7D, R8/2018-08-01T00/P7D'
# EPr miniset 'R8/2018-01-04T00/P7D, R8/2018-08-02T00/P7D'
# GFS Dates 'R29/2019-12-03T00/P3D, R31/2020-06-01T00/P3D'
# GFS/HR Hurricane 'R81/2020-09-01T00/P1D'
# GDAS dates from Lydia 'R13/2021-07-03T00/P1D'
####################################
# define suite
# hopefully user does not have to edit anything below here
{% set ICP = '19940101T00' %}
{% set FCP = '20241231T12' %}
[meta]
title = "grab and analyize CICE output"
[scheduler]
UTC mode = True
[task parameters]
cice_var = {{ AICE_VAR }}
experiment = {{ EXPS }}
mem = 0..{{ ENS_MEMBERS }}
poles = 'north', 'south'
[scheduling]
initial cycle point = {{ ICP }}
final cycle point = {{ FCP }}
<<<<<<< Updated upstream:flow.cylc
runahead limit = P5
=======
max active cycle points = 1
>>>>>>> Stashed changes:suite.rc
[[queues]]
[[[default]]]
limit = 42
################################################
# download data if needed from HPSS
[[graph]]
R1 = """
{% if PARSE_DATA %}
GRAB_OBS
{% else %}
POST_PARSE
{% endif %} # if PARSE_DATA
"""
{{ DATES }} = """
GRAB_EXPS:succeed-all => PARSE_OUTPUT_CICE
PARSE_OUTPUT_CICE:succeed-all => ENSEMBLE_COMBINE
ENSEMBLE_COMBINE:succeed-all => POST_PARSE
POST_PARSE => CALC_ICE_EXTENT
POST_PARSE => INTERP_ICE
CALC_ICE_EXTENT:succeed-all => plot_ice_extent
INTERP_ICE:succeed-all => CALC_IIEE
CALC_IIEE:succeed-all => plot_iiee
INTERP_ICE:succeed-all => MAPS_ICE_CON
"""
################################################
# tasks
[runtime]
[[root]]
execution retry delays = 3*PT10M
#job runner = background
init-script = """
umask 022
set -xu
export SCRIPT_DIR=${CYLC_RUN_DIR}/${CYLC_WORKFLOW_NAME}/_cylc-install/source/SCRIPTS
source ${SCRIPT_DIR}/modules.sh
unset ESMFMKFILE
"""
[[[environment]]]
AICE_VAR = {{ AICE_VAR }}
DTG = $(cylc cycle-point --template=%Y%m%d%H)
EXPS = {{ EXPS }}
ENS_MEMBERS = {{ ENS_MEMBERS }}
[[[job]]]
<<<<<<< Updated upstream:flow.cylc
=======
#execution retry delays = 3*PT10M
batch system = slurm
#[[[events]]]
# failed handler = cylc email-task
# submission failed handler = cylc email-task
>>>>>>> Stashed changes:suite.rc
[[[directives]]]
--account = marine-cpu
--nasks = 1
--time = 00:30:00
--mem = 0
#--qos = debug
####################################
# grab experiments and obs
[[HPSS]]
[[[directives]]]
--partition = service
[[GRAB_EXPS]]
inherit = HPSS
[[grab<experiment>_from_hpss]]
inherit = GRAB_EXPS
script = """
EXP=${CYLC_TASK_PARAM_experiment}
${SCRIPT_DIR}/GRAB_exps_from_hpss.sh ${DTG} ${EXP} ${ENS_MEMBERS}
"""
#[[[job]]]
# batch system = background
[[GRAB_OBS]]
inherit = HPSS
[[grab_sea_ice_exents]]
inherit = GRAB_OBS
script = """
${SCRIPT_DIR}/GRAB_ice_extent_from_hpss.sh
"""
################################################
# parse data
[[PARSE_OUTPUT_CICE]]
[[parse_output<experiment><mem><cice_var>]]
inherit = PARSE_OUTPUT_CICE
script = """
VAR=${CYLC_TASK_PARAM_cice_var}
EXP=${CYLC_TASK_PARAM_experiment}
MEM=${CYLC_TASK_PARAM_mem}
${SCRIPT_DIR}/CICE_parse_output.sh ${DTG} ${VAR} ${EXP} ${MEM} ${ENS_MEMBERS}
"""
#[[[job]]]
# batch system = background
[[ENSEMBLE_COMBINE]]
[[ensemble_combine<experiment><cice_var>]]
inherit = ENSEMBLE_COMBINE
script = """
VAR=${CYLC_TASK_PARAM_cice_var}
EXP=${CYLC_TASK_PARAM_experiment}
${SCRIPT_DIR}/ENS_combine_files.sh ${DTG} ${VAR} ${EXP}
"""
[[POST_PARSE]]
#platform = background
script = """
echo "POST_PARSE is a dummy task"
"""
################################################
# diagnostics
[[CALC_ICE_EXTENT]]
[[calc_ice_extent<experiment>]]
inherit = CALC_ICE_EXTENT
script = """
EXP=${CYLC_TASK_PARAM_experiment}
source ${SCRIPT_DIR}/experiment_options.sh ${EXP} ${DTG}
${SCRIPT_DIR}/CALC_ice_extent.py -d ${TOPDIR_OUTPUT}/${EXP} -v ${AICE_VAR}
"""
[[[directives]]]
--time = 04:00:00
#--qos = debug
[[plot_ice_extent]]
script = """
source ${SCRIPT_DIR}/experiment_options.sh HR1 ${DTG}
${SCRIPT_DIR}/PLOT_ice_extent.py -d ${TOPDIR_OUTPUT} -e ${EXPS} -v ${AICE_VAR} -fd ${TOPDIR_FIGURES} -od ${TOPDIR_OBS}
"""
[[INTERP_ICE]]
[[interp_ice<experiment>]]
inherit = INTERP_ICE
script = """
EXP=${CYLC_TASK_PARAM_experiment}
source ${SCRIPT_DIR}/experiment_options.sh ${EXP} ${DTG}
${SCRIPT_DIR}/INTERP_iiee.py -d ${TOPDIR_OUTPUT}/${EXP} -v ${AICE_VAR} -od ${TOPDIR_OBS}
"""
[[[directives]]]
--time = 08:00:00
[[CALC_IIEE]]
[[calc_iiee<experiment>]]
inherit = CALC_IIEE
script = """
EXP=${CYLC_TASK_PARAM_experiment}
source ${SCRIPT_DIR}/experiment_options.sh ${EXP} ${DTG}
${SCRIPT_DIR}/CALC_iiee.py -d ${TOPDIR_OUTPUT}/${EXP} -v ${AICE_VAR} -od ${TOPDIR_OBS}
"""
[[[directives]]]
--time = 08:00:00
[[plot_iiee]]
script = """
source ${SCRIPT_DIR}/experiment_options.sh HR1 ${DTG}
${SCRIPT_DIR}/PLOT_iiee.py -d ${TOPDIR_OUTPUT} -v ${AICE_VAR} -e ${EXPS} -fd ${TOPDIR_FIGURES}
"""
[[MAPS_ICE_CON]]
[[maps_ice_concentration<poles><experiment>]]
inherit = MAPS_ICE_CON
script = """
EXP=${CYLC_TASK_PARAM_experiment}
POLE=${CYLC_TASK_PARAM_poles}
source ${SCRIPT_DIR}/experiment_options.sh ${EXP} ${DTG}
${SCRIPT_DIR}/CICE_maps.py -d ${TOPDIR_OUTPUT}/${EXP} -e ${EXP} -v ${AICE_VAR} -p ${POLE} -fd ${TOPDIR_FIGURES} -od ${TOPDIR_OBS}
"""
[[[directives]]]
--time = 08:00:00
--qos = batch
--mem = 0