awi-esm3-veg-hr-variables/core_ocean/cmip7_awiesm3-veg-hr_ocean.yaml
- name: thkcello_fx
inputs:
pattern: mesh.nc
- name: masscello_fx
reference_density: 1025.0
examples/custom_steps.py
def compute_thkcello_fx(data, rule):
thickness = _layer_thickness_from_bnds(data["depth_bnds"].values)
def _layer_thickness_from_bnds(bnds):
thickness = np.diff(bnds)
, i.e. the question is now the bounds of the vertical levels are defined.
ncdump -v depth,depth_bnds /work/ab0246/a270092/input/fesom2/dars2/mesh.nc
depth = 2.5, 7.5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 107.5, 122.5, 137.5,
152.5, 170, 190, 212.5, 237.5, 262.5, 287.5, 312.5, 337.5, 362.5, 387.5,
425, 475, 525, 575, 625, 675, 750, 850, 970, 1110, 1255, 1415, 1600,
1810, 2035, 2275, 2525, 2775, 3025, 3275, 3525, 3775, 4025, 4275, 4525,
4775, 5025, 5275, 5525, 5825, 6125, 3160 ;
depth_bnds = -0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 115, 130, 145,
160, 180, 200, 225, 250, 275, 300, 325, 350, 375, 400, 450, 500, 550,
600, 650, 700, 800, 900, 1040, 1180, 1330, 1500, 1700, 1920, 2150, 2400,
2650, 2900, 3150, 3400, 3650, 3900, 4150, 4400, 4650, 4900, 5150, 5400,
5650, 6000, 6250, 70 ;
ncks -F -d time,1,1 -d nod2,78802,78802 /scratch/a/a270092/pycmor_hr/cli37_extraatm_512g_filecache_vec/cmorized/core_ocean/cmorized/thkcello_tavg-ol-hxy-sea_mon_glb_gn_AWI-ESM-3_picontrol_r1i1p1f1_158701-158712.nc
no | depth | depth_bnds | thkcello
-- | ----- | ---------- | ----------------
1 | 2.5 | 0 | 5
2 | 7.5 | 5 | 5.0000147819519
3 | 15 | 10 | 10
4 | 25 | 20 | 10.0000295639038
5 | 35 | 30 | 10
6 | 45 | 40 | 10.0000295639038
7 | 55 | 50 | 10
8 | 65 | 60 | 10.0000295639038
9 | 75 | 70 | 10
10 | 85 | 80 | 10.0000295639038
11 | 95 | 90 | 10
12 | 107.5 | 100 | 15.0000295639038
13 | 122.5 | 115 | 15
14 | 137.5 | 130 | 15.0000295639038
15 | 152.5 | 145 | 15
16 | 170 | 160 | 20.0000591278076
17 | 190 | 180 | 20
18 | 212.5 | 200 | 25.0000591278076
19 | 237.5 | 225 | 25
20 | 262.5 | 250 | 25.0000591278076
21 | 287.5 | 275 | 25
22 | 312.5 | 300 | 25.0000591278076
23 | 337.5 | 325 | 25
24 | 362.5 | 350 | 25.0000591278076
25 | 387.5 | 375 | 25
26 | 425 | 400 | 50.0001182556152
27 | 475 | 450 | 50
28 | 525 | 500 | 50.0001182556152
29 | 575 | 550 | 50
30 | 625 | 600 | 50.0001182556152
31 | 675 | 650 | 50
32 | 750 | 700 | 100.00023651123
33 | 850 | 800 | 100
34 | 970 | 900 | 140.000473022461
35 | 1110 | 1040 | 140
36 | 1255 | 1180 | 150.000473022461
37 | 1415 | 1330 | 170
38 | 1600 | 1500 | 200.000473022461
39 | 1810 | 1700 | 220
40 | 2035 | 1920 | 230.000473022461
41 | 2275 | 2150 | 250
42 | 2525 | 2400 | 250.000473022461
43 | 2775 | 2650 | 250
44 | 3025 | 2900 | 250.000473022461
45 | 3275 | 3150 | 250
46 | 3525 | 3400 | 250.000473022461
47 | 3775 | 3650 | 250
48 | 4025 | 3900 | 250.000473022461
49 | 4275 | 4150 | 250
50 | 4525 | 4400 | 250.000473022461
51 | 4775 | 4650 | 250
52 | 5025 | 4900 | 250.000473022461
53 | 5275 | 5150 | 250
54 | 5525 | 5400 | 250.000473022461
55 | 5825 | 5650 | 350
56 | 6125 | 6000 | 250.000473022461
| | 6250 |
Hi
As far as I understand,
thkcelloand hencemasscelloare currently (feat/cmip7-awiesm3-veg-hr, 465afa4) derived fromFirst, appendix G3 of Griffies et al. 2016 reports 1035 kg m-3 as a boussinesq reference density, not 1025 kg m-3.
Second, appendix H4 defines
, i.e. the question is now the bounds of the vertical levels are defined.
The dars2 example above uses
(The last values of
depthanddepth_bndsare obviously wrong which seems to be a bug in the python version of spherlab.)depth_bndsare the 1st nlev values fromaux3d.out:https://github.com/FESOM/spheRlab/blob/0424b811a911de58215bdbfda7b5398b71cde9e7/R/sl.grid.readFESOM.R#L104
Somehow,
thickness = np.diff(bnds)seems to introduce some rounding issue:The above output is the last column:
Cheers,
Chris