[RegCNET] Bugs fixed in RegCM4.2 with CLM option and Problems left
Guangshan Chen
gchen9 at gmail.com
Tue May 15 19:52:44 CEST 2012
Dear all,
Thanks Prof. Guiling Wang in University of Connecticut for suggesting me to provide a more detail summary of the problems to ICTP
that I met when I run RegCM4.2 with CLM option.
I totally met seven problems. Six of them were solved (fixed). One is left.
The six problems fixed are listed here:
https://lists.ictp.it/pipermail/regcnet/2012/006083.html
https://lists.ictp.it/pipermail/regcnet/2012/006113.html
The one left unsolved is that all the values in the output history files of SRF and SST are missing values or Zero.
Also I am sorry that the strange problems were caused on Friday at the workshop by the fixing methods I posted. I do not have the detail of the strange
problems caused and I can not tell. In my end, there is no strange problems except the one left unsolved.
The following is a more detail summary of the steps for me to compile and run RegCM4.2 with CLM option.
If you have problems by following the instruction, please feel free to let me know. I am more than happy to help you.
Guangshan Chen
University of Wisconsin-Madison
Starting the instruction:
Let say $REGCM_ROOT = “the path where your put the code” and “>” means UNIX command needed to inout.
Step 1: download the RegCM4.2 user guide from http://gforge.ictp.it/gf/download/docmanfileversion/26/569/UserGuide-4.2.pdf
Step 2: Read Chapter 3.1 to see software needed to compile and install RegCM4.2
Step 3: Read Chapter 9 to see how to install the pre-required software.
FYI: I only installed NETCDF library and OpenMPI library
Step 4: Edit .tcshrc (for C shell) in your home directory to define the following shell environment variables according to the compiler on your system
# (Don’t use “ ” in your shell, here I just want to make clear)
setenv NETCDF “path of Netcdf Libary”
setenv MPI “path of Openmpi libary”
set path = ($MPI/bin $path)
# If LD_LIBRARY_PATH is not defined, please define as the following. Otherwise add the Netcdf library and MPI library to previous one
setenv LD_LIBRARY_PATH $NETCDF/lib
setenv LD_LIBRARY_PATH $MPI/lib:$LD_LIBRARY_PATH
Step 4: Patch $REGCM_ROOT/configure file to fix the configure can not find NETCDF Library file, MPI library file (mpi.h) and the files in clmlib.
Download the attached file configure.patch to $REGCM_ROOT, and patch it
> patch –p0 –i configure.patch
Step 5: Patch $REGCM_ROOT/Main/ mod_lm_interface.F90 to fix Bug 1 and Bug 3 found here: https://lists.ictp.it/pipermail/regcnet/2012/006083.html
Download the attached file mod_lm_interface.F90.patch and put it in $REGCM_ROOT/Main
> patch -p0 -i mod_lm_interface.F90.patch
Step 6: Patch $REGCM_ROOT/PreProc/ICBC/mod_sst_1deg.F90 to fix Bug 2 found here: https://lists.ictp.it/pipermail/regcnet/2012/006083.html
Download the attached file mod_sst_1deg.F90.patch and put it in $REGCM_ROOT/PreProc/ICBC
> patch -p0 -i mod_sst_1deg.F90.patch
Step 7: To fix Bug 3 found here: https://lists.ictp.it/pipermail/regcnet/2012/006083.html, you need the following patches:
mod_bats_common.F90.patch
mod_lm_interface.F90.patch (already used in Step 5)
mod_mtrxclm.F90.patch
surfrdMod.F90.patch
Download mod_bats_common.F90.patch and put it in $REGCM_ROOT/Main/batslib
> patch -p0 -i mod_bats_common.F90.patch
Download mod_mtrxclm.F90.patch and put it in $REGCM_ROOT/Main/clmlib
> patch -p0 -i mod_mtrxclm.F90.patch
Download surfrdMod.F90.patch and put it in $REGCM_ROOT/Main/clmlib/patchset to replace the old one coming with the code.
Step 8: To fix Bug 4 in there: https://lists.ictp.it/pipermail/regcnet/2012/006083.html
Download clm2rcm.F90.patch and put in $REGCM_ROOT/PreProc/CLM
> patch -p0 -i clm2rcm.F90.patch
Step 9: To fix But 5 (CLM can not recognize Gregorian calendar) found there:
https://lists.ictp.it/pipermail/regcnet/2012/006083.html
Download clm_time_manager.F90.patch and put it in $REGCM_ROOT/Main/clmlib/patchset to replace the old one
Download ESMF.inc.patch and put it in $REGCM_ROOT/Main/clmlib/clm3.5/src/utils/esmf_wrf_timemgr
> patch -p0 -i ESMF.inc.patch
If you use no_leap calendar, Please define -DNO_LEAP_CALENDAR in CPPFLAGS during configuration. (I will show you later).
Step 10: To fix the bug (segmentation fault caused by reallocation of c2r_allout in clm_atmlnd.F90) found here:
https://lists.ictp.it/pipermail/regcnet/2012/006113.htm
Download clm_atmlnd.F90.patch and put it in $REGCM_ROOT/Main/clmlib/patchset to replace the old one
Step 11: Run configure
> setenv CPPFLAGS '-I/parth_MPI_library/include'
If you use no_leap calendar, use the following one:
> setenv CPPFLAGS '-I/parth_MPI_library/include -DNO_LEAP_CALENDAR'
> ./configure --with-netcdf=parth_netcdf_libary --enable-clm
Step 12: make all and make install
Step 13: Run RegCM4.2
mpirun -np 10 ./Bin/regcmMPI_clm regcm.in > & std.out &
(you should have regcm.in available)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0011.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.patch
Type: application/octet-stream
Size: 441 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0010.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0012.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_lm_interface.F90.patch
Type: application/octet-stream
Size: 784 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0011.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0013.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_sst_1deg.F90.patch
Type: application/octet-stream
Size: 443 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0012.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0014.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: surfrdMod.F90.patch
Type: application/octet-stream
Size: 100048 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0013.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0015.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_mtrxclm.F90.patch
Type: application/octet-stream
Size: 1683 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0014.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0016.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_bats_common.F90.patch
Type: application/octet-stream
Size: 652 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0015.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0017.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ESMF.inc.patch
Type: application/octet-stream
Size: 203 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0016.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0018.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clm_time_manager.F90.patch
Type: application/octet-stream
Size: 1249 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0017.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0019.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clm2rcm.F90.patch
Type: application/octet-stream
Size: 2615 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0018.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0020.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clm_atmlnd.F90.patch
Type: application/octet-stream
Size: 24669 bytes
Desc: not available
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0019.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ictp.it/pipermail/regcnet/attachments/20120515/8f14869e/attachment-0021.htm>
More information about the RegCNET
mailing list