noresm:settingupcamonlinuxpc

LDAP: couldn't connect to LDAP server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
noresm:settingupcamonlinuxpc [2014-03-05 12:13:12]
alfg [Configure your case]
noresm:settingupcamonlinuxpc [2022-05-31 09:29:32] (current)
Line 15: Line 15:
 **To use the development version of CAM5-Oslo, check out NorESM (not CESM) from the noresm repository** **To use the development version of CAM5-Oslo, check out NorESM (not CESM) from the noresm repository**
 <file> <file>
-svn checkout https://svn.met.no/NorESM/noresm/branches/featureCAM5-OsloDevelopment_trunk2.0-myCamOsloDev+svn checkout https://svn.met.no/NorESM/noresm/branches/featureCAM5-OsloDevelopment_trunk2.0-myCamOsloDev
 </file> </file>
 ===== Compile the netcdf libraries using gfortran ===== ===== Compile the netcdf libraries using gfortran =====
Line 51: Line 51:
   * export CXXFLAGS=-O0   * export CXXFLAGS=-O0
  
-The netcdf c-library complains about a non-successful compilation because it can not find Doxyfile. This is not important.+The netcdf c-library complains about a non-successful compilation because it can not find Doxyfile. This is not important. The compilation needs also the following env-variables: CPPFLAGS=-I${dir}/include, LDFLAGS=-L${dir}/lib, where "dir" is directory you use for the "configure" scripts
  
 3) Get the netcdf source code (including the c-headers) from  3) Get the netcdf source code (including the c-headers) from 
Line 59: Line 59:
 c) make install c) make install
  
-4) Get fortran netcdf api (http://www.unidata.ucar.edu/downloads/netcdf/netcdf-fortran/index.jsp) and follow+4) Get fortran netcdf api (http://www.unidata.ucar.edu/downloads/netcdf/index.jsp) and follow
 http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-fortran-install.html
  
Line 81: Line 81:
   * export CSMDATA=/path/to/cam/input/data   * export CSMDATA=/path/to/cam/input/data
  
-This command compiles CAM (not including any CAM-Oslo code) on my machine+This command configures CAM (not including any CAM-Oslo code) on my machine. It creates a Makefile used later for compilation.
  
 <file> <file>
Line 87: Line 87:
 </file> </file>
  
-As long as $camcfg is defined, you can execute this from any directory..+**As long as $camcfg is defined, you can execute this from any directory..**
  
-Then you need the following commands+Then you need the following commands **executed from the same directory as you executed "configure"**
 <file> <file>
 $camcfg/build-namelist -test -config config_cache.xml $camcfg/build-namelist -test -config config_cache.xml
Line 112: Line 112:
 <file> <file>
 ./cam ./cam
 +</file>
 +
 +
 +NOTE: In CAM5.5 (upcoming versions) this same procedure is supposed to work with the following command (NOT VERIFIED): 
 +<file>
 +$camcfg/configure -fc gfortran -fc_type gnu -debug -nospmd -nosmp -dyn fv -res 10x15 -ice sice -phys cam5
 </file> </file>
  
Line 118: Line 124:
 This assumes you checked out NorESM (and CESM) with subversion This assumes you checked out NorESM (and CESM) with subversion
  
-**In order to include CAM-Oslo code you need to change the config-options: (go back to the configure-step in the section above)**+Works with latest version of oslo aerosol development branch
 <file> <file>
- $camcfg/configure -dyn fv -debug -hgrid 10x15 -fc gfortran -nospmd -nosmp -test -fc_type gnu -cam_oslo aerlife -cam_oslo_pc true+ $camcfg/configure -dyn fv -debug -hgrid 10x15 -fc gfortran -nospmd -nosmp -test -fc_type gnu -chem trop_mam_oslo 
 </file> </file>
 +
  
 There are additional input needed for the CAM-Oslo code. They are available in the same input-directory as the normal CESM-input files. There are additional input needed for the CAM-Oslo code. They are available in the same input-directory as the normal CESM-input files.
Line 139: Line 146:
  
 gdb has problems with printing info about allocatable arrays. Allocatable arrays have to be displayed as "*((real_8 *)my_array + N)@M" where N is number of elements beyond first element and M is number of elements to show. (See bottom of this page (and links therein) http://stackoverflow.com/questions/11786958/how-to-print-fortran-arrays-in-gdb)  gdb has problems with printing info about allocatable arrays. Allocatable arrays have to be displayed as "*((real_8 *)my_array + N)@M" where N is number of elements beyond first element and M is number of elements to show. (See bottom of this page (and links therein) http://stackoverflow.com/questions/11786958/how-to-print-fortran-arrays-in-gdb) 
 +
 +It is sometimes useful to let the compiler tell you about additional errors. Assuming you use gfortran on your PC: See https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html for additional options. For example if you want to check just about everything, add "-fcheck=all" to the "FC_FLAGS" in the gfortran section. (Note: Running configure again re-generates the Makefile)
  
  
  • noresm/settingupcamonlinuxpc.1394021592.txt.gz
  • Last modified: 2022-05-31 09:23:24
  • (external edit)