sfvp: testing

The stream-function velocity-potential code is quite complex and needs testing carefully. Sadly good tests cases are hard to find.

Here is the IDL code: fsfvp.pro and the sfvp.f the fortran it calls. Note the oddness: I have to reverse both u,v and sf,vp. I don't know why.

Case 1

In this case I'm trying to replicate the velocity potential as shown in fig 5 of this Hadley page, and the ps is cached here.

ue=gm('era-40/0.01',m=[0,1,2],y=1980+indgen(10),sc=15201,lev=200,/avg)        
ve=gm('era-40/0.01',m=[0,1,2],y=1980+indgen(10),sc=15202,lev=200,/avg)        

uve1=pp_regrid(/pole,red2reg([ue,ve]),get_orog())
sfvpe1=fsfvp(uve1)                                                                        
pp_plot,/glob,wpp_fc(sfvpe1(1),!met_values.radius_earth/1e6,1),model=0,lev=(indgen(11)-5)*2
gettwogifs,out='hadley-fig05'
And this looks about right:

The most noticable difference is that the negative "loop" over S. America has slightly different values. But apart from that - a good fit. Hurrah.

Case 2

Try to replicate figures 4, 5, 6 (all part c) of Vera et al, J Climate, v17 n9, 2004/5/1, p1741.

In this case they are drawing the 200 hPa streamfunction anomalies. Note that they usually say sigma=0.2 but once they say 200 hPa and this is what they mean. They use NCEP; I use ERA-40. Nonetheless it is clear that we agree.

Hurrah!

@vera