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.
Rich- > We often initialize the sea floor with a certain thickness of sediment > and then want to see how the bed changes with time. To see this > clearly it would be nice to create a formula that subtracts the > initial value of the sediment thickness (at time step =1) from every > other time step of sediment thickness, so that the initial change > field would show all zeros, and then we would see the changes with > time. > > Is this possible? Anything's possible. ;-) If you don't want to wait for Jeff, you could try something in Jython like: def diffFromStart(data): newData = data.clone() first = data[0] for t in range(data.length): newData[t] = data[t]-first return newData I tried this on one grid and it worked. ;-) You may have to tweak it some. It assumes that this is a time sequence. > The bundle I'd like to do this with is at: > http://coast-enviro.er.usgs.gov/models/share/bed_thick_coast2_2.xidv Don Ticket Details =================== Ticket ID: ZMQ-488883 Department: Support IDV Priority: Normal Status: Open