How to set environment variables in new task

I want to add a task to the ACCESS-CM2 job. I want to configure this task using environment variables.

I’m setting the variables in the configuration like this:

$ cat roses/u-cw525/app/update_sst/rose_app.conf
[env]
SOMEVAR=SOMETEXT

But when I run it, the variable is not set. I don’t find any good documentation on environment variables in rose/cylc either. Can someone tell me how to do this?

Thank you

1 Like

Environment variables set in a rose app file are used when you use rose task-run to execute the task. Rose will set up the environment variables, create files, then run the command specified in the [command] section of the config file.

You’ve not specified [command] in your file, so I assume you’re not running with rose task-run?

No, I’m trying to really understand rose/cylc but I don’t find more than the most cursory of documentation. The tutorials on the metoffice’s website are fine, but they don’t go into that much detail. There’s a cylc documentation but it doesn’t talk about rose at all.

They’re both separate projects, rose is built on top of Cylc. Try the rose tutorial

1 Like

Thank you, bookmarked and I’ll read through it.