Changeset 203 for codes/icosagcm/trunk/src/vector.f90
- Timestamp:
- 07/09/14 00:58:30 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/vector.f90
r201 r203 48 48 END SUBROUTINE cross_product2 49 49 50 FUNCTION arc(lon1,lat1, lon2,lat2) 51 REAL(rstd) :: lon1,lat1, lon2,lat2, arc2, & 52 x1,x2,x3,y1,y2,y3,z1,z2,z3 53 x1=cos(lat1)*cos(lon1) 54 x2=cos(lat2)*cos(lon2) 55 y1=cos(lat1)*sin(lon1) 56 y2=cos(lat2)*sin(lon2) 57 z1=sin(lat1) 58 z2=sin(lat2) 59 x3=y1*z2-y2*z1 60 y3=z1*x2-z2*x1 61 z3=x1*y2-x2*y1 62 arc=ASIN(SQRT(x3*x3+y3*y3+z3*z3)) 50 FUNCTION arc(lon,lat, lonc,latc) 51 REAL(rstd) :: lon,lat, lonc,latc, arc 52 arc=ACOS(sin(latc)*sin(lat)+cos(latc)*cos(lat)*cos(lon-lonc)) 63 53 END FUNCTION arc 64 54
Note: See TracChangeset
for help on using the changeset viewer.