NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: ncdigest V1 #766

Hui Du,

Why you didn't email cdcdata@xxxxxxxx, like the readme says, I don't know.
The data are packed, per Unidata NetCDF convention.  See:
        http://www.cdc.noaa.gov/PublicData/faq.html#2

-Hoop
> From owner-ncdigest@xxxxxxxxxxxxxxxx  Tue May  4 21:42:59 2004
> Return-Path: <owner-ncdigest@xxxxxxxxxxxxxxxx>
> Date: Tue, 4 May 2004 21:25:00 -0600 (MDT)
> Organization: UCAR/Unidata
> Keywords: 200405050325.i453P0l6006195
> From: owner-ncdigest@xxxxxxxxxxxxxxxx (ncdigest)
> To: ncdigest@xxxxxxxxxxxxxxxx
> Subject: ncdigest V1 #766
> Reply-To: netcdfgroup@xxxxxxxxxxxxxxxx
> Sender: owner-ncdigest@xxxxxxxxxxxxxxxx
> Precedence: bulk
> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on ruff
> X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYE_00 autolearn=ham 
>       version=2.63
> X-Spam-Level: 
> Content-Length: 4390
> X-Lines: 129
> 
> 
> ncdigest             Tuesday, May 4 2004             Volume 01 : Number 766
> 
> 
> 
> Today's Topics:
> Problems with reading my data
> 
> ----------------------------------------------------------------------
> 
> Date: Tue, 04 May 2004 14:02:10 -0700
> From: "Hui Du" <netcdf@xxxxxxxxxxx>
> Subject: Problems with reading my data
> 
> >Dear netcdf users:
> >>  I am trying to read data from a netcdf file.  But it turned out crazy
> >>  The following are some of the data I have read
> >>  -1.3207933E+10
> >>  -8.3823027E+09
> >>  -5.4078728E+11
> >>  -1.6477924E+12
> >>  -3.1043398E+17
> >>  -1.3207933E+10
> >>  -1.0523522E+10
> >>  -8.1099614E+11
> >>  -2.6932095E+11
> >>They are completely different from what I expect.  Actually , the Data 
> >>should be the following or something
> >>
> >>-12310, -12320, -12315, -12310, -12310, -12320, -12325, -12340, -123
> >>40,
> >>    -12340, -12345, -12350, -12350, -12354, -12360, -12365, -12370, -123
> >>75,
> >>    -12379, -12395, -12410, -12415, -12420, -12425, -12425, -12420, -124
> >>04,
> >>    -12400, -12395, -12385, -12375,
> >>
> >>When I use the same fortran program to read another different fille, it 
> >>works well. The only modification I made is changing the dimension size
> >>
> >>the following is the fortran program, I think it should be right
> >>********************************************************
> >>        program filter
> >>        parameter   (ndims=4)
> >>        parameter   (nlat=73,nlon=144)
> >>        real         data(nlon,nlat)
> >>        integer      ncid,ncidin,ncidout,iv
> >>        integer      rcode
> >>        integer      start(3), count(3)
> >>        data start/1,1,1/
> >>        data count/nlon,nlat,1/
> >>        character*50 fname
> >>        character*20 file
> >>        include '/opt/netcdf/include/netcdf.inc'
> >>        ncidin  =  ncopn('../obs_cdc_olr.ctrl.nc',ncnowrit,rcode)
> >>        iv=4
> >>        k=1
> >>        call rdncdf2d(ncidin,iv,k,data)
> >>        do i=1,5
> >>         do j=1,5
> >>        write(6,*) data(i,j)
> >>        end do
> >>        end do
> >>        stop
> >>        end
> >>
> >>subroutine rdncdf2d(ncidin,id,itime,data)
> >>        parameter    (nlat=73, nlon=144)
> >>        parameter    (ndims=3)
> >>        integer      rcode
> >>        integer      start(ndims), count(ndims)
> >>        real         data(nlon,nlat)
> >>        character*31 dimname
> >>        data start/1,1,1/
> >>        data count/nlon,nlat,1/
> >>        start(3)=itime
> >>        call ncvgt(ncidin,id,start,count,data,rcode)
> >>        return
> >>        end
> >>***********************************************************
> >>
> >>There are some difference between these two file in that one has scale 
> >>factor and offset, the other does not. The following is the part of the 
> >>head information of the two netcdf files
> >>
> >>for    obs_cdc_olr.ctrl.nc   (for this file where the problem happened)
> >>                short olr(time, lat, lon) ;
> >>                olr:long_name = "Daily OLR" ;
> >>                olr:valid_range = 0.f, 500.f ;
> >>                olr:actual_range = 64.75f, 341.9f ;
> >>                olr:units = "W/m^2" ;
> >>                olr:add_offset = 327.65f ;
> >>                olr:scale_factor = 0.01f ;
> >>                olr:missing_value = 32766s ;
> >>                olr:var_desc = "Outgoing Longwave Radiation\n",
> >>                        "O" ;
> >>                olr:precision = 2s ;
> >>                olr:dataset = "NOAA Interpolated OLR\n",
> >>                        "O" ;
> >>                olr:level_desc = "Other\n",
> >>                        "-" ;
> >>                olr:statistic = "Mean\n",
> >>                        "M" ;
> >>                olr:parent_stat = "Individual Obs\n",
> >>                        "I" ;
> >>
> >>for  mm5_lon180_ncep.ctrl.nc  (for this file it works well)
> >>
> >>      float LWOUTNEW(TDAY, LATITUDE110_28, LONGITUDE17_80) ;
> >>                LWOUTNEW:missing_value = -1.e+34f ;
> >>                LWOUTNEW:_FillValue = -1.e+34f ;
> >>                LWOUTNEW:long_name = "outgoing longwave radiation" ;
> >>                LWOUTNEW:units = "W m^-2" ;
> >>
> >>
> >>Would anyone give me some hint about this problem?
> >>Thanks a lot in advance !
> >>
> >>Hui Du
> 
> _________________________________________________________________
> Watch LIVE baseball games on your computer with MLB.TV, included with MSN 
> Premium! 
> http://join.msn.com/?page=features/mlb&pgmarket=en-us/go/onm00200439ave/direct/01/
> 
> ------------------------------
> 
> End of ncdigest V1 #766
> ***********************

  • 2004 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: