
Display vertical levels in depth-resolved climate data
Source:R/htr_show_levels.R
htr_show_levels.Rd
This function examines 3D ocean climate model data and displays the vertical levels (depths or pressure levels) available in each file using CDO (Climate Data Operators). This is useful for understanding the vertical structure of ocean models before performing depth-related operations.
Value
Character vector containing the vertical level information for each file. Each element corresponds to one input file and contains the level values as returned by CDO showlevel.
Details
Ocean climate models use various vertical coordinate systems (depth in meters,
pressure levels, sigma coordinates, etc.). This function uses the CDO showlevel
operator to display the vertical levels present in each file, helping users
understand the vertical resolution and coordinate system.
The function:
Processes all NetCDF files in the input directory
For each file, executes
cdo showlevel filename
to extract level informationPrints the filename and returns the level information
Collects all level information into a character vector
This information is essential for:
Understanding the vertical structure of ocean models
Planning depth integration operations with
htr_integrate_levels()
Selecting appropriate level ranges for analysis
Note
Requires CDO (Climate Data Operators) to be installed and accessible from the system PATH
Input files must be 3D data with vertical coordinate dimensions
Prints filenames to console for progress tracking
Level values and units depend on the model's vertical coordinate system
Does not use parallel processing (processes files sequentially)