Analyzing model output

Analyzing model output#

As a reminder, the model output can be found in your case directory. All eCLM output files are in netCDF format (.nc). If you are running for different time sampling frequencies (set in the lnd_in namelist), there will be separate files created for each frequency, e.g. my_case.h0.1993-01.nc and my_case.h1.1993-01.nc.

NetCDF is supported by many languages including Python, Matlab, R, NCL, IDL; tool suites of file operators (NCO, CDO) and viewing tools like ncview or ncdump. ncdump helps you to get an overview of the file structure and ncview is a graphical interface that allows to interactively visualize a selected variable across a selected range (time, spatial).

Using Ncview#

To use ncview you first have to load the ncview module. You also need Xming to be active to display the ncview window. Then you can open ncview and look at your file. Afterward, you can simply close the ncview interface to get back to your terminal

module load ncview
ncview FILENAME.nc # replace FILENAME with your output history file
../_images/ncview.png

Fig. 6 Example of ncview interface.#

Using ncdump#

The utility ncdump can be used to show the contents of netCDF files.

# Output a summary of your file (dimensions, variables, global attributes)
ncdump -h FILENAME.nc # replace FILENAME with your output history file

# Show the data for a specific variable
ncdump -v VAR1 FILENAME.nc # replace VAR1 with the variable of interest and FILENAME with your output history file

See ncdump --help for more options.

Using Python#

For scientific output analysis and visualizations, programming languages like Python are recommended.

You can use Jupyter Notebooks on JSC machines to directly access the model input and output data (login to Jupyter-JSC). If you have access to Gitlab, you can check the tutorial for Jupyter Notebooks on JSC machines through the following link: JupyterLab on JSC.

An exemplary notebook for eCLM output analysis and an annual output file covering the period from 2017-01-01 to 2017-12-31 for the NRW domain are available in the shared data directory /p/scratch/cslts/shared_data/rlmod_eCLM/. Copy the Jupyter Notebook to your directory before modifying it.

cp /p/scratch/cslts/shared_data/rlmod_eCLM/Analyse_ECLM_Input_Output.ipynb $MYPROJECT

Important

Remember to stop the JupyterLab after usage! See point 3 in JupyterLab on JSC