Changeset 6621 for branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS
- Timestamp:
- 2016-05-25T16:21:58+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/nemo_v3_6_STABLE/NEMOGCM/TOOLS/REBUILD_NEMO/icb_combrest.py
r6449 r6621 169 169 sys.exit(15) 170 170 fo = Dataset(pathout, 'w') 171 for dim in ['x','y','c' ]:171 for dim in ['x','y','c','k']: 172 172 indim = fi.dimensions[dim] 173 173 fo.createDimension(dim, len(indim)) 174 for var in [' calving','calving_hflx','stored_ice','stored_heat']:174 for var in ['kount','calving','calving_hflx','stored_ice','stored_heat']: 175 175 invar = fi.variables[var] 176 176 fo.createVariable(var, invar.datatype, invar.dimensions) 177 177 fo.variables[var][:] = invar[:] 178 fo.variables[var].long_name = invar.long_name 179 fo.variables[var].units = invar.units 178 if "long_name" in invar.ncattrs(): 179 fo.variables[var].long_name = invar.long_name 180 if "units" in invar.ncattrs(): 181 fo.variables[var].units = invar.units 180 182 os.remove(pathout.replace('.nc','_WORK.nc')) 181 183 #
Note: See TracChangeset
for help on using the changeset viewer.