Opened 3 weeks ago

Last modified 3 weeks ago

#3215 accepted help

ANTS on JASMIN

Reported by: pmcguire Owned by: pmcguire
Component: Land Surface Modelling Keywords: ANTS, Python, CAP, JASMIN
Cc: mtodt Platform: JASMIN
UM Version:

Description

Hi Patrick

If I remember correctly you said at last week's group meeting that you and V set up ANTS on JASMIN. Could you point me to it? Thanks a lot!

Cheers
Markus

Change History (2)

comment:1 Changed 3 weeks ago by pmcguire

  • Cc mtodt added
  • Status changed from new to accepted

Hi Markus
I will put these instructions on the UofR LSP web page ASAP.
But this should get you started with setting up your environment on JASMIN so that it can use ANcillary Tools and Suites (ANTS).

0) You will need to apply for and receive the ncas_generic group workspace privilege if you haven't already.
1) Log out of jasmin-sci* it is important to log out, to make sure your PATH is clean and in its original state
2) ssh in to one of the jasmin-sci* Virtual Machines (VMs).
3) Type:

source ~pmcguire/from_valeriu/env_ants.sh

4) Type:

which python

5) It should say:

/gws/nopw/j04/ncas_generic/users/pmcguire/anaconda3/envs/ants_env/bin/python

6) Type:

ls -ltr /gws/nopw/j04/ncas_generic/users/pmcguire/anaconda3/envs/ants_env/bin/python

7) It should say:

lrwxrwxrwx 1 pmcguire users 9 Mar 7 2019 /gws/nopw/j04/ncas_generic/users/pmcguire/anaconda3/envs/ants_env/bin/python → python2.7

Note: this is python2.7 not python3.7.

8) Type:

python

9) Type:

import ants

this can sometimes take 5 minutes or so before you get back to the open Python prompt again, so be patient. Maybe someday we can try to speed-up this loading. But for the time being, we will work with the slow loading.

10) Then you can run your Python commands that use ANTS from the Python command-line. Or you can submit a LOTUS batch job that uses ANTS Python programs, etc.

11) If you ever need to switch back to the regular version of Python instead of the one where the ANTS environment is set up, the easiest way is to log out of the jasmin-sci* VM. The second easiest way is to change your .bash* script or your .profile script to remember your initial PATH variable prior to running the env_ants.sh script, and then invoke the command after the ANTS session to go back to the initial PATH.

The main WIKI for ANTS is at:
https://code.metoffice.gov.uk/trac/ancil/wiki/ANTS
and the user guide is here:
https://code.metoffice.gov.uk/doc/ancil/

If you need scripts that use ANTS, let me know.
I have some soils scripts that use Python and ANTS, for example.

Patrick

comment:2 Changed 3 weeks ago by pmcguire

Hi Markus:

These instructions have been slightly edited and are now also available on:
https://research.reading.ac.uk/landsurfaceprocesses/software-examples/ants_on_jasmin/

Patrick

Note: See TracTickets for help on using tickets.