Re: Unknown and unreasonable values when making

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Wed, 01 Jul 2009 13:08:33 -0600

Yan,

The plot in your original e-mail June 29 clearly indicates that this
is a missing value problem. The red areas at the edges of the plot
are supposed to be missing values outside of the limited NARR
domain, as shown on this page:

   http://www.cdc.noaa.gov/data/narr/format.html

You should focus on the missing value issue. If the fix that I sent
did not work, then please take a closer look at the metadata for
missing values.

I think you need to get debugging information. First, what is your
NCL version and computer platform and OS version? Also, exactly
where did you get your copy of the data file air.199001.nc, and was
it modified? I have assumed the NOAA/PSD FTP site, but that must be
confirmed.

Now display the metadata for the data variable after you read it.
Using Dennis's variable names:

1. After xShort = f->air(10,:,:,:) do this:
     printVarSummary (xShort)

2. After the second end if, do this:
     printVarSummary (xShort)

3. After x = short2flt(xShort) do this:
     printVarSummary (x)

 From each one, what are the values of the attributes _FillValue and
missing_value? Following step 2, both attributes should have the
integer value 32766. If not, there is a problem before this step.
If they are both correct, then print a few xShort values where the
data is unreasonable. If they are other than 32766, then this needs
to be investigated.

There are several things to check. Good luck, and please write back
to the list if you do not find the problem.

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/psd1/

Dennis Shea wrote:
> I just did the following and it worked fine ... including the plot
>
> diri = "./" ; input directory
> f = addfile (diri+"air.199001.nc", "r")
>
> xShort = f->air(10,:,:,:) ; (time=11,lev,lat,lon)
> if (isatt(xShort,"_FillValue") .and. isatt(xShort,"missing_value")) then
> if (xShort@_FillValue .ne. xShort_at_missing_value) then
> xShort@_FillValue = xShort_at_missing_value ; use alt. missing value
> end if ; only if needed
> end if
>
> x = short2flt(xShort) ; convert short=>float
>
> printVarSummary(x)
>
> ===
> I speculate the problem with specific humidity, is related to
> something you are doing. Use printVarSummary and printMinMax
> to examine the variabe
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml
> http://www.ncl.ucar.edu/Document/Functions/Contributed/printMinMax.shtml
>
>
> Yan Bao wrote:
>> Hi,
>> I have tried the way Dave had shown me , but the plots I made are
>> same as before. One intresting thing is when I tried to use NCEP data to
>> make the same figures, it works, but for specific humility, if you
>> change the unit (from g/kg to kg/kg), you will get the totally different
>> plots. I know that's the same problem both in NARR and NCEP, but how can
>> I advoid the problem? Any ideas for that?
>> Thanks,
>>
>> Yan
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 01 2009 - 13:08:33 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 02 2009 - 11:39:38 MDT