CFU
CFU (Climate Fortran Utilities)
Several functions of the CFU package are need in the subchain scripts. CFU contains functions which are covered neither by CDO nor NCO functions .
add_hours
Purpose | add a number of hours to a date | |
Call |
| |
Result | YYYYMMDDHH[mmss] | |
Meanings | ystartdate | has the form YYYYMMDDHH[mmss] |
itype_calendar | 0 = 365 days (plus taking into account for leap years) a year 1 = climatological calendar (360 days per year) |
add_lonlat
Purpose | adds 2D geographical latitude and longitude to a netCDF file containing rotated coordinates | |
Call |
| |
Result | < ncfile > with two additional 2D fields (lon and lat) | |
Meanings | ncfile | name of netCDF file to which the coordinates should be added |
add_months
Purpose | add a number of hours to a date | |
Call |
| |
Result | YYYYMMDDHH[mmss] | |
Meanings | ystartdate | has the form YYYYMMDDHH[mmss] |
add_vertices
Purpose | adds geographical latitude and longitude vertices to a netCDF file | |
Call |
| |
Result | < ncfile > with two additional fields (lon_bnds and lat_bnds) with the dimensions (4,lon,lat) | |
Meanings | ncfile | name of netCDF file to which the vertices should be added |
Remark | The counting of the 4 vertices goes like this
|
check_files
Purpose | check whether all required files in a date range are in a certain directory | |
Call |
| |
Result | 0=success, 1=error. In case of error the file | |
Meanings
| ystartdate | start date in the form YYYYMMDDHH[mmss] |
yenddate | end date the form YYYYMMDDHH[mmss] | |
hh:mm:ss | time increment of the files in the date range | |
prefix1 | primary prefix to be checked (e.g. caf, laf, …), i.e. the characters preceding the YYYYMMDDHH[mmss] sequence | |
prefix2 | secondary prefix to be checked (e.g. cas, lbfd, …), if prefix1 gives errors.In case only one prefix should be checked set prefix1=prefix2 | |
suffix | suffix to be checked (e.g. .nc, c.nc, …), i.e. the characters following the YYYYMMDDHH[mmss] sequence | |
input directory | full path to directory holding the files to be checked | |
last output | should be set to true | |
itype_calendar | 0 = 365 days (plus taking into account for leap years) a year 1 = climatological calendar (360 days per year) |