Skip to content

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

@milancurcic

Description

@milancurcic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions