Introduction
Introduction Statistics Contact Development Disclaimer Help
tgenerate simple sea level forcing - pism-exp-gsw - ice stream and sediment tra…
git clone git://src.adamsgaard.dk/pism-exp-gsw
Log
Files
Refs
README
LICENSE
---
commit 8f5f2cf210626f9f532093fab4c53626fd078a97
parent 67cc411b812c5b5294d00318345a3977068da6f5
Author: Anders Damsgaard <[email protected]>
Date: Fri, 26 Nov 2021 10:48:38 +0100
generate simple sea level forcing
Diffstat:
M Makefile | 6 +++++-
A sealvl.py | 22 ++++++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/Makefile b/Makefile
t@@ -1,4 +1,5 @@
NPROC != awk '/^cpu cores/ {print $$4; exit}' /proc/cpuinfo
+SLSERIES=sealvl.nc
all: \
ABC1_1a_M1_A1-flux.pdf\
t@@ -42,7 +43,10 @@ experiment-1a-mode-1.sh: run.py
experiment-1a-mode-3.sh: run.py
./run.py -e 1a --mode=3 --Mx=1201 > $@
+${SLSERIES}: sealvl.py
+ ./sealvl.py
+
clean:
- rm -f out.* experiment-*.sh *.nc *.pdf
+ rm -f out.* experiment-*.sh *.nc *.pdf ${SLSERIES}
.PHONY: all clean
\ No newline at end of file
diff --git a/sealvl.py b/sealvl.py
t@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+import numpy as np
+import netCDF4 as nc4
+
+f = nc4.Dataset("sealvl.nc", "w", format="NETCDF4")
+
+f.createDimension("time", None)
+time = f.createVariable("time", "f4", ("time",))
+time.calendar = "365_day"
+time.units = "years since 1-1-1"
+time.long_name = "Time"
+
+delta_SL = f.createVariable("delta_SL", "f4", "time")
+delta_SL.long_name = "Sea Level (variation from present)"
+delta_SL.standard_name = "global_average_sea_level_change"
+delta_SL.units = "meters"
+
+time[:] = [0, 1000]
+delta_SL[:] = [0, 10]
+
+f.close()
+\ No newline at end of file
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.