Possible incorrect code in WRFUserARW.ncl

From: Àî¼ÎÅô <lijpbasin_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 16 2012 - 19:35:48 MDT

Hi,
The code in "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" lines from 770 to 781 might be incorrect!
 770 cone = 1.
 771 if( map_projection .eq. 1) then ; Lambert Conformal mapping
 772 if( (fabs(true_lat1 - true_lat2) .gt. 0.1) .and. \
 773 (fabs(true_lat2 - 90. ) .gt. 0.1) ) then
 774 cone = 10^(cos(true_lat1*radians_per_degree)) \
 775 -10^(cos(true_lat2*radians_per_degree))
 776 cone = cone/(10^(tan(45. -fabs(true_lat1/2.)*radians_per_degree)) - \
 777 10^(tan(45. -fabs(true_lat2/2.)*radians_per_degree)) )
 778 else
 779 cone = sin(fabs(true_lat1)*radians_per_degree)
 780 end if
 781 end if
lines from 774 to 776 should be
 774 cone = log(cos(true_lat1*radians_per_degree)) \
 775 -log(cos(true_lat2*radians_per_degree))
 776 cone = cone/( log(tan((45. -fabs(true_lat1/2.))*radians_per_degree)) - \
 777 log(tan((45. -fabs(true_lat2/2.))*radians_per_degree)) )
according to the following web pages:
http://mathworld.wolfram.com/LambertConformalConicProjection.html
http://en.wikipedia.org/wiki/Lambert_conformal_conic_projection

The code which calculates cone factor in ARWpost V3.1's source file
ARWpost/src/module_map_utils.f90
is also provided (lines 634 to 642)
 634 IF (ABS(truelat1-truelat2) .GT. 0.1) THEN
 635
 636 ! Compute cone factor following:
 637 cone=(ALOG(COS(truelat1*rad_per_deg))-ALOG(COS(truelat2*rad_per_deg))) / &
 638 (ALOG(TAN((90.-ABS(truelat1))*rad_per_deg*0.5 ))- &
 639 ALOG(TAN((90.-ABS(truelat2))*rad_per_deg*0.5 )) )
 640 ELSE
 641 cone = SIN(ABS(truelat1)*rad_per_deg )
 642 ENDIF

NCL version: 6.0.0
my system:
Linux balance 3.2.9-1-ARCH #1 SMP PREEMPT Thu Mar 1 09:31:13 CET 2012 x86_64 AMD Phenom(tm) 9150e Quad-Core Processor AuthenticAMD GNU/Linux

--
LiJiapeng (lijpbasin@126.com)


_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Fri Mar 16 19:36:19 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 20 2012 - 15:27:15 MDT