Skip to content
Snippets Groups Projects
Commit e2b281ca authored by Behrens, Prof. Dr. Jörn's avatar Behrens, Prof. Dr. Jörn
Browse files

added more type conversion in interpolation of wind

parent a3d7263a
No related branches found
No related tags found
No related merge requests found
......@@ -509,29 +509,29 @@
i_hiy=2_GRID_SI
determine_lon: DO i_cnt=1, i_lon-1
IF(r_lon(i_cnt) .LT. r_coord(1)) THEN
IF(r_lon(i_cnt +1) .GE. r_coord(1)) THEN
IF(REAL(r_lon(i_cnt),GRID_SR) .LT. r_coord(1)) THEN
IF(REAL(r_lon(i_cnt +1),GRID_SR) .GE. r_coord(1)) THEN
i_lox= i_cnt
i_hix= i_cnt+1
exit determine_lon
END IF
END IF
END DO determine_lon
IF(r_lon(i_lon) .LT. r_coord(1)) THEN
IF(REAL(r_lon(i_lon),GRID_SR) .LT. r_coord(1)) THEN
i_lox = i_lon-1
i_hix = i_lon
END IF
determine_lat: DO i_cnt=1, i_lat-1
IF(r_lat(i_cnt) .LT. r_coord(2)) THEN
IF(r_lat(i_cnt +1) .GE. r_coord(2)) THEN
IF(REAL(r_lat(i_cnt),GRID_SR) .LT. r_coord(2)) THEN
IF(REAL(r_lat(i_cnt +1),GRID_SR) .GE. r_coord(2)) THEN
i_loy= i_cnt
i_hiy= i_cnt+1
exit determine_lat
END IF
END IF
END DO determine_lat
IF(r_lat(i_lat) .LT. r_coord(2)) THEN
IF(REAL(r_lat(i_lat),GRID_SR) .LT. r_coord(2)) THEN
i_loy = i_lat-1
i_hiy = i_lat
END IF
......@@ -540,12 +540,12 @@
!---------- calculate weights for bilinear interpolation
! NOTE: We do not consider the distance stretching with height!
r_dx= r_lon(i_hix)- r_lon(i_lox)
r_dy= r_lat(i_hiy)- r_lat(i_loy)
r_lx= r_coord(1) - r_lon(i_lox)
r_ly= r_coord(2) - r_lat(i_loy)
r_hx= r_lon(i_hix) - r_coord(1)
r_hy= r_lat(i_hiy) - r_coord(2)
r_dx= REAL(r_lon(i_hix),GRID_SR)- REAL(r_lon(i_lox),GRID_SR)
r_dy= REAL(r_lat(i_hiy),GRID_SR)- REAL(r_lat(i_loy),GRID_SR)
r_lx= r_coord(1) - REAL(r_lon(i_lox),GRID_SR)
r_ly= r_coord(2) - REAL(r_lat(i_loy),GRID_SR)
r_hx= REAL(r_lon(i_hix),GRID_SR) - r_coord(1)
r_hy= REAL(r_lat(i_hiy),GRID_SR) - r_coord(2)
r_scalx=r_deg
r_scaly=r_deg*cos(r_coord(2))
......@@ -617,29 +617,29 @@
i_hiy=2_GRID_SI
determine_lon: DO i_cnt=1, i_lon-1
IF(r_lon(i_cnt) .LT. r_coord(1)) THEN
IF(r_lon(i_cnt +1) .GE. r_coord(1)) THEN
IF(REAL(r_lon(i_cnt),GRID_SR) .LT. r_coord(1)) THEN
IF(REAL(r_lon(i_cnt +1),GRID_SR) .GE. r_coord(1)) THEN
i_lox= i_cnt
i_hix= i_cnt+1
exit determine_lon
END IF
END IF
END DO determine_lon
IF(r_lon(i_lon) .LT. r_coord(1)) THEN
IF(REAL(r_lon(i_lon),GRID_SR) .LT. r_coord(1)) THEN
i_lox = i_lon-1
i_hix = i_lon
END IF
determine_lat: DO i_cnt=1, i_lat-1
IF(r_lat(i_cnt) .LT. r_coord(2)) THEN
IF(r_lat(i_cnt +1) .GE. r_coord(2)) THEN
IF(REAL(r_lat(i_cnt),GRID_SR) .LT. r_coord(2)) THEN
IF(REAL(r_lat(i_cnt +1),GRID_SR) .GE. r_coord(2)) THEN
i_loy= i_cnt
i_hiy= i_cnt+1
exit determine_lat
END IF
END IF
END DO determine_lat
IF(r_lat(i_lat) .LT. r_coord(2)) THEN
IF(REAL(r_lat(i_lat),GRID_SR) .LT. r_coord(2)) THEN
i_loy = i_lat-1
i_hiy = i_lat
END IF
......@@ -648,12 +648,12 @@
!---------- calculate weights for bilinear interpolation
! NOTE: We do not consider the distance stretching with height!
r_dx= r_lon(i_hix)- r_lon(i_lox)
r_dy= r_lat(i_hiy)- r_lat(i_loy)
r_lx= r_coord(1) - r_lon(i_lox)
r_ly= r_coord(2) - r_lat(i_loy)
r_hx= r_lon(i_hix) - r_coord(1)
r_hy= r_lat(i_hiy) - r_coord(2)
r_dx= REAL(r_lon(i_hix),GRID_SR)- REAL(r_lon(i_lox),GRID_SR)
r_dy= REAL(r_lat(i_hiy),GRID_SR)- REAL(r_lat(i_loy),GRID_SR)
r_lx= r_coord(1) - REAL(r_lon(i_lox),GRID_SR)
r_ly= r_coord(2) - REAL(r_lat(i_loy),GRID_SR)
r_hx= REAL(r_lon(i_hix),GRID_SR) - r_coord(1)
r_hy= REAL(r_lat(i_hiy),GRID_SR) - r_coord(2)
!---------- linear interpolation in x-direction
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment