[ncl-talk] Daily averaged ozone concentration

Dennis Shea shea at ucar.edu
Fri Aug 4 20:23:24 MDT 2017


After

  filAtt = 0
  filAtt at title = "O3: Daily Mean"
  filAtt at Conventions = "None"
  filAtt at creation_date = systemfunc("date")
  filAtt at NCL    = get_ncl_version()

Add the following line:

  copy_VarAtts(f[0], filAtt)                  ; copy WRF file attributes

Cheers
D


On Fri, Aug 4, 2017 at 7:25 PM, Bucaram Carbo, Carlos <
carlos.bucaramcarbo at und.edu> wrote:

>
> Hi Dennis,
>
>
> Thank you for your quick reply. Upon your suggestion we downloaded the
> pre-compiled binaries of NCl 6.4.0 for our Linux distribution configuration
> , openSUSE Leap 42.1_x86_64, and thankfully got it to work.
>
>
> We also used your script and and it work very well to give us an average
> of the ground level o3 values on a new netcdf file, as well as on the
> terminal screen. However for some reason the new NCL image appear to revert
> to polar coordinates, and not to the original Lambert Conformal ones of the
> original wrfout_d01* file.
>
>
> Below you will see the message which we received on our terminal screen:
>
>
>
>
>
>
>
>
> *Bucaram at linux-vx3k:~/Documents2/ncl_ncarg-6.4.0.Linux_CentOS7.3_x86_64_nodap_gnu485/bin>
> ./ncl ozone_script.ncl  Copyright (C) 1995-2017 - All Rights Reserved
>  University Corporation for Atmospheric Research  NCAR Command Language
> Version 6.4.0  The use of this software is governed by a License Agreement.
>  See http://www.ncl.ucar.edu/ <http://www.ncl.ucar.edu/> for more details. **(0)
> wrf_map: Error: no MAP_PROJ attribute in input file*
>
> It appears that since a map projection is not found on the newly produced *o3.day.nc
> <http://o3.day.nc>* file, the NCL post-processed image shows (North)
> polar coordinates.
>
> Also attached you will find the script as well as the pdf post-processed
> file from NCL 6.4.0. Please let me know if you think it might be possible
> to include the original map projection on the post-processed image, so as
> to visualize the average ground level o3 concentration in the original
> domain.
>
> Thanks again for your help and best regards,
>
>
> Carlos
>
> ------------------------------
> *From:* Dennis Shea <shea at ucar.edu>
> *Sent:* Thursday, August 3, 2017 8:38:11 PM
> *To:* Bucaram Carbo, Carlos
> *Cc:* ncl-talk at ucar.edu
> *Subject:* Re: [ncl-talk] Daily averaged ozone concentration
>
> What version of NCL do you have?
>
> The attached script  uses a 6.4.0 function: calculate_daily_values
> It is untested ... don't have multiple hourly files.
>
> https://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_daily_
> values.shtml
> calculate_daily_values - CISL's NCAR Command Language (NCL)
> <https://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_daily_values.shtml>
> www.ncl.ucar.edu
> NCL Home > Documentation > Functions > General applied math
> calculate_daily_values. Calculate daily values [avg, sum, min, max] from
> high frequency temporal values.
>
>
> On Thu, Aug 3, 2017 at 1:44 PM, Bucaram Carbo, Carlos <
> carlos.bucaramcarbo at und.edu> wrote:
>
>>
>> Dear NCL Support,
>>
>>
>> We are trying to find a script that would read 24 individual 1-hour
>> wrfout_d01* output files for every day of an entire month of the year, then average
>> the individual hourly ground level ozone (o3) concentrations data over each
>> daily 24-hour period (at lowest level nl=0), and write a new netcdf file
>> with an gridded o3 average concentration for that specific day. The end
>> result would be a visual representation of a gridded o3 average
>> concentration for any specific day, if possible.
>>
>>
>> When searching on previous archives we found the following response to a
>> somewhat similar inquire back in 2011, but we are not sure if it would
>> apply in our case:
>>
>>
>> https://www.ncl.ucar.edu/Support/talk_archives/2011/1358.html
>>
>> NCL:
>>
>>     x3 = f->X ; (time,lat,lon) time is 3-hrly
>>     dimx3 = dimsizes(x3)
>>     ntim3 = dimx3(0)
>>
>>     nsd = 8 ; number of samples per day
>>
>>     xday = x3(::nsd,:,:) ; create array with meta data
>>
>>     do nt=0,ntim3-1,nsd
>>        xday(nt/nsd,:,:) = (/ dum_avg_n(nt:nt+nsd-1,:,:) /)
>>     end do
>>
>>     diro = "./" ; output directory
>>     filo = "day.nc"
>>     system ("/bin/rm -f "+diro+filo)
>>     fnc = addfile (diro+filo, "c")
>>
>>     filAtt = 0
>>     filAtt at title = "..."
>>     filAtt at Conventions = "None"
>>     filAtt at creation_date = systemfunc("date")
>>     fileattdef( fnc, filAtt ) ; create file attributes
>>     filedimdef(ncdf,"time",-1,True) ; make time UNLIMITED
>>     fnc->XDAY = xday
>>
>> Also attached you will find the current *wrf_ozone.ncl* script which we
>> use to post-process each individual 1-hour wrfout_d01* file for o3, as a
>> well as a sample post-processed image for a specific day and hour of 2010.
>>
>> Any specific direction from your side regarding this issue would be
>> greatly appreciated.
>>
>> With best regards,
>>
>>
>> Carlos J. Bucaram
>> Graduate Research Assistant
>> University of North Dakota
>> Department of Chemical Engineering
>>
>> Harrington Hall Room 223
>> 241 Centennial Dr., Grand Forks, ND
>>
>> 58202-7101
>>
>>
>>
>>
>> _______________________________________________
>> 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/20170804/b83fac70/attachment.html 


More information about the ncl-talk mailing list