Changeset 1472 in lmdz_wrf
- Timestamp:
- Mar 28, 2017, 11:19:04 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1467 r1472 7229 7229 fname='compute_opervartimes' 7230 7230 7231 ofile = 'opervartimes_' + varname + '.nc'7232 7233 7231 if values == 'h': 7234 7232 print fname + '_____________________________________________________________' 7235 print opervartimes.__doc__7233 print compute_opervartimes.__doc__ 7236 7234 quit() 7235 7236 ofile = 'opervartimes_' + varname + '.nc' 7237 7237 7238 7238 if not os.path.isfile(ncfile): … … 10604 10604 """ 10605 10605 import subprocess as sub 10606 fname='netcdf_fold_concatenat e_HMT'10606 fname='netcdf_fold_concatenation_HMT' 10607 10607 10608 10608 ofile = 'netcdf_fold_concatenated_HMT.nc' … … 10623 10623 if Nfiles == 0: 10624 10624 print errormsg 10625 print ' ' + fname + ": there are no files as '" + fold + '/' + ncfile + "*' !!" 10625 print ' ' +fname+ ": there are no files as '" + fold + '/' + '*'.join(HMT) +\ 10626 "*' !!" 10626 10627 quit(-1) 10627 10628 print confiles … … 10631 10632 for filen in confiles: 10632 10633 print 'charging: ',filen 10633 ncobjs.append(NetCDFFile(fold + '/' + filen, 'r')) 10634 if filen.find(fold) != -1: 10635 ncobjs.append(NetCDFFile(filen, 'r')) 10636 else: 10637 ncobjs.append(NetCDFFile(fold + '/' + filen, 'r')) 10634 10638 10635 10639 # Looking for the new length of the concatenation dimension … … 10656 10660 else: 10657 10661 newnc.createDimension(condim, totcondim) 10662 newnc.createDimension('file', Nfiles) 10663 newnc.createDimension('Lstring', 256) 10664 10665 # dim-variables 10666 newvar = newnc.createVariable('file','c',('file','Lstring')) 10667 newvals = writing_str_nc(newvar, confiles, 256) 10668 if confiles[0].find(fold) != -1: 10669 str="concatenated files following dimension '" + condim + "'" 10670 else: 10671 str="concatenated files from folder '" + fold + "' following dimension '" + \ 10672 condim + "'" 10673 vardef = basicvardef(newvar, 'files', str, '-') 10674 10658 10675 # Fake variable for the dimension 10659 10676 print 'condim:',condim … … 10735 10752 10736 10753 newnc.sync() 10754 add_global_PyNCplot(newnc, main, fname, '1.1') 10755 10737 10756 newnc.close() 10738 10757
Note: See TracChangeset
for help on using the changeset viewer.