Using an output in another computation

The CDB was conceived in such way that it is easy to use the output from one diagnostic into another diagnostic. Among other things, this provides simple server-side processing framework.

To output the result of a diagnostic for reuse into another diagnostic, just list the desired frequency and realm of output files in the CDB_CMIP5_COMP_LIST bash variable at the end of a diagnostic script. The CDB will then structure the variables using the ESG naming convention. In the tas_zonal example, this list is:

${CDB_OUT_DIR}/${CDB_OUT_FILE}.daily;day,atmos,day \
${CDB_OUT_DIR}/${CDB_OUT_FILE}.monthly;mon,atmos,Amon \

This will output the .daily variables as atmospheric daily variables and .monthly variables as atmospheric monthly variables. Note that there must be a space between list entries for this feature to work properly.

The output will be found in CDB_OUT_DIR/tas_zonal/in and will have the same structure as ESG data. If these variables are to be used in another hypothetical diagnostic named 'tas_stats_zonal', one would move the directory CDB_OUT_DIR/tas_zonal/in to CDB_IN_DIR/tas_stats_zonal/in. When running the tas_stats_zonal diagnostic, the retrieval script will find the variables and retrieve them as if they were part of the local ESG archive.