- Timestamp:
- Dec 22, 2020, 11:51:50 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3d_common/dynetat0.F90
r2337 r2439 329 329 CHARACTER(LEN=*), INTENT(IN) :: var 330 330 REAL, INTENT(OUT) :: v(:,:) 331 INTEGER :: j 331 332 CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var) 332 333 CALL err(NF90_GET_VAR(fID,vID,v),"get",var) 334 ! Check that if on iip1 points along the longitude 335 ! values indeed perfectly match at end points 336 if (size(v,1)==iip1) then 337 do j=1,size(v,2) 338 if (v(1,j).ne.v(iip1,j)) then 339 ! tell the world 340 write(*,*) "Warning: longitudinal modulo discrepency for ",trim(var) 341 write(*,*) "j=",j," v(1,j)=",v(1,j)," v(iip1,j)=",v(iip1,j) 342 ! copy over value from v(1,j) to v(iip1,j) 343 write(*,*) "setting v(iip1,j)=v(1,j)" 344 v(iip1,j)=v(1,j) 345 endif ! of if (v(1,j).ne.v(iip1,j)) 346 enddo ! of do j=1,size(v,2) 347 endif ! of if (size(v,1)==iip1) 333 348 END SUBROUTINE get_var2 334 349 … … 337 352 REAL, INTENT(OUT) :: v(:,:) 338 353 INTEGER, INTENT(IN) :: indextime 354 INTEGER :: j 339 355 corner(1)=1 340 356 corner(2)=1 … … 345 361 CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var) 346 362 CALL err(NF90_GET_VAR(fID,vID,v,corner,edges),"get",var) 363 ! Check that if on iip1 points along the longitude 364 ! values indeed perfectly match at end points 365 if (size(v,1)==iip1) then 366 do j=1,size(v,2) 367 if (v(1,j).ne.v(iip1,j)) then 368 ! tell the world 369 write(*,*) "Warning: longitudinal modulo discrepency for ",trim(var) 370 write(*,*) "j=",j," v(1,j)=",v(1,j)," v(iip1,j)=",v(iip1,j) 371 ! copy over value from v(1,j) to v(iip1,j) 372 write(*,*) "setting v(iip1,j)=v(1,j)" 373 v(iip1,j)=v(1,j) 374 endif ! of if (v(1,j).ne.v(iip1,j)) 375 enddo ! of do j=1,size(v,2) 376 endif ! of if (size(v,1)==iip1) 347 377 END SUBROUTINE get_var2_t 348 378 … … 359 389 REAL, INTENT(OUT) :: v(:,:,:) 360 390 INTEGER, INTENT(IN) :: indextime 391 INTEGER :: j,k 361 392 corner(1)=1 362 393 corner(2)=1 … … 369 400 CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var) 370 401 CALL err(NF90_GET_VAR(fID,vID,v,corner,edges),"get",var) 402 ! Check that values indeed perfectly match at end points along longitude 403 do k=1,llm 404 do j=1,jjp1 405 if (v(1,j,k).ne.v(iip1,j,k)) then 406 ! tell the world 407 write(*,*) "Warning: longitudinal modulo discrepency for ",trim(var) 408 write(*,*) "j=",j," k=",k 409 write(*,*) " v(1,j,k)=",v(1,j,k)," v(iip1,j,k)=",v(iip1,j,k) 410 ! copy over value from v(1,j,k) to v(iip1,j,k) 411 write(*,*) "setting v(iip1,j,k)=v(1,j,k)" 412 v(iip1,j,k)=v(1,j,k) 413 endif ! of if (v(1,j,k).ne.v(iip1,j,k)) 414 enddo ! of do j=1,jjp1 415 enddo ! of do k=1,llm 371 416 END SUBROUTINE get_var3u_t 372 417 … … 375 420 REAL, INTENT(OUT) :: v(:,:,:) 376 421 INTEGER, INTENT(IN) :: indextime 422 INTEGER :: j,k 377 423 corner(1)=1 378 424 corner(2)=1 … … 385 431 CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var) 386 432 CALL err(NF90_GET_VAR(fID,vID,v,corner,edges),"get",var) 433 ! Check that values indeed perfectly match at end points along longitude 434 do k=1,llm 435 do j=1,jjm 436 if (v(1,j,k).ne.v(iip1,j,k)) then 437 ! tell the world 438 write(*,*) "Warning: longitudinal modulo discrepency for ",trim(var) 439 write(*,*) "j=",j," k=",k 440 write(*,*) " v(1,j,k)=",v(1,j,k)," v(iip1,j,k)=",v(iip1,j,k) 441 ! copy over value from v(1,j,k) to v(iip1,j,k) 442 write(*,*) "setting v(iip1,j,k)=v(1,j,k)" 443 v(iip1,j,k)=v(1,j,k) 444 endif ! of if (v(1,j,k).ne.v(iip1,j,k)) 445 enddo ! of do j=1,jjm 446 enddo ! of do k=1,llm 387 447 END SUBROUTINE get_var3v_t 388 448
Note: See TracChangeset
for help on using the changeset viewer.