Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
milancurcic opened this issue Aug 23, 2024 · 0 comments

Comments

@milancurcic
Copy link
Collaborator

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

CALL nc_open(trim(fname(UAx,fileNumber)),ncId)
CALL nc_info_dim2(fname(UAx,fileNumber),ncId,axorderT,totsnapshotsinfile)
CALL nc_close(fname(UAx,fileNumber), ncId)

Dimension orders are hardcoded here:

! set some default values for namelist
orthogrid = .true.
axorderX = 1
axorderY = 2
axorderZ = 3
axorderT = 4

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant