Last change
on this file since 5444 was
5390,
checked in by yann meurdesoif, 3 weeks ago
|
- Remove UTF8 character that inihibit fortran parsing with GPU morphosis
- Add missing END SUBROUTINE instead of simple END, that inhibit correct parsing with regulat expression parser (quick and dirty parsing)
YM
|
File size:
737 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 geometry_mod, 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 | enddo |
---|
20 | return |
---|
21 | end function grid_index |
---|
Note: See
TracBrowser
for help on using the repository browser.