Commit 72d057b3 authored by Modellers Operational's avatar Modellers Operational
Browse files

Bug fixs in CMEMS start file

parent 1da69a0d
......@@ -2,6 +2,7 @@ import multiprocessing
import numpy as np
import datetime as dt
import glob as gb
import sys
from pathlib import Path
import PyFVCOM as pf
......@@ -35,7 +36,12 @@ restart.time.datetime = np.asarray([start_date])
ref_date = dt.datetime(1858,11,17,0,0,0)
restart.time.time = np.asarray([(start_date - ref_date).days])
restart.time.Itime = np.asarray([(start_date - ref_date).days])
restart.time.Times = np.asarray(['{}T00:00:00.0000000'.format(start_date.strftime('%Y-%m-%d'))])
restart.time.Times = np.asarray(['{}T00:00:00.000000'.format(start_date.strftime('%Y-%m-%d'))])
# We need to bracket the restart data in time with CMEMS data to ensure it interpolates properly.
for this_fvcom, this_var in fvcom_cmems_names.items():
......@@ -78,5 +84,7 @@ for this_fvcom, this_var in fvcom_cmems_names.items():
restart.replace_variable_with_regular(this_fvcom, this_var[1], this_data_reader, constrain_coordinates=True, mode=this_mode)
# replace Times as need to be a 26 character array
restart.time.Times = np.asarray(list(restart.time.Times[0]))[np.newaxis,:]
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