Open-source earth model for climate change
NOAA-GDFL model system for CMIP6

The Geophysical Fluid Dynamics Laboratory (GDFL) of the National Oceanic and Atmospheric Administration (NOAA) uses an coupled open source modeling system for their contribution to CMIP6. CMIP6 is the 6th Coupled Model Intercomparion Project (CMIP6) on which basis the Sixth Assessment Report of the IPCC (the upcoming report) will be partly based on. 

The model system of the GDFL consists of several components that have to be compiled invidually and couled to each other. The ocean is represented by the Modular Ocean Model v6 (MOM) and the atmosphere is represented by their Atmosphere Model v4.5 (AM). Both models are open source. But, I am not sure under which licence they are published. There are further components needed for the proper climate model system setup. Have a look in this json file for possible combinations.

Educational climate model: Planet Simulator

This text section was already posted by me as an answer to the question Simple Climate Models that Predict Climate Change.

The Meteorological Institute of the University of Hamburg, Germany, provides and simple model called "Planet Simulator" (PlaSim).

The Planet Simulator is mainly made for educational purposes and runs on personal computers. However, it is also parallalized and can be run on HPC clusters. There exists an Documentation and the source code is said to be well commented. The whole source code is open source. The programming language is Fortran. One should be able to compile it with gfortran under Linux.

The Planet Simulator offers a GUI (after compiling successfully) to set up da model simulation and run it. There is code for postprocessing included. Thus, there is not need for additional postprocessing software. If you write out the output as netCDF, which is the quasi-standard output format of climate models, it might be practical to install ncview or Panoply because these are common netCDF viewers with which you can look directly into the output files.