Dear all,
I got some emails about the errors when some users compile and run RegCM4.2 with CLM options after they fixed the bugs according my previous poster.
I can not reply all of you one by one. So I write this poster to list all the steps:
Step1: fix all the four bugs listed in my previous poster (you can google "Bugs fixed in RegCM4.2 with CLM option")
Step2: define the following environment variable according to the compiler on your system before running configure command
setenv CC gcc
setenv FC pgf90
setenv F77 pgf90
setenv CPPFLAGS '-I/usr/pgi/linux86-64/11.10/mpi2/mpich/include'
setenv NETCDF /usr/local/netcdf_pgi
setenv MPI /usr/pgi/linux86-64/11.10/mpi2/mpich
set path = ($MPI/bin $path)
setenv LD_LIBRARY_PATH $NETCDF/lib
setenv LD_LIBRARY_PATH $MPI/lib:$LD_LIBRARY_PATH
Step3: Patch configure file use the attached patch file
The purpose of the configure file is to fix the problem that the configure command can not get the CPPFLAGS value even we define it as environment variable.
Secondly to fix the problem that rcmlib is not included in the path of library to compile CLM.
If you are not clear what I say, I am sorry for this. You can just use the patch file.
Step4: configure and compile
./configure --with-netcdf=/usr/local/netcdf_pgi --enable-clm
make all
make install
Step5: run
mpirun -np 10 ./Bin/regcmMPI_clm regcm.in > & std.out &
Guangshan Chen
Center for Climatic Research
University of Wisconsin-Madison