Changeset 2015 in lmdz_wrf
- Timestamp:
- Aug 2, 2018, 5:56:36 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r2014 r2015 10195 10195 * 'f', full 10196 10196 SWNEbox: ',' list of the vertexs of the map [SWlon, NElon, SWlat, NElat] 10197 'lonlatxtrms': to use the extremes of the lon,lat stations 10197 10198 imgtit: title of the image ('!' for spaces) 10198 10199 imgkind: kind of file output of the image (ps, pns, pdf, ...) … … 10211 10212 stypevals = values.split(':')[0].split('@') 10212 10213 mapvals = values.split(':')[1] 10213 SWNEbox = gen.str_list_k(values.split(':')[2], ',', 'F')10214 SWNEboxS = values.split(':')[2] 10214 10215 imgtit = values.split(':')[3].replace('!', ' ') 10215 10216 imgkind = values.split(':')[4] … … 10236 10237 ofile = open(filename, 'r') 10237 10238 dicstations = {} 10239 nlonst = 100000. 10240 xlonst = -100000. 10241 nlatst = 100000. 10242 xlatst = -100000. 10243 10238 10244 for line in ofile: 10239 10245 if line[0:1] != '#' and len(line) > 1: … … 10244 10250 llat = np.float(linev[3]) 10245 10251 lhgt = np.float(linev[4]) 10252 if nlonst > llon: nlonst=llon 10253 if xlonst < llon: xlonst=llon 10254 if nlatst > llat: nlatst=llat 10255 if xlatst < llat: xlatst=llat 10246 10256 10247 10257 if not gen.searchInlist(sttyps, ltyp): … … 10257 10267 ofile.close() 10258 10268 10269 if SWNEboxS == 'lonlatxtrms': 10270 SWNEbox = [nlonst, xlonst, nlatst, xlatst] 10271 else: 10272 SWNEbox = gen.str_list_k(SWNEboxS, ',', 'F') 10273 10259 10274 Nd = 100 10260 10275 nlon = SWNEbox[0] … … 10265 10280 ddlon = (xlon - nlon)/Nd 10266 10281 ddlat = (xlat - nlat)/Nd 10282 10283 if SWNEboxS == 'lonlatxtrms': 10284 SWNEbox = [nlonst-ddlon, xlonst+ddlon, nlatst-ddlat, xlatst+ddlat] 10285 nlon = SWNEbox[0] 10286 xlon = SWNEbox[1] 10287 nlat = SWNEbox[2] 10288 xlat = SWNEbox[3] 10267 10289 10268 10290 lon1D = np.arange(nlon, xlon+ddlon, ddlon)
Note: See TracChangeset
for help on using the changeset viewer.