Changeset 1502


Ignore:
Timestamp:
Mar 21, 2011, 5:07:54 PM (14 years ago)
Author:
jghattas
Message:

Modifications for variable idissip :

  • Changed name of variable idissip to dissip_period everywhere to be compatible with old .def files.
  • This variable was before read from physiq.def but the value was overwritten by a calculation in inidissip. Now, if dissip_period=0 calculation is done as before(default). Else the value from physiq.def is used directly.
  • leapfrog : added "AND NOT forward" at line 284 (dyn3d) and line 363(dyn3dpar) necessare if dissip_period not a multiple by iperiod.
  • iniconst : removed calculation of dtdiss (calculation done in inidissip)

FC, JG

Location:
LMDZ5/trunk/libf
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3d/conf_gcm.F

    r1492 r1502  
    215215       CALL getin('output_grads_dyn',output_grads_dyn)
    216216
    217 !Config  Key  = idissip
     217!Config  Key  = dissip_period
    218218!Config  Desc = periode de la dissipation
    219 !Config  Def  = 10
     219!Config  Def  = 0
    220220!Config  Help = periode de la dissipation
    221 !Config         (en pas) ... a completer !
    222        idissip = 10
    223        CALL getin('idissip',idissip)
     221!Config  dissip_period=0 => la valeur sera calcule dans inidissip       
     222!Config  dissip_period>0 => on prend cette valeur
     223       dissip_period = 0
     224       CALL getin('dissip_period',dissip_period)
    224225
    225226ccc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
     
    619620      write(lunout,*)' periodav = ', periodav
    620621      write(lunout,*)' output_grads_dyn = ', output_grads_dyn
    621       write(lunout,*)' idissip = ', idissip
     622      write(lunout,*)' dissip_period = ', dissip_period
    622623      write(lunout,*)' lstardis = ', lstardis
    623624      write(lunout,*)' nitergdiv = ', nitergdiv
     
    862863      write(lunout,*)' periodav = ', periodav
    863864      write(lunout,*)' output_grads_dyn = ', output_grads_dyn
    864       write(lunout,*)' idissip = ', idissip
     865      write(lunout,*)' dissip_period = ', dissip_period
    865866      write(lunout,*)' lstardis = ', lstardis
    866867      write(lunout,*)' nitergdiv = ', nitergdiv
  • LMDZ5/trunk/libf/dyn3d/control_mod.F90

    r1403 r1502  
    1212  REAL    :: periodav
    1313  INTEGER :: nday,day_step,iperiod,iapp_tracvl,nsplit_phys
    14   INTEGER :: iconser,iecri,idissip,iphysiq,iecrimoy
     14  INTEGER :: iconser,iecri,dissip_period,iphysiq,iecrimoy
    1515  INTEGER :: dayref,anneeref, raz_date, ip_ebil_dyn
    1616  LOGICAL :: offline
  • LMDZ5/trunk/libf/dyn3d/defrun.F

    r1403 r1502  
    133133
    134134      READ (tapedef,9001) ch1,ch4
    135       READ (tapedef,*)    idissip
    136       WRITE(tapeout,9001) ch1,'idissip'
    137       WRITE(tapeout,*)    idissip
     135      READ (tapedef,*)    dissip_period
     136      WRITE(tapeout,9001) ch1,'dissip_period'
     137      WRITE(tapeout,*)    dissip_period
    138138
    139139ccc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
  • LMDZ5/trunk/libf/dyn3d/ini_paramLMDZ_dyn.h

    r1279 r1502  
    7878     .                "once", dt_cum,dt_cum)
    7979c
    80          CALL histdef(nid_ctesGCM, "idissip",
     80         CALL histdef(nid_ctesGCM, "dissip_period",
    8181     .  "periode de la dissipation (en pas) ... a completer",
    8282     .                "-",iip1,jjp1,thoriid, 1,1,1, -99, 32,
  • LMDZ5/trunk/libf/dyn3d/iniconst.F

    r1403 r1502  
    3939c-----------------------------------------------------------------------
    4040
    41       dtdiss  = idissip * dtvr
    4241      dtphys  = iphysiq * dtvr
    4342      unsim   = 1./iim
  • LMDZ5/trunk/libf/dyn3d/inidissip.F90

    r1492 r1502  
    1111  !   -------------
    1212
    13   USE control_mod, only : idissip,iperiod
     13  USE control_mod, only : dissip_period,iperiod
    1414
    1515  IMPLICIT NONE
     
    215215  ENDDO
    216216
    217   write(lunout,*)'inidissip: tetamin dtvr iperiod ',tetamin,dtvr,iperiod
    218   idissip = INT( tetamin/( 2.*dtvr*iperiod) ) * iperiod
    219   write(lunout,*)'inidissip: tetamin idissip ',tetamin,idissip
    220   idissip = MAX(iperiod,idissip)
    221   dtdiss  = idissip * dtvr
    222   write(lunout,*)'inidissip: idissip dtdiss ',idissip,dtdiss
     217  ! If dissip_period=0 calculate value for dissipation period, else keep value read from gcm.def
     218  IF (dissip_period == 0) THEN
     219     dissip_period = INT( tetamin/( 2.*dtvr*iperiod) ) * iperiod
     220     write(lunout,*)'inidissip: tetamin dtvr iperiod dissip_period(intermed) ',tetamin,dtvr,iperiod,dissip_period
     221     dissip_period = MAX(iperiod,dissip_period)
     222  END IF
     223
     224  dtdiss  = dissip_period * dtvr
     225  write(lunout,*)'inidissip: dissip_period=',dissip_period,' dtdiss=',dtdiss,' dtvr=',dtvr
    223226
    224227  DO l = 1,llm
  • LMDZ5/trunk/libf/dyn3d/leapfrog.F

    r1454 r1502  
    275275      ! Purely Matsuno time stepping
    276276         IF( MOD(itau,iconser) .EQ.0.AND.  forward    ) conser = .TRUE.
    277          IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE.
     277         IF( MOD(itau,dissip_period ).EQ.0.AND..NOT.forward )
     278     s        apdiss = .TRUE.
    278279         IF( MOD(itau,iphysiq ).EQ.0.AND..NOT.forward
    279280     s          .and. iflag_phys.EQ.1                 ) apphys = .TRUE.
     
    281282      ! Leapfrog/Matsuno time stepping
    282283         IF( MOD(itau   ,iconser) .EQ. 0              ) conser = .TRUE.
    283          IF( MOD(itau+1,idissip)  .EQ. 0              ) apdiss = .TRUE.
     284         IF( MOD(itau+1,dissip_period).EQ.0 .AND. .NOT. forward )
     285     s        apdiss = .TRUE.
    284286         IF( MOD(itau+1,iphysiq).EQ.0.AND.iflag_phys.EQ.1) apphys=.TRUE.
    285287      END IF
  • LMDZ5/trunk/libf/dyn3d/write_paramLMDZ_dyn.h

    r1403 r1502  
    5151     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    5252c
    53       zx_tmp_2d(1:iip1,1:jjp1)=REAL(idissip)
    54       CALL histwrite(nid_ctesGCM, "idissip", itau_w,
     53      zx_tmp_2d(1:iip1,1:jjp1)=REAL(dissip_period)
     54      CALL histwrite(nid_ctesGCM, "dissip_period", itau_w,
    5555     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    5656c
  • LMDZ5/trunk/libf/dyn3dpar/conf_gcm.F

    r1492 r1502  
    225225       CALL getin('output_grads_dyn',output_grads_dyn)
    226226
    227 !Config  Key  = idissip
     227!Config  Key  = dissip_period
    228228!Config  Desc = periode de la dissipation
    229 !Config  Def  = 10
     229!Config  Def  = 0
    230230!Config  Help = periode de la dissipation
    231 !Config         (en pas) ... a completer !
    232        idissip = 10
    233        CALL getin('idissip',idissip)
     231!Config  dissip_period=0 => la valeur sera calcule dans inidissip       
     232!Config  dissip_period>0 => on prend cette valeur
     233       dissip_period = 0
     234       CALL getin('dissip_period',dissip_period)
    234235
    235236ccc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
     
    635636      write(lunout,*)' periodav = ', periodav
    636637      write(lunout,*)' output_grads_dyn = ', output_grads_dyn
    637       write(lunout,*)' idissip = ', idissip
     638      write(lunout,*)' dissip_period = ', dissip_period
    638639      write(lunout,*)' lstardis = ', lstardis
    639640      write(lunout,*)' nitergdiv = ', nitergdiv
     
    909910      write(lunout,*)' periodav = ', periodav
    910911      write(lunout,*)' output_grads_dyn = ', output_grads_dyn
    911       write(lunout,*)' idissip = ', idissip
     912      write(lunout,*)' dissip_period = ', dissip_period
    912913      write(lunout,*)' lstardis = ', lstardis
    913914      write(lunout,*)' nitergdiv = ', nitergdiv
  • LMDZ5/trunk/libf/dyn3dpar/control_mod.F90

    r1403 r1502  
    1212  REAL    :: periodav
    1313  INTEGER :: nday,day_step,iperiod,iapp_tracvl,nsplit_phys
    14   INTEGER :: iconser,iecri,idissip,iphysiq,iecrimoy
     14  INTEGER :: iconser,iecri,dissip_period,iphysiq,iecrimoy
    1515  INTEGER :: dayref,anneeref, raz_date, ip_ebil_dyn
    1616  LOGICAL :: offline
  • LMDZ5/trunk/libf/dyn3dpar/defrun.F

    r1403 r1502  
    132132
    133133      READ (tapedef,9001) ch1,ch4
    134       READ (tapedef,*)    idissip
    135       WRITE(tapeout,9001) ch1,'idissip'
    136       WRITE(tapeout,*)    idissip
     134      READ (tapedef,*)    dissip_period
     135      WRITE(tapeout,9001) ch1,'dissip_period'
     136      WRITE(tapeout,*)    dissip_period
    137137
    138138ccc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
  • LMDZ5/trunk/libf/dyn3dpar/iniconst.F

    r1403 r1502  
    3939c-----------------------------------------------------------------------
    4040
    41       dtdiss  = idissip * dtvr
    4241      dtphys  = iphysiq * dtvr
    4342      unsim   = 1./iim
  • LMDZ5/trunk/libf/dyn3dpar/inidissip.F90

    r1492 r1502  
    1111  !   -------------
    1212
    13   USE control_mod, only : idissip,iperiod
     13  USE control_mod, only : dissip_period,iperiod
    1414
    1515  IMPLICIT NONE
     
    215215  ENDDO
    216216
    217   write(lunout,*)'inidissip: tetamin dtvr iperiod ',tetamin,dtvr,iperiod
    218   idissip = INT( tetamin/( 2.*dtvr*iperiod) ) * iperiod
    219   write(lunout,*)'inidissip: tetamin idissip ',tetamin,idissip
    220   idissip = MAX(iperiod,idissip)
    221   dtdiss  = idissip * dtvr
    222   write(lunout,*)'inidissip: idissip dtdiss ',idissip,dtdiss
     217  ! If dissip_period=0 calculate value for dissipation period, else keep value read from gcm.def
     218  IF (dissip_period == 0) THEN
     219     dissip_period = INT( tetamin/( 2.*dtvr*iperiod) ) * iperiod
     220     write(lunout,*)'inidissip: tetamin dtvr iperiod dissip_period(intermed) ',tetamin,dtvr,iperiod,dissip_period
     221     dissip_period = MAX(iperiod,dissip_period)
     222  END IF
     223
     224  dtdiss  = dissip_period * dtvr
     225  write(lunout,*)'inidissip: dissip_period=',dissip_period,' dtdiss=',dtdiss,' dtvr=',dtvr
    223226
    224227  DO l = 1,llm
  • LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F

    r1492 r1502  
    350350      conser = .FALSE.
    351351      apdiss = .FALSE.
    352 c      idissip=1
     352
    353353      IF( purmats ) THEN
    354354      ! Purely Matsuno time stepping
    355355         IF( MOD(itau,iconser) .EQ.0.AND.  forward    ) conser = .TRUE.
    356          IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE.
     356         IF( MOD(itau,dissip_period ).EQ.0.AND..NOT.forward )
     357     s        apdiss = .TRUE.
    357358         IF( MOD(itau,iphysiq ).EQ.0.AND..NOT.forward
    358359     s          .and. iflag_phys.EQ.1                 ) apphys = .TRUE.
     
    360361      ! Leapfrog/Matsuno time stepping
    361362         IF( MOD(itau   ,iconser) .EQ. 0              ) conser = .TRUE.
    362          IF( MOD(itau+1,idissip)  .EQ. 0              ) apdiss = .TRUE.
     363         IF( MOD(itau+1,dissip_period).EQ.0 .AND. .NOT. forward )
     364     s        apdiss = .TRUE.
    363365         IF( MOD(itau+1,iphysiq).EQ.0.AND.iflag_phys.EQ.1) apphys=.TRUE.
    364366      END IF
Note: See TracChangeset for help on using the changeset viewer.