Ignore:
Timestamp:
Nov 18, 2015, 1:25:35 PM (9 years ago)
Author:
Ehouarn Millour
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phydev/phys_state_var_mod.F90

    r1907 r2395  
    77!======================================================================
    88
    9 USE dimphy, only : klon
     9!USE dimphy, only : klon
    1010 
    1111
    12 REAL, ALLOCATABLE, SAVE :: rlat(:), rlon(:)
    13 !$OMP THREADPRIVATE(rlat,rlon)
     12!REAL, ALLOCATABLE, SAVE :: rlat(:), rlon(:)
     13!!$OMP THREADPRIVATE(rlat,rlon)
    1414
    1515CONTAINS
     
    1717!======================================================================
    1818  SUBROUTINE phys_state_var_init()
    19   use dimphy, only : klon
     19!  use dimphy, only : klon
    2020
    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
     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
    2626 
    2727  END SUBROUTINE phys_state_var_init
     
    2929!======================================================================
    3030  SUBROUTINE phys_state_var_end
    31   use dimphy, only : klon
     31!  use dimphy, only : klon
    3232
    33   deallocate(rlat,rlon)
     33!  deallocate(rlat,rlon)
    3434
    3535  END SUBROUTINE phys_state_var_end
Note: See TracChangeset for help on using the changeset viewer.