Main Content

ncdisp

명령 창에 netCDF 데이터 소스의 내용 표시

    설명

    예제

    ncdisp(source)는 지정된 netCDF 데이터 소스에 포함된 모든 그룹, 차원, 변수 정의 및 특성을 명령 창에 텍스트로 표시합니다.

    예제

    ncdisp(source,location)location으로 지정된 변수 또는 그룹에 대한 정보를 표시합니다.

    예제

    ncdisp(source,location,dispFormat)dispFormat에 지정된 표시 형식을 사용합니다.

    예제

    모두 축소

    netCDF 파일 example.nc의 내용을 표시합니다.

    ncdisp("example.nc")
    Source:
               matlabroot\toolbox\matlab\demos\example.nc
    Format:
               netcdf4
    Global Attributes:
               creation_date = '29-Mar-2010'
    Dimensions:
               x = 50
               y = 50
               z = 5
    Variables:
        avagadros_number
               Size:       1x1
               Dimensions: 
               Datatype:   double
               Attributes:
                           description = 'this variable has no dimensions'
        temperature     
               Size:       50x1
               Dimensions: x
               Datatype:   int16
               Attributes:
                           scale_factor = 1.8
                           add_offset   = 32
                           units        = 'degrees_fahrenheit'
        peaks           
               Size:       50x50
               Dimensions: x,y
               Datatype:   int16
               Attributes:
                           description = 'z = peaks(50);'
    Groups:
        /grid1/
            Attributes:
                       description = 'This is a group attribute.'
            Dimensions:
                       x    = 360
                       y    = 180
                       time = 0     (UNLIMITED)
            Variables:
                temp
                       Size:       []
                       Dimensions: x,y,time
                       Datatype:   int16
        
        /grid2/
            Attributes:
                       description = 'This is another group attribute.'
            Dimensions:
                       x    = 360
                       y    = 180
                       time = 0     (UNLIMITED)
            Variables:
                temp
                       Size:       []
                       Dimensions: x,y,time
                       Datatype:   int16

    파일 example.nc에 있는 변수 peaks의 내용을 표시합니다.

    ncdisp("example.nc","peaks")
    Source:
               matlabroot\toolbox\matlab\demos\example.nc
    Format:
               netcdf4
    Dimensions:
               x = 50
               y = 50
    Variables:
        peaks
               Size:       50x50
               Dimensions: x,y
               Datatype:   int16
               Attributes:
                           description = 'z = peaks(50);'

    파일 example.nc의 그룹 계층과 변수 정의만 표시합니다.

    ncdisp("example.nc","/","min")
    Source:
               matlabroot\toolbox\matlab\demos\example.nc
    Format:
               netcdf4
    Variables:
        avagadros_number
               Size:       1x1
               Dimensions: 
               Datatype:   double
        temperature     
               Size:       50x1
               Dimensions: x
               Datatype:   int16
        peaks           
               Size:       50x50
               Dimensions: x,y
               Datatype:   int16
    Groups:
        /grid1/
            Variables:
                temp
                       Size:       []
                       Dimensions: x,y,time
                       Datatype:   int16
        
        /grid2/
            Variables:
                temp
                       Size:       []
                       Dimensions: x,y,time
                       Datatype:   int16

    입력 인수

    모두 축소

    netCDF 데이터 소스 이름으로, string형 스칼라 또는 문자형 벡터로 지정됩니다. source 인수는 다음 값 중 하나일 수 있습니다.

    • 로컬 netCDF 소스의 경로

    • 원격 OPeNDAP netCDF 데이터 소스의 OPeNDAP URL

    • 원격 netCDF 소스의 HTTP URL로, 바이트 범위 읽기를 활성화하기 위해 URL 끝에 #mode=bytes가 추가됨

      참고

      바이트 범위 읽기는 다른 소스에서 읽는 것보다 속도가 느립니다. 바이트 범위 읽기에 대한 자세한 내용은 netCDF 문서를 참조하십시오.

    예: "myNetCDFfile.nc"

    예: "http://host_name/netcdf_filename#mode=bytes"

    netCDF 데이터 소스에서 변수나 그룹의 위치로, string형 스칼라 또는 문자형 벡터로 지정됩니다. 전체 소스의 내용을 표시하려면 location"/"(슬래시)로 설정하십시오.

    예: "myVar"

    예: "/myGrp/mySubGrp/myNestedVar"

    예: "myGrp"

    예: "/myGrp/mySubGrp"

    표시 형식으로, "full" 또는 "min"으로 지정됩니다. 특성을 표시하려면 dispFormat"full"로 설정하고 특성을 표시하지 않으려면 dispFormat"min"으로 설정합니다.

    데이터형: string | char

    • source가 제약 조건 표현식이 포함된 OPeNDAP URL이면 다른 입력 인수가 없는 구문 ncdisp(source)를 사용하십시오.

    버전 내역

    R2011a에 개발됨

    모두 확장