Potential issue in WPS geogrid

demonsyang

New member
Hi,

I recently encountered an issue associated with the rotation angle calculated by WPS.

My test domain is the southern hemisphere polar stereographic projection (truelat1 < 0.)

I found that COSALPHA / SINALPHA in geo_em.d01.nc are different between WPS v4.0.2 and WPS v4.5

Specifically, the sign of SINALPHA is reversed between v4.0.2 and v4.5

I looked the code and noticed subroutine get_rotang in WPS/geogrid/src/process_tile_module.F in v4.5 (as well as the latest v4.7) has an updated method to calculate the rotation angle compared to v4.0.2

!
! Polar stereographic projection
!
else if (iproj_type == PROJ_PS) then

! Rotation angle is given by the difference in longitude from the standard longitude

do i=start_mem_i, end_mem_i
do j=start_mem_j, end_mem_j
d_lon = stand_lon - xlon_arr(i,j)
if (d_lon > 180.) then
d_lon = d_lon - 360.
else if (d_lon < -180.) then
d_lon = d_lon + 360.
end if

alpha = d_lon * RAD_PER_DEG


sina(i,j) = sin(alpha)
cosa(i,j) = cos(alpha)
end do
end do

For this section, does it require a sign reversal for the southern hemisphere?

Such as

alpha = SIGN(1.0, truelat1) * d_lon * RAD_PER_DEG

The below is my geogrid setting

&geogrid
parent_id = 1,
parent_grid_ratio = 1,
i_parent_start = 1,
j_parent_start = 1,
e_we = 501,
e_sn = 501,
geog_data_res = 'default',
dx = 25000,
dy = 25000,
map_proj = 'polar',
ref_lat = -90.0,
ref_lon = 0.0,
truelat1 = -60.0,
truelat2 = -70.0,
stand_lon = 0.0,

They are the same in my v4.0.2 and v4.5 test.
 
Last edited:
Back
Top