Changeset 4136 for trunk/LMDZ.COMMON/libf/evolution/geometry.F90
- Timestamp:
- Mar 17, 2026, 11:12:37 AM (12 days ago)
- File:
-
- 1 edited
-
trunk/LMDZ.COMMON/libf/evolution/geometry.F90 (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/geometry.F90
r4134 r4136 153 153 154 154 !======================================================================= 155 SUBROUTINE lonlat2vect(nlon ,nlat,ngrid,v_ll,v_vect)155 SUBROUTINE lonlat2vect(nlon_in,nlat_in,ngrid_in,v_ll,v_vect) 156 156 !----------------------------------------------------------------------- 157 157 ! NAME … … 180 180 ! ARGUMENTS 181 181 !---------- 182 integer(di), intent(in) :: nlon, nlat, ngrid183 real(dp), dimension(nlon ,nlat), intent(in) :: v_ll184 real(dp), dimension(ngrid ),intent(out) :: v_vect182 integer(di), intent(in) :: nlon_in, nlat_in, ngrid_in 183 real(dp), dimension(nlon_in,nlat_in), intent(in) :: v_ll 184 real(dp), dimension(ngrid_in), intent(out) :: v_vect 185 185 186 186 ! LOCAL VARIABLES … … 190 190 ! CODE 191 191 !----- 192 if (ngrid == 1) then ! 1D case192 if (ngrid_in == 1) then ! 1D case 193 193 v_vect(1) = v_ll(1,1) 194 194 return 195 195 else ! 3D 196 196 ! Check 197 if (ngrid /= nlon*(nlat- 2) + 2) call stop_clean(__FILE__,__LINE__,'problem of dimensions!',1)197 if (ngrid_in /= nlon_in*(nlat_in - 2) + 2) call stop_clean(__FILE__,__LINE__,'problem of dimensions!',1) 198 198 199 199 ! Initialization … … 202 202 ! Treatment of the poles 203 203 v_vect(1) = v_ll(1,1) 204 v_vect(ngrid ) = v_ll(1,nlat)204 v_vect(ngrid_in) = v_ll(1,nlat_in) 205 205 206 206 ! Treatment of regular points 207 do j = 2,nlat - 1208 do i = 1,nlon 209 v_vect(1 + i + (j - 2)*nlon ) = v_ll(i,j)207 do j = 2,nlat_in - 1 208 do i = 1,nlon_in 209 v_vect(1 + i + (j - 2)*nlon_in) = v_ll(i,j) 210 210 end do 211 211 end do … … 216 216 217 217 !======================================================================= 218 SUBROUTINE vect2lonlat(nlon ,nlat,ngrid,v_vect,v_ll)218 SUBROUTINE vect2lonlat(nlon_in,nlat_in,ngrid_in,v_vect,v_ll) 219 219 !----------------------------------------------------------------------- 220 220 ! NAME … … 243 243 ! ARGUMENTS 244 244 !---------- 245 integer(di), intent(in) :: nlon, nlat, ngrid246 real(dp), dimension(ngrid ),intent(in) :: v_vect247 real(dp), dimension(nlon ,nlat), intent(out) :: v_ll245 integer(di), intent(in) :: nlon_in, nlat_in, ngrid_in 246 real(dp), dimension(ngrid_in), intent(in) :: v_vect 247 real(dp), dimension(nlon_in,nlat_in), intent(out) :: v_ll 248 248 249 249 ! LOCAL VARIABLES … … 253 253 ! CODE 254 254 !----- 255 if (ngrid == 1) then ! 1D case255 if (ngrid_in == 1) then ! 1D case 256 256 v_ll(1,1) = v_vect(1) 257 257 return 258 258 else ! 3D 259 259 ! Check 260 if (ngrid /= nlon*(nlat- 2) + 2) call stop_clean(__FILE__,__LINE__,'problem of dimensions!',1)260 if (ngrid_in /= nlon_in*(nlat_in - 2) + 2) call stop_clean(__FILE__,__LINE__,'problem of dimensions!',1) 261 261 262 262 ! Initialization … … 265 265 ! Treatment of the poles 266 266 v_ll(:,1) = v_vect(1) 267 v_ll(:,nlat ) = v_vect(ngrid)267 v_ll(:,nlat_in) = v_vect(ngrid_in) 268 268 269 269 ! Treatment of regular points 270 do j = 2,nlat - 1271 do i = 1,nlon 272 v_ll(i,j) = v_vect(1 + i + (j - 2)*nlon )270 do j = 2,nlat_in - 1 271 do i = 1,nlon_in 272 v_ll(i,j) = v_vect(1 + i + (j - 2)*nlon_in) 273 273 end do 274 274 end do … … 279 279 280 280 !======================================================================= 281 SUBROUTINE dyngrd2vect(ni,nj,ngrid ,v_dyn,v_vect)281 SUBROUTINE dyngrd2vect(ni,nj,ngrid_in,v_dyn,v_vect) 282 282 !----------------------------------------------------------------------- 283 283 ! NAME … … 306 306 ! ARGUMENTS 307 307 !---------- 308 integer(di), intent(in) :: ni, nj, ngrid309 real(dp), dimension(ni,nj), intent(in) :: v_dyn310 real(dp), dimension(ngrid ), intent(out) :: v_vect308 integer(di), intent(in) :: ni, nj, ngrid_in 309 real(dp), dimension(ni,nj), intent(in) :: v_dyn 310 real(dp), dimension(ngrid_in), intent(out) :: v_vect 311 311 312 312 ! LOCAL VARIABLES … … 316 316 ! CODE 317 317 !----- 318 if (ngrid == 1) then ! 1D case318 if (ngrid_in == 1) then ! 1D case 319 319 v_vect(1) = v_dyn(1,1) 320 320 return 321 321 else ! 3D 322 322 ! Check 323 if (ngrid /= (ni - 1)*(nj - 2) + 2) call stop_clean(__FILE__,__LINE__,'problem of dimensions!',1)323 if (ngrid_in /= (ni - 1)*(nj - 2) + 2) call stop_clean(__FILE__,__LINE__,'problem of dimensions!',1) 324 324 325 325 ! Initialization … … 328 328 ! Treatment of the poles 329 329 v_vect(1) = v_dyn(1,1) 330 v_vect(ngrid ) = v_dyn(1,nj)330 v_vect(ngrid_in) = v_dyn(1,nj) 331 331 332 332 ! Treatment of regular points … … 342 342 343 343 !======================================================================= 344 SUBROUTINE vect2dyngrd(ni,nj,ngrid ,v_vect,v_dyn)344 SUBROUTINE vect2dyngrd(ni,nj,ngrid_in,v_vect,v_dyn) 345 345 !----------------------------------------------------------------------- 346 346 ! NAME … … 369 369 ! ARGUMENTS 370 370 !---------- 371 integer(di), intent(in) :: ni, nj, ngrid372 real(dp), dimension(ngrid ), intent(in) :: v_vect373 real(dp), dimension(ni,nj), intent(out) :: v_dyn371 integer(di), intent(in) :: ni, nj, ngrid_in 372 real(dp), dimension(ngrid_in), intent(in) :: v_vect 373 real(dp), dimension(ni,nj), intent(out) :: v_dyn 374 374 375 375 ! LOCAL VARIABLES … … 379 379 ! CODE 380 380 !----- 381 if (ngrid == 1) then ! 1D case381 if (ngrid_in == 1) then ! 1D case 382 382 v_dyn(1,1) = v_vect(1) 383 383 return 384 384 else ! 3D 385 385 ! Check 386 if (ngrid /= (ni - 1)*(nj - 2) + 2) call stop_clean(__FILE__,__LINE__,'problem of dimensions!',1)386 if (ngrid_in /= (ni - 1)*(nj - 2) + 2) call stop_clean(__FILE__,__LINE__,'problem of dimensions!',1) 387 387 388 388 ! Initialization … … 391 391 ! Treatment of the poles 392 392 v_dyn(:,1) = v_vect(1) 393 v_dyn(:,nj) = v_vect(ngrid )393 v_dyn(:,nj) = v_vect(ngrid_in) 394 394 395 395 ! Treatment of regular points
Note: See TracChangeset
for help on using the changeset viewer.
