Version 1 (modified by lalibert, 8 years ago) (diff)


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, one simply has the frequency and realm of output files in the CDB_CMIP5_COMP_LIST bash variable at the end of a diagnostic script. In the tas_zonal example, this list was:

${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 be structure as ESG data. If one would like to use these variables 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. 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.