- Timestamp:
- Jul 26, 2019, 2:42:36 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/create_OBSnetcdf.py
r2684 r2685 1476 1476 1477 1477 Nvariables=len(description['varN']) 1478 NlongN=len(description['varLN']) 1479 NvarU=len(description['varU']) 1478 1480 formats = description['varTYPE'] 1481 1482 if Nvariables != NlongN: 1483 print errormsg 1484 print ' ' + main + ': number of variables:', Nvariables,' and number of ' + \ 1485 'long names', NlongN,' does not coincide!!' 1486 print ' * what is found is _______' 1487 if Nvariables > NlongN: 1488 Nshow = NlongN 1489 for ivar in range(Nshow): 1490 print ivar,' ',description['varN'][ivar],':', description['varLN'][ivar],\ 1491 '[', description['varU'][ivar], '] fmt:', formats[ivar] 1492 print ' missing values for:', description['varN'][Nshow:Nvariables+1] 1493 else: 1494 Nshow = Nvariables 1495 for ivar in range(Nshow): 1496 print ivar,' ',description['varN'][ivar],':', description['varLN'][ivar],\ 1497 '[', description['varU'][ivar], '] fmt:', formats[ivar] 1498 print ' excess of long names for :', description['varLN'][Nshow:NlongN+1] 1499 1500 quit(-1) 1501 1502 if Nvariables != NvarU: 1503 print errormsg 1504 print ' ' + main + ': number of variables:', Nvariables,' and number of ' + \ 1505 'units', NvarU,' does not coincide!!' 1506 print ' * what is found is _______' 1507 if Nvariables > NvarU: 1508 Nshow = NvarU 1509 for ivar in range(Nshow): 1510 print ivar,' ',description['varN'][ivar],':', description['varLN'][ivar],\ 1511 '[', description['varU'][ivar], '] fmt:', formats[ivar] 1512 print ' missing values for:', description['varN'][Nshow:Nvariables+1] 1513 else: 1514 Nshow = Nvariables 1515 for ivar in range(Nshow): 1516 print ivar,' ',description['varN'][ivar],':', description['varLN'][ivar],\ 1517 '[', description['varU'][ivar], '] fmt:', formats[ivar] 1518 print ' excess of units for :', description['varU'][Nshow:NvarU+1] 1519 1520 quit(-1) 1521 1522 1523 print 'Number of variables', Nvariables 1524 print 'Number of long names', len(description['varLN']) 1525 1479 1526 1480 1527 if len(formats) != Nvariables:
Note: See TracChangeset
for help on using the changeset viewer.