Changeset 3602 for nappy


Ignore:
Timestamp:
13/03/08 16:54:35 (11 years ago)
Author:
astephen
Message:

Thoughts in place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nappy/trunk/nappy/nappy_api.py

    r3488 r3602  
    77 
    88What do we want in the API? 
    9  - some thoughts.... 
    109 
    11  
    12 openNAFile - read and/or write 
    13 convertNCToNA 
    14 convertNAToNC 
     10openNAFile  - done - read and/or write 
     11convertNCToNA(na_file, nc_file, **kwargs) 
     12 - do same for this from command line/nc-INterface version 
     13convertNAToNC(nc_file, na_file, **kwargs) 
     14na2nc.py [-m <mode>] [-v <var_list>] [-a <aux_var_list>] [-g <global_atts_list>] 
     15            [-r <rename_vars_list>] [-t <time_units>] [-n] -i <na_file> [-o <nc_file>] 
     16    <mode>                      is the file mode, either "w" for write or "a" for append 
     17    <var_list>                  is a comma-separated list of variable names to include 
     18    <aux_var_list>              is a comma-separated list of auxiliary variables names to include 
     19    <global_atts_list>  is a comma-separated list of global attributes to add 
     20    <rename_vars_list>  is a comma-separated list of <old_name>,<new_name> pairs to rename variables 
     21    <time_units>                is a valid time units string such as "hours since 2003-04-30 10:00:00 
     22" 
     23    -n                                  suppresses the time units warning if invalid 
     24    <na_file>                   is the input NASA Ames file path 
     25    <nc_file>                   is the output NetCDF file path 
     26na_file, variables=None, aux_variables=None, 
     27                 global_attributes={"Conventions":"CF-1.0"}, 
     28                 time_units=None, time_warning=True, 
     29                 rename_variables={}): 
    1530convertNCToCSV 
    1631convertNAToCSV 
    1732 
    18 compareNAFiles 
     33compareNAFiles - do it 
     34  Check comparing 2001.na and 2001.csv and see why it falls over. 
     35 
    1936convertCDMSObjectsToNA 
    2037convertCDMSObjectsToCSV 
    2138convertNADictToNC 
     39readCDMSObjectsFromNA - returns cds 
     40ims var list and g,o 
     41lobal atts 
    2242 
    2343some things from utils... 
    2444 
    2545getMappings 
    26 getVersion 
     46getVersion use __version__ 
    2747getFFI 
    2848chooseFFI 
     49 have a look at what is needed 
    2950 
     51import nappy  (via nappy_api.py module) 
     52nappy.convertNAToNC(na_file, nc_file) 
     53nappy.convertNCToNA(nc_file, na_file) 
    3054 
    3155 
     
    3862from nappy.utils.common_utils import * 
    3963 
    40 def openNAFile(filename, mode="r", na_dict=None, delimiter="    ", float_format="%8.3f"): 
     64def openNAFile(filename, mode="r", na_dict=None, delimiter="    ", float_format="%g"): 
    4165    """ 
    4266    Function wrapper around the NASA Ames File classes. Any NASA Ames 
Note: See TracChangeset for help on using the changeset viewer.