test_conversion Subroutine

public subroutine test_conversion()

Arguments

None

Calls

proc~~test_conversion~~CallsGraph proc~test_conversion test_conversion proc~abi_xy_2_lonlat ABI_XY_2_lonlat proc~test_conversion->proc~abi_xy_2_lonlat proc~lonlat_2_abi_xy lonlat_2_ABI_XY proc~test_conversion->proc~lonlat_2_abi_xy

Source Code

  subroutine test_conversion
    implicit none
    real*8 :: x0
    real*8 :: y0
    real*8 :: lam, the
    real*8 :: lon, lat
    integer :: mask
    real*8 :: xnew, ynew

    ! two points mapping: (x0, y0) <--> (lam, the)
    x0 = -0.024052d0
    y0 =  0.095340d0
    lam = -1.478135612d0
    the =  0.590726971d0

    call ABI_XY_2_lonlat (x0, y0, lambda0_SatE, lon, lat, mask)
    write(6, 111) 'x,y 2 ll'
    write(6, 111) 'x,y=', x0, y0
    write(6, 111) 'lon,lat=', lon, lat
    write(6, 121) 'mask=', mask
    write(6, 111) 'errror lon,lat=', lon - lam, lat-the

    call lonlat_2_ABI_XY (lam, the, lambda0_SatE, xnew, ynew, mask)
    write(6, 111) 'll 2 xy'
    write(6, 111) 'lon,lat=', lam, the
    write(6, 111) 'x,y=', xnew, ynew
    write(6, 121) 'mask=', mask
    write(6, 111) 'errror lon,lat=', xnew -x0, ynew-y0

101   format (2x, a,10(2x,f15.8))
111   format (2x, a,20(2x,f25.11))
121   format (2x, a,10(2x,i8))

  end subroutine test_conversion