Last change
on this file since 5218 was
5119,
checked in by abarral, 5 months ago
|
enforce PRIVATE by default in several modules, expose PUBLIC as needed
move eigen.f90 to obsolete/
(lint) aslong the way
|
File size:
718 bytes
|
Line | |
---|
1 | function grid_index(lon_deg,lat_deg) |
---|
2 | !-------------------------------------------------------------------------------- |
---|
3 | ! Get local index of grid point of longitude,latitude lon_deg,lat_deg |
---|
4 | ! Author : FH 2024/07/18 |
---|
5 | ! Please do not put this function in a m*odule not to complexify the replay script |
---|
6 | !-------------------------------------------------------------------------------- |
---|
7 | USE dimphy, ONLY: klon |
---|
8 | USE lmdz_geometry, ONLY: latitude_deg, longitude_deg |
---|
9 | IMPLICIT NONE |
---|
10 | REAL, INTENT(IN) :: lon_deg,lat_deg |
---|
11 | INTEGER :: grid_index |
---|
12 | INTEGER i |
---|
13 | grid_index=0 |
---|
14 | DO i=1,klon |
---|
15 | IF ( abs(lon_deg-longitude_deg(i)) < 0.02 .AND. abs(lat_deg-latitude_deg(i)) < 0.02 ) THEN |
---|
16 | grid_index=i |
---|
17 | exit |
---|
18 | endif |
---|
19 | END DO |
---|
20 | RETURN |
---|
21 | END |
---|
Note: See
TracBrowser
for help on using the repository browser.