Changeset 466
- Timestamp:
- Dec 9, 2011, 5:10:15 PM (13 years ago)
- Location:
- trunk/UTIL/PYTHON
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/README.MCS
r465 r466 27 27 ------- 28 28 ------- 29 Ok, but after all, I want to interpolate these fields on the vertical grid used by MCS... (make sure to have rho in30 your file for a better interpolation. You also need aps, bps, and ps)29 Ok, but after all, I want to interpolate these fields on the vertical grid used in the MCS data... (make sure to have rho in 30 your file for a better interpolation. You also need aps, bps, ps and phisinit, at least in diagfi.nc or phisinit.nc.) 31 31 32 32 command -> mcs.py -f $YourSimulation/diagfi.nc -m /d5/lmlmd/MCS_processeddata/MCSdata_binned_MY29.nc --var temp,co2ice -i … … 34 34 ------- 35 35 ------- 36 Ok, but I dont care for the intermediary diagfi_P.nc file, it takes to much space. I want to remove it automatically36 Ok, but I dont care for the intermediary diagfi_P.nc file, it takes too much space. I want to remove it automatically 37 37 after the computation 38 38 … … 44 44 45 45 command -> mcs.py -f $YourSimulation/diagfi.nc -m /d5/lmlmd/MCS_processeddata/MCSdata_binned_MY29.nc --var temp,co2ice -i --ditch -H 46 output -> diagfi_ P_h_MCS.nc46 output -> diagfi_h_P_MCS.nc 47 47 ------- 48 48 ------- … … 51 51 52 52 command -> mcs.py -f $YourSimulation/diagfi.nc -m /d5/lmlmd/MCS_processeddata/MCSdata_binned_MY29.nc --var temp,co2ice -i -H 53 output -> diagfi_ P_h_MCS.nc53 output -> diagfi_h_P_MCS.nc 54 54 ------- 55 55 ------- … … 57 57 58 58 command -> mcs.py -f $YourSimulation/diagfi.nc -m /d5/lmlmd/MCS_processeddata/MCSdata_binned_MY29.nc --var temp,co2ice -i -H --override 59 output -> diagfi_P _h_MCS.nc59 output -> diagfi_P.nc , diagfi_h_P.nc , diagfi_h_P_MCS.nc 60 60 ------- -
trunk/UTIL/PYTHON/gcm_transformations.py
r465 r466 3 3 ### A. Colaitis -- LMD -- 08/11/2011 <-- Added ZRECAST for altitude mode, and MCS and TES modes for Pressure 4 4 ### A. Colaitis -- LMD -- 08/11/2011 <-- Added HRECAST for MCS and TES predefined grids 5 ### 6 7 ### TODO 8 ### add wrapper to streamfunction.e 9 ### add wrapper to localtime.e 5 ### Added wrapper to streamfunction.e 6 ### Added wrapper to localtime.e 10 7 11 8 def call_zrecast ( interp_mode = '4', \ … … 119 116 return output_name 120 117 118 def call_localtime ( input_name = None, \ 119 fields = 'all', \ 120 times = None): 121 122 import numpy as np 123 from myplot import separatenames 124 from os import system 125 system("rm -f localtime.auto.def") 126 system("touch localtime.auto.def") 127 indicefile=0 128 outputfilename="" 129 append="_LT" 130 f = open('localtime.auto.def', 'w') 131 for zfile in input_name: 132 f.write(zfile+"\n") 133 for zvar in fields: 134 f.write(zvar+"\n") 135 f.write("\n") 136 f.write(str(len(times))+"\n") 137 for t in times: 138 f.write(str(t)+"\n") 139 f.close() 140 system("localtime.e < localtime.auto.def") 141 142 if indicefile is 0: 143 outputfilename=input_name[indicefile][0:len(input_name[0])-3]+append+".nc" 144 else: 145 outputfilename=outputfilename+","+input_name[indicefile][0:len(input_name[0])-3]+append+".nc" 146 indicefile = indicefile +1 147 148 for i in range(len(outputfilename)): 149 output_name = separatenames(outputfilename) 150 151 return output_name 152 153 def call_streamfunction ( input_name = None): 154 import numpy as np 155 from myplot import separatenames 156 from os import system 157 system("rm -f streamfunction.auto.def") 158 system("touch streamfunction.auto.def") 159 indicefile=0 160 outputfilename="" 161 append="_stream" 162 f = open('streamfunction.auto.def', 'w') 163 for zfile in input_name: 164 f.write(zfile+"\n") 165 f.close() 166 system("streamfunction.e < streamfunction.auto.def") 167 168 if indicefile is 0: 169 outputfilename=input_name[indicefile][0:len(input_name[0])-3]+append+".nc" 170 else: 171 outputfilename=outputfilename+","+input_name[indicefile][0:len(input_name[0])-3]+append+".nc" 172 indicefile = indicefile +1 173 174 for i in range(len(outputfilename)): 175 output_name = separatenames(outputfilename) 176 177 return output_name 178
Note: See TracChangeset
for help on using the changeset viewer.