- Timestamp:
- Nov 9, 2016, 8:43:22 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/model_graphics.py
r1296 r1297 943 943 # Joining variable files 944 944 if not os.path.isfile(fileon): 945 if db: 946 print ' ' + fname + ": concatenating all variable files to create '" + \ 947 fileon + "..." 948 try: 949 with gen.Capturing() as output: 950 ncvar.netcdf_fold_concatenation_HMT('./,time', CFvarn+'_'+headerf+ \ 951 SgP+'_,-,.nc', 'all') 952 except: 953 print errmsg 954 print 'netcdf_fold_concatenation_HMT(./,time, '+CFvarn+'_'+headerf+SgP+ \ 955 '_,-,.nc, all)' 956 for s1out in output: print s1out 957 quit(-1) 958 if db: 959 for s1out in output: print s1out 960 961 sout = sub.call('mv netcdf_fold_concatenated_HMT.nc ' + fileon, shell=True) 962 if os.path.isfile(fileon): 963 sout = sub.call('rm '+CFvarn +'_'+ headerf+SgP + '_*-*.nc >& /dev/null',\ 964 shell=True) 945 if Ntotfiles > 1: 946 if db: 947 print ' ' + fname + ": concatenating all variable files to " + \ 948 "create '" + fileon + "..." 949 try: 950 with gen.Capturing() as output: 951 ncvar.netcdf_fold_concatenation_HMT('./,time', CFvarn + '_' + \ 952 headerf + SgP +'_,-,.nc', 'all') 953 except: 954 print errmsg 955 print 'netcdf_fold_concatenation_HMT(./,time, ' + CFvarn + '_' + \ 956 headerf +SgP + '_,-,.nc, all)' 957 for s1out in output: print s1out 958 quit(-1) 959 if db: 960 for s1out in output: print s1out 961 962 sout = sub.call('mv netcdf_fold_concatenated_HMT.nc '+fileon, shell=True) 963 if os.path.isfile(fileon): 964 sout = sub.call('rm '+CFvarn + '_' + headerf + SgP + '_*-*.nc >& ' + \ 965 '/dev/null', shell=True) 966 else: 967 sout = sub.call('mv ' + CFvarn + '_' + headerf + SgP + '_1-1.nc ' + \ 968 fileon, shell=True) 965 969 966 970 # Re-setting time of final concatenated file
Note: See TracChangeset
for help on using the changeset viewer.