source: LMDZ5/trunk/libf/phydev/phys_state_var_mod.F90 @ 5327

Last change on this file since 5327 was 2395, checked in by Ehouarn Millour, 9 years ago

Bug fix for aquaplanets: "rlat" and "rlon" were uninitialized when written to startphy.nc; phyredem should write "longitude_deg" and "latitude_deg" to the file. Overall "rlat" and "rlon" should not be used and "latitude_deg" and "longitude_deg" should be used instead in the physics. To be further cleaned up.
Some cleanup on that mater also made in phydev.
Note that this change will make bench test results different for longitudes and latitudes, because of roundoff effects.
EM

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 894 bytes
RevLine 
[1671]1!
2! $Id:  $
3!
4MODULE phys_state_var_mod
5!======================================================================
6! Variables saved in startphy.nc
7!======================================================================
8
[2395]9!USE dimphy, only : klon
[1671]10 
11
[2395]12!REAL, ALLOCATABLE, SAVE :: rlat(:), rlon(:)
13!!$OMP THREADPRIVATE(rlat,rlon)
[1671]14
15CONTAINS
16
17!======================================================================
18  SUBROUTINE phys_state_var_init()
[2395]19!  use dimphy, only : klon
[1671]20
[2395]21!  if (.not.allocated(rlat)) then
22!    ALLOCATE(rlat(klon),rlon(klon))
23!  else
24!    write(*,*) "phys_state_var_init: warning, rlat already allocated"
25!  endif
[1686]26 
[1671]27  END SUBROUTINE phys_state_var_init
28
29!======================================================================
30  SUBROUTINE phys_state_var_end
[2395]31!  use dimphy, only : klon
[1671]32
[2395]33!  deallocate(rlat,rlon)
[1671]34
35  END SUBROUTINE phys_state_var_end
36
37END MODULE phys_state_var_mod
Note: See TracBrowser for help on using the repository browser.