passing information among different tasks #620
-
I wonder if there is a way of updating information read from the config.yaml file. In my case, workflow has a task that downloads forcing data and I need to point those data files when I am creating cdeps stream namelist file (defined by |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 23 replies
-
Hi @uturuncoglu, thanks for starting this discussion. I have some questions:
Probably not: The design of the UW drivers is such that they are expected to get any needed information from the config that the driver is instantiated with, which is also schema-checked for correctness.
I think this is the right approach. Depending on your workflow, and especially whether it processes any tasks in parallel, you might need to consider making a copy of the main config and editing only the copy, perhaps in the run directory for a specific task. Those are just some initial thoughts. We'd be happy to look at code, too, and try to help come up with good ideas. |
Beta Was this translation helpful? Give feedback.
-
Hi @uturuncoglu. I just wanted to let you know that I merged a small PR updating the |
Beta Was this translation helpful? Give feedback.
-
@maddenp-noaa I circle back to my initial question again. The workflow that I am working on gets input forcing and creates CDEPS namelist files based on it. The issue is that there are some options in the CDEPS namelist files that are input file specific and it is hard to know those options in advance since we are subsetting the forcing file based on the domain file. For example, |
Beta Was this translation helpful? Give feedback.
-
@uturuncoglu I feel confident there's a clean solution, but it would probably be easier to look at your code together. Maybe we could schedule some time soon to do a screen-sharing sessions to look at what you've got. If you like, please feel free to invite me -- you should be able to see my calendar with your NOAA email and e.g. invite me to a Meet. |
Beta Was this translation helpful? Give feedback.
-
@uturuncoglu I had a few thoughts after our Meet discussion:
to the
But another task could e.g.
I think it demonstrates some of the ideas we talked about, and shows how public tasks with no arguments, private helper tasks with arguments, and helper functions can work together to model a more complicated workflow, with each lower-level task communicating information that it is responsible for upwards, and how higher-level tasks can use that information. I hope it's useful. |
Beta Was this translation helpful? Give feedback.
@uturuncoglu I had some time yesterday to catch up on this and was able to, I think, get the
provisioned_rundir
task and its dependencies to complete successfully. I'm attaching the output ofuw execute --module coastal.py --classname Coastal --task provisioned_rundir --config-file coastal.yaml --cycle 2024-08-05T12 --batch
here: log.txtYou can see the code here. I made significant changes to
coastal.py
, more minor changes tocoastal.yaml
andschism.jsonschema
, and fairly trivial (but useful, I think) changes to some of the.py
modules underutils/
. More about these below.A main issue, which I solved (at least for this specific configuration) in the
forcing_data()
andmesh_files()
task …