Skip to content

Commit 0c9995f

Browse files
committed
Updated ecco_po_tutorials.py
1 parent 1725f17 commit 0c9995f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Intro_to_PO_Tutorials/ecco_po_tutorials.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def mean_weighted_binned(value_field,weighting,bin_field,bin_bounds):
117117
#----------------------------------------------------------------------------------------
118118

119119

120-
def geos_vel_compute(dens_press_filename,grid_filename="~/Downloads/ECCO_V4r4_PODAAC/ECCO_L4_GEOMETRY_LLC0090GRID_V4R4/GRID_GEOMETRY_ECCO_V4r4_native_llc0090.nc",fc_filename="llc_13tile_fc.txt"):
120+
def geos_vel_compute(dens_press_filename,grid_filename="~/Downloads/ECCO_V4r4_PODAAC/ECCO_L4_GEOMETRY_LLC0090GRID_V4R4/GRID_GEOMETRY_ECCO_V4r4_native_llc0090.nc",subset=None):
121121
"""
122122
This routine computes geostrophic velocities from an input netCDF file containing ECCO v4r4 density and pressure anomalies on the native llc90 grid.
123123
@@ -126,8 +126,8 @@ def geos_vel_compute(dens_press_filename,grid_filename="~/Downloads/ECCO_V4r4_PO
126126
dens_press_filename: the name (including path if not in current directory) of the netCDF file containing the density and pressure anomalies
127127
128128
grid_filename: the name (including path if not in current directory) of the netCDF file containing the latitudes ('YC') and grid parameters ('dxC','dyC') needed to compute horizontal derivatives
129-
130-
fc_filename: text file containing a Python dictionary specifying the tile/face connections in the ECCO llc90 grid
129+
130+
subset: dictionary containing dimension names and index values, e.g., {'k': [0,1,2]}. The index values can be integers, slice objects, or arrays. This object is passed directly to xarray.Dataset.isel as an indexer. If not specified, the entire global domain will be used.
131131
"""
132132

133133
import numpy as np
@@ -141,8 +141,7 @@ def geos_vel_compute(dens_press_filename,grid_filename="~/Downloads/ECCO_V4r4_PO
141141
import ecco_v4_py as ecco
142142

143143
# load file into workspace
144-
ds_denspress = xr.open_dataset(dens_press_filename, data_vars='minimal',\
145-
coords='minimal', compat='override')
144+
ds_denspress = xr.open_dataset(dens_press_filename)
146145

147146
densanom = ds_denspress.RHOAnoma
148147

0 commit comments

Comments
 (0)