Changeset 2802 in lmdz_wrf for trunk/tools
- Timestamp:
- Feb 11, 2020, 7:26:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/create_OBSnetcdf.py
r2801 r2802 459 459 " work with '" + op.split(',')[2] + "' !!" 460 460 quit(-1) 461 elif opern == 'repl': 462 replvals = stringS_dictvar(operv, Dc=';', DVs=':') 463 replaced = False 464 for repls in replvals.keys(): 465 if val == repls: 466 newval = np.float32(replvals[val]) 467 replaced = True 468 break 469 if not replaced: newval = np.float32(val) 461 470 462 471 elif fmt == 'F': … … 478 487 " work with '" + op.split(',')[2] + "' !!" 479 488 quit(-1) 489 elif opern == 'repl': 490 replvals = stringS_dictvar(operv, Dc=';', DVs=':') 491 replaced = False 492 for repls in replvals.keys(): 493 if val == repls: 494 newval = np.float(replvals[val]) 495 replaced = True 496 break 497 if not replaced: newval = np.float(val) 480 498 481 499 elif fmt == 'I': … … 524 542 " work with '" + op.split(',')[2] + "' !!" 525 543 quit(-1) 544 elif opern == 'repl': 545 replvals = stringS_dictvar(operv, Dc=';', DVs=':') 546 replaced = False 547 for repls in replvals.keys(): 548 if val == repls: 549 newval = np.int64(replvals[val]) 550 replaced = True 551 break 552 if not replaced: newval = np.int64(val) 553 526 554 elif fmt == 'S': 527 555 if opern == 'rmchar': … … 537 565 " work with '" + op.split(',')[2] + "' !!" 538 566 quit(-1) 567 elif opern == 'repl': 568 replvals = stringS_dictvar(operv, Dc=';', DVs=':') 569 replaced = False 570 for repls in replvals.keys(): 571 if val == repls: 572 newval = replvals[val] 573 replaced = True 574 break 575 if not replaced: newval = val 576 539 577 else: 540 578 newval = val
Note: See TracChangeset
for help on using the changeset viewer.