Dear Guiling Wang,
Thank you very much for your valuable suggestion. Our thread of communications as following (I ignored some communications between Chao Sun and me):
1) First, I posted my question after many time trying to compile the model but it was not successful:
https://lists.ictp.it/pipermail/regcnet/2012/006045.html
2) After that Cheng posted his instruction to fix:
https://lists.ictp.it/pipermail/regcnet/2012/006083.html
3) I posted another question:
https://lists.ictp.it/pipermail/regcnet/2012/006087.html
4) Guangshan Cheng posted his instruction again:
https://lists.ictp.it/pipermail/regcnet/2012/006093.html
5) Chao Sun posted:
https://lists.ictp.it/pipermail/regcnet/2012/006102.html
6)
GuangshanCheng posted:
https://lists.ictp.it/pipermail/regcnet/2012/006107.html
7) I posted:
https://lists.ictp.it/pipermail/regcnet/2012/006108.html
8) And, the last one,
Guangshan Cheng answered me:

This fixing is not to fix the problem of missing values or zero in SRF and SST.

Some variables in SRF, you can find them in clmoutput.clm2.h0*.nc, such as TSA (2 meters temperature).

I think it will take time to find the reason.

Sorry, I do not have clue now.

Guangshan
---------------------------
Hopefully, ICTP's model developers can fix these problems.
Best wishes.
PVT


--- On Sun, 5/13/12, Wang, Guiling <gwang@engr.uconn.edu> wrote:

From: Wang, Guiling <gwang@engr.uconn.edu>
Subject: regarding this bug fix
To: "Phan Van Tan" <tanpv2000@yahoo.com>, "guangshan chen" <gchen9@gmail.com>
Cc: "chao sun" <1988sunchao@gmail.com>, "giorgi" <giorgi@ictp.it>
Date: Sunday, May 13, 2012, 7:36 PM

Dear Guangshan, Chao, and Phan Van Tan,

 

I have followed this thread of communications with interest. However, at this point, I think it would be more efficient if one of you can summarize and clearly describe the problem to the ICTP contacts so that they can look into this more carefully. That way, they can come up with a fix and test it before releasing it to the RegCNET community. (After reading your recent email exchanges, it is no longer clear to me what works and work does not.)

 

Filippo, maybe you can  suggest a best contact person to report this. The problem several group projects had on Friday at the workshop was related to this – apparently the fix Guangshan suggested was incorporated into the version used at the workshop at the last minute, and it was causing strange problems and we had to reverse it back.

 

Thanks!

Guiling

 

 

*****************************************

Guiling Wang, Ph.D.

Director of Environmental Engineering Program

Associate Professor in Civil & Environmental Engineering

University of Connecticut

Storrs, CT 06269-2037

Tel:  (860) 486-5648; Fax: (860) 486-2298

Email: gwang@engr.uconn.edu

http://www.engr.uconn.edu/~gwang

 

 

 

From: regcnet-bounces@lists.ictp.it [mailto:regcnet-bounces@lists.ictp.it] On Behalf Of Phan Van Tan
Sent: Sunday, May 13, 2012 12:47 AM
To: guangshan chen
Cc: regcnet@lists.ictp.it; chao sun
Subject: Re: [RegCNET] Another Bug confirmed and fixed in RegCM4.2 with CLM option

 

Dear Guangshan Chen and Chao Sun,
Many thanks for your comments. Hopefully someone can solve it before us.
Have a nice weekend days.


--- On Sat, 5/12/12, guangshan chen <gchen9@gmail.com> wrote:


From: guangshan chen <gchen9@gmail.com>
Subject: Re: Another Bug confirmed and fixed in RegCM4.2 with CLM option
To: "Phan Van Tan" <tanpv2000@yahoo.com>
Cc: regcnet@lists.ictp.it, "chao sun" <1988sunchao@gmail.com>
Date: Saturday, May 12, 2012, 8:36 PM

Dear Phan Van Tan,

 

This fixing is not to fix the problem of missing values or zero in SRF and SST.

 

Some variables in SRF, you can find them in clmoutput.clm2.h0*.nc, such as TSA (2 meters temperature).

 

I think it will take time to find the reason.

 

Sorry, I do not have clue now.

 

Guangshan

 

On May 12, 2012, at 11:15 AM, Phan Van Tan wrote:



Dear Guangshan Chen,

After fixing, the model output in the SRF and STS files are still missing values or zero !!!???


--- On Fri, 5/11/12, Guangshan Chen <gchen9@gmail.com> wrote:


From: Guangshan Chen <gchen9@gmail.com>
Subject: Another Bug confirmed and fixed in RegCM4.2 with CLM option
To: regcnet@lists.ictp.it
Cc: "Phan Van Tan" <tanpv2000@yahoo.com>, "chao sun" <1988sunchao@gmail.com>
Date: Friday, May 11, 2012, 8:48 AM

Dear all,

 

There is another bug confirmed and fixed in RegCM4.2 with CLM option.

 

First, thanks for Chao Sun who found it and Phan Van Tan who provided part of fixing.

 

This bug is in ./Main/clmlib/clm_atmlnd.F90, line 1370 and line 1374.

 

I have confirmed that line 1370 and line 1374 do cause a segment fault due to reallocation of c2r_allout by each processor.

(if you use one processor, it is no problem. Also you may can not find it by just run the model for couple of days. I find it after

about one month. At first, I just tested the code for couple of days and did not find it.) After fixing it, the model passed the crashed point.

It is still running now (two months already).

 

The lines 1370 and 1374 should be fixed as follow:

     if(AERTYP.ne.'AER00D0') then  !Aerosol scheme on
       nout = 22
       allocate(c2r_all(nt*nout))
       if (.NOT. allocated(c2r_allout(numg*nout))) allocate(c2r_allout(numg*nout))
     else
       nout = 20
       allocate(c2r_all(nt*nout))
       if (.NOT. allocated(c2r_allout(numg*nout))) allocate(c2r_allout(numg*nout))
     end if

 

I made a new patch file based on the old one in ./Main/clmlib/patchset. You can use this new patch to replace the old one.

 

 

Next step, comment deallocate(c2r_allout) (delete this line) in ./Main/clmlib/mod_mtrxclm.F90.

I had made a patch file for mod_mtrxclm.F90. The attached is a new one.

 

Guangshan Chen

University of Wisconsin-Madison, USA