source: nappy/trunk/nappy/nc_interface/convert_1010_nc_to_1020_nc.py @ 3469

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/nappy/trunk/nappy/nc_interface/convert_1010_nc_to_1020_nc.py@3469
Revision 3469, 358 bytes checked in by astephen, 12 years ago (diff)

Some temporary scripts to test functionality before formalising into unit tests.

Line 
1import cdms
2f=cdms.open("../../test_outputs/1010.nc")
3p_new = f('pressure', altitude=(10,85))
4o_new = f('ozone_concentration', altitude=slice(0,16,4))
5out_file = cdms.open("../../test_outputs/1010_edited_for_1020.nc", "w")
6out_file.write(p_new)
7out_file.write(o_new)
8for att, value in f.attributes.items():
9    setattr(out_file, att, value)
10out_file.close()
Note: See TracBrowser for help on using the repository browser.