Commits

Ville Suoranta authored aa3603a1922 Merge
Merge pull request #257 in CASA/casa6 from CAS-13258 to release/6.1.2

* commit '0b294e09d8da67537d525b8b081072f5a24ad136': For CAS-13040, replaced awkward (and python3 non-compliant) logic clauses that prepend zeros to low day-of-year numbers with str.zfill(3).

casa5/gcwrap/python/scripts/recipes/tec_maps.py

Modified
455 455 ## =============================================================================
456 456 """
457 457
458 458 year = int(ymd_date.split('/')[0])
459 459 month = int(ymd_date.split('/')[1])
460 460 day = int(ymd_date.split('/')[2])
461 461
462 462 ## Gives the day of the year of any given year
463 463 dayofyear = datetime.datetime.strptime(''+str(year)+' '+str(month)+' '+str(day)+'', '%Y %m %d').timetuple().tm_yday
464 464
465 - ## Prepare the 3-digit day of the year for use to find the right IONEX file
466 - if dayofyear < 10:
467 - dayofyear = '00'+str(dayofyear)
468 - if dayofyear < 100 and dayofyear >= 10:
469 - dayofyear = '0'+str(dayofyear)
465 + ## Convert dayofyear to 3-digit string, padded with zeros for IONEX filename format
466 + dayofyear = str(dayofyear).zfill(3)
470 467
471 468 ## Outputing the name of the IONEX file you require.
472 469 #igs_file = 'igsg'+str(dayofyear)+'0.'+str(list(str(year))[2])+''+str(list(str(year))[3])+'i'
473 470 igs_file = 'igsg'+str(dayofyear)+'0.'+str(year)[2:4]+'i'
474 471
475 472 print('\nFor '+ymd_date+', the required IGS file is called: '+igs_file)
476 473
477 474 ## =========================================================================
478 475 ##
479 476 ## This goes to the CDDIS website, and downloads and uncompresses the IGS

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut