Re: addfiles and plotting multiple wrfout_d01 files

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri, 05 Jun 2009 10:20:54 -0600

jwsmith_at_ucar.edu wrote:
> Thanks,
>
> 1) I meant to have o3(0,:,:) in the previous e-mail not o3(,:,:)
Apparently, your o3 variable is 4-dimensional (say) o3(time,level,lat,lon)
You are specifying 3 subscripts. That is incorrect.

Please note: In NCL, dimensions of an array specified as scalars
are viewd as *degenerate*, hence,
     o3(time,lev,lat,lon) ==> o3( 0,5,:,:) ===> o3(:,:)
>
> 2)When just having the following:
> contour_o3 = wrf_contour(mulfiles[0],wks,o3,opts)
>
> I get the following error:
>
> Number of dimensions in parameter (2) of (wrf_contour) is (4), (2)
> dimensions were expected
>
See above
> 3) In the wrf_contour statement I have above is parameter (2) wks or o3?
>
NCL is C-based. Index values and argument counting start at zero.
So parameter 2 is o3
>
> 4) I want to load several wrfout files, so will the nc_file: file
> needed in the wrf_contour function handle this. In the documentation,
> it appears that I can only handle one file.
>
> 5) mulfiles = addfiles(fils, "r")
    
If you want to process multiple files

     nfils = dimsizes(fils)
     do nf=0,nfils-1
          o3 = multfiles[nf]=>O3

>
> Thanks,
> Jonathan
>
>
>
> Quoting Dennis Shea <shea_at_ucar.edu>:
>
>> [1]
>> You have a syntax error.
>> contour_o3 = wrf_contour(mulfiles[0],wks,o3(,:,:),opts)
>> ^^^^^^^^
>> Note the comma.
>>
>> [2]
>> The documentation for wrf_contour
>>
>> function wrf_contour (
>> nc_file : file,
>> wks : graphic,
>> data [*][*] : numeric,
>> res : logical
>> )
>>
>>
>> Shows that that the o3 [data] is required to be two-dimensional
>>
>>
>>
>> jwsmith_at_ucar.edu wrote:
>>> Thanks for the earlier responses.
>>> Including the [0] seems to have resolved some errors.
>>>
>>> I now have another error with the wrf_contour function.
>>>
>>> I currently have the following line of script in the code:
>>> contour_o3 = wrf_contour(mulfiles[0],wks,o3(,:,:),opts)
>>> The code terminates at this line. I then get the following error:
>>>
>>> Number of subscripts do not match number of dimensions of variable,
>>> (3) Subscripts used, (4) Subscripts expected
>>>
>>> I am using the addfiles function. Please refer the file
>>> o3_surface_multiple_wrfout_test.ncl that was attached in the
>>> initial e-mail.
>>>
>>> Jonathan
>>>
>>> Quoting Mary Haley <haley_at_ucar.edu>:
>>>
>>>> Hi Jonathan,
>>>>
>>>> Your "fils" variable is just a string array of file names.
>>>>
>>>> The "wrf_map" function needs a file that has been opened with
>>>> "addfile" or "addfiles".
>>>>
>>>> I think want you want is:
>>>>
>>>> map = wrf_map(wks,f[0],mpres)
>>>>
>>>> Note that you can't use "f", because "f" is a special "List" variable.
>>>> "f[0]" references the first file opened with "addfiles".
>>>>
>>>> --Mary
>>>>
>>>>
>>>> On Wed, 20 May 2009 jwsmith_at_ucar.edu wrote:
>>>>
>>>>> NCL_talk,
>>>>>
>>>>> Is there a mapping function that is specific to the addfiles and
>>>>> systemfunc functions? I
>>>>> am unable to plot figures for multiple wrfout_d01 files due to
>>>>> the wrf_map that I have
>>>>> been using with the addfile function.
>>>>>
>>>>> I have attached a the script that I am using to plot multple
>>>>> wrfout_d01 files.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> fatal:Argument type mismatch on argument (1) of (wrf_map) can not
>>>>> coerce
>>>>> fatal:Number of elements of dimension (0) of argument (1) is (3)
>>>>> in function (wrf_map),
>>>>> exp ected (1) elements
>>>>> fatal:Execute: Error occurred at or near line 48 in file
>>>>> o3_surface_multiple_wrfout_test.ncl
>>>>>
>>>>>
>>>>> Jonathan Wynn Smith
>>>>>
>>>>> Doctoral Student in Howard University
>>>>> Program in Atmospheric Sciences (HUPAS)
>>>>> 2008 ASP Graduate Student Visitor
>>>>> 2006 ASP Summer Colloquium Participant
>>>>>
>>>>> 408 Thirkield Building
>>>>> 2355 6th St. NW
>>>>> Washington, DC 20059
>>>>>
>>>>> E-mail: jw_smith_at_howard.edu or jwsmith9_at_gmail.com
>>>>> Cell Phone: 336-601-4563
>>>>>
>>>>> ----------------------------------------------------------------
>>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>>
>>>>>
>>>
>>>
>>>
>>> Jonathan Wynn Smith
>>>
>>> Doctoral Student in Howard University
>>> Program in Atmospheric Sciences (HUPAS)
>>> 2008 ASP Graduate Student Visitor
>>> 2006 ASP Summer Colloquium Participant
>>>
>>> 408 Thirkield Building
>>> 2355 6th St. NW
>>> Washington, DC 20059
>>>
>>> E-mail: jw_smith_at_howard.edu or jwsmith9_at_gmail.com
>>> Cell Phone: 336-601-4563
>>>
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> Jonathan Wynn Smith
>
> Doctoral Student in Howard University
> Program in Atmospheric Sciences (HUPAS)
> 2008 ASP Graduate Student Visitor
> 2006 ASP Summer Colloquium Participant
>
> 408 Thirkield Building
> 2355 6th St. NW
> Washington, DC 20059
>
> E-mail: jw_smith_at_howard.edu or jwsmith9_at_gmail.com
> Cell Phone: 336-601-4563
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jun 05 2009 - 10:20:54 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 08 2009 - 09:30:31 MDT