Re: about missing value in nc file and avg function

From: Sylvia Murphy (murphys AT XXXXXX)
Date: Mon Jun 14 2004 - 08:30:56 MDT

  • Next message: sharad yeri: "question"

    YangJing,

    those ,_,_, are the missing values. that is how ncdump displays them.

    1) I would recommend creating a missing value that is WAY outside of the
    range of your data. 251 is rather close, try -999 or 1x36 etc.

    2) wrt your second problem, use printVarSummary on the value of RAIN
    before you do the average. make sure you have not done anything to the
    variable.

    sylvia

    On Mon, 14 Jun 2004, YangJing wrote:

    > ncl-talkHi aLL:
    >
    > Today I met a problem when i use NCL .
    >
    > In my NCL programm to creat a nc file.
    > I wrote as follows:
    > ..............
    > ..............
    > RAIN@_FillValue = 251.
    >
    > print(RAIN)
    >
    > outfile = addfile("rain_98_big.nc","c")
    > outfile->RAIN = RAIN
    > end
    > ---------------------------------------------------------------------------------------------
    > Then it is printed on computer monitor :
    > 1, 0.5, 0, 0, 0, 0.3, 0.5, 0.3, 0, 0, 0, 0, 0, 0, 0, 0, 0.4, 1, 1.4, 0.8,
    > 0.1, 0, 0, 0, 0.1, 0.3, 0.3, 0.6, 5.3, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    > 8.3, 6.3, 8.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    > 0, 0, 0.6, 1.3, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    > 0, 0, 0.1, 0.1, 0.1,
    > 251., 251., 251., 0, 0, 0,251.,251.,251.,251., 0, 0, 0,..................
    >
    >
    > But, when I open the .nc file, it is as follows:
    > ..........
    > ............
    > RAIN:_FillValue = 251.f
    > ==============================
    >
    > 1, 0.5, 0, 0, 0, 0.3, 0.5, 0.3, 0, 0, 0, 0, 0, 0, 0, 0, 0.4, 1, 1.4, 0.8,
    > 0.1, 0, 0, 0, 0.1, 0.3, 0.3, 0.6, 5.3, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    > 8.3, 6.3, 8.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    > 0, 0, 0.6, 1.3, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    > 0, 0, 0.1, 0.1, 0.1,
    > _, _, _, 0, 0, 0, _, _, _, _, 0, 0, 0, _, 0, 0, 0, .................................
    > ====================================
    > You see the 251. is not displayed as it should be. why?
    >
    > Then I will make average for the array in "this" nc file I created.
    > So i wrote
    > --------------------------------
    > rainave = avg(RAIN)
    > --------------------------------
    > but when I run the NCL script.
    > I got these warnings.
    >
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > warning:avg: Entire input array contains missing values, can't compute average
    > --------------------------------------------------------------------------------------
    >
    > I don't know why?
    >
    > could you help me?
    >
    > Thanks a lot!
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > _______________________________________________
    > ncl-talk mailing list
    > ncl-talk@ucar.edu
    > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
    >

    ******************************************************
    Sylvia Murphy EML: murphys@ucar.edu
    NCAR CGD/CSEG PHN: 303-497-1720
    1850 Table Mesa Drive FAX: 303-497-1333
    Boulder CO 80305

    WEB: http://www.cgd.ucar.edu/csm/support/
         http://www.cgd.ucar.edu/csm/support/CSM_Graphics/
    ******************************************************

    _______________________________________________
    ncl-talk mailing list
    ncl-talk@ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Fri Jun 25 2004 - 15:17:38 MDT