Changeset 2878 for branches/2011/dev_r2802_MERCATOR10_diadct/NEMOGCM/TOOLS/SECTIONS_DIADCT/src/sections_tools.f90
- Timestamp:
- 2011-09-30T08:26:28+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2011/dev_r2802_MERCATOR10_diadct/NEMOGCM/TOOLS/SECTIONS_DIADCT/src/sections_tools.f90
r2877 r2878 3 3 !! *** MODULE sections_tools *** 4 4 !! 5 !! History: 2011: cbricaudMercator-Ocean5 !! History: 2011: Clement Bricaud, Mercator-Ocean 6 6 !! 7 7 !!===================================================================== … … 14 14 !! * Routine accessibility 15 15 PUBLIC pointToCoordF ! define a point with geographical coordinates 16 PUBLIC distance ! compute distance between 2 points17 16 PUBLIC distance2 ! compute distance between 2 points 18 17 PUBLIC distance3 ! compute distance between a point and a line … … 42 41 43 42 END FUNCTION pointToCoordF 44 45 REAL(wp) FUNCTION distance(coordA,coordB,ld_date_line)46 !!---------------------------------------------------------------------47 !! *** FUNCTION distance ***48 !!49 !! ** Purpose: Compute distance between coordA and coordB50 !! We add 360° to coordB%long if the line (coordA,coordB)51 !! crosses the date-line.52 !!53 !!---------------------------------------------------------------------54 !! * arguments55 TYPE(COORD_SECTION), INTENT(IN) :: coordA,coordB56 LOGICAL,INTENT(IN),OPTIONAL :: ld_date_line57 58 !! * Local declarations59 INTEGER ::idateline ! local integer60 61 !-----------------------------------------------62 !63 idateline=064 IF( PRESENT( ld_date_line))THEN65 IF( ld_date_line )idateline=166 ENDIF67 !68 !function output69 distance = (sqrt((coordA%lon-coordB%lon-360*idateline )**2 + (coordA%lat-coordB%lat )**2))70 !71 RETURN72 !73 END FUNCTION distance74 43 75 44 REAL(wp) FUNCTION distance2(coordA,coordB,ld_date_line)
Note: See TracChangeset
for help on using the changeset viewer.