<div dir="ltr"><div><div><div>Please look at NCL functions:<br><br><b><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_monthly_values.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/calculate_monthly_values.shtml</a><br><br></b></div><br></div>Also, read the Description section. The CDO (Climate Data Operators) have a command line tool for doing thios.<br><br></div>Good Luck<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 13, 2017 at 7:35 AM, Sri Nandini <span dir="ltr">&lt;<a href="mailto:snandini@marum.de" target="_blank">snandini@marum.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hello<br><br>Im using daily data (for evaporation) and would like to convert/calculate monthly values to plot my annual cycle.<br>The evaporation data is from 1979-2010 in daily format.<br>My script is:<br><br>; ==============================<wbr>==============================<wbr>==<br>; Open the file: Read only the user specified period first observations then model<br>; ==============================<wbr>==============================<wbr>==<br>f = addfile(&quot;ERAIL_SF_SRO_SSRO_TP_<wbr>E_1979_2010.nc&quot;, &quot;r&quot;) ;<br>;*****************************<wbr>******************************<br>; Read time and create required yyyyddd                    <br>;*****************************<wbr>******************************<br>   time    = f-&gt;time                       <wbr>   ; time:units = &quot;hours since 1-1-1 00:00:0.0&quot;                    <wbr>           <br>   TIME    = cd_calendar(time, 0)          ; type float <br>   year    = toint( TIME(:,0) )<br>   month   = toint( TIME(:,1) )<br>   day     = toint( TIME(:,2) ) <br>   ddd     = day_of_year(year, month, day) <br>   yyyyddd = year*1000 + ddd                           <wbr>       ; needed for input<br>;*****************************<wbr>******************************<br>; Read data: short2flt                     <wbr>                <br>;*****************************<wbr>****************************** <br>   e0     =  short2flt( f-&gt;e(:,:,:) )    ; convert to float <br>   printVarSummary( e0 ) <br>;*****************************<wbr>******************************<br>; Compute daily climatology: raw and then &#39;smoothed&#39;  <br>;*****************************<wbr>******************************<br>   EClmDay    = clmDayTLL(e0, yyyyddd)     ; daily climatology at each grid point                         <wbr>             <br>   printVarSummary(EClmDay)      <wbr>                              <wbr>                              <br>         printVarSummary(EClmDay)      <wbr>                          ; (time, lat,lon)  <br><br><br>and the output is:<br><br>Variable: e0<br>Type: float<br>Total Size: 233385984 bytes<br>            58346496 values<br>Number of Dimensions: 3<br>Dimensions and sizes:    [time | 11688] x [latitude | 64] x [longitude | 78]<br>Coordinates: <br>            time: [692520..973008]<br>            latitude: [64..32.5]<br>            longitude: [30..68.5]<br>Number Of Attributes: 7<br>  units :    m of water equivalent<br>  long_name :    Evaporation<br>  standard_name :    lwe_thickness_of_water_<wbr>evaporation_amount<br>  _FillValue_original :    -32767<br>  _FillValue :    -32767<br>  missing_value_original :    -32767<br>  missing_value :    -32767<br><br>Variable: EClmDay<br>Type: float<br>Total Size: 7308288 bytes<br>            1827072 values<br>Number of Dimensions: 3<br>Dimensions and sizes:    [year_day | 366] x [latitude | 64] x [longitude | 78]<br>Coordinates: <br>            year_day: [1..366]<br>            latitude: [64..32.5]<br>            longitude: [30..68.5]<br>Number Of Attributes: 4<br>  long_name :    Daily Climatology: Evaporation<br>  units :    m of water equivalent<br>  information :    Raw daily averages across all years<br>  smoothing :    None<br><br>Would really appreciate any advice<br></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>