connectivity-modeling-system icon indicating copy to clipboard operation
connectivity-modeling-system copied to clipboard

Reading the number of snapshots in file depends on dimension order which is hardcoded

Open milancurcic opened this issue 6 months ago • 0 comments

Number of snapshots in file is determined by inquiring NetCDF dimension size by hardcoded number axorderT:

https://github.com/beatrixparis/connectivity-modeling-system/blob/fb491389261e895379f9f1bc943e46d66ab59684/cms-master/src/getphysicaldata.f90#L156-L158

Dimension orders are hardcoded here:

https://github.com/beatrixparis/connectivity-modeling-system/blob/fb491389261e895379f9f1bc943e46d66ab59684/cms-master/src/getnestinfo.f90#L81-L86

and not updated anywhere past that place in the code.

This breaks reading data, for example from HYCOM GOMb0.01 where the dimensions are ordered as time, lon, lat, depth (rather than lon, lat, depth, time).

Removing dimension inquiry by number and using inquiry by name altogether would make CMS more flexible.

milancurcic avatar Aug 23 '24 16:08 milancurcic