pvl_readtmy2

Read a Typical Meteological Year 2 (TMY2) file to a MATLAB struct.

Contents

Syntax

TMYData = pvl_readtmy2()

TMYData = pvl_readtmy2(FileName)

Description

Read a TMY2 file and make a struct of the data. Note that values contained in the struct are unchanged from the TMY2 file (i.e. units are retained). Time/Date and Location data imported from the TMY2 file have been modified to conform to the following conventions:

In the case of any discrepencies between this documentation and the TMY2 User's Manual ([1]), the TMY2 User's Manual takes precedence.

Inputs

Outputs

Example

pvl_readtmy2('23050.tm2')
ans = 

  struct with fields:

                     SiteID: 23050
                StationName: {'ALBUQUERQUE'}
               StationState: {'NM'}
               SiteTimeZone: -7
               SiteLatitude: 35.0500
              SiteLongitude: -106.6167
              SiteElevation: 1619
                 DateNumber: [8760×1 double]
                 DateString: {8760×1 cell}
                 TimeString: {8760×1 cell}
                        ETR: [8760×1 double]
                       ETRN: [8760×1 double]
                        GHI: [8760×1 double]
                  GHISource: {8760×1 cell}
             GHIUncertainty: [8760×1 double]
                        DNI: [8760×1 double]
                  DNISource: {8760×1 cell}
             DNIUncertainty: [8760×1 double]
                        DHI: [8760×1 double]
                  DHISource: {8760×1 cell}
             DHIUncertainty: [8760×1 double]
                    GHillum: [8760×1 double]
              GHillumSource: {8760×1 cell}
         GHillumUncertainty: [8760×1 double]
                    DNillum: [8760×1 double]
              DNillumSource: {8760×1 cell}
         DNillumUncertainty: [8760×1 double]
                    DHillum: [8760×1 double]
              DHillumSource: {8760×1 cell}
         DHillumUncertainty: [8760×1 double]
                  Zenithlum: [8760×1 double]
            ZenithlumSource: {8760×1 cell}
       ZenithlumUncertainty: [8760×1 double]
                     TotCld: [8760×1 double]
               TotCldSource: {8760×1 cell}
           TotCldUnertainty: [8760×1 double]
                     OpqCld: [8760×1 double]
               OpqCldSource: {8760×1 cell}
          OpqCldUncertainty: [8760×1 double]
                    DryBulb: [8760×1 double]
              DryBulbSource: {8760×1 cell}
         DryBulbUncertainty: [8760×1 double]
                   DewPoint: [8760×1 double]
             DewPointSource: {8760×1 cell}
        DewPointUncertainty: [8760×1 double]
                       RHum: [8760×1 double]
                 RHumSource: {8760×1 cell}
            RHumUncertainty: [8760×1 double]
                   Pressure: [8760×1 double]
             PressureSource: {8760×1 cell}
        PressureUncertainty: [8760×1 double]
                       Wdir: [8760×1 double]
                 WdirSource: {8760×1 cell}
            WdirUncertainty: [8760×1 double]
                       Wspd: [8760×1 double]
                 WspdSource: {8760×1 cell}
            WspdUncertainty: [8760×1 double]
                       Hvis: [8760×1 double]
                 HvisSource: {8760×1 cell}
            HvisUncertainty: [8760×1 double]
                    CeilHgt: [8760×1 double]
              CeilHgtSource: {8760×1 cell}
         CeilHgtUncertainty: [8760×1 double]
             PresentWeather: {8760×1 cell}
                       Pwat: [8760×1 double]
                 PwatSource: {8760×1 cell}
            PwatUncertainty: [8760×1 double]
                        AOD: [8760×1 double]
                  AODSource: {8760×1 cell}
             AODUncertainty: [8760×1 double]
                  SnowDepth: [8760×1 double]
            SnowDepthSource: {8760×1 cell}
       SnowDepthUncertainty: [8760×1 double]
               LastSnowfall: [8760×1 double]
         LastSnowfallSource: {8760×1 cell}
    LastSnowfallUncertainty: [8760×1 double]

References

[1] Marion, W., and Urban, K., 1995. User's Manual for TMY2s, National Renewable Energy Laboratory. Available online at http://rredc.nrel.gov/solar/pubs/tmy2/titlepg.html.

See Also

pvl_makelocationstruct , pvl_readtmy3, pvl_maketimestruct

Copyright 2014 Sandia National Laboratories