Changeset 1517 in lmdz_wrf for trunk/tools/nc_var_tools.py
- Timestamp:
- Apr 12, 2017, 12:52:49 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1511 r1517 6950 6950 """ Function to compute opersvarfiles: operation of variables from different files 6951 6951 (OPER1.FILE1_VAR1 OPER2.FILE2_VAR2), operations are going to be sequentially made 6952 compute_opersvarsfiles(values, varinfo) 6952 compute_opersvarsfiles(values, varinfo). 6953 NOTE: Values from the first file (with always operation 'add') 6954 [prevalues]: values from the previous operations 6953 6955 values= '%' separated list of dimension ranges and file,operation,variable to compute 6954 6956 [dimranges1]@[operfile1var]%[dimranges2]@[operfile2var]%[...[dimrangesM]@[operfileMvar]] … … 6975 6977 'pot': powering with [var] ([prevalues] ** [var]) 6976 6978 'potc',[modval1]: [prevalues] ** [modval1] 6979 'repl',[modval1]: replace values of [prevalues] with values from [operfile2var] except 6980 values in second file = [modval1] 6981 'replbig',[modval1]: replace values of [prevalues] with values from [operfile2var] except 6982 values in second file > [modval1] 6983 'repless',[modval1]: replace values of [prevalues] with values from [operfile2var] except 6984 values in second file < [modval1] 6977 6985 'sub': substracting [var] ([prevalues] - [var]) 6978 6986 'subc',[modval1]: remove [modval1] of [prevalues] … … 7171 7179 prevalues, operS = gen.matoperations(opern, varvals, inimat) 7172 7180 else: 7181 print ' ' + fname + ': Lluis opern:', opern 7173 7182 prevalues, operS = gen.matoperations(opern, prevalues, varvals) 7174 7183 operS = ' ' + operS + '[' + varn + ']' … … 7217 7226 7218 7227 # Global attributes 7219 objofile.setncattr('script', fname) 7220 objofile.setncattr('version', '1.0') 7221 objofile.setncattr('author', 'L. Fita') 7222 newattr = set_attributek(objofile, 'institution', unicode('Laboratoire de M' + \ 7223 unichr(233) + 't' + unichr(233) + 'orologie Dynamique'), 'U') 7224 objofile.setncattr('university', 'Pierre et Marie Curie') 7225 objofile.setncattr('country', 'France') 7228 add_global_PyNCplot(objofile, main, fname, '1.1') 7226 7229 newattr = set_attributek(objofile, 'used_operation', operationS, 'S') 7227 7230 newattr = set_attributek(objofile, 'used_files', ', '.join(filens) ,'S')
Note: See TracChangeset
for help on using the changeset viewer.