CosmoCoffee Forum Index CosmoCoffee

 
 FAQFAQ   SearchSearch  MemberlistSmartFeed   MemberlistMemberlist    RegisterRegister 
   ProfileProfile   Log inLog in 
Arxiv New Filter | Bookmarks & clubs | Arxiv ref/author:

CosmoMC: Accessing Cl_Scalar from within CAMB_GetResults
 
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software
View previous topic :: View next topic  
Author Message
Simon Muya Kasanda



Joined: 16 Jan 2007
Posts: 5
Affiliation: UKZN

PostPosted: October 14 2016  Reply with quote

I have added new parameters to CosmoMC to account for partial correlation of isocurvature and adiabatic modes. However, I need, in 'CAMB_GetResults', to be able to access the Cl_Scalar, Cl_lensed and Cl_tensor from within the subroutine. This works for CAMB alone, but when compiled with Cosmomc, somehow these output are not accessible.

A simple check can be done by adding the following, just before 'end subroutine CAMB_GetResults'

do i=2,500
write(10,*)i,Cl_Scalar(i,1,1)
enddo

This works in CAMB, but not with Cosmomc. What can I do to access these Cls from inside CAMB_GetResults ?
Back to top
View user's profile  
Antony Lewis



Joined: 23 Sep 2004
Posts: 1224
Affiliation: University of Sussex

PostPosted: October 14 2016  Reply with quote

Cosmomc first calls CAMB to get the transfer functions, and then separately to get the power spectrum from them. So it probably isn't calling CAMB_GetResults.
Back to top
View user's profile [ Hidden ] Visit poster's website
Simon Muya Kasanda



Joined: 16 Jan 2007
Posts: 5
Affiliation: UKZN

PostPosted: October 17 2016  Reply with quote

Thank you for your response. Yes CosmoMc calls CAMB to get the transfer functions. But what I do not understand is that even when modifying CosmoMC to call CAMB_GetResults(P,error), I still cannot access cl_scalar!

For instance, in "CAMBCalc_GetNewTransferData", I add "use Modeldata" and call CAMB_GetResults(P,error) just before the "CAMB_GetTransfers(P, Info%Transfers, error)".
I have made sure that
P%WantCls=1
P%WantScalars=1

Is there any particular setting in CosmoMC that forbids accessing these?

Regards,
Back to top
View user's profile  
Antony Lewis



Joined: 23 Sep 2004
Posts: 1224
Affiliation: University of Sussex

PostPosted: October 17 2016  Reply with quote

Are you sure you're using the right module (probably need "camb").
Back to top
View user's profile [ Hidden ] Visit poster's website
Simon Muya Kasanda



Joined: 16 Jan 2007
Posts: 5
Affiliation: UKZN

PostPosted: October 20 2016  Reply with quote

Yes. Just for testing purposes, I have modified 'Calculator_CAMB.f90' by using camb module instead on the restrictions that were then (use camb, only: ....). With this, I commented all lines containing 'MpiStop', 'concat' and 'Feedback' to avoid same names from different module. Then, in 'CAMBCalc_GetNewTransferData', I have added:

call CAMB_GetResults(P, error)
do i=2,500
write(10,*)i,Cl_scalar(i,1,1)
enddo

just before
call CAMB_GetTransfers(P, Info%Transfers, error)


Executing the code, goes well until it reaches the line to write the Cl_scalar in to file, where these are not be accessible. If this can be sorted out, then I am set to go. Many thanks
Back to top
View user's profile  
Simon Muya Kasanda



Joined: 16 Jan 2007
Posts: 5
Affiliation: UKZN

PostPosted: October 25 2016  Reply with quote

Oops! P%OnlyTransfers was .true. Changing it to .false. solved the problem. Thanks
Back to top
View user's profile  
Display posts from previous:   
Post new topic   Reply to topic    CosmoCoffee Forum Index -> Computers and software All times are GMT + 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group. Sponsored by WordWeb online dictionary and dictionary software.