Skip to content

Commit 8fd0a93

Browse files
authored
Merge pull request #27 from valeriupredoi/new_mass_download
Updated the download from mass tool
2 parents 8eab3c4 + 224fb42 commit 8fd0a93

7 files changed

+180
-112
lines changed

Diff for: README.md

+33-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Multi-model comaprison report
134134
-----------------------------
135135

136136
Once several models have been analysed using the time series analysis,
137-
their time development can be compared using the analysis_compare command:
137+
their time development can be compared using the `analysis_compare` command:
138138
```
139139
analysis_compare recipe.yml
140140
```
@@ -172,6 +172,38 @@ The optional arguments for each job are:
172172
A sample yaml exists in `input_yml/comparison_analysis_template.yml`,
173173
which can be adapted to additional analysis.
174174

175+
Download data from MASS
176+
-----------------------
177+
178+
It's straightforward to download data from the Met Office
179+
Storage System, MASS.
180+
The bgcval2 tool `download_data_from mass` sets up the command and
181+
outputs a script which you can run on Jasmin's mass-cli1 machine.
182+
183+
Note that the only place on CEDA-JASMIN you can download data
184+
is the dedicated virtual machine, mass-cli1.jasmin.ac.uk.
185+
186+
The recommended process is to generate the download script on an interactive node,
187+
like sci1 with the command:
188+
```
189+
download_from_mass jobID noMoo
190+
```
191+
Which will then create a script in the directory `mass_scripts`.
192+
The runtime flag `noMoo` stops the script from attempted to execute the script.
193+
194+
From there, the user must log into the mass machine, and execute the script:
195+
```
196+
#from login1.jasmin.ac.uk:
197+
ssh -X mas-cli1
198+
cd bgcval2
199+
source mass_script/*.sh
200+
```
201+
202+
Note that these scripts can also be automatically generated by
203+
the `analysis_compare` command by including the
204+
```
205+
do_mass_download: True
206+
```
175207

176208
Documentation
177209
=============

Diff for: bgcval2/analysis_compare.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
from .timeseries import profileAnalysis
6060
from .timeseries import timeseriesPlots as tsp
6161
from bgcval2.analysis_timeseries import analysis_timeseries
62+
from bgcval2.download_from_mass import download_from_mass
63+
6264

6365
try:
6466
from .bgcvaltools.pftnames import getLongName
@@ -4167,6 +4169,7 @@ def load_comparison_yml(master_compare_yml_fn):
41674169
exit(0)
41684170

41694171
details['do_analysis_timeseries'] = dictionary.get('do_analysis_timeseries', False)
4172+
details['do_mass_download'] = dictionary.get('do_mass_download', False)
41704173

41714174
details['master_suites'] = dictionary.get('master_suites', [])
41724175

@@ -4220,6 +4223,7 @@ def main():
42204223
jobs = details['jobs']
42214224
analysis_name = details['name']
42224225
do_analysis_timeseries = details['do_analysis_timeseries']
4226+
do_mass_download = details['do_mass_download']
42234227
master_suites = details['master_suites']
42244228

42254229
colours = details['colours']
@@ -4239,9 +4243,12 @@ def main():
42394243
print(jobID, 'Shift time by', shifttimes[jobID])
42404244
print(jobID, 'suite:', suites[jobID])
42414245

4242-
# if do_mass_download:
4243-
# Not yet implemented.
4244-
4246+
for jobID in jobs:
4247+
# even if you don't want to download, it's good to run this
4248+
# as it clears up the path and ensures recently downloed data is
4249+
# correctly symlinked.
4250+
download_from_mass(jobID, doMoo=do_mass_download)
4251+
42454252
if do_analysis_timeseries:
42464253
for jobID in jobs:
42474254
analysis_timeseries(

0 commit comments

Comments
 (0)