Hi @jcollin,
First of all, thank you very much for your reply and for looking into this issue.
Here are the details of my setup:
-
CROCO_PYTOOLS version: Release 2.0.0
-
Grid configuration: BENGUELA_LR
-
LLm0 = 543
-
MMm0 = 363
-
N = 40 vertical levels
-
Simulation period: 2014-01-01 00:00:00 to 2014-06-30 00:00:00
-
Variables processed: temperature, salinity, and velocity components (u, v)
-
Operation: vertical interpolation to fixed z-levels using gop.interp_regular()
I have attached the draft of the Python code used for interpolating temperature and salinity to regular z-levels, along with the relevant sections of my croco.in file.
While processing multiple hourly output files, I noticed that variables and coordinates such as Cs_rho (and some other vertical coordinate information) are present only in the first output file. When I try to process the files individually, the absence of these coordinates in subsequent files results in errors during interpolation.
Could you please clarify whether this is the default behavior of CROCO output files, where these grid-related variables are written only once, or whether I may have missed a setting in my configuration?
I also have an additional question regarding the velocity fields.
I came across the XOA example for CROCO sections:
https://xoa.readthedocs.io/stable/examples/plot_croco_section.html
From the example, it appears that XOA can handle CROCO vertical coordinates and interpolation to regular z-levels. Would it be possible (or recommended) to use a similar XGCM/XOA-based workflow for interpolating the staggered u and v velocity components onto regular depth levels?
My understanding is that u and v are located on different C-grid positions than tracers (temp, salt), so I am unsure whether they should first be interpolated to rho points (or rotated to eastward/northward velocities) before performing the vertical interpolation. Alternatively, can XGCM/XOA directly handle the staggered velocity fields and interpolate them to regular z-levels correctly?
Any guidance on the recommended workflow for extracting u and v on fixed-depth levels would be greatly appreciated.
Any guidance on the recommended way to handle this when processing files independently with XCROCO would be greatly appreciated.
Thank you again for your help and for the continued development of XCROCO.
crocoin.txt (1.1 KB)
ts.py (3.1 KB)