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

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/nappy/trunk/nappy/Plans for re-factoring 2008.txt@3349
Revision 3349, 4.2 KB checked in by astephen, 12 years ago (diff)

Tidied some variable names and boolean types.

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 * GET REST FROM WIKI!
10
11-------------------
12!NAPpy stands for NASA Ames Processing in Python. It is a BADC tool that we use for
13
14converting NASA Ames format to NetCDF (and vice versa). Since we intend to base the
15
16UKCIP08 output formats on NASA Ames and we are working in python it is sensible for us
17
18to extend !NAPpy to do the conversion process.
19
20The definition task will involve liaison with the BADC team members working on the data
21
22formats tasks. We need to decide what is required in terms of:
23
24    * actual formats
25    * mappings to/from NetCDF
26    * mapping to/from other formats (if required).
27
28    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.
29
30        Here is an initial list of issues
31
32    *Put in the option to order variables explicitly, rather than relying on nasa_ames_var_number attributes.
33
34    *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.
35
36    * Refactoring to make it clearer and functions shorter but not too short.
37    * Add an option for the learning column.
38    * Proper use of FFI selection.
39    * 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.
40    * Column headings for Excel users, this will clash with the current #End of normal comments# lines.
41    * Is it still right that the 4010 class is the same as 2010?
42    * Does comma separation option work correctly – any consequences for RDATE and DATE which retains some space separation?
43    * float rounding in nappy to get difference between independent variable values - and degree of accuracy (8.3f etc)
44    * cdms2na() needs argument "variable_order" that is a list of the order you want them to appear in 2110.
45    * Need sensible handling of rotated grid data where found (might be wrapper outside of nappy
46    * FFI 2110 is best for 2D columns for Excel etc. - Nappy must support this
47
48
49===============
50localRules.py --> REMOVE COMPLETELY
51localRules/blah - remove this and put stuff in a top-level config file, or even remove altogether.
52
53localRules/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.
54
55 * dump all aircraft stuff in  an unsupported dir without refactoring in.
56
57=================
58
59naToCdms.py
60===========
61
62This is a sub-class of all NAFile objects. Bad idea. What we need is to:
63
64import convertor
65convertor.writeToNC(blah)
66convertor.convertToCdms(blah): (vars, global_atts)
67
68================
69
70Have I broken textParser.py's main function - is it same in old and new.
71
72=====
73
74_readData[12] are crying out for useful names
75
76GREP
77====
78
79Need to do a lot of grepping for inconsistencies.
80
81The following need to be set to True or False (not yes,no):
82 * _normalizedX
83 * time_warning
84
85Global find and replace:
86
87 * float_format
88 * na_dict
89=====================
90
91In naToCdms.py.NAToCdms.toCdmsAxis() there is a line naming the id (if too long) as:
92
93naAuxVariable....
94
95 - need to find where else this string is used and replace all with "naIndVariable" with map-back!
96
97===================
98
99Should we leave in the interactive time units checker in na_to_cdms.py - ask Charles
100
101
102Unit tests
103==========
104
1051001 appears to be done. Others are there as stubs but all need writing.
106
107We 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.