Ignore:
Timestamp:
Jan 22, 2019, 4:21:59 PM (5 years ago)
Author:
Laurent Fairhead
Message:

"Historic" :-) commit merging the physics branch used for DYNAMICO with the LMDZ trunk.
The same physics branch can now be used seamlessly with the traditional lon-lat LMDZ
dynamical core and DYNAMICO.
Testing consisted in running a lon-lat LMDZ bucket simulation with the NPv6.1 physics package
with the original trunk sources and the merged sources. Tests were succesful in the sense that
numeric continuity was preserved in the restart files from both simulation. Further tests
included running both versions of the physics codes for one year in a LMDZOR setting in which
the restart files also came out identical.

Caution:

  • as the physics package now manages unstructured grids, grid information needs to be transmitted

to the surface scheme ORCHIDEE. This means that the interface defined in surf_land_orchidee_mod.F90
is only compatible with ORCHIDEE version orchidee2.1 and later versions. If previous versions of
ORCHIDEE need to be used, the CPP key ORCHIDEE_NOUNSTRUCT needs to be set at compilation time.
This is done automatically if makelmdz/makelmdz_fcm are called with the veget orchidee2.0 switch

  • due to a limitation in XIOS, the time at which limit conditions will be read in by DYNAMICO will be

delayed by one physic timestep with respect to the time it is read in by the lon-lat model. This is caused
by the line

IF (MOD(itime-1, lmt_pas) == 0 .OR. (jour_lu /= jour .AND. grid_type /= unstructured)) THEN ! time to read

in limit_read_mod.F90

Work still needed on COSP integration and XML files for DYNAMICO

EM, YM, LF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/phys_state_var_mod.F90

    r3208 r3435  
    1818      INTEGER, SAVE :: radpas  ! radiation is called every "radpas" step
    1919      INTEGER, SAVE :: cvpas   ! convection is called every "cvpas" step
    20       INTEGER, SAVE :: cvpas_0 ! reference value for cvpas
     20      INTEGER, SAVE :: cvpas_0 = 1 ! reference value for cvpas
    2121      INTEGER, SAVE :: wkpas   ! wake scheme is called every "wkpas" step
    2222      REAL, PARAMETER :: missing_val_nf90=nf90_fill_real
     
    2525!$OMP THREADPRIVATE(cvpas_0)
    2626!$OMP THREADPRIVATE(wkpas)
    27       REAL, SAVE :: dtime, solaire_etat0
    28 !$OMP THREADPRIVATE(dtime, solaire_etat0)
     27      REAL, SAVE :: phys_tstep=0, solaire_etat0
     28!$OMP THREADPRIVATE(phys_tstep, solaire_etat0)
    2929
    3030      REAL, ALLOCATABLE, SAVE :: pctsrf(:,:)
     
    286286      REAL,ALLOCATABLE,SAVE :: total_rain(:), nday_rain(:) 
    287287!$OMP THREADPRIVATE(total_rain,nday_rain)
     288      REAL,ALLOCATABLE,SAVE :: paire_ter(:)
     289!$OMP THREADPRIVATE(paire_ter)
    288290! albsol1: albedo du sol total pour SW visible
    289291! albsol2: albedo du sol total pour SW proche IR
     
    417419      ! tendencies on wind due to gravity waves
    418420
     421      LOGICAL,SAVE :: is_initialized=.FALSE.
     422!$OMP THREADPRIVATE(is_initialized)   
     423
    419424CONTAINS
    420425
     
    437442include "clesphys.h"
    438443
     444      IF (is_initialized) RETURN
     445      is_initialized=.TRUE.
    439446      ALLOCATE(pctsrf(klon,nbsrf))
    440447      ALLOCATE(ftsol(klon,nbsrf))
     
    452459      ALLOCATE(snow_fall(klon))
    453460      ALLOCATE(solsw(klon), sollw(klon))
     461      sollw=0.0
    454462      ALLOCATE(radsol(klon))
    455463      ALLOCATE(swradcorr(klon))
     
    541549      ALLOCATE(wake_deltat(klon,klev), wake_deltaq(klon,klev))
    542550      ALLOCATE(wake_s(klon), awake_dens(klon), wake_dens(klon))
     551      awake_dens = 0.
    543552      ALLOCATE(wake_Cstar(klon))
    544553      ALLOCATE(wake_pe(klon), wake_fip(klon))
     
    549558      ALLOCATE(pfrac_1nucl(klon,klev))
    550559      ALLOCATE(total_rain(klon), nday_rain(klon))
     560      ALLOCATE(paire_ter(klon))
    551561      ALLOCATE(albsol1(klon), albsol2(klon))
    552562!albedo SB >>>
     
    566576      ALLOCATE(topsw(klon), toplw(klon))
    567577      ALLOCATE(sollwdown(klon), sollwdownclr(klon))
     578      sollwdown = 0.
    568579      ALLOCATE(toplwdown(klon), toplwdownclr(klon))
    569580      ALLOCATE(topsw0(klon),toplw0(klon),solsw0(klon),sollw0(klon))
     581      sollw0 = 0.
    570582      ALLOCATE(albpla(klon))
    571583!IM ajout variables CFMIP2/CMIP5
     
    604616      ALLOCATE(ale_bl_trig(klon))
    605617!!! fin nrlmd le 10/04/2012
    606       if (ok_gwd_rando) allocate(du_gwd_rando(klon, klev))
    607       if (.not. ok_hines .and. ok_gwd_rando) allocate(du_gwd_front(klon, klev))
    608 
     618      IF (ok_gwd_rando) THEN
     619        allocate(du_gwd_rando(klon, klev))
     620        du_gwd_rando(:,:)=0.
     621      ENDIF
     622      IF (.not. ok_hines .and. ok_gwd_rando) THEN
     623        ALLOCATE(du_gwd_front(klon, klev))
     624        du_gwd_front(:,:) = 0 !ym missing init   
     625      ENDIF
    609626END SUBROUTINE phys_state_var_init
    610627
     
    691708      deallocate(pfrac_1nucl)
    692709      deallocate(total_rain, nday_rain)
     710      deallocate(paire_ter)
    693711      deallocate(albsol1, albsol2)
    694712!albedo SB >>>
     
    738756      deallocate(ale_bl_trig)
    739757!!! fin nrlmd le 10/04/2012
    740 
     758      is_initialized=.FALSE.
    741759END SUBROUTINE phys_state_var_end
    742760
Note: See TracChangeset for help on using the changeset viewer.