possible approaches to ingest workflow in application layer #478
-
I am stating to experiment uwtools as a part of the ufs-coastal-app and just wonder about the approaches to ingest workflow in the application layer. Do I need to go with condo environment to install it (specific version) or just add the workflow tools (main branch) as a submodule in the application level and start creating environment with the copy. Since, I am plaining to start building the specific configuration of ufs coastal (data atmosphere coupled with ocean) model with workflow, I am plaining to implement specific driver/s around it. So, probably I'll do some development also in the uwtools side. Let me know what is the best practice for the development environment. If there is one already for SRW etc. that I could as a reference and follow the same convention, that would be great. |
Beta Was this translation helpful? Give feedback.
Replies: 20 comments 68 replies
-
FYI, @christinaholtNOAA |
Beta Was this translation helpful? Give feedback.
-
I am following https://uwtools.readthedocs.io/en/main/sections/contributor_guide/developer_setup.html to setup development environment. Here are my observations:
|
Beta Was this translation helpful? Give feedback.
-
Okay. I had to do |
Beta Was this translation helpful? Give feedback.
-
BTW, I am not seeing anything about building specific configuration of the model (i.e. ufs-coastal). Is there any example for it? Maybe I need to create new app under |
Beta Was this translation helpful? Give feedback.
-
One more question, how can I make available new driver? I tried to clean existing development environment and creating again ( |
Beta Was this translation helpful? Give feedback.
-
@maddenp-noaa It seems that
|
Beta Was this translation helpful? Give feedback.
-
@maddenp-noaa BTW, along the way I had to dig into documentation to find some key information or look around the code. So, there is not strait forward way to find all those information and easy to follow example to bring new driver. Maybe this could be a future improvement in the documentation. Just and idea and feedback. |
Beta Was this translation helpful? Give feedback.
-
@maddenp-noaa I just wonder if there is a way to write the namelist file in ESMF config format. The one of the namlist file which is required for CDEPS data component is stream definition file in ESMF config format. In UFS, both |
Beta Was this translation helpful? Give feedback.
-
@maddenp-noaa I am trying to combine couple of steps of UFS coastal with UWTools and I just wonder if you have a exiting workflow that coupled couple of steps such as prep and running the code etc. Is there any generic driver or way to trader a python code or command through the workflow. For example, let's assume that I have a script that gets the data for the case, Is it possible to trigger it (and define as a dependency for other steps or derives) without writing any specific driver. I also wonder about the defining dependencies among steps. Anyway, if you could point me couple of place in the documentation, I could try to look at them and try to understand. |
Beta Was this translation helpful? Give feedback.
-
I think you have a number of options:
Rocoto is mature, well-supported, and probably a good choice. Here's an example of a toy workflow using just
It imports some items from the Here's an
You can query the workflow for available tasks:
Execute the
Inspect run directory:
Running the driver again is a no-op, since all the work is complete:
But if a declared output is removed, the workflow can recreate it:
Less work is done than the first time because the namelist files and symlinks are still ready to use. The above code relies on some features in Let me know what you think and we can discuss more. |
Beta Was this translation helpful? Give feedback.
-
@maddenp-noaa Thanks. Lots of information in here to digest. Let me look at them and get back to you if I have any question. It seems that a Python script needs to be written for |
Beta Was this translation helpful? Give feedback.
-
Rocoto requires an XML document to describe workflows. It could be written directly, or you could use the If you know that you need to use a specific workflow manager eventually, I think you'd be better off starting with it immediately. But I think that defining the workflow steps, figuring out dependencies, etc., can be the hardest part of workflow construction, so I don't think that much work is wated if you move from one workflow engine to another: Steps defined for one engine probably translate, conceptually at least, to another, though the syntax changes. An interesting property of |
Beta Was this translation helpful? Give feedback.
-
Hi @uturuncoglu Generally, you need to run Two ways forward are:
I'll add something to the docs to try to make this clearer. |
Beta Was this translation helpful? Give feedback.
-
And if you're installing the package into the same environment in which you built it, you can use the simpler command
|
Beta Was this translation helpful? Give feedback.
-
@maddenp-noaa Thanks for all your help. I have other couple of minor questions to make DATM+SCHSIM configure working with the workflow.
|
Beta Was this translation helpful? Give feedback.
-
BTW, in the example workflow. The Linker part of code is facing like following,
So, i checked the file and found that there is a
But this also requires to provide
and I am expecting to use current run dir but since link part has no information like that maybe I also need to add |
Beta Was this translation helpful? Give feedback.
-
I think you might have pulled
I'm sorry, I should have realized, when answering your question about the local In re: the specific construction of the YAML, yes, there are many possibilities there, including a top-level Our team is continuing to implement features meant to support coupled drivers. I am currently working on a task that would make it possible for the YAML config sections belonging to components to omit some otherwise required items -- like |
Beta Was this translation helpful? Give feedback.
-
@maddenp-noaa Thanks. Yes. I realized that my version have |
Beta Was this translation helpful? Give feedback.
-
@maddenp-noaa I just wonder how can I submit job through the schedular. I define the workflow with
Maybe I need to also add some other function to my workflow file but not sure. |
Beta Was this translation helpful? Give feedback.
-
@uturuncoglu I have something for you to look at / test. We recently created a new You'll need to build a local
This will create a Note that, if the contents of You can also run Please have a look when you have time and let me know how it goes. I can make and push changes that you can |
Beta Was this translation helpful? Give feedback.
@maddenp-noaa Yes. Thanks for the clarification. I think we could go with iota for now. I am not sure how hard would be to switch rococo and this point and I am not sure about using ecflow along with uwtools. Let me mark this as answered and close the discussion and we could continue to discuss using another one if we need.