[ncl-talk] Data Extraction

Najib Yusuf najibgal at yahoo.com
Fri Feb 24 07:52:14 MST 2017


Thank you Sir Dennis.
Najib 

    On Thursday, February 23, 2017 8:10 PM, Dennis Shea <shea at ucar.edu> wrote:
 

 Your question is very general ... no specifics. Hence, it is hard to respond.

[1] 
It is *your responsibility* to learn the language. When ncl-talk people see "can you guide me" , we have found that 'we' (ncl-talk) does most, if not all the work. Hence, people afre reluctant to respond. We want to help but we have our own jobs to do.

[2]
Please see the excellent tutorials  created by Karin Meier-Fleischer and MichaelBöttinger of DKRZ(Deutsches Klimarechenzentrum). 
     http://www.ncl.ucar.edu/Document/Manuals/
In particular, it would be beneficial for you to do some of the exercises.

[3]
An example of "data extraction"

   [a] Examine the file's contents

        %>  ncl_filedump   TES-Aura_L2-O3-Nadir_Megacity_ v006_Litev08.nc  | less
      or
         %>  ncdump -h   TES-Aura_L2-O3-Nadir_Megacity_ v006_Litev08.nc  | less       

[snip]
       float averagecloudeffopticaldepth(grid_targets) ;
                averagecloudeffopticaldepth:long_name = "average cloud effective optical depth" ;
                averagecloudeffopticaldepth:units = "" ;
                averagecloudeffopticaldepth:_fillvalue = -999.f ;
                averagecloudeffopticaldepth:missing_value = -999.f ;
[snip]
        int cityindex(grid_targets) ;
                cityindex:long_name = "city index:  [Los Angeles, Houston, New York City, Mexico City, Sao Paulo, Buenos Aires, Pa
ris, Istanbul, Lagos, Beijing, SW China, Shenzhen, Tokyo, Bangkok, Dhaka, Delhi, Mumbai, Kolkata, Karachi]" ;
                cityindex:units = "" ;
                cityindex:_fillvalue = "" ;
                cityindex:missing_value = "" ;
[snip]

  
   [b]  Say, you want Lagos: NCL indexing starts at 0 ... hence index 8

   [b] Select a variable and in a script ...

       diri = "./"     ; directory with data file(s)
       fili   = "TES-Aura_L2-O3-Nadir_Megacity_ v006_Litev08.nc"
       pthi = diri+fili

       f = addfile(pthi, "r")
       aceod = f->averagecloudeffopticaldepth    ; all 'grid_targets'
       printVarSummary(aceod)
       printMinMax(aceod)

or

      i = 8
      aceod_Lagos = f->averagecloudeffopticaldepth(i)
      printVarSummary(aceod_Lagos)
      printMinMax(aceod__lagos


Good luck


On Thu, Feb 23, 2017 at 2:20 AM, Najib Yusuf <najibgal at yahoo.com> wrote:

Dear all,I need some more help please. Can you guide me to Data variable extraction and also data (measurement and model output) comparison templates?
I will appreciate your elderly advise. Thank you
Najib 

    On Saturday, February 18, 2017 4:57 PM, Dennis Shea <shea at ucar.edu> wrote:
 

 The file you sent has a .rc extension. This is not a recognized file extension. I changed it to a .nc extension

%> mv TES-Aura_L2-O3-Nadir_Megacity_ v006_Litev08.rc  TES-Aura_L2-O3-Nadir_Megacity_ v006_Litev08.nc

Then, I used

%> ncdump -h TES-Aura_L2-O3-Nadir_Megacity_ v006_Litev08.nc >&! out_630.TES_Nadir

The output (out_630.TES_Nadir) is attached.

============================== ======
NCL 6.3.0

%> ncl_filedump TES-Aura_L2-O3-Nadir_Megacity_ v006_Litev08.nc | less

NCL reads the file just fine. However, by netCDF rule, the _FillValue associated with a variable should match the type of the variable with which it is associated.

      variable (float); _FillValue (float)
      variable (byte); _FillValue (byte)
      ...etc...

This file sometimes has a mismatch so ncl_filedump (unlike ncdump -h) will issue a warning message like

warning:NetOpenFile: MissingToFillValue option set True, but missing_value attribute and data variable (city) types differ: not adding virtual _FillValue attribute

Actually, this is valuable information. You should be aware of this. The TES file is technically not a good netCDF file.

===
In an NCL script, you can turn off the warning messages via:

setfileoption("nc","MissingToF illValue", False)
f = addfile("TES-Aura_L2-O3-Nadir_ Megacity_v006_Litev08.nc", "r")

   https://www.ncl.ucar.edu/ Document/Functions/Built-in/ setfileoption.shtmn
On Fri, Feb 17, 2017 at 12:53 AM, Najib Yusuf <najibgal at yahoo.com> wrote:

Hello Denish,
[1] TES-Aura_L2-O3-Nadir_ Megacity_v006_Litev08
[2] I tried opening the data "ncdump" it has open but not in readable format.
[3] NCL version 6.3.0

Najib
 

    On Thursday, February 16, 2017 4:01 PM, Dennis Shea <shea at ucar.edu> wrote:
 

 re: " ...  but I am having trouble extracting a parameter from TES data."

[1] What type of file: L1B (Nadir), L2 (Nadir and Ancillary), and L3 (Gridded)?[2] Can you please show what you have tried?
[3] What version of NCL are you using?
     %>  ncl -V






On Thu, Feb 16, 2017 at 1:54 AM, Najib Yusuf <najibgal at yahoo.com> wrote:

Dear all,I want to compare TES data with model output using NCL but I am having trouble extracting a parameter from TES data.Kindly assist me on how to achieve this.
Thank you.

Najib YusufCentre for Atmospheric ResearchAnyigba. Nigeria.+234 80 371 4158
______________________________ _________________
ncl-talk mailing list
ncl-talk at ucar.edu
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/ mailman/listinfo/ncl-talk





   



   



   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170224/524d5369/attachment.html 


More information about the ncl-talk mailing list