[ncl-talk] How to define date for WRF-chem to get average daily of a variable ?

Setareh Rahimi setareh.rahimi at gmail.com
Fri Oct 7 05:16:45 MDT 2022


Dear Dennis,
So many thanks for your advice. I made corrections to my script as you
suggested, and attempted to calculate and plot the average AOD for
2011-06-28 but I still get errors. I attached the script and the errors.

As you can see from the error message, NCL says :fatal: No coordinate
variable exists for dimension (Time) in variable (x)
I wonder about variable x; I did not define such a variable.

Please advise me on how to sort this issue out.
Many thanks in advance,
Best wishes,

On Fri, Oct 7, 2022 at 6:02 AM Dennis Shea <shea at ucar.edu> wrote:

> As noted in the documentation, *calculate_daily_values*
> <https://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_daily_values.shtml>
> requires that the variable have a **time coordinate** that is recognized by
> cd_calendar.
>
>   Times = f->Times                    ; Times(Time, DateStrLen)    (type character)
>   Time = *wrf_times_c*( Times, 0 )      ; "hours since" initial time on file   (double); units recognized by cd_calendar
>
>      a2           = f->TAUAER   ; (Time, south_north, west_east)
>      a2&Time = Time   ; associate the 'Time' coordinate with the variable
> using  standard NCL & syntax
>      printVarSummary(a2)
>      print("------------------------------------")
>
>    a2Day = calculate_daily_values (a2, "avg", 0, opt)
>    printVarSummary(a2Day)
>    printMinMax (a2Day,1)
>
>
>
> On Wed, Oct 5, 2022 at 9:30 AM Setareh Rahimi via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Dear NCL users,
>>
>> I am trying to plot the daily average of AOD (aerosol optical depth) from
>> WRF-chem outputs. However, I can not define the time so that NCL plots the
>> daily average of AOD.(the script has been attached, and the model output is
>> too large and I just used ncdump to show the header of some varibles ).
>> I tried the following commands:
>>
>>
>> times = wrf_user_getvar(f,"times",-1)
>> printVarSummary(times)
>> print(times)
>> ymdh = cd_calendar(a2&times, -2)
>>   print(ymdh)
>>
>> but faced an error.
>> Would you please kindly advise me on how can I calculate the daily
>> average of AOD from the hourly output of WRF-chem?
>> Many thanks in advance,
>> Best wishes,
>> --
>> S.Rahimi
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>

-- 
S.Rahimi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20221007/a8b2cbce/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dust-ncl
Type: application/octet-stream
Size: 2271 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20221007/a8b2cbce/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 1401-07-15 at 2.37.10 PM.png
Type: image/png
Size: 126935 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20221007/a8b2cbce/attachment.png>


More information about the ncl-talk mailing list