suite.rc 3.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!jinja2
[cylc]
	UTC mode = True # Ignore DST
	abort if any task fails = False

[scheduling]
	initial cycle point = {{INITIAL_START_DATE}}
{%- if FINAL_CYCLE_POINT not in ['NONE','None'] %}
	final cycle point = {{FINAL_CYCLE_POINT}}
{%- endif %}
	[[special tasks]]
		clock-trigger = start_cycle(PT0M)
	[[dependencies]]
		[[[P1D]]]
			graph = """
16 17
{% if USE_CETO %}
					regrid_domain_ceto[-P1D]:finish => start_cycle => suite_trigger <{{TRIGGER_SUITE}}::{{TRIGGER_TASK}}> => transfer_to_remote
18
					transfer_to_remote => regrid_domain_ceto => transfer_from_remote => softlink_to_portal => write_ncml
19 20 21 22
{% else %}
					regrid_domain[-P1D]:finish => start_cycle => suite_trigger <{{TRIGGER_SUITE}}::{{TRIGGER_TASK}}> => regrid_domain
{% endif %}

23 24 25 26 27 28 29
					"""

[runtime]
	[[root]]
		env-script = eval $(rose task-env --cycle-offset=P1D)
		script = rose task-run --verbose
		[[[job]]]
30
			execution time limit = PT6H
31 32 33 34 35 36 37 38 39 40 41 42
		[[[events]]]
			mail events = submission timeout, execution timeout, failed
			mail to = {{MAIL_TO}}
			submission timeout = P1D
		[[[environment]]]
			NPROCS={{NPROCS}}
			FVCOM_GRID_NAME={{FVCOM_GRID_NAME}}
			GRID_LOWER_LEFT={{GRID_LOWER_LEFT}}
			GRID_UPPER_RIGHT={{GRID_UPPER_RIGHT}}
			HORIZ_RES={{HORIZ_RES}}
			DEPTH_LAYERS={{DEPTH_LAYERS}}
			VARS={{VARS}}
43 44
			OUTPUT_DIR={{OUTPUT_DIR}}
			OUTPUT_FILENAME={{OUTPUT_FILENAME}}
45
			NCML_FILE_DATEFMT={{NCML_FILE_DATEFMT}}
46
			FORECAST_DAY=$(rose date --print-format='%Y-%m-%d' $CYLC_TASK_CYCLE_POINT)
47 48
			FORECAST_YEAR=$(rose date --print-format='%Y' $CYLC_TASK_CYCLE_POINT)
			FORECAST_MONTH=$(rose date --print-format='%m' $CYLC_TASK_CYCLE_POINT)
49
			NCML_DATE=$(rose date --print-format=${NCML_FILE_DATEFMT} $CYLC_TASK_CYCLE_POINT)
50
	
51
			FVCOM_FILE={{FVCOM_OUTPUT_DIR}}/${FORECAST_DAY}/${FVCOM_GRID_NAME}_0001.nc
52
			PORTAL_BASEDIR={{PORTAL_BASEDIR}}
53
			PORTAL_NCML_BASEDIR={{PORTAL_NCML_BASEDIR}}
54 55
			NCML_FILE_PRE={{NCML_FILE_PRE}}
			NCML_FILE_POST={{NCML_FILE_POST}}
56

57 58 59 60 61
        [[start_cycle]]
                script = """
                        echo 'Starting regrid'
                        """
        [[suite_trigger]]
62 63 64 65 66 67
                script =""
                [[[suite state polling]]]
                        interval = PT10M
                        max-polls = 1440
                [[[job]]]
                        execution retry delays = 3*PT15M
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

{% if USE_CETO %}
        [[slurm_job]]
                [[[job]]]
                        batch system = slurm
                        submission polling intervals = PT10S
                        execution polling intervals = PT10S, PT1M
                [[[directives]]]
                        --nodes = {{NODES}}
                        --ntasks-per-node=20
                        --threads-per-core=1
                        --time=24:00:00

                [[[remote]]]
                        host = login.ceto.npm.ac.uk
                       owner = {{REMOTE_USER}}


       [[remote_job]]
                [[[remote]]]
                        host = login.ceto.npm.ac.uk
                        owner = {{REMOTE_USER}}

        [[transfer_to_remote]]
		inherit = remote_job
        [[transfer_from_remote]]
		inherit = remote_job
	[[regrid_domain_ceto]]
		inherit = slurm_job
97
	[[softlink_to_portal]]
98 99
	[[write_ncml]]

100 101
{% else %}

102
	[[regrid_domain]]
103 104 105

{% endif %}