Ignore:
Timestamp:
Apr 16, 2010, 11:50:10 AM (14 years ago)
Author:
Ehouarn Millour
Message:

Added possibility to run in "Shallow Water" mode. SW mode is automatically set if the number of atmospheric layers is 1.
To use SW mode, the model should be compiled without physics (makelmdz_fcm -p nophys) and/or without calls to the physics (i.e. set iflag_phys=0 in gcm.def).

-Updated some definitions and comments in run.def & gcm.def

-Fixed misplaced #ifdef CPP_EARTH in calfis.F + some write(lunout,*)

-Specific initialisation of fields for SW are done in sw_case_williamson91_6 (called by iniacademic, when read_start=.false.)

  • Checked (on Vargas & Brodie) that these changes don't alter usual bench GCM outputs.

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/exner_hyb_p.F

    r985 r1363  
     1!
     2! $Id $
     3!
    14      SUBROUTINE  exner_hyb_p ( ngrid, ps, p,alpha,beta, pks, pk, pkf )
    25c
     
    5154      INTEGER ije,ijb,jje,jjb
    5255c
    53 c$OMP BARRIER           
     56c$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)
     69        endif
     70       
     71        ! Compute pks(:),pk(:),pkf(:)
     72        ijb=ij_begin
     73        ije=ij_end
     74!$OMP DO SCHEDULE(STATIC)
     75        DO ij=ijb, ije
     76          pks(ij)=(cpp/preff)*ps(ij)
     77          pk(ij,1) = .5*pks(ij)
     78          pkf(ij,1)=pk(ij,1)
     79        ENDDO
     80!$OMP ENDDO
     81
     82!$OMP MASTER
     83      if (pole_nord) then
     84        DO  ij   = 1, iim
     85          ppn(ij) = aire(   ij   ) * pks(  ij     )
     86        ENDDO
     87        xpn      = SSUM(iim,ppn,1) /apoln
     88 
     89        DO ij   = 1, iip1
     90          pks(   ij     )  =  xpn
     91          pk(ij,1) = .5*pks(ij)
     92          pkf(ij,1)=pk(ij,1)
     93        ENDDO
     94      endif
     95     
     96      if (pole_sud) then
     97        DO  ij   = 1, iim
     98          pps(ij) = aire(ij+ip1jm) * pks(ij+ip1jm )
     99        ENDDO
     100        xps      = SSUM(iim,pps,1) /apols
     101 
     102        DO ij   = 1, iip1
     103          pks( ij+ip1jm )  =  xps
     104          pk(ij+ip1jm,1)=.5*pks(ij+ip1jm)
     105          pkf(ij+ip1jm,1)=pk(ij+ip1jm,1)
     106        ENDDO
     107      endif
     108!$OMP END MASTER
     109
     110        jjb=jj_begin
     111        jje=jj_end
     112        CALL filtreg_p ( pkf,jjb,jje, jmp1, llm, 2, 1, .TRUE., 1 )
     113
     114        ! our work is done, exit routine
     115        return
     116      endif ! of if (llm.eq.1)
     117
     118
    54119      unpl2k    = 1.+ 2.* kappa
    55120c
Note: See TracChangeset for help on using the changeset viewer.