|
| 1 | +# (C) Copyright 2021-2022 United States Government as represented by the Administrator of the |
| 2 | +# National Aeronautics and Space Administration. All Rights Reserved. |
| 3 | +# |
| 4 | +# This software is licensed under the terms of the Apache Licence Version 2.0 |
| 5 | +# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
| 6 | + |
| 7 | +# -------------------------------------------------------------------------------------------------- |
| 8 | + |
| 9 | +# Cylc suite for executing Geos forecast |
| 10 | + |
| 11 | +# -------------------------------------------------------------------------------------------------- |
| 12 | + |
| 13 | +[scheduler] |
| 14 | + UTC mode = True |
| 15 | + allow implicit tasks = False |
| 16 | + |
| 17 | +# -------------------------------------------------------------------------------------------------- |
| 18 | + |
| 19 | +[scheduling] |
| 20 | + |
| 21 | + initial cycle point = {{start_cycle_point}} |
| 22 | + final cycle point = {{final_cycle_point}} |
| 23 | + runahead limit = {{runahead_limit}} |
| 24 | + |
| 25 | + [[graph]] |
| 26 | + R1 = """ |
| 27 | + # Triggers for non cycle time dependent tasks |
| 28 | + # ------------------------------------------- |
| 29 | + # Clone Geos source code |
| 30 | + CloneGeos |
| 31 | + |
| 32 | + # Build Geos source code by linking |
| 33 | + CloneGeos => BuildGeosByLinking? |
| 34 | + |
| 35 | + # If not able to link to build create the build |
| 36 | + BuildGeosByLinking:fail? => BuildGeos |
| 37 | + """ |
| 38 | + |
| 39 | + {% for cycle_time in cycle_times %} |
| 40 | + {{cycle_time.cycle_time}} = """ |
| 41 | + {% for model_component in model_components %} |
| 42 | + # Task triggers for: {{model_component}} |
| 43 | + # ------------------ |
| 44 | + # Get background |
| 45 | + GetRestart-{{model_component}} |
| 46 | + |
| 47 | + # Run Geos hofx executable |
| 48 | + BuildGeosByLinking[^]? | BuildGeos[^] => PrepGeosRunDir |
| 49 | + GetRestart-{{model_component}} => PrepGeosRunDir |
| 50 | + |
| 51 | + # Run Geos Executable |
| 52 | + PrepGeosRunDir => RunGeosExecutable |
| 53 | + |
| 54 | + # Save restart |
| 55 | + RunGeosExecutable => SaveRestart-{{model_component}} |
| 56 | + {% endfor %} |
| 57 | + """ |
| 58 | + {% endfor %} |
| 59 | + |
| 60 | +# -------------------------------------------------------------------------------------------------- |
| 61 | + |
| 62 | +[runtime] |
| 63 | + |
| 64 | + # Task defaults |
| 65 | + # ------------- |
| 66 | + [[root]] |
| 67 | + pre-script = "source $CYLC_SUITE_DEF_PATH/modules" |
| 68 | + |
| 69 | + [[[environment]]] |
| 70 | + datetime = $CYLC_TASK_CYCLE_POINT |
| 71 | + config = $CYLC_SUITE_DEF_PATH/experiment.yaml |
| 72 | + |
| 73 | + # Tasks |
| 74 | + # ----- |
| 75 | + [[CloneGeos]] |
| 76 | + script = "swell_task CloneGeos $config" |
| 77 | + |
| 78 | + [[BuildGeosByLinking]] |
| 79 | + script = "swell_task BuildGeosByLinking $config" |
| 80 | + |
| 81 | + [[BuildGeos]] |
| 82 | + script = "swell_task BuildGeos $config" |
| 83 | + platform = {{platform}} |
| 84 | + execution time limit = {{scheduling["BuildGeos"]["execution_time_limit"]}} |
| 85 | + [[[directives]]] |
| 86 | + --account = {{scheduling["BuildGeos"]["account"]}} |
| 87 | + --qos = {{scheduling["BuildGeos"]["qos"]}} |
| 88 | + --job-name = BuildGeos |
| 89 | + --nodes={{scheduling["BuildGeos"]["nodes"]}} |
| 90 | + --ntasks-per-node={{scheduling["BuildGeos"]["ntasks_per_node"]}} |
| 91 | + |
| 92 | + [[PrepGeosRunDir]] |
| 93 | + script = "swell_task PrepGeosRunDir $config" |
| 94 | + |
| 95 | + {% for model_component in model_components %} |
| 96 | + [[GetRestart-{{model_component}}]] |
| 97 | + script = "swell_task GetRestart $config -d $datetime -m {{model_component}}" |
| 98 | + |
| 99 | + [[SaveRestart-{{model_component}}]] |
| 100 | + script = "swell_task SaveRestart $config -d $datetime -m {{model_component}}" |
| 101 | + {% endfor %} |
| 102 | + |
| 103 | + [[RunGeosExecutable]] |
| 104 | + script = "swell_task RunGeosExecutable $config -d $datetime" |
| 105 | + platform = {{platform}} |
| 106 | + execution time limit = {{scheduling["RunGeosExecutable"]["execution_time_limit"]}} |
| 107 | + [[[directives]]] |
| 108 | + --account = {{scheduling["RunGeosExecutable"]["account"]}} |
| 109 | + --qos = {{scheduling["RunGeosExecutable"]["qos"]}} |
| 110 | + --job-name = RunGeosExecutable |
| 111 | + --nodes={{scheduling["RunGeosExecutable"]["nodes"]}} |
| 112 | + --ntasks-per-node={{scheduling["RunGeosExecutable"]["ntasks_per_node"]}} |
| 113 | + |
| 114 | +# -------------------------------------------------------------------------------------------------- |
0 commit comments