Skip to content

Commit 38ccba2

Browse files
committed
uncommited changes when review started
1 parent 0e2603a commit 38ccba2

5 files changed

Lines changed: 897 additions & 722 deletions

src/archive_data_GRL_paper.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
#PBS -P xv83
3+
#PBS -l ncpus=1
4+
#PBS -l mem=30GB
5+
#PBS -q copyq
6+
#PBS -l walltime=03:00:00
7+
#PBS -l wd
8+
#PBS -l storage=scratch/xv83+gdata/xv83
9+
#PBS -o output/PBS/
10+
#PBS -j oe
11+
12+
13+
SOURCEDIR='/scratch/xv83/TMIP/data/ACCESS-ESM1-5/'
14+
DESTDIR='/g/data/xv83/TMIP/data/ACCESS-ESM1-5/'
15+
16+
echo "Archiving monthly climatologies"
17+
rsync -a -m --include='ssp370/r*i1p1f1/Jan20*-Dec20*/cyclomonth/t*_trans_s*.nc' --include='*/' --exclude='*' ${SOURCEDIR} ${DESTDIR}
18+
19+
echo "Archiving monthly matrices"
20+
rsync -a -m --include='ssp370/r*i1p1f1/Jan20*-Dec20*/cyclomonth/cyclo_matrix_centered_kVdeep3e-05_kH300_kVML1e+00_*.jld2' --include='*/' --exclude='*' ${SOURCEDIR} ${DESTDIR}
21+
22+
echo "Archiving mean reemergence time"
23+
rsync -a -m --include='ssp370/r*i1p1f1/Jan20*-Dec20*/cyclomonth/reemergence_time_centered_kVdeep3e-05_kH300_kVML1e+00.nc' --include='*/' --exclude='*' ${SOURCEDIR} ${DESTDIR}
24+
25+
echo "Archiving mean TTD"
26+
rsync -a -m --include='ssp370/r*i1p1f1/Jan20*-Dec20*/calgtilde_centered_kVdeep3e-05_kH300_kVML1e+00.nc' --include='*/' --exclude='*' ${SOURCEDIR} ${DESTDIR}
27+
28+
echo "Archiving mean sequestration efficiency"
29+
rsync -a -m --include='ssp370/r*i1p1f1/Jan20*-Dec20*/calE_centered_kVdeep3e-05_kH300_kVML1e+00.nc' --include='*/' --exclude='*' ${SOURCEDIR} ${DESTDIR}
30+
31+
echo "Done archiving!"

src/plot_ACCESS_quantilesandmean.jl

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# qsub -I -P xv83 -q express -l mem=47GB -l storage=scratch/gh0+scratch/xv83 -l walltime=01:00:00 -l ncpus=12
2+
# This is Fig. 2 in Pasquier et al. (GRL, 2025)
23

34
using Pkg
45
Pkg.activate(".")
@@ -150,8 +151,8 @@ fig = Figure(size = (ncols * 500, nrows * 250 + 100), fontsize = 18)
150151
yticks = -60:30:60
151152
xticks = -120:60:120 + 360
152153

153-
datamean = (Γout_ensemblemean, τℰ1050_ensemblemean[:,:,2], τℰ1050_ensemblemean[:,:,1])
154-
datarange = (Γout_ensemblerange, τℰ1050_ensemblerange[:,:,2], τℰ1050_ensemblerange[:,:,1])
154+
datamean = (Γout_ensemblemean, τℰ1050_ensemblemean[:,:,2] .|> Float64, τℰ1050_ensemblemean[:,:,1] .|> Float64)
155+
datarange = (Γout_ensemblerange, τℰ1050_ensemblerange[:,:,2] .|> Float64, τℰ1050_ensemblerange[:,:,1] .|> Float64)
155156
𝒓 = rich("r", font = :bold_italic)
156157
Γstr = rich("Γ", superscript(""), rich("", offset = (-0.55, 0.25)), rich("", offset = (-0.85, 0.25)))
157158
Γfun = rich(Γstr, rich("(", 𝒓, ")", offset = (0.4, 0)))
@@ -325,4 +326,34 @@ outputfile = joinpath(outputdir, "rangemeanage_over_meanage_$(time_window)$(suff
325326
save(outputfile, fig)
326327
@show mean(data, weights)
327328
@show std(data, weights)
328-
@show quantile(data, weights, 0:0.1:1)
329+
@show quantile(data, weights, 0:0.1:1)
330+
331+
332+
333+
# Save the data to be uploaded with paper
334+
metadata = Dict(
335+
"description" => "Characteristic timescales as plotted in Fig. 2 in Pasquier et al. (2025)",
336+
"model" => model,
337+
"experiment" => experiment,
338+
"time window" => time_window,
339+
"unit" => "years",
340+
)
341+
cube4D = DimensionalData.rebuild(areacello_ds["areacello"];
342+
data = [cat(datamean..., dims=3);;;; cat(datarange..., dims=3)],
343+
dims = (
344+
dims(readcubedata(volcello_ds.lat))...,
345+
dims(DimArray(ones(3), Dim{:timescale}(["mean", "median", "10th percentile"])))[1],
346+
dims(DimArray(ones(2), Dim{:statistic}(["ensemble mean", "ensemble range"])))[1],
347+
),
348+
metadata = metadata,
349+
)
350+
arrays = Dict(:timescales => cube4D, :lat => readcubedata(volcello_ds.lat), :lon => readcubedata(volcello_ds.lon))
351+
ds = Dataset(; properties = metadata, arrays...)
352+
353+
# Save to netCDF file
354+
outputfile = joinpath(inputdir, "Pasquier_etal_GRL_2025_Fig2_data.nc")
355+
@info "Saving characteristic timescales as netCDF file:\n $(outputfile)"
356+
# ds_chunked = setchunks(ds, (x = 60, y = 60, Ti = length(ds.Ti)))
357+
savedataset(ds, path = outputfile, driver = :netcdf, overwrite = true)
358+
359+

0 commit comments

Comments
 (0)