Commit bf6fc715 authored by Knut's avatar Knut

meteo: flip_var()

parent 3845e7fb
...@@ -854,7 +854,7 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -854,7 +854,7 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
! !
! !LOCAL VARIABLES: ! !LOCAL VARIABLES:
integer :: i,j,err integer :: i,j,err
REALTYPE,dimension(edges(1),edges(2)) :: wrk,wrk_dp REALTYPE,dimension(edges(1),edges(2)) :: wrk!,wrk_dp
REALTYPE :: angle,uu,vv,sinconv,cosconv REALTYPE :: angle,uu,vv,sinconv,cosconv
!EOP !EOP
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
...@@ -874,8 +874,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -874,8 +874,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,airp_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,airp_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,airp_input)
end if end if
end if end if
...@@ -889,8 +891,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -889,8 +891,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
evap_input(ill:ihl,jll:jhl) = wrk evap_input(ill:ihl,jll:jhl) = wrk
end if end if
else else
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,evap_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,evap_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,evap_input)
end if end if
if (evap_factor .ne. _ONE_) then if (evap_factor .ne. _ONE_) then
evap_input = evap_input * evap_factor evap_input = evap_input * evap_factor
...@@ -907,8 +911,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -907,8 +911,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
precip_input(ill:ihl,jll:jhl) = wrk precip_input(ill:ihl,jll:jhl) = wrk
end if end if
else else
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,precip_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,precip_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,precip_input)
end if end if
if (precip_factor .ne. _ONE_) then if (precip_factor .ne. _ONE_) then
precip_input = precip_input * precip_factor precip_input = precip_input * precip_factor
...@@ -928,8 +934,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -928,8 +934,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,u10_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,u10_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,u10_input)
end if end if
end if end if
...@@ -944,8 +952,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -944,8 +952,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,v10_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,v10_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,v10_input)
end if end if
end if end if
...@@ -984,8 +994,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -984,8 +994,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,t2_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,t2_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,t2_input)
end if end if
end if end if
...@@ -1000,8 +1012,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -1000,8 +1012,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,hum_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,hum_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,hum_input)
end if end if
end if end if
...@@ -1016,8 +1030,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -1016,8 +1030,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end if end if
else else
!KBKwrk_dp = _ZERO_ !KBKwrk_dp = _ZERO_
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,tcc_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,tcc_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,tcc_input)
end if end if
end if end if
...@@ -1072,8 +1088,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -1072,8 +1088,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
sst_input(ill:ihl,jll:jhl) = wrk sst_input(ill:ihl,jll:jhl) = wrk
end if end if
else if (calc_met) then else if (calc_met) then
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,sst_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,sst_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,sst_input)
end if end if
end if end if
...@@ -1087,8 +1105,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -1087,8 +1105,10 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
sss_input(ill:ihl,jll:jhl) = wrk sss_input(ill:ihl,jll:jhl) = wrk
end if end if
else if (calc_met) then else if (calc_met) then
call copy_var(grid_scan,wrk,wrk_dp) !call copy_var(grid_scan,wrk,wrk_dp)
call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,sss_input) !call do_grid_interpol(az,wrk_dp,gridmap,ti,ui,sss_input)
call flip_var(wrk)
call do_grid_interpol(az,wrk,gridmap,ti,ui,sss_input)
end if end if
end if end if
...@@ -1102,6 +1122,35 @@ STDERR 'grid_north_pole_longitude ',southpole(2) ...@@ -1102,6 +1122,35 @@ STDERR 'grid_north_pole_longitude ',southpole(2)
end subroutine read_data end subroutine read_data
!EOC !EOC
!-----------------------------------------------------------------------
!BOP
!
! !IROUTINE: flip_var -
!
! !INTERFACE:
subroutine flip_var(var)
IMPLICIT NONE
!
! !DESCRIPTION:
!
! !INPUT/OUTPUT PARAMETERS:
REALTYPE, intent(inout) :: var(edges(1),edges(2))
!
! !REVISION HISTORY:
!
! !LOCAL VARIABLES:
!
!EOP
!-----------------------------------------------------------------------
select case (grid_scan)
case (0)
var = var(:,edges(2):1:-1)
end select
return
end subroutine flip_var
!EOC
!----------------------------------------------------------------------- !-----------------------------------------------------------------------
!BOP !BOP
! !
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment