Re: Composite of MJO phases

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Dec 02 2013 - 07:59:52 MST

The following should get you started.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

; http://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml

   diri = "./"
   fili = systemfunc("cd "+diri+" ; ls RegCM4*nc")

; http://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml

   f = addfiles(diri+fili, "r") ; *all* RegCM4 files
   TIME = f[:]->time ; *all* times
   printVarSummary(TIME)

; http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml

   adate= cd_calendar(TIME, -2) ; all yyyymmdd
   printVarSummary(adate)

; http://www.ncl.ucar.edu/Document/Functions/Built-in/asciiread.shtml

   cdate= asciiread("...txt",-1,"integer") ; composite dates
   printVarSummary(cdate)

; http://www.ncl.ucar.edu/Document/Functions/Contributed/get1Dindex.shtml

   itime= get1Dindex(adate, cdate) ; indices of desired times
   printVarSummary(itime)

   pr = f[:]->PR(itime,:,:)
   printVarSummary(pr)

On 11/28/13 12:48 AM, cirrus 0103 wrote:
> Dear Everyone,
> I have 11 years netCDF data which is the output of Regcm4 Model. I want to make a composite of precipitation data that have the same MJO phases from that file. Let say MJO phase 1 occurred on (yyyy-mm-dd):
> 20000926
> 20000927
> 20001110
> 20001111
> 20001112
> 20021211
> 20021212
> 20021213
> ...
> ...
> 20100115
> 20100116
> ...
> ...
>
> I put the list on a .txt file. So, in the end i will have 8 netCDF file that content the same MJO phases on 11 years. Any advice will be appreciated. Thank you in advance.
>
> Here is the description of my data (RegCM4 output):
> XAXIS = 103 ;
> YAXIS = 95 ;
> TIME = UNLIMITED ; // (2928 currently)
> bnds = 2 ;
> variables:
> double XAXIS(XAXIS) ;
> XAXIS:units = "DEGREE" ;
> XAXIS:point_spacing = "even" ;
> XAXIS:axis = "X" ;
> XAXIS:modulo = 360. ;
> double YAXIS(YAXIS) ;
> YAXIS:units = "DEGREE" ;
> YAXIS:point_spacing = "even" ;
> YAXIS:axis = "Y" ;
> double TIME(TIME) ;
> TIME:long_name = "time" ;
> TIME:calendar = "gregorian" ;
> TIME:units = "hours since 1949-12-01 00:00:00" ;
> TIME:bounds = "TIME_bnds" ;
> TIME:axis = "T" ;
> double TIME_bnds(TIME, bnds) ;
> float PR(TIME, YAXIS, XAXIS) ;
> PR:missing_value = -1.e+34f ;
> PR:_FillValue = -1.e+34f ;
> PR:long_name = "PRCV[GXY=NEWGRID@ASN]" ;
> PR:history = "From MIT_20_Sumatera_SRF.2000010100" ;
>
>
> Kind regards,
>
>
>
> --
> Rahmi Ariani
> Student of Applied Climatology
> Faculty of Mathematics and Natural Science
> Bogor Agricultural University
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Dec 2 07:59:59 2013

This archive was generated by hypermail 2.1.8 : Wed Dec 04 2013 - 20:42:38 MST