Changeset 1345 for trunk/LMDZ.COMMON


Ignore:
Timestamp:
Sep 8, 2014, 10:09:19 AM (10 years ago)
Author:
aslmd
Message:

LMDZ.COMMON. introduced an attenuation profile for nudging towards wind. new parameter: phalf: pressure at which attenuation factor is divided by two.

Location:
trunk/LMDZ.COMMON/libf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/dyn3d_common/comuforc_h.F90

    r1300 r1345  
    22       IMPLICIT NONE
    33       REAL,ALLOCATABLE,DIMENSION(:,:) :: uforc
     4       REAL,ALLOCATABLE,DIMENSION(:) :: attenua
    45       REAL :: facwind
     6       REAL :: phalf
    57       end module comuforc_h
    68
  • trunk/LMDZ.COMMON/libf/dyn3d_common/relaxetat0.F

    r1300 r1345  
    2222! VARIABLES
    2323      REAL ucov(iip1, jjp1,llm)
     24      REAL press(llm)
    2425      INTEGER ierr, nid, nvarid
    2526      INTEGER i,j,l,ij
     
    6364      CALL getin('facwind',facwind)
    6465
     66      !! CALCULATE ATTENUATION FACTOR WITH ALTITUDE
     67      ierr = NF_INQ_VARID (nid, "presnivs", nvarid)
     68      IF (ierr .NE. NF_NOERR) THEN
     69         write(lunout,*)"dynetat0: Le champ <presnivs> est absent"
     70         CALL abort
     71      ENDIF
     72      ierr = nf90_get_var(nid, nvarid, press)
     73      IF (ierr .NE. NF_NOERR) THEN
     74         write(lunout,*)"dynetat0: Lecture echouee pour <press>"
     75         CALL abort
     76      ENDIF
     77      phalf = 1.e5 !! at this pressure, attenua is 0.5
     78      CALL getin('phalf',phalf)
     79      !! attenua goes from 1 at lowermost levels to 0 at uppermost levels
     80      IF (.NOT.ALLOCATED(attenua)) ALLOCATE(attenua(llm))
     81      attenua = 0.5*(1.+tanh(log10(press/phalf)))
     82
    6583      !! END
    6684      ierr = NF_CLOSE(nid)
  • trunk/LMDZ.COMMON/libf/dyn3dpar/leapfrog_p.F

    r1302 r1345  
    678678
    679679#ifdef NODYN
    680       WRITE(lunout,*)"NO DYN !!!!!"
     680      !WRITE(lunout,*)"NO DYN !!!!!"
    681681      dv(:,:) = 0.D+0
    682682      du(:,:) = 0.D+0
     
    684684      dq(:,:,:) = 0.D+0
    685685      dp(:) = 0.D+0
     686      if (planet_type.eq."generic") then
     687      if (ok_guide) then
     688       DO l=1,llm
     689       ucov(:,l) = ucov(:,l) + dt*attenua(l)*
     690     &   ((uforc(:,l)-ucov(:,l))/facwind)
     691       ENDDO
     692      endif
     693      endif
    686694#else
    687695! ADAPTATION GCM POUR CP(T)
     
    719727      if (planet_type.eq."generic") then
    720728       if (ok_guide) then
    721          du(:,:) = du(:,:) + ((uforc(:,:)-ucov(:,:)) / facwind)
     729         DO l=1,llm
     730          du(:,l)=du(:,l)+attenua(l)*((uforc(:,l)-ucov(:,l))/facwind)
     731         ENDDO
    722732       endif
    723733      endif
Note: See TracChangeset for help on using the changeset viewer.