source: nappy/trunk/nappy/Plans for re-factoring 2008.txt @ 3351

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/nappy/trunk/nappy/Plans for re-factoring 2008.txt@3351
Revision 3351, 4.0 KB checked in by astephen, 12 years ago (diff)
Line 
1= Changes needed to make Nappy fit for purpose =
2
3 * Need error checking throughout - making it more robust but also checking on read will make Nappy a useful NASA Ames checker replacement.
4
5 * cdms interface should be in a separate part of the stack, not in core classes AND SUB-CLASSES
6
7 * Need to make an egg of it, but in the meantime we also need it installed as:
8
9-------------------
10We need to decide what is required in terms of:
11
12    * actual formats
13    * mappings to/from NetCDF
14    * mapping to/from other formats (if required).
15
16    AS and CK have been analysing the required changes to make Nappy suitable for automated conversion of NetCDF-CF in DCIP to NASA Ames / CSV variant.
17
18        Here is an initial list of issues
19
20    * Put in the option to order variables explicitly, rather than relying on nasa_ames_var_number attributes.
21
22    * Support for 2110 – NX for the quickest changing IV needs to be converted to an auxiliary variable which does not fit nicely into the structure. In principle the second independent variable length changes at each first independent variable value but we may need it fixed.
23
24    * Refactoring to make it clearer and functions shorter but not too short.
25    * Add an option for the learning column.
26    * Proper use of FFI selection.
27    * In cdms2na.py, stopping filling an axis once the start and increment are known may not be enough. May need to populate all of the axis.
28    * Column headings for Excel users, this will clash with the current #End of normal comments# lines.
29    * Is it still right that the 4010 class is the same as 2010?
30    * Does comma separation option work correctly – any consequences for RDATE and DATE which retains some space separation?
31    * float rounding in nappy to get difference between independent variable values - and degree of accuracy (8.3f etc)
32    * cdms2na() needs argument "variable_order" that is a list of the order you want them to appear in 2110.
33    * Need sensible handling of rotated grid data where found (might be wrapper outside of nappy
34    * FFI 2110 is best for 2D columns for Excel etc. - Nappy must support this
35
36----------------------
37
38
39=== Adding annotation column ===
40
41via argument: annotated=True|False
42
43Only on output. So only affects write methods.
44NOTE: could do read as well by reading in file and then removing column 1 (as long as we know the delimiter is a comma). But don't do this now.
45
46Ask Charles to come up with a list of definitions for each column in a config file.
47
48Need to defined names in config file and a ways of mapping to each of the lines by tagging to self.A, self.X self.XNAMES etc
49
50=== Adding CSV ===
51
52Via delimiter/spacer argument. Would be nice to have a writeCSV() method.
53
54Should 'csv' and 'delim' args be sent to write methods rather than __init__()?
55---
56
57===
58
59Do we need global DEBUG = True|False
60
61Then all the prints could be:
62
63if DEBUG == True: print "blah"
64
65===============
66localRules.py --> REMOVE COMPLETELY
67localRules/blah - remove this and put stuff in a top-level config file, or even remove altogether.
68
69localRules/aircraft.py - Need to consider how this can be a sub-class of Cdms2NA so that we push all the odd code into separate modules. Need to encapstulate the differences into one or two methods that are small and can be overridden.
70 * decided to dump all aircraft stuff in  an unsupported dir without refactoring in - it will probably never be used!
71
72=================
73
74import nappy  (via nappy_api.py module)
75nappy.convertNAToNC(na_file, nc_file)
76nappy.convertNCToNA(nc_file, na_file)
77
78================
79
80Have I broken textParser.py's main function - is it same in old and new - need a test for it!
81
82=====
83
84_readData[12] are crying out for useful names
85
86Should we leave in the interactive time units checker in na_to_cdms.py - ask Charles
87
88Unit tests
89==========
90
911001 appears to be done. Others are there as stubs but all need writing.
92
93We then need a set of nc_interface tests as well! Need NetCDF files to convert the other way as well. Need to be small.
Note: See TracBrowser for help on using the repository browser.