Commit 8338a806 authored by BorjaEst's avatar BorjaEst
Browse files

mock time coord input "end" optional, def==start

parent a09497b6
......@@ -3,7 +3,9 @@
import datetime
def __timeline(start, end, step=10):
def __timeline(start, end=None, step=10):
if not end:
end = start
start = datetime.datetime(start, 1, 1)
end = datetime.datetime(end, 12, 31)
step = datetime.timedelta(days=step)
......
......@@ -17,13 +17,13 @@ with utils.cd(model1_dir):
mockup.Dataset(
var_coords={
'toz': [
coordinate.time(year,year),
coordinate.time(year),
coordinate.lat(),
coordinate.lon()
]
},
coords=[
coordinate.time(year, year),
coordinate.time(year),
coordinate.plev(),
coordinate.lat(),
coordinate.lon()
......@@ -37,14 +37,14 @@ with utils.cd(model1_dir):
mockup.Dataset(
var_coords={
'vmro3': [
coordinate.time(year,year),
coordinate.time(year),
coordinate.plev(),
coordinate.lat(),
coordinate.lon()
]
},
coords=[
coordinate.time(year, year),
coordinate.time(year),
coordinate.plev(),
coordinate.lat(),
coordinate.lon()
......@@ -60,22 +60,22 @@ with utils.cd(model2_dir):
mockup.Dataset(
var_coords={
'toz': [
coordinate.time(year,year),
coordinate.time(year),
coordinate.lat(),
coordinate.lon()
],
'vmro3': [
coordinate.time(year,year),
coordinate.time(year),
coordinate.plev(),
coordinate.lat(),
coordinate.lon()
]
},
coords=[
coordinate.time(year, year),
coordinate.time(year),
coordinate.plev(),
coordinate.lat(),
coordinate.lon()
]
).to_netcdf("toz_" + str(year) + ".nc")
).to_netcdf("all_" + str(year) + ".nc")
Supports Markdown
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