Changeset 3991 for trunk/LMDZ.COMMON/libf/evolution/grid_conversion.F90
- Timestamp:
- Dec 16, 2025, 4:39:24 PM (4 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/grid_conversion.F90
r3980 r3991 1 1 MODULE grid_conversion 2 !----------------------------------------------------------------------- 3 ! NAME 4 ! grid_conversion 5 ! 6 ! DESCRIPTION 7 ! Provides tools to convert data between lon x lat grid format 8 ! and vector format. 9 ! 10 ! AUTHORS & DATE 11 ! JB Clement, 12/2025 12 ! 13 ! NOTES 14 ! Handles pole duplication differences between the grid format 15 ! and vector format. 16 !----------------------------------------------------------------------- 2 17 18 ! DECLARATION 19 ! ----------- 3 20 implicit none 4 21 5 !=======================================================================6 22 contains 23 !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 7 25 !======================================================================= 8 26 SUBROUTINE lonlat2vect(nlon,nlat,ngrid,v_ll,v_vect) 9 ! To convert data from lon x lat grid (where values at the poles are duplicated) into a vector 10 ! /!\ The longitudes -180 and +180 are not duplicated like in the PCM dynamics 27 !----------------------------------------------------------------------- 28 ! NAME 29 ! lonlat2vect 30 ! 31 ! DESCRIPTION 32 ! Convert data from lon x lat grid (where values at the poles are 33 ! duplicated) into a vector. 34 ! 35 ! AUTHORS & DATE 36 ! JB Clement, 12/2025 37 ! 38 ! NOTES 39 ! The longitudes -180 and +180 are not duplicated like in the PCM 40 ! dynamics. 41 ! 42 !----------------------------------------------------------------------- 11 43 44 ! DECLARATION 45 ! ----------- 12 46 implicit none 13 47 14 48 ! Arguments 15 49 !---------- 16 integer, intent(in) :: nlon, nlat, ngrid17 real, dimension(nlon,nlat), intent(in) :: v_ll18 real, dimension(ngrid), intent(out) :: v_vect50 integer, intent(in) :: nlon, nlat, ngrid 51 real, dimension(nlon,nlat), intent(in) :: v_ll 52 real, dimension(ngrid), intent(out) :: v_vect 19 53 20 54 ! Local variables … … 48 82 49 83 END SUBROUTINE lonlat2vect 84 !======================================================================= 50 85 51 86 !======================================================================= 52 87 SUBROUTINE vect2lonlat(nlon,nlat,ngrid,v_vect,v_ll) 53 ! To convert data from a vector into lon x lat grid (where values at the poles are duplicated) 54 ! /!\ The longitudes -180 and +180 are not duplicated like in the PCM dynamics 88 !----------------------------------------------------------------------- 89 ! NAME 90 ! vect2lonlat 91 ! 92 ! DESCRIPTION 93 ! Convert data from a vector into lon x lat grid (where values 94 ! at the poles are duplicated). 95 ! 96 ! AUTHORS & DATE 97 ! JB Clement, 12/2025 98 ! 99 ! NOTES 100 ! The longitudes -180 and +180 are not duplicated like in the PCM 101 ! dynamics. 102 !----------------------------------------------------------------------- 55 103 104 ! DECLARATION 105 ! ----------- 56 106 implicit none 57 107 58 108 ! Arguments 59 109 !---------- 60 integer, intent(in):: nlon, nlat, ngrid61 real, dimension(ngrid), intent(in):: v_vect110 integer, intent(in) :: nlon, nlat, ngrid 111 real, dimension(ngrid), intent(in) :: v_vect 62 112 real, dimension(nlon,nlat), intent(out) :: v_ll 63 113 … … 92 142 93 143 END SUBROUTINE vect2lonlat 144 !======================================================================= 94 145 95 146 END MODULE grid_conversion
Note: See TracChangeset
for help on using the changeset viewer.
