Last change
on this file since 5103 was
5103,
checked in by abarral, 3 months ago
|
Handle CPP_INLANDSIS in lmdz_cppkeys_wrapper.F90
Remove obsolete key wrgrads_thermcell, _ADV_HALO, _ADV_HALLO, isminmax
Remove redundant uses of CPPKEY_INCA (thanks acozic)
Remove obsolete misc/write_field.F90
Remove unused ioipsl_* wrappers
Remove calls to WriteField_u with wrong signature
Convert .F -> .[fF]90
(lint) uppercase fortran operators
[note: 1d and iso still broken - working on it]
|
File size:
717 bytes
|
Rev | Line | |
---|
[5074] | 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 | !-------------------------------------------------------------------------------- |
---|
[5101] | 7 | USE dimphy, ONLY: klon |
---|
[5074] | 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 |
---|
[5103] | 14 | DO i=1,klon |
---|
[5074] | 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 |
---|
[5103] | 19 | END DO |
---|
[5074] | 20 | return |
---|
| 21 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.