Ask Your Question

from sigma to depth coordinates

asked 2021-12-14 14:58:51 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >5 is welcome to improve it.

Hi, I am trying to get depth coordinates from sigma coordinates and obtain my variables in 3 d (lat, lon and depth instead of sigma level). It is probably something really simple since the croco_gui does it in the visualization programme, however I am not being able to do it. I've seen there is a script (et_depths.m in VIsualization tools but I could not made it run without errors)

Has someone done this and could give me a hand? Many thanks Camla

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2021-12-20 09:45:14 +0200

MartinV gravatar image

updated 2021-12-20 09:46:10 +0200


The get_var function from croco_tools can give you 2D data at required depth (vlevel has to be negative - in meters). So in your case, you can call get_var for each depth you are interested in and you'll get 3D data.


function [lat,lon,mask,var]=get_var(hisfile,gridfile,vname,tindex,... vlevel,coef,rempts)

Best, Martin

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-12-14 14:58:51 +0200

Seen: 74 times

Last updated: Dec 20 '21