Ignore:
Timestamp:
Jun 5, 2013, 2:41:09 PM (12 years ago)
Author:
emillour
Message:

Common dynamics:
Updates in the dynamics (seq and ) to keep up with updates
in LMDZ5 (up to LMDZ5 trunk, rev 1760):

  • General stuff (essentially to keep up with Earth model):
  • Updated makelmdz_fcm and makelmdz (more control on dimension.h, added option -mem, although it is not usefull for now)
  • Updated build_gcm with more control over fcm
  • Updated create_make_gcm (enable looking for code in subdirectories)
  • bibio:
  • updates (just renaming the files actually...) new_unit.F90 => new_unit_m.F90, pchsp_95.F90 => pchsp_95_m.F90 and pchfe_95.F90 => pchfe_95_m.F90
  • filtrez:
  • mod_fft.F90: use more baseline CPP directives for preprocessor compatibility
  • mod_filtre_fft_loc.F90: added this new file
  • filtreg_mod.f90: added calls to init_..._loc
  • filtreg.F: fixed calls to DGEMM into SGEMM (preprocessing does the switch)
  • dyn3d:
  • removed obsolete files: etat0_netcdf.F90 limit_netcdf.F90

pres2lev.F90

  • added new file : pres2lev_mod.F90 (module containing "old" pres2lev)
  • gcm.F: changed args to call to inidissip (added arg "vert_prof_dissip")
  • inidissip.F90: added arg "vert_prof_dissip" and the "earth model" discterizations (flagged with "planet_type=="earth")
  • comdissnew.h: added 'vert_prof_dissip' to the common block
  • guide_mod.F90: added the "use pres2lev_mod"
  • conf_gcm.F: cosmetics, and evaluation of vert_prof_dissip, (and also of dissip_* factors, for Earth model)
  • comconst.h : added dissip_factz,dissip_zref variables (for Earth mode dissip)
  • dyn3dpar:
  • removed obsolete files: etat0_netcdf.F90 limit_netcdf.F90

pres2lev.F90 mod_const_para.F90

  • added new files: pres2lev_mod.F90 (module containing "old" pres2lev)

mod_const_mpi

  • abort_gcm : better control of abort in parallel mode
  • gcm.F: changed args to call to inidissip (added arg "vert_prof_dissip")
  • inidissip.F90: added arg "vert_prof_dissip" and the "earth model" discterizations (flagged with "planet_type=="earth")
  • comdissnew.h: added 'vert_prof_dissip' to the common block
  • filtreg_p.F : bug correction (array bounds)
  • guide_p_mod.F90 : added the "use pres2lev_mod"
  • conf_gcm.F : cosmetics (and evaluation of vert_prof_dissip , and

also of dissip_* factors, for Earth model)
plus check if "adjust" is indeed not used in OpenMP

  • comconst.h : add dissip_factz,dissip_zref variables (for Earth mode dissip)

EM

Location:
trunk/LMDZ.COMMON/libf/dyn3d
Files:
1 added
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/dyn3d/comconst.h

    r887 r979  
    2929      REAL g ! (m/s2) gravity
    3030      REAL omeg ! (rad/s) rotation rate of the planet
     31! Dissipation factors, for Earth model:
     32      REAL dissip_factz,dissip_zref !dissip_deltaz
     33! Dissipation factors, for other planets:
    3134      REAL dissip_fac_mid,dissip_fac_up,dissip_deltaz,dissip_hdelta
    3235      REAL dissip_pupstart
  • trunk/LMDZ.COMMON/libf/dyn3d/comdissnew.h

    r1 r979  
    1212
    1313      COMMON/comdissnew/ lstardis,nitergdiv,nitergrot,niterh,tetagdiv,  &
    14      &                   tetagrot,tetatemp,coefdis 
     14     &                   tetagrot,tetatemp,coefdis, vert_prof_dissip
    1515
    1616      LOGICAL lstardis
    1717      INTEGER nitergdiv, nitergrot, niterh
     18
     19! For the Earth model:
     20      integer vert_prof_dissip ! vertical profile of horizontal dissipation
     21!     Allowed values:
     22!     0: rational fraction, function of pressure
     23!     1: tanh of altitude
     24
    1825      REAL     tetagdiv, tetagrot,  tetatemp, coefdis
    1926
  • trunk/LMDZ.COMMON/libf/dyn3d/conf_gcm.F

    r617 r979  
    1414#endif
    1515      USE infotrac, ONLY : type_trac
     16      use assert_m, only: assert
     17
    1618      IMPLICIT NONE
    1719c-----------------------------------------------------------------------
     
    8890      CALL getin('lunout', lunout)
    8991      IF (lunout /= 5 .and. lunout /= 6) THEN
    90         OPEN(lunout,FILE='lmdz.out')
     92        OPEN(UNIT=lunout,FILE='lmdz.out',ACTION='write',
     93     &          STATUS='unknown',FORM='formatted')
    9194      ENDIF
    9295
     
    311314       CALL getin('tetatemp',tetatemp )
    312315
     316! For Earth model only:
     317! Parametres controlant la variation sur la verticale des constantes de
     318! dissipation.
     319! Pour le moment actifs uniquement dans la version a 39 niveaux
     320! avec ok_strato=y
     321
     322       dissip_factz=4.
     323       dissip_deltaz=10.
     324       dissip_zref=30.
     325       CALL getin('dissip_factz',dissip_factz )
     326       CALL getin('dissip_deltaz',dissip_deltaz )
     327       CALL getin('dissip_zref',dissip_zref )
     328
     329! For other planets:
    313330! Parametres controlant la variation sur la verticale des constantes de
    314331! dissipation.
     
    474491        write(lunout,*)'STOP !!!'
    475492        write(lunout,*)'use_filtre_fft n est pas implemente dans dyn3d'
    476         STOP
     493        STOP 1
    477494      ENDIF
    478495     
     
    484501      ok_strato=.TRUE.
    485502      CALL getin('ok_strato',ok_strato)
     503
     504! NB: vert_prof_dissip is Earth-specific; should not impact other models
     505      if (planet_type=="earth") then
     506       vert_prof_dissip = merge(1, 0, ok_strato .and. llm==39)
     507       CALL getin('vert_prof_dissip', vert_prof_dissip)
     508       call assert(vert_prof_dissip == 0 .or. vert_prof_dissip ==  1,
     509     $     "bad value for vert_prof_dissip")
     510      else
     511       vert_prof_dissip=0
     512      endif
    486513
    487514!Config  Key  = ok_gradsfile
     
    834861      write(lunout,*)' day_step = ', day_step
    835862      write(lunout,*)' iperiod = ', iperiod
     863      write(lunout,*)' nsplit_phys = ', nsplit_phys
    836864      write(lunout,*)' iconser = ', iconser
    837865      write(lunout,*)' iecri = ', iecri
  • trunk/LMDZ.COMMON/libf/dyn3d/gcm.F

    r965 r979  
    428428
    429429      CALL inidissip( lstardis, nitergdiv, nitergrot, niterh   ,
    430      *                tetagdiv, tetagrot , tetatemp              )
     430     *                tetagdiv, tetagrot , tetatemp, vert_prof_dissip)
    431431
    432432c-----------------------------------------------------------------------
  • trunk/LMDZ.COMMON/libf/dyn3d/guide_mod.F90

    r776 r979  
    1212  USE Write_Field
    1313  use netcdf, only: nf90_nowrite, nf90_open, nf90_inq_varid, nf90_close
     14  use pres2lev_mod
    1415
    1516  IMPLICIT NONE
  • trunk/LMDZ.COMMON/libf/dyn3d/inidissip.F90

    r776 r979  
    33!
    44SUBROUTINE inidissip ( lstardis,nitergdiv,nitergrot,niterh  , &
    5      tetagdiv,tetagrot,tetatemp             )
     5     tetagdiv,tetagrot,tetatemp, vert_prof_dissip)
    66  !=======================================================================
    77  !   initialisation de la dissipation horizontale
     
    1111  !   -------------
    1212
    13   USE control_mod, only : dissip_period,iperiod
     13  USE control_mod, only : dissip_period,iperiod,planet_type
    1414
    1515  IMPLICIT NONE
     
    2626  REAL,INTENT(in) :: tetagdiv,tetagrot,tetatemp
    2727
     28  integer, INTENT(in):: vert_prof_dissip ! for the Earth model !!
     29  ! Vertical profile of horizontal dissipation
     30  ! Allowed values:
     31  ! 0: rational fraction, function of pressure
     32  ! 1: tanh of altitude
     33
    2834! Local variables:
    2935  REAL fact,zvert(llm),zz
     
    3541  INTEGER l,ij,idum,ii
    3642  REAL tetamin
     43  REAL pseudoz
    3744  REAL Pup
    3845  character (len=80) :: abort_message
     
    166173  !   variation verticale du coefficient de dissipation:
    167174  !   --------------------------------------------------
    168 
     175 
     176  if (planet_type.eq."earth") then
     177
     178   if (vert_prof_dissip == 1) then
     179     do l=1,llm
     180        pseudoz=8.*log(preff/presnivs(l))
     181        zvert(l)=1+ &
     182             (tanh((pseudoz-dissip_zref)/dissip_deltaz)+1.)/2. &
     183             *(dissip_factz-1.)
     184     enddo
     185   else
     186     DO l=1,llm
     187        zvert(l)=1.
     188     ENDDO
     189     fact=2.
     190     DO l = 1, llm
     191        zz      = 1. - preff/presnivs(l)
     192        zvert(l)= fact -( fact-1.)/( 1.+zz*zz )
     193     ENDDO
     194   endif ! of if (vert_prof_dissip == 1)
     195
     196  else ! other planets
     197 
    169198! First step: going from 1 to dissip_fac_mid (in gcm.def)
    170199!============
    171   DO l=1,llm
     200   DO l=1,llm
    172201     zz      = 1. - preff/presnivs(l)
    173202     zvert(l)= dissip_fac_mid -( dissip_fac_mid-1.)/( 1.+zz*zz )
    174   ENDDO
    175 
    176   write(lunout,*) 'Dissipation : '
    177   write(lunout,*) 'Multiplication de la dissipation en altitude :'
    178   write(lunout,*) '  dissip_fac_mid =', dissip_fac_mid
     203   ENDDO
     204
     205   write(lunout,*) 'Dissipation : '
     206   write(lunout,*) 'Multiplication de la dissipation en altitude :'
     207   write(lunout,*) '  dissip_fac_mid =', dissip_fac_mid
    179208
    180209! Second step if ok_strato:  from dissip_fac_mid to dissip_fac_up (in gcm.def)
     
    188217!   atmosphere par celui-ci.
    189218
    190   if (ok_strato) then
     219   if (ok_strato) then
    191220
    192221    Pup = dissip_pupstart*exp(-0.5*dissip_deltaz/dissip_hdelta)
     
    201230                   dissip_pupstart,'Pa', dissip_deltaz , '(km)'
    202231
    203   endif
     232   endif ! of if (ok_strato)
     233 
     234  endif ! of if (planet_type.eq."earth")
    204235
    205236
Note: See TracChangeset for help on using the changeset viewer.