Changeset 1445 in lmdz_wrf
- Timestamp:
- Feb 12, 2017, 7:31:16 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1440 r1445 20 20 # add_dims: Function to add dimensions from a given netCDF object to another one 21 21 # add_globattrs: Function to add global attributes from a given netCDF object to another one 22 # add_global_PyNCplot: Function to add global attributes from 'PyNCplot' to a given netCDF 22 23 # add_varattrs: Function to add variables attributes from a given netCDF object to other variables in another one 23 24 # add_vars: Function to add variables from a given netCDF object to another one … … 1040 1041 1041 1042 return attr 1043 1044 def add_global_PyNCplot(ObjFile, pyscript, funcname, version): 1045 """ Function to add global attributes from 'PyNCplot' to a given netCDF 1046 ObjFile= netCDF file object to which add the global attributes 1047 funcname= name of the function from which file comes from 1048 version= version of the function 1049 """ 1050 fname = 'add_global_PyNCplot' 1051 1052 # Global values 1053 ObjFile.setncattr('author', 'L. Fita') 1054 newattr = ncvar.set_attributek(ObjFile, 'institution', unicode('Laboratoire ' +\ 1055 'de M' + unichr(233) + 't' + unichr(233) + 'orologie Dynamique'), 'U') 1056 ObjFile.setncattr('university', 'Pierre et Marie Curie - Jussieu, Paris 06') 1057 ObjFile.setncattr('center', 'Centre National de Recherches Scientifiques') 1058 ObjFile.setncattr('city', 'Paris') 1059 ObjFile.setncattr('country', 'France') 1060 ObjFile.setncattr('tool', 'PyNCplot') 1061 ObjFile.setncattr('url', 'http://www.xn--llusfb-5va.cat/python/PyNCplot/') 1062 ObjFile.setncattr('script', pyscript) 1063 ObjFile.setncattr('function', funcname) 1064 ObjFile.setncattr('version', version) 1065 1066 ObjFile.sync() 1067 1068 return 1042 1069 1043 1070 def basicvardef(varobj, vstname, vlname, vunits):
Note: See TracChangeset
for help on using the changeset viewer.