parameters: (yyyymmdd, year, month, day,
                   dayInc, # if to add one to the day
                   site, fileType)
return_statement: return folderUrl
docstring: Get full URL to the location where the files are kept.
docstring_summary: Get full URL to the location where the files are kept.
docstring_tokens: Get full URL to the location where the files are kept .
function: def getFolderUrl(yyyymmdd, year, month, day,
                   dayInc, # if to add one to the day
                   site, fileType):
      '''Get full URL to the location where the files are kept.'''
  
      # Note that yyyymmdd can equal 20100422a.
      ext = ''
      if len(yyyymmdd) == 9:
          ext = yyyymmdd[8]
  
      if fileType == 'nav':
          # This is the simplest, usually one file per flight.
          base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE_FTP/IPAPP1B_GPSInsCorrected_v01'
          yearFolder = makeYearFolder(year, site)
          folderUrl  = os.path.join(base, yearFolder)
          return folderUrl
  
      if fileType == 'jpeg':
  
          # If yyyymmdd is 20100422, put a or b depending on dayVal
          if twoFlightsInOneDay(site, yyyymmdd):
              if dayInc == 0:
                  ext = 'a'
              else:
                  ext = 'b'
              dayInc = 0
              
          #base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE_FTP/IODMS0_DMSraw_v01'
          base = 'https://daacdata.apps.nsidc.org/pub/DATASETS/ICEBRIDGE/IODMS0_DMSraw_v01'
          
          yearFolder = makeYearFolder(year, site)
          dateFolder = makeDateFolder(year, month, day + dayInc, ext, fileType)
          folderUrl  = os.path.join(base, yearFolder, dateFolder)
          return folderUrl
      
      # The other types share more formatting
      if twoFlightsInOneDay(site, yyyymmdd):
          dayInc = 0 # for this particular day, one should not look at the next day
          
      if fileType == 'ortho':
          base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE/IODMS1B.001'       
      elif fileType == 'fireball':
          base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE/IODMS3.001'
      elif fileType == 'atm1':
          base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE/ILATM1B.001/'
      elif fileType == 'atm2':
          base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE/ILATM1B.002/'
      elif fileType == 'lvis':
          base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE/ILVIS2.001/'
      else:
          raise("Unknown type: " + fileType)
      
      dateFolder = makeDateFolder(year, month, day + dayInc, ext, fileType)
      folderUrl  = os.path.join(base, dateFolder)
      
      return folderUrl
function_tokens: def getFolderUrl ( yyyymmdd , year , month , day , dayInc , # if to add one to the day site , fileType ) : # Note that yyyymmdd can equal 20100422a. ext = '' if len ( yyyymmdd ) == 9 : ext = yyyymmdd [ 8 ] if fileType == 'nav' : # This is the simplest, usually one file per flight. base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE_FTP/IPAPP1B_GPSInsCorrected_v01' yearFolder = makeYearFolder ( year , site ) folderUrl = os . path . join ( base , yearFolder ) return folderUrl if fileType == 'jpeg' : # If yyyymmdd is 20100422, put a or b depending on dayVal if twoFlightsInOneDay ( site , yyyymmdd ) : if dayInc == 0 : ext = 'a' else : ext = 'b' dayInc = 0 #base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE_FTP/IODMS0_DMSraw_v01' base = 'https://daacdata.apps.nsidc.org/pub/DATASETS/ICEBRIDGE/IODMS0_DMSraw_v01' yearFolder = makeYearFolder ( year , site ) dateFolder = makeDateFolder ( year , month , day + dayInc , ext , fileType ) folderUrl = os . path . join ( base , yearFolder , dateFolder ) return folderUrl # The other types share more formatting if twoFlightsInOneDay ( site , yyyymmdd ) : dayInc = 0 # for this particular day, one should not look at the next day if fileType == 'ortho' : base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE/IODMS1B.001' elif fileType == 'fireball' : base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE/IODMS3.001' elif fileType == 'atm1' : base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE/ILATM1B.001/' elif fileType == 'atm2' : base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE/ILATM1B.002/' elif fileType == 'lvis' : base = 'https://n5eil01u.ecs.nsidc.org/ICEBRIDGE/ILVIS2.001/' else : raise ( "Unknown type: " + fileType ) dateFolder = makeDateFolder ( year , month , day + dayInc , ext , fileType ) folderUrl = os . path . join ( base , dateFolder ) return folderUrl