# /work quota

**URL:** <https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083>\
**Category:** Unified Model\
**Tags:** ARCHER2\
**Created:** [31 July 2023 08:30 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083 "2023-07-31T08:30:15Z")\
**Posts on this page:** 16\
**Page:** 3

<div class="post-metadata">

**Author:** ![grenville](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/grenville/32/29_2.png) [@grenville](https://cms-helpdesk.ncas.ac.uk/u/grenville)\
**Post date:** [9 August 2023 17:34 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/43 "2023-08-09T17:34:23Z")

</div>

there are a slew of cylc environment variables here [9. Suite Configuration — The Cylc Suite Engine 7.8.8 documentation](https://cylc.github.io/cylc-doc/7.8.8/html/suite-config.html#task-job-script-variables)

any help

---

<div class="post-metadata">

**Author:** ![shakka](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/shakka/32/111_2.png) [@shakka](https://cms-helpdesk.ncas.ac.uk/u/shakka)\
**Post date:** [10 August 2023 09:19 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/44 "2023-08-10T09:19:30Z")

</div>

Aha, okay. I’ve changed the python script to use $CYLC\_CURRENT\_CYCLE\_POINT and use python to figure out which files to download ahead of time and which to remove. Hopefully that should work.

Presumably I need to tell the app to inherit the variable somewhere, or are they already loaded in in the cylc environment?

… although I notice archer /work isn’t running properly at the moment, which explains why my job was endlessly hanging

---

<div class="post-metadata">

**Author:** ![grenville](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/grenville/32/29_2.png) [@grenville](https://cms-helpdesk.ncas.ac.uk/u/grenville)\
**Post date:** [10 August 2023 12:46 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/45 "2023-08-10T12:46:16Z")

</div>

$CYLC\_CURRENT\_CYCLE\_POINT should be available by default

---

<div class="post-metadata">

**Author:** ![shakka](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/shakka/32/111_2.png) [@shakka](https://cms-helpdesk.ncas.ac.uk/u/shakka)\
**Post date:** [10 August 2023 13:18 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/46 "2023-08-10T13:18:36Z")

</div>

It didn’t seem to be available (maybe it was the way i was specifying it), so i changed it to use $CURR\_DATE instead.

But now I’m getting the cdsapi error again, which I’ve realised I’m getting because cdsapi is installed on /home and it isn’t visible to the compute nodes.

Can I / someone install cdsapi on the /work filesystem?

---

<div class="post-metadata">

**Author:** ![grenville](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/grenville/32/29_2.png) [@grenville](https://cms-helpdesk.ncas.ac.uk/u/grenville)\
**Post date:** [10 August 2023 13:35 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/47 "2023-08-10T13:35:27Z")

</div>

Yes - I should have caught that – constant source of error!

Run it on the login node instead - if it’s not resource hungry?

---

<div class="post-metadata">

**Author:** ![shakka](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/shakka/32/111_2.png) [@shakka](https://cms-helpdesk.ncas.ac.uk/u/shakka)\
**Post date:** [10 August 2023 13:54 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/48 "2023-08-10T13:54:50Z")

</div>

I managed to get it to work and get beyond the initial cdsapi error by adding the path to my local install of cdsapi to the init-script for HPC\_SERIAL, but it sounds like running on the login nodes might be useful anyway, especially if anyone else wants to use the app eventually.

Would I set that up by adding a line to [[HPC\_SERIAL]] in /site/ncas-cray-ex/suite-adds.rc ?

---

<div class="post-metadata">

**Author:** ![RosalynHatcher](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/rosalynhatcher/32/11_2.png) [@RosalynHatcher](https://cms-helpdesk.ncas.ac.uk/u/RosalynHatcher)\
**Post date:** [10 August 2023 14:16 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/49 "2023-08-10T14:16:29Z")

</div>

For future reference, in case you should need to do something similar again or anyone else reads this, the cylc environment variables should be available in a python script by using `os.environ['CYLC_CURRENT_CYCLE_POINT']`

---

<div class="post-metadata">

**Author:** ![shakka](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/shakka/32/111_2.png) [@shakka](https://cms-helpdesk.ncas.ac.uk/u/shakka)\
**Post date:** [10 August 2023 14:47 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/50 "2023-08-10T14:47:16Z")

</div>

> [@RosalynHatcher](#):
>
> os.environ[‘CYLC\_CURRENT\_CYCLE\_POINT’]

Thanks for this Ros. I tried this but get the following error:

> Traceback (most recent call last):  
> File “/work/n02/n02/shakka/test.py”, line 6, in   
> cycle = os.environ[‘CYLC\_CURRENT\_CYCLE\_POINT’]  
> File “/opt/cray/pe/python/3.9.13.1/lib/python3.9/os.py”, line 679, in **getitem**  
> raise KeyError(key) from None  
> KeyError: ‘CYLC\_CURRENT\_CYCLE\_POINT’  
> /work/n02/n02/shakka/cylc-run/u-cy223/app

---

<div class="post-metadata">

**Author:** ![RosalynHatcher](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/rosalynhatcher/32/11_2.png) [@RosalynHatcher](https://cms-helpdesk.ncas.ac.uk/u/RosalynHatcher)\
**Post date:** [10 August 2023 15:04 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/51 "2023-08-10T15:04:21Z")

</div>

Oh I see the problem `CYLC_CURRENT_CYCLE_POINT` is not a valid cylc variable - it’s `CYLC_TASK_CYCLE_POINT`

Cheers,  
Ros.

---

<div class="post-metadata">

**Author:** ![shakka](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/shakka/32/111_2.png) [@shakka](https://cms-helpdesk.ncas.ac.uk/u/shakka)\
**Post date:** [10 August 2023 15:16 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/52 "2023-08-10T15:16:59Z")

</div>

aha! Yes this seems to work… and defining within the python script saves me feeding it command line inputs.

---

<div class="post-metadata">

**Author:** ![shakka](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/shakka/32/111_2.png) [@shakka](https://cms-helpdesk.ncas.ac.uk/u/shakka)\
**Post date:** [11 August 2023 12:30 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/53 "2023-08-11T12:30:37Z")

</div>

> [@RosalynHatcher](#):
>
> CYLC\_TASK\_CYCLE\_POINT

Update: have successfully managed to get my app to run - thanks for your help! Am now going to move onto the next part of the task, which is to set up the transfer of output files to jasmin…

Cheers  
Ella

---

<div class="post-metadata">

**Author:** ![shakka](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/shakka/32/111_2.png) [@shakka](https://cms-helpdesk.ncas.ac.uk/u/shakka)\
**Post date:** [14 August 2023 09:42 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/54 "2023-08-14T09:42:34Z")

</div>

I’m looking at the [docs](https://metomi.github.io/rose/doc/html/api/built-in/rose_arch.html) for rose-arch now, and wondering where to put the step in the suite graph. I have kind of assumed the suite-graph/lam-fcst.rc would be the best place (as archiving is already referenced there).

Also, is there a suite id I can look at that has archiving set up (from archer2 to jasmin ideally, but I know this might be a lot to ask!) ?

Cheers  
Ella

---

<div class="post-metadata">

**Author:** ![grenville](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/grenville/32/29_2.png) [@grenville](https://cms-helpdesk.ncas.ac.uk/u/grenville)\
**Post date:** [15 August 2023 14:27 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/55 "2023-08-15T14:27:07Z")

</div>

Hi Ella

It’s not easy to follow the jinja in u-cy223 – I’m only guessing where to put an archive task, but in  
`suite-graph/lam-fcst.rc` and `suite-graph/dm.rc` , adding:

`archive => housekeep_cycle`

makes a graph like:

```auto
 install_glm_startdata => glm_um_recon1 => glm_um_fcst_000 => glm_um_fcst_001 => glm_um_fcst_002 => glm_um_fcst_003 => glm_um_fcst_004 => glm_um_fcst_005 => archive => housekeep_cycle
Arctic_11km_ga7_24-36_um_recon => Arctic_11km_ga7_24-36_um_fcst_000 => Arctic_11km_ga7_24-36_um_fcst_001 => Arctic_11km_ga7_24-36_um_fcst_002 => Arctic_11km_ga7_24-36_um_fcst_003 => Arctic_11km_ga7_24-36_um_fcst_004 => Arctic_11km_ga7_24-36_um_fcst_005 => archive => housekeep_cycle
Antarctic_11km_ga7_24-36_um_recon => Antarctic_11km_ga7_24-36_um_fcst_000 => Antarctic_11km_ga7_24-36_um_fcst_001 => Antarctic_11km_ga7_24-36_um_fcst_002 => Antarctic_11km_ga7_24-36_um_fcst_003 => Antarctic_11km_ga7_24-36_um_fcst_004 => Antarctic_11km_ga7_24-36_um_fcst_005 => archive => housekeep_cycle

```

We don’t use the built in archive app for climate suites so I can not point to a suite that uses the built in app for archiving to JASMIN.

Grenville

---

<div class="post-metadata">

**Author:** ![shakka](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/shakka/32/111_2.png) [@shakka](https://cms-helpdesk.ncas.ac.uk/u/shakka)\
**Post date:** [15 August 2023 15:10 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/56 "2023-08-15T15:10:55Z")

</div>

Hi Grenville,

Thanks for this. I’ll add it in here.

So you’re saying there are no suites currently archiving archer → jasmin? That bodes well!

I’m struggling to decipher the archiving rename syntax. I’d like to be able to rename the files produced by the suite according to the region name and cycle point before transferring them because I’m using the same suite to produce output for Antarctic and Arctic. I presume I can use ROSE variables like $ROSE\_SUITE\_NAME for this?

Would it look something like this?

> [arch:field.nc/]  
> command-format=rsync %(sources)s %(target)s  
> rename-format=%(cycle)s\_${NAME}\_p%(tag)s  
> rename-parser=^._(?P._.nc)$  
> source=\*.nc  
> source-prefix=$RUN\_DIR

Cheers  
Ella

---

<div class="post-metadata">

**Author:** ![shakka](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/shakka/32/111_2.png) [@shakka](https://cms-helpdesk.ncas.ac.uk/u/shakka)\
**Post date:** [16 August 2023 09:29 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/57 "2023-08-16T09:29:12Z")

</div>

I’m going to start a new thread on the archiving, because it seems to make more sense to do this separately… hope that’s all good!

---

<div class="post-metadata">

**Author:** ![RosalynHatcher](https://dub1.discourse-cdn.com/flex013/user_avatar/cms-helpdesk.ncas.ac.uk/rosalynhatcher/32/11_2.png) [@RosalynHatcher](https://cms-helpdesk.ncas.ac.uk/u/RosalynHatcher)\
**Post date:** [18 October 2023 16:27 UTC](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083/58 "2023-10-18T16:27:12Z")

</div>



[Previous page](https://cms-helpdesk.ncas.ac.uk/t/work-quota/1083.md?page=2)
