; ; WRITTEN: 19DEC2006 Xuepu ; pro ghgchc_scbf,scbf,obs,g,h,gcp,hcp,ghfcp,IPH=iph,JTH=jth,NMAX=nmax, $ APAR=apar,RCP=rcp,RSS=rss if N_params() lt 1 then begin print,'PRO ghgchc_scbf,scbf,obs,g,h,gc,hc,ghfcp,JPH=,ITH=,NMAX=,$' print," APAR=,RCP=,RSS=" print,"INPUT: scbf (filename for photospheric field), obs ('wso' or 'mdi')," print,"g,h,gc,hc,ghf,ghfcp (calculated spherical coefficients)" return endif ; Default values for parameters if not keyword_set(iph) then iph=72 if not keyword_set(jth) then jth=30 if not keyword_set(nmax) then nmax=13 if not keyword_set(rcp) then rcp=2.25 if not keyword_set(rss) then rss=15.0 if not keyword_set(apar) then apar=0.2 ; Get spherical coefficients at the photosphere based on scbf if obs NE 'wso' then gh_mbrsc,scbf,nmax,g,h,/ifl $ else gh_wbrsc,scbf,nmax,g,h,/ifl,/cali g=100*g & h=100*h ; in mT ; Grid spacing zgrid,iph,jth,phd,thd,lad,cth,sth pdp,cth,Nmax,P,dP csmph,phd,nmax,cmph,smph ; Get field distribution on the cusp surface of rcp sb_hc,Nmax,apar,rcp,jth-1,iph-1,sth,cmph,smph,g,h,P,dP,brcp,btcp,bpcp ; Get spherical coefficients at the cusp surface based on brcp,btcp,bpcp ;ghv_csss,apar,Nmax,rcp,rss,jth-1,iph-1,sth,cmph,smph,P,dP,brcp,btcp,bpcp,$ ; ghfcsss,gcsss,hcsss ghcpf='ghcp_'+scbf ghv_csss,brcp,btcp,bpcp,sth,cmph,smph,P,dP,apar,Rcp,Rss,gcp,hcp,ghcpf end