[gradsusr] Plotting daily average

Adams, Jennifer M. (GSFC-610.2)[ADNET SYSTEMS INC] jennifer.m.adams at nasa.gov
Mon Mar 4 16:32:42 EST 2019


Hi, Emily -- 
If you want to convert a dataset that is hourly to one that is daily, you need to use fwrite (or sdfwrite) to build it explicitly. This is a bare-bones outline for what you need to do, my syntax is not guaranteed to work:

tbeg=1
tend=365
'set t 'tbeg' 'tend
areaavg = tloop(aave(var,g))   ;* define your hourly area average time series first, so you do the I/O only once
'set fwrite -ap dailymean.dat' 
'!/bin/rm -f dailymean.dat'    ;* make sure that dailymean.dat does not already exist
'set gxout fwrite'
t=tbeg
while (t<tend)
   'set t 't
   'd ave(areaavg,t+0,t+23)    ;* this is the daily mean 
   t=t+24
endwhile
'disable fwrite'


-- 
Jennifer Miletta Adams
ADNET Systems, Inc.
NASA/GSFC, Code 610.2
Building 32, Room S159
(301) 614-6070
 

On 3/4/19, 12:34 PM, "gradsusr on behalf of Saunders, Emily (GSFC-610.0)[SCIENCE SYSTEMS AND APPLICATIONS INC]" <gradsusr-bounces at gradsusr.org on behalf of emily.saunders at nasa.gov> wrote:

    Hi all,
    
    I need some help plotting the daily average for the total CO burden. In 
    my script I am trying to plot the calculated Total CO burden daily 
    average and plot the daily average value for each day, but instead it 
    plots the value for each hour instead of the average of the hours. Here 
    is part of the script I am working with:
    
    'set time 01JAN2019
    'set time 05JAN2019
    'set z 1'
    'set lon 0'
    'set lat 0'
    'set ccolor 14'
    'set cstyle 1'
    'set cthick 10'
    'cons = 2.687e+20/6.022e+23*48/1.0e+12'
    'define tseries = 
    cons*aave(totcol_co,lon=0,lon=360,lat=-90,lat=90)*510.1*1000000000000'
    'define a = ave(tseries, time=00:30z01JAN2019, time=23:30z05JAN2019)'
    'set parea 1.5 9 1.5 7.5'
    'set digsiz 0.10'
    'set cmark 3'
    'd a'
    
    Thank you for your help in advance.
    
    -- 
    Emily Saunders, PhD.
    Senior Research Scientist
    Global Modeling and Assimilation Office/SSAI
    NASA Goddard Space Flight Center Bldg 33, Room H-111B
    Code 610.1, Greenbelt, MD, 20771
    Phone: +1-301-614-6532
    
    _______________________________________________
    gradsusr mailing list
    gradsusr at gradsusr.org
    https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_mailman_listinfo_gradsusr&d=DwICAg&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=M2mFZsxo0ZoztoK2Lyoypu1kKkBVKyEoM9CXGWO42zk&m=BqvJ1gpPp6UsVJ8xCQgeUVsTqQIUMaKSioEo-DIvRtA&s=iROw_ETmciLifggPzeiuiHIma3NfoWMm6wxnWw40Mds&e=
    




More information about the gradsusr mailing list