Due to a shift in policy, from 0900 GMT on Wednesday 14th July 2021, we will be disabling ssh access to the server for external users. External users who wish to continue to access code repositories on the server will need to switch to using https. This can be accomplished in the following way: 1) On the repo on gitlab, use the clone dialogue and select ‘Clone with HTTPS’ to get the address of the repo; 2) From within the checkout of your repo run: $ git remote set-url origin HTTPS_ADDRESS. Here, replace HTTPS_ADDRESS with the address you have just copied from GitLab. Pulls and pushes will now require you to enter a username and password rather than using a ssh key. If you would prefer not to enter a password each time, you might consider caching your login credentials.

Commit e4c13505 authored by Modellers Operational's avatar Modellers Operational

Add archiving on CETO

parent 3425a26b
import numpy as np
import datetime as dt
import sys
import PyFVCOM as pf
fvcom_output_path = sys.argv[1]
fvcom_grid_name = sys.argv[2]
start_date = dt.datetime.strptime(sys.argv[3], '%Y-%m-%d')
end_date = dt.datetime.strptime(sys.argv[4], '%Y-%m-%d')
date_list = pf.utilities.time.date_range(start_date, end_date)
with open('make_daily_nc.sh', 'w') as f:
f.write('#!/bin/bash \n')
this_filestr = '{}/{}_0001.nc'.format(fvcom_output_path,fvcom_grid_name)
this_fr = pf.read.FileReader(this_filestr)
for i, this_date in enumerate(date_list):
time_ind = [np.argwhere(this_fr.time.datetime == this_date), np.argwhere(this_fr.time.datetime == this_date + dt.timedelta(hours=23))]
this_out_filestr = '{}_{}.nc'.format(fvcom_grid_name, this_date.strftime('%Y-%m-%d'))
with open('make_daily_nc.sh', 'a') as f:
f.write('ncks -d time,{},{} {} {} \n'.format(np.squeeze(time_ind[0]), np.squeeze(time_ind[1]), this_filestr, this_out_filestr))
default = module purge; module load ipd;
python3 make_ncks_script.py ${ROSE_DATAC}/output ${GRID_NAME} ${START_DAY} ${END_DAY};
bash ./make_daily_nc.sh;
......@@ -70,12 +70,11 @@
{% endif %}
{% if FORECAST %}
write_run_namelist => run_fvcom => transfer_data => transfer_data_today
write_run_namelist => run_fvcom => transfer_data => transfer_data_today => remote_archive => clean_output
{% else %}
write_run_namelist => run_fvcom => transfer_data
write_run_namelist => run_fvcom => transfer_data => clean_output
{% endif %}
run_fvcom => nan_check
transfer_data => plot_surf_vars
......@@ -317,4 +316,10 @@
inherit = remote_job
inherit = remote_job
inherit = remote_job
script = """
rm ${ROSE_DATAC}/output/${GRID_NAME}_0001.nc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment