Usage: nccrip [options|parameters] cccdata ... Convert CCCma binary data to netcdf, one variable per output file. cccdata ... represents one or more CCCma binary data files. Options, parameter definitions and file names may be interspersed on the command line. Options: -coord_as_real ...Make coordinate variable type real (default is type double) -add_time_bnds ...Add a time_bnds variable to indicate time intervals -grll ...Input grid is a regular lat-lon grid -grllc ...Input grid is a regular lat-lon grid with a cylic lon -goll ...Input grid is an offset regular lat-lon grid -gollc ...Input grid is an offset regular lat-lon grid with a cylic lon -gocn ...Input grid is an ocean tracer grid -gocnv ...Input grid is an ocean velocity grid The input grid is assumed to be gaussian if none of -grll, -grllc, -goll, -gollc, -gocn or -gocnv are specified -rem_cyclic_lon ...Remove the cyclic longitude from all output fields -plev_in ...Input data is defined on pressure levels -mlev_in ...Input data is defined on atmosphere model levels -olev_in ...Input data is defined on ocean model levels -slev_in ...Input data is defined on soil depth levels -rlev_out ...The output vertical coordinate will contain the verbatim values that appear in the ibuf(4) field of labels read from the input file -plev_out ...The output vertical coordinate will be on pressure levels Normally input levels are output levels. plev_out is only used when atm model levels are input and pressure levels are desired in the output file. In this case the program will calculate pressure levels from the atm model levels. -reverse_levs ...Reverse the direction of the vertical coordinate -disk ...By default all input CCCma records are kept in memory until they get written to the output netcdf file This option will force these records to be written to disk then reread before they are finally written to the output file These temporary files are removed when no longer needed unless the "-keep" option is invoked -keep ...Do not delete tmp files create by the "-disk" option -ccout ...Create CCCma binary output files in addition to netcdf -list_output ...Create text files containing lists of all output files A file named "nccrip_file_list_netcdf" will contain a list of netcdf output files. If -ccout is used then a second file named "nccrip_file_list_cccbin" will contain a list CCCma output files -nomatch_label ...do not compare LABL values when comparing input records to see if the current record belongs to the same variable as a previous record The default is to compare LABL vlaues for all input records -nosp2gg ...do not convert SPEC records to GRID records Normally SPEC records are always converted to GRID -nopfx ...do not add a prefix to output file names -noinv ...assume there are no time invariant records The default is to assume that records with ibuf2=0 are invariant but there are no time invariant records when time_offset is used -no_default_meta ...Do not read default meta data -no_date_range ...Do not include a date range in the output netcdf file names -ts ...The input file is a time series file containing a single variable Using this option can speed up processing of time series files Do not use this unless the input file contains a single variable -query ...Read enough records from the input data file to determine dimension sizes and write info to stdout then stop. This is only intended to be used when the input file contains a single variable (e.g. ts files). -query_name ...Similar to query but read only enough to determine CCCma variable name. The CCCma variable name will be the sole ouput in this case. -h ...Display extended usage info -v ...Increase verbosity (use -vv or -vvv for more output) Parameters: flist=Char ...The name of a file containing input file names Each file name should appear on a separate line. Comment lines (lines that begin with "#") and blank lines are ignored. flist_out=Char ...The name of a file containing output file names This list will be created if either flist_out is defined on the command line or the -list_output option is invoked. If the file is to be written but flist_out is not defined then a default name of nccrip_file_list_netcdf will be used. desc=Char ...A file containing data description variables (e.g. PARM, ocean coords etc) This file may contain an arbitrary set of variables but only a certain subset of these variables will be read. Currently, these are PARM, DTTS, LAT, LATH, LON, LONH, Z, ZH var[s]=Char ...A white space separated list of variables to include These may be variable names or variable definitions. Note: variable definitions may not contain white space. xvar[s]=Char ...A white space separated list of variables to exclude These variable names will appear in ibuf(3) of input records var[s] and xvar[s] are mutually exclusive vlist=Char ...The name of a file containing variables to include Each variable or variable definition should appear in this file on a separate line. Comment lines (lines that begin with "#") and blank lines are ignored. This is an alternative to using var[s]=... but variable definitions input here may contain white space vdef[s]=Char ...A white space separated list of variable definitions Each definition is of the form "ncname=def" where ncname is the name of the variable as it will appear in the output netcdf file and def is a linear combination of variable names found in the input CCCma binary file. No whitespace is allowed in ncname and def. Variables defined here will be written to netcdf files in addition to all other variables found in the input files. By contrast, variables defined via var=... will result in only a subset of variables being written to netcdf files (ie only those contained in the var=... list) Examples of variable definitions would be tas=ST+273.16 balt=FSA+FSG+FLA+FLG geo_h=PHIS/9.8 vdef_list=Char ...The name of a file containing variable definitions Each variable definition should appear in this file on a separate line. Comment lines (lines that begin with "#") and blank lines are ignored. This is an alternative to using vdef[s]=... but variable definitions input here may contain white space. Each variable definition must contain one and only one equal sign. lab[s]=Char ...A comma separated list of superlabels to include xlab[s]=Char ...A comma separated list of superlabels to exclude lab[s] and xlab[s] are mutually exclusive lon[s]=Char ...A white space separated list of output longitudes This list must be exactly the same length as the number of longitudes (ibuf5) found in the input CCCma binary file. All output variables must use the same horizontal grid in this case. lon_bnd[s]=Char ...A white space separated list of output longitude bounds This list must be one element longer than the number of longitudes (ibuf5) found in the input CCCma binary file. lon_bnds is only used when lon=... is supplied by the user. If lon is provided but lon_bnds is not then (if required) a default lon_bnds is calculated internally. lat[s]=Char ...A white space separated list of output latitudes This list must be exactly the same length as the number of latitudes (ibuf6) found in the input CCCma binary file. All output variables must use the same horizontal grid in this case. lat_bnd[s]=Char ...A white space separated list of output latitude bounds This list must be one element longer than the number of latitudes (ibuf6) found in the input CCCma binary file. lat_bnds is only used when lat=... is supplied by the user. If lat is provided but lat_bnds is not then (if required) a default lat_bnds is calculated internally. lev[s]=Char ...A white space separated list of output levels (ibuf4 values) This must be a subset of the levels found in the input files plev[s]=Char ...A white space separated list of output pressure levels (hPa) This is an alternative to levs when pressure levels are output. Pressure values should be monotonically increasing with array index and within the range 0 to 1200. If plev is not defined a default set of levels is used meta_data=Char ...The name of a file containing user supplied meta data namelist=Char ...The name of a file containing namelist input start=Int ...The smallest time (ibuf2 value) to appear in output files stop=Int ...The largest time (ibuf2 value) to appear in output files time_units=Char ...Indicate the units for the output time dimension This string must be suitable as the "units" attribute in a CF compiant netcdf file (default "days since 1850-1-1") Valid values for the first word in this string are: days, hours, minutes or seconds ib2_fmt=Char ...Description of the format of the ibuf(2) value found in the CCCma input file. This will be one of MODEL OMODEL RAW YYYYMMDDHH YYYYMMDD YYYYMM YYYY ib2_fmt is set internally if not defined on the command line MODEL=Char ...A white space separated list of variables that require a MODEL ib2_fmt OMODEL=Char ...A white space separated list of variables that require a OMODEL ib2_fmt RAW=Char ...A white space separated list of variables that require a RAW ib2_fmt YYYYMMDDHH=Char ...A white space separated list of variables that require a YYYYMMDDHH ib2_fmt YYYYMMDD=Char ...A white space separated list of variables that require a YYYYMMDD ib2_fmt YYYYMM=Char ...A white space separated list of variables that require a YYYYMM ib2_fmt YYYY=Char ...A white space separated list of variables that require a YYYY ib2_fmt ...Defining one or more of the above variable lists will force the program to use the specified ib2_fmt for particular variables. This ib2_fmt specification will superceed any other ib2_fmt specification, for the variables in these lists. time_shift=Int ...An integer flag used to determine if a forward or backward time shift of half an interval is required. Valid values are: -1 => shift backward, 0 => no shift, 1 => shift forward time_interval=Char ...A string that will indicate the time interval between successive records in the input data file. This string must be of the form "R Unit" where R is numeric and Unit is one of "days", "hours", "minutes" or "seconds". If this is not set by the user then an internal default is determined based on the format of the ibuf(2) value. This time interval is used when a time shift is requested or a time_bnds variable is required. time_offset=Char ...A string that will indicate an offset to add to time values read from the input file. A positive offset means move forward in time and a negative offset means move backward in time. This string is of the form "R Unit" where R is numeric and Unit is one of "years", "days", "hours", "minutes" or "seconds". pfx=Char ...A prefix to be used on all output file names Use the command line option -nopfx to avoid any prefix sfx=Char ...A suffix to be used on all output file names psfile=Char ...The name of a file containing surface pressure in "hPa" psfile_Pa=Char ...The name of a file containing surface pressure in "Pa" psfile[_Pa] is used in conjunction with -mlev For every record in the input CCCma binary time series file there must be a corresponding record with the same time (same ibuf2 value) in this psfile. The file name may be provided as "fname:ib2fmt" (ie a colon separated pair of strings) where ib2fmt identifies the format of the ibuf2 values in this file. nens=Int ...The number of ensemble members present in the input files There must be nens separate files supplied on the command line. All files will contain the same set of records and each file will correspond with a single realization of the ensemble. The order these files appear on the command line will determine their index in the ensemble dimension of the output netcdf file. fillvalue=Re ...Reset the fillvalue (default is 1e38) verbose=Int ...Request more output (Int>3) than -vvv will provide meta_data_file description: The user may supply a text file containing variable specifc meta data. In this file blank lines and lines whose first non-whitespace character is "#" are ignored. Leading and trailing whitespace is stripped from all other lines. Case is significant everywhere. The file will contain sections that start with lines of the form: variable: CCC_VNAME [= NC_VNAME] [: SUPER LABEL] The keyword "variable" must be the first word on the line, followed by a colon (:). This is followed by the CCCma variable name (represented as CCC_VNAME) and optionally followed by an assignment to a new variable name to be used in the output netcdf file. There may be an optional super label appended on this line, preceeded by a colon. If the super label is present then both variable name and super label must match those found in the CCCma binary file in order to use the associated meta data. Space is optional around both ":" and "=" whenever they appear. All other lines will describe attributes associated with the current variable. Attribute descriptions are of the form: att_type att_name : att_value where att_type is one of "char", "int", "float" or "double" att_name is the name of the attribute (no spaces are allowed in att_name) att_value is a text string for type "char" or a comma (,) separated list of numbers for other types. Attributes defined before the first variable entry line will be added to the netcdf file as global attributes. Attribute definitions may be continued on to the next line when the current line ends with the character "&". Example of a meta data description file: ##### Global meta data ##### char comment: This is a line of text that is & continued on to the next line. ##### Variable specific meta data ##### variable: ST char long_name : Screen Temperature float _FillValue : 1e38 variable : U=ua char standard_name: eastward_wind char units: m s-1 variable: SHUM : Q char long_name : Specific Humidity char comment : Both variable name "SHUM" and super label "Q" must match those found in the input file.