cptv10

creates a CPT v10 file from the input dataset/variable

inputdata {variable list} [ spatial grids ... ] [ time ... ] cptv10

Arguments
labeltypedescription
inputdata dataset or variable dataset or variable to be put in cptv10 file
variable list proc optional list of variables to be extracted from the dataset (default is to include all of them) (optional)
spatial grids grid set either a pair of spatial grids or the station grid
time grid set grid or variable that gives the time
Returns
output file cpt file page which gives links to the CPT files

cptv10 allows one to explicitly specify variables, spatial, and temporal grids for output to a cptv10 file. Since CPT is most useful as a tool to analyze results from Data Library analyses (as opposed to direct downloads of datasets that explicitly exist in the data library), the flexibility of explicitly specifying information for CPT is useful.

Downloading a precipitation analysis with no explicit time

  
  SOURCES .IRI .FD .ECHAM4p5 .Forecast 
     .ca_sst .ensemble24 .MONTHLY .prec
  (mm/day) unitconvert
  [M]average
  S (1 Dec 1957-2008) VALUES
  L 0.5 2.5 RANGEEDGES
  [L] /keepgrids average
  [X Y][S L add]cptv10
		
This example accesses the precipitation record, changes the units, ensemble averages, selects Dec starts, and averages over the first three lags (retaining the lag (L) grid so that it can be used to compute time later). The last line then specifies X Y as the spatial grids and the sum of start and lead time as time.

Results

Downloading two precipitation analyses as a pair of fields for CPT

   
  SOURCES .NOAA .NCEP .EMC .CFS
     .MONTHLY .surface .prate
  L (1.5) (3.5) RANGEEDGES
  S (0000 1 Sep 1982-2008) VALUES
  X (30E) (100E) RANGEEDGES
  Y (30N) (30S) RANGEEDGES
  [M]average
  [L] /keepgrids average   
  c: /name /water_density def 998 (kg/m3) :c
   div
  (mm/day) unitconvert
      
 SOURCES .IRI .MP .RESEARCH .COUPLED .GLOBAL
   .ECHAM4p5-MOM3-AC1 .ATM .Surface .prec
   L (1.5) (3.5) RANGEEDGES
   S (0000 1 Sep 1982-2008) VALUES
   X (30E) (100E) RANGEEDGES
   Y (30N) (30S) RANGEEDGES
   [M]average
   [L] /keepgrids average
   (mm/day) unitconvert
      
[ X Y ] regridLinear      
 {NOAA_prcp IRI_prcp}ds
  [X Y][S L add ]cptv10
In this example, we compute seasonal average precipitation from two different models. Extract data from the monthly CFS, Sep starts averaged from 1.5 to 3.5 month leads. Note that we keep the L grid in the average so that we can use it later to compute time from start time and lead.
   
  SOURCES .NOAA .NCEP .EMC .CFS
        .MONTHLY .surface .prate
  L (1.5) (3.5) RANGEEDGES
  S (0000 1 Sep 1982-2008) VALUES
  X (30E) (100E) RANGEEDGES
  Y (30N) (30S) RANGEEDGES
  [M]average
  [L] /keepgrids average
  
Because this model outputs precipitation in kg /m2 /s, we need to divide by water density to allow unit conversion to mm/day.
	
    c:  /name /water_density def  998 (kg/m3) :c
   div
  (mm/day) unitconvert
  
Now we extract data from the monthly MOM3, again Sep starts averaged from 1.5 to 3.5 month leads. The mm/day unit conversion does not involve water density this time.
      
 SOURCES .IRI .MP .RESEARCH .COUPLED .GLOBAL
  .ECHAM4p5-MOM3-AC1 .ATM .Surface .prec
  L (1.5) (3.5) RANGEEDGES
  S (0000 1 Sep 1982-2008) VALUES
  X (30E) (100E) RANGEEDGES
  Y (30N) (30S) RANGEEDGES
  [M]average
  [L] /keepgrids average
  (mm/day) unitconvert
Now we regrid the IRI model analysis to match the NOAA model analysis
          
[ X Y ] regridLinear
We bundle the two results into a new dataset, calling them NOAA_prcp and IRI_prcp respectively.
          
   {NOAA_prcp IRI_prcp}ds
We then invoke cptv10, specifying X Y spatial grids, and computing time from the sum of start time S and lead time L. Note that the width of three months associated with L is inherited by T, so that the output is correctly labelled as seasonal averages.
          
  [X Y][S L add ]cptv10
  
Results

Downloading dual field Station data

SOURCES .NOAA .NCDC .USHCN
  state
   (30) dup masknotrange
   SELECT
  T (Jun 1960-1979) VALUES
  {raw .prcp 
   raw .mean .temp
   lon lat elev Name}[ID][T] cptv10
This example uses the state code to pick out a subset of the stations, picks June data from 1960-1979, then selected prcp and temp data, with lon, lat, elev, and Name station information.

Results