Skip to content

Commit

Permalink
Merge pull request #171 from FESOM/workbench
Browse files Browse the repository at this point in the history
Workbench
  • Loading branch information
patrickscholz authored Nov 1, 2024
2 parents dff84d3 + 339f74c commit 0b9e383
Show file tree
Hide file tree
Showing 6 changed files with 435 additions and 95 deletions.
10 changes: 10 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ Welcome to tripyview's documentation!
:undoc-members:
:show-inheritance:

.. automodule:: tripyview.sub_zmoc
:members:
:undoc-members:
:show-inheritance:

.. automodule:: tripyview.sub_dmoc
:members:
:undoc-members:
:show-inheritance:

Indices and tables
==================

Expand Down
35 changes: 18 additions & 17 deletions templates_notebooks/template_transp_dmoc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/albedo/home/pscholz/tripyview\n"
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
Expand Down Expand Up @@ -40,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 18,
"metadata": {
"tags": [
"parameters"
Expand Down Expand Up @@ -159,7 +160,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -176,7 +177,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 20,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -266,7 +267,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -298,7 +299,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 22,
"metadata": {
"scrolled": false
},
Expand All @@ -308,7 +309,7 @@
"output_type": "stream",
"text": [
"/albedo/work/projects/p_fesom/pscholz/project_TRR181/trr181_tke+idemix_jayne_bin_ck0.1/5/ TKE+IDEMIX, jayne\n",
" --> elasped time to load data: 1.84 min.\n",
" --> elasped time to load data: 1.95 min.\n",
" --> data uses 0.41 Gb:\n",
"\n"
]
Expand All @@ -331,21 +332,21 @@
" --> data uses 0.00 Gb:\n",
"\n",
"/albedo/work/projects/p_fesom/pscholz/project_TRR181/trr181_tke+idemix_nycander_bin_ck0.1/5/ TKE+IDEMIX, nycander\n",
" --> elasped time to load data: 1.89 min.\n",
" --> elasped time to load data: 1.93 min.\n",
" --> data uses 0.41 Gb:\n",
"\n",
" --> elasped time to compute dmoc: 0.02 min.\n",
" --> data uses 0.00 Gb:\n",
"\n",
"/albedo/work/projects/p_fesom/pscholz/project_TRR181/trr181_tke+idemix_stormtide_bin_ck0.1/5/ TKE+IDEMIX, stormtide\n",
" --> elasped time to load data: 3.78 min.\n",
" --> elasped time to load data: 1.92 min.\n",
" --> data uses 0.41 Gb:\n",
"\n",
" --> elasped time to compute dmoc: 0.02 min.\n",
" --> data uses 0.00 Gb:\n",
"\n",
"/albedo/work/projects/p_fesom/pscholz/project_TRR181/trr181_tke_ctrl_ck0.1/5/ TKE\n",
" --> elasped time to load data: 4.29 min.\n",
" --> elasped time to load data: 1.91 min.\n",
" --> data uses 0.41 Gb:\n",
"\n",
" --> elasped time to compute dmoc: 0.02 min.\n",
Expand All @@ -362,9 +363,9 @@
" print(datapath, descript)\n",
" ts = clock.time()\n",
" #__________________________________________________________________________________________________ \n",
" data = tpv.load_dmoc_data(mesh, datapath, descript, year, which_transf, std_dens, \n",
" do_info=False, do_zcoord=do_zcoord, \n",
" do_useZinfo=do_useZinfo, do_bolus=do_bolus, do_load=False, do_persist=True, do_parallel=do_parallel)\n",
" data = tpv.load_dmoc_data(mesh, datapath, std_dens, year=year, which_transf=which_transf, descript=descript,\n",
" do_zcoord=do_zcoord, do_useZinfo=do_useZinfo, do_bolus=do_bolus, \n",
" do_load=False, do_persist=True, do_parallel=do_parallel, do_info=False, )\n",
" \n",
" #__________________________________________________________________________________________________ \n",
" # check if data where loaded\n",
Expand Down Expand Up @@ -399,7 +400,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 23,
"metadata": {
"scrolled": false
},
Expand All @@ -412,7 +413,7 @@
"--> histo: cmin, cmax = -28.622097515022787 21.073623472355873\n",
"--> histo: cmin, cmax = -28.622097515022787 21.077633774988065\n",
"--> histo: cmin, cmax = -28.622097515022787 21.077633774988065\n",
"{'cstr': 'blue2red', 'cnum': 15, 'cref': 0, 'chist': True, 'ctresh': 0.995, 'cnlab': 8, 'cmin': -28.622, 'cmax': 21.078, 'cmap': <matplotlib.colors.ListedColormap object at 0x7fb279fbfca0>, 'clevel': array([-30. , -27.5, -25. , -22.5, -20. , -17.5, -15. , -12.5, -10. ,\n",
"{'cstr': 'blue2red', 'cnum': 15, 'cref': 0, 'chist': True, 'ctresh': 0.995, 'cnlab': 8, 'cmin': -28.622, 'cmax': 21.078, 'cmap': <matplotlib.colors.ListedColormap object at 0x7fb279f0a130>, 'clevel': array([-30. , -27.5, -25. , -22.5, -20. , -17.5, -15. , -12.5, -10. ,\n",
" -7.5, -5. , -2.5, 0. , 2.5, 5. , 7.5, 10. , 12.5,\n",
" 15. , 17.5, 20. , 22.5]), 'clab': array([-30. , -22.5, -15. , -7.5, 0. , 7.5, 15. , 22.5])}\n"
]
Expand Down Expand Up @@ -466,7 +467,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
Expand Down
50 changes: 25 additions & 25 deletions tripyview/sub_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,38 @@
#|_____________________________________________________________________________|
def load_data_fesom2(mesh,
datapath,
vname = None ,
year = None ,
mon = None ,
day = None ,
record = None ,
depth = None ,
depidx = False ,
do_tarithm = 'mean' ,
do_zarithm = 'mean' ,
do_zweight = False ,
do_hweight = True ,
do_nan = True ,
vname = None ,
year = None ,
mon = None ,
day = None ,
record = None ,
depth = None ,
depidx = False ,
do_tarithm = 'mean' ,
do_zarithm = 'mean' ,
do_zweight = False ,
do_hweight = True ,
do_nan = True ,
do_ie2n = True ,
do_vecrot = True ,
do_filename = False ,
do_file = 'run' ,
descript = '' ,
runid = 'fesom' ,
do_prec = 'float32' ,
do_f14cmip6 = False ,
do_compute = False ,
do_load = True ,
do_persist = False ,
do_vecrot = True ,
do_filename = False ,
do_file = 'run' ,
descript = '' ,
runid = 'fesom' ,
do_prec = 'float32' ,
do_f14cmip6 = False ,
do_compute = False ,
do_load = True ,
do_persist = False ,
do_parallel = False ,
chunks = { 'time' :'auto', 'elem':'auto', 'nod2':'auto', \
'edg_n':'auto', 'nz' :'auto', 'nz1' :'auto', \
'ndens':'auto'},
do_showtime = False ,
do_info = True ,
do_showtime = False ,
do_info = True ,
**kwargs):
"""
--> general loading of
--> general loading of fesom2 and fesom14cmip6 data
Parameters:
Expand Down
Loading

0 comments on commit 0b9e383

Please sign in to comment.