...
vl3, vl4, vl5 -> list variable with description
At UQAM, there There is also a set of 'vl' (variable list) commands (one for each model version) which will give you a list of all the variables in an RPN file. The first description is always correct, but rarely contains the unit. For physics fields take the second description with a grain of salt. If it matches the first one, it's unit is correct as well. If it doesn't match, ignore it. However, to all units of accumulators a 'per second' needs to get added, for example:
...
editfst (also called editfst2000) is a utility used for editing and copying records from RPN standard files into a new or existing RPN standard file. It can do a straight (complete) copy of the input file or it can copy records selectively as indicated from the standard input or from a file of directives named in the "-i" key. One can select (via desire), exclude (via exclure) or modify (zap) records by their:
- TYPVAR: type of variable; 'A'(analysis),'P'(forecast),'X'
- NOMVAR: 4 caracter variable name
- ETIKET: 12 caracter label recorded from the original model run
- DATE: CMC date timestamp
- IP1: the level of the field (in pressure,eta,meters,other)
- IP2: the hour of the forecast (rounded off if not exact)
- IP3: value of 0 unless otherwise modified
...
Volet |
---|
Convert from NetCDF to RPN format: cdf2rpn -rpn RPN_standard_file -cdf NetCDF_file -attr attribut_list Convert from RPN to NetCDF format - one needs to add the key '-dir' (for 'direction'): cdf2rpn -rpn RPN_standard_file -cdf NetCDF_file -attr attribut_list -dir |
Notes:
- If you do not add a path to the output file name the file will end up in $TMPDIR!!!
- All fields in a file must have the same "type" of levellevels.
You cannot have i.e. sigma, hybrid, arbitrary and pressure levels in the same file!!! Nor can there be, for example, a field on 20 pressure levels and another on only 1 pressure level. If your RPN input file contains fields with different types or numbers of fields levels you can select the fields your want to convert with 'r.diag' and/or 'editfst' - see above. - If converting RPN to NetCDF make sure your RPN file contains all necessary grid descriptors ('^^', '>>', '^>', 'HY','!!')
- All variables you want to convert need to be in the attribute list.
You can find an example file on the servers under: ~winger/Scripts/NetCDF_converter/attribut_netcdf.dat
Make sure that the For each variable that is to be converted needs to be an entry starting with 'def_attribut' at the end of the file. Higher up in the file you find the documentation - see also below.
Make sure that the factors are correct!!! If one or more of your variables are not in this file, just take a copy and add the missing variables.
Volet |
---|
def_attribut[ name; ccname; mult; add; Where: name: name of netCDF variable - mandatory |
Notes:
- Unit conversion from RPN → netCDF: unit(RPN) = mult*unit(netCDF)+add
- Unit conversion from netCDF → RPN : unit(netCDF)= (unit(RPN)-add)/mult
- 'nom_attribut' and 'valeur_attribut' are only used for conversions to nsfCDF format.
- Never put a space before the ";"!
- "[", "]", "=" and ";" are reserved characters. Do not use them otherwise, for example in names or descriptions.