modelutil: Future Work
A list of additional work to do on this package at some point:
wrapmethods. When writing
Fieldobjects, account for cases where the data is a scalar or 1-element array and make sure that both masked/unmasked as well as Numpy and numarray arrays are all handled.
__getitem__methods on slices.
add_tend1). Currently only a simple test of
step1is done (though the
seaicepackage itself provides a decent test of
Fieldobjects which replaces key metadata (
units) with one line.
Fieldmethod that translates from
Fieldand back again.
add_allmethod that adds all the
Fields from one
__setitem__(or whatever the method is that you use for setting dictionary entries) that you check that the dictionary key is the same as
Fieldto another, forget to change the
id, and add the new
Statecontainer holding the original
Field, overwriting the previous value. I've documented this in the manual in two places (including the FAQ); is there any way around this problem? Maybe create a "locked" metadata attribute which allows the variable to only be deleted from a
Stateobject but not overwritten?
Statevariable contains the axes for the
Fieldvariables also found in the
State. Also check the number of elements along each axis of a
Fieldobject is correct, corresponding to the axis
Fields in the
Statevariable. This, I think, should be a separate method from
GenericModelassumes that a model grid doesn't change shape during runtime, and that tendencies follow that same model grid. However, with python you can easily have the grid change while the program is running, so it would be nice (in theory) to have this capability. I have yet to do the hard thinking of the protocol for that. Should there be a separate method different from
tend1where wholesale deletion/insertion of model variables can occur, one which is not summed up (but rather just included into the
Stateobject) in the
Stateor delete it? If I do keep it, should I add
includekeywords, as in the