This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Vladimir, > Description of problem: Hello. I read in documentation, that if i need to > read current length of unlimited dimension, i should use INQUIRE_DIMENSION. > But documentation says it return maximum for all variables with this DIMID. > Is this any way to inquire dimension length of specified variable? Or i > should invent tricks with length storage in attributes and so on?) If you are using the netCDF-3 classic data model, there can only be one unlimited dimension per netCDF file, and it has the same length for all variables that use it. In the netCDF-4 enhanced data model, you can define multiple unlimited dimensions, but each unlimited dimension still has one unique length, shared by all the variables defined with that dimension. Extending one of those variables along that dimension extends all of them along the axis of that dimension. So if you want different variables to have different unlimited dimensions, you must define multiple unlimited dimensions. That's easy to do with netCDF-4. For example, you could have dimensions: time = unlimited ; // currently 10 station = unlimited ; // currently 20 level = 5; variables: float time(time) ; int id(station) ; float surface_temperature(time, station) ; float relative_humidity(time, station, level) ; If you add a new time, it extends the variables time, surface_temperature, and relative_humidity, but not id. If you add a new station, it extends id, surface_temperature, and relative_humidity, but not time. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: PPV-371725 Department: Support netCDF Priority: Normal Status: Closed