Ignore:
Timestamp:
May 23, 2011, 1:37:09 PM (14 years ago)
Author:
Ehouarn Millour
Message:

Implementation of a different vertical discretization (from/for planets, but
can in principle also be used for Earth).
Choice of vertical discretization is set by flag 'disvert_type';
'disvert_type=1' is Earth standard (default; ie set to 1 if
planet_type=="earth") case.
With 'disvert_type=2', approximate altitude of layers and reference atmospheric
scale height must be given using an input file ("z2sig.def", first line
should give scale height, in km, following lines must specify the altitude,
in km above surface, of mid-layers, one per line; see disvert_noterre.F).

Checked that these changes do not impact on 'bench' results, on Vargas.

EM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3dpar/exner_hyb_p.F

    r1403 r1520  
    5353      EXTERNAL SSUM
    5454      INTEGER ije,ijb,jje,jjb
    55 c
    56 c$OMP BARRIER
    57 
    58       if (llm.eq.1) then
    59         ! Specific behaviour for Shallow Water (1 vertical layer) case
    60      
    61         ! Sanity checks
    62         if (kappa.ne.1) then
    63           call abort_gcm("exner_hyb",
    64      &    "kappa!=1 , but running in Shallow Water mode!!",42)
    65         endif
    66         if (cpp.ne.r) then
    67         call abort_gcm("exner_hyb",
    68      &    "cpp!=r , but running in Shallow Water mode!!",42)
     55      logical,save :: firstcall=.true.
     56!$OMP THREADPRIVATE(firstcall)
     57      character(len=*),parameter :: modname="exner_hyb_p"
     58c
     59
     60      ! Sanity check
     61      if (firstcall) then
     62        ! check that vertical discretization is compatible
     63        ! with this routine
     64        if (disvert_type.ne.1) then
     65          call abort_gcm(modname,
     66     &     "this routine should only be called if disvert_type==1",42)
    6967        endif
    7068       
     69        ! sanity checks for Shallow Water case (1 vertical layer)
     70        if (llm.eq.1) then
     71          if (kappa.ne.1) then
     72            call abort_gcm(modname,
     73     &      "kappa!=1 , but running in Shallow Water mode!!",42)
     74          endif
     75          if (cpp.ne.r) then
     76            call abort_gcm(modname,
     77     &      "cpp!=r , but running in Shallow Water mode!!",42)
     78          endif
     79        endif ! of if (llm.eq.1)
     80
     81        firstcall=.false.
     82      endif ! of if (firstcall)
     83
     84c$OMP BARRIER
     85
     86! Specific behaviour for Shallow Water (1 vertical layer) case
     87      if (llm.eq.1) then
     88     
    7189        ! Compute pks(:),pk(:),pkf(:)
    7290        ijb=ij_begin
     
    116134      endif ! of if (llm.eq.1)
    117135
     136!!!! General case:
    118137
    119138      unpl2k    = 1.+ 2.* kappa
Note: See TracChangeset for help on using the changeset viewer.