Ignore:
Timestamp:
Jul 1, 2010, 11:02:53 AM (14 years ago)
Author:
Laurent Fairhead
Message:

Merged LMDZ4V5.0-dev branch changes r1292:r1399 to trunk.

Validation:
Validation consisted in compiling the HEAD revision of the trunk,
LMDZ4V5.0-dev branch and the merged sources and running different
configurations on local and SX8 machines comparing results.

Local machine: bench configuration, 32x24x11, gfortran

  • IPSLCM5A configuration (comparison between trunk and merged sources):
    • numerical convergence on dynamical fields over 3 days
    • start files are equivalent (except for RN and PB fields)
    • daily history files equivalent
  • MH07 configuration, new physics package (comparison between LMDZ4V5.0-dev branch and merged sources):
    • numerical convergence on dynamical fields over 3 days
    • start files are equivalent (except for RN and PB fields)
    • daily history files equivalent

SX8 machine (brodie), 96x95x39 on 4 processors:

  • IPSLCM5A configuration:
    • start files are equivalent (except for RN and PB fields)
    • monthly history files equivalent
  • MH07 configuration:
    • start files are equivalent (except for RN and PB fields)
    • monthly history files equivalent

Changes to the makegcm and create_make_gcm scripts to take into account
main programs in F90 files


Fusion de la branche LMDZ4V5.0-dev (r1292:r1399) au tronc principal

Validation:
La validation a consisté à compiler la HEAD de le trunk et de la banche
LMDZ4V5.0-dev et les sources fusionnées et de faire tourner le modéle selon
différentes configurations en local et sur SX8 et de comparer les résultats

En local: 32x24x11, config bench/gfortran

  • pour une config IPSLCM5A (comparaison tronc/fusion):
    • convergence numérique sur les champs dynamiques après 3 jours
    • restart et restartphy égaux (à part sur RN et Pb)
    • fichiers histoire égaux
  • pour une config nlle physique (MH07) (comparaison LMDZ4v5.0-dev/fusion):
    • convergence numérique sur les champs dynamiques après 3 jours
    • restart et restartphy égaux
    • fichiers histoire équivalents

Sur brodie, 96x95x39 sur 4 proc:

  • pour une config IPSLCM5A:
    • restart et restartphy égaux (à part sur RN et PB)
    • pas de différence dans les fichiers histmth.nc
  • pour une config MH07
    • restart et restartphy égaux (à part sur RN et PB)
    • pas de différence dans les fichiers histmth.nc

Changement sur makegcm et create_make-gcm pour pouvoir prendre en compte des
programmes principaux en *F90

Location:
LMDZ4/trunk
Files:
4 deleted
45 edited
3 copied

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk

  • LMDZ4/trunk/libf/dyn3d/adaptdt.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44      subroutine adaptdt(nadv,dtbon,n,pbaru,
    55     c                   masse)
    66
     7      USE control_mod
    78      IMPLICIT NONE
    89
     
    1617#include "logic.h"
    1718#include "temps.h"
    18 #include "control.h"
    1919#include "ener.h"
    2020#include "description.h"
  • LMDZ4/trunk/libf/dyn3d/advtrac.F

    r1279 r1403  
    1616c
    1717      USE infotrac
     18      USE control_mod
     19 
    1820
    1921      IMPLICIT NONE
     
    2729#include "logic.h"
    2830#include "temps.h"
    29 #include "control.h"
    3031#include "ener.h"
    3132#include "description.h"
     
    121122
    122123      ! ... Flux de masse diaganostiques traceurs
    123       flxw = wg / FLOAT(iapp_tracvl)
     124      flxw = wg / REAL(iapp_tracvl)
    124125
    125126c  test sur l'eventuelle creation de valeurs negatives de la masse
  • LMDZ4/trunk/libf/dyn3d/bilan_dyn.F

    r1279 r1403  
    423423         Q_cum(:,:,:,iQ)=Q_cum(:,:,:,iQ)/masse_cum(:,:,:)
    424424      enddo
    425       zz=1./float(ncum)
     425      zz=1./REAL(ncum)
    426426      ps_cum=ps_cum*zz
    427427      masse_cum=masse_cum*zz
  • LMDZ4/trunk/libf/dyn3d/caladvtrac.F

    r1279 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    99c
    1010      USE infotrac
     11      USE control_mod
     12 
    1113      IMPLICIT NONE
    1214c
     
    2426#include "paramet.h"
    2527#include "comconst.h"
    26 #include "control.h"
    2728
    2829c   Arguments:
  • LMDZ4/trunk/libf/dyn3d/calfis.F

    r1279 r1403  
    3131c   .........
    3232      USE infotrac
     33      USE control_mod
     34 
    3335
    3436      IMPLICIT NONE
     
    9698#include "comvert.h"
    9799#include "comgeom2.h"
    98 #include "control.h"
     100#include "iniprint.h"
    99101
    100102c    Arguments :
     
    149151      REAL zdpsrf(ngridmx)
    150152c
     153      REAL zdufic(ngridmx,llm),zdvfic(ngridmx,llm)
     154      REAL zdtfic(ngridmx,llm),zdqfic(ngridmx,llm,nqtot)
     155      REAL jH_cur_split,zdt_split
     156      LOGICAL debut_split,lafin_split
     157      INTEGER isplit
     158
    151159      REAL zsin(iim),zcos(iim),z1(iim)
    152160      REAL zsinbis(iim),zcosbis(iim),z1bis(iim)
     
    181189        debut = .TRUE.
    182190        IF (ngridmx.NE.2+(jjm-1)*iim) THEN
    183          PRINT*,'STOP dans calfis'
    184          PRINT*,'La dimension ngridmx doit etre egale a 2 + (jjm-1)*iim'
    185          PRINT*,'  ngridmx  jjm   iim   '
    186          PRINT*,ngridmx,jjm,iim
     191         write(lunout,*) 'STOP dans calfis'
     192         write(lunout,*)
     193     &   'La dimension ngridmx doit etre egale a 2 + (jjm-1)*iim'
     194         write(lunout,*) '  ngridmx  jjm   iim   '
     195         write(lunout,*) ngridmx,jjm,iim
    187196         STOP
    188197        ENDIF
     
    308317      CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,pphis,zphis)
    309318      DO l=1,llm
    310         DO ig=1,ngridmx
    311            zphi(ig,l)=zphi(ig,l)-zphis(ig)
    312         ENDDO
     319        DO ig=1,ngridmx
     320           zphi(ig,l)=zphi(ig,l)-zphis(ig)
     321        ENDDO
    313322      ENDDO
    314323
     
    408417            z1(i)   =(rlonu(i)-rlonu(i-1))*pvcov(i,jjm,l)/cv(i,jjm)
    409418            z1bis(i)=(rlonu(i)-rlonu(i-1))*pdvcov(i,jjm,l)/cv(i,jjm)
    410         ENDDO
     419        ENDDO
    411420
    412421         DO i=1,iim
     
    415424            zsin(i)    = SIN(rlonv(i))*z1(i)
    416425            zsinbis(i) = SIN(rlonv(i))*z1bis(i)
    417         ENDDO
     426        ENDDO
    418427
    419428         zufi(ngridmx,l)  = SSUM(iim,zcos,1)/pi
     
    443452      if (planet_type=="earth") then
    444453#ifdef CPP_EARTH
    445       CALL physiq (ngridmx,
     454
     455      write(lunout,*) 'PHYSIQUE AVEC NSPLIT_PHYS=',nsplit_phys
     456      zdt_split=dtphys/nsplit_phys
     457      zdufic(:,:)=0.
     458      zdvfic(:,:)=0.
     459      zdtfic(:,:)=0.
     460      zdqfic(:,:,:)=0.
     461
     462      do isplit=1,nsplit_phys
     463
     464         jH_cur_split=jH_cur+(isplit-1) * dtvr / (daysec *nsplit_phys)
     465         debut_split=debut.and.isplit==1
     466         lafin_split=lafin.and.isplit==nsplit_phys
     467
     468         CALL physiq (ngridmx,
    446469     .             llm,
    447      .             debut,
    448      .             lafin,
     470     .             debut_split,
     471     .             lafin_split,
    449472     .             jD_cur,
    450      .             jH_cur,
    451      .             dtphys,
     473     .             jH_cur_split,
     474     .             zdt_split,
    452475     .             zplev,
    453476     .             zplay,
     
    469492     .             pducov,
    470493     .             PVteta)
     494
     495         zufi(:,:)=zufi(:,:)+zdufi(:,:)*zdt_split
     496         zvfi(:,:)=zvfi(:,:)+zdvfi(:,:)*zdt_split
     497         ztfi(:,:)=ztfi(:,:)+zdtfi(:,:)*zdt_split
     498         zqfi(:,:,:)=zqfi(:,:,:)+zdqfi(:,:,:)*zdt_split
     499
     500         zdufic(:,:)=zdufic(:,:)+zdufi(:,:)
     501         zdvfic(:,:)=zdvfic(:,:)+zdvfi(:,:)
     502         zdtfic(:,:)=zdtfic(:,:)+zdtfi(:,:)
     503         zdqfic(:,:,:)=zdqfic(:,:,:)+zdqfi(:,:,:)
     504
     505      enddo
     506      zdufi(:,:)=zdufic(:,:)/nsplit_phys
     507      zdvfi(:,:)=zdvfic(:,:)/nsplit_phys
     508      zdtfi(:,:)=zdtfic(:,:)/nsplit_phys
     509      zdqfi(:,:,:)=zdqfic(:,:,:)/nsplit_phys
     510
    471511#endif
    472512      endif !of if (planet_type=="earth")
  • LMDZ4/trunk/libf/dyn3d/ce0l.F90

    r1323 r1403  
    1414!     masque is created in etat0, passed to limit to ensure consistancy.
    1515!-------------------------------------------------------------------------------
     16  USE control_mod
    1617#ifdef CPP_EARTH
    1718! This prog. is designed to work for Earth
     
    3637#include "indicesol.h"
    3738#include "iniprint.h"
    38 #include "control.h"
    3939#include "temps.h"
    4040#include "logic.h"
  • LMDZ4/trunk/libf/dyn3d/conf_gcm.F

    r1323 r1403  
    66      SUBROUTINE conf_gcm( tapedef, etatinit, clesphy0 )
    77c
     8      USE control_mod
    89#ifdef CPP_IOIPSL
    910      use IOIPSL
     
    3435#include "dimensions.h"
    3536#include "paramet.h"
    36 #include "control.h"
    3737#include "logic.h"
    3838#include "serre.h"
     
    162162       day_step = 240
    163163       CALL getin('day_step',day_step)
     164
     165!Config  Key  = nsplit_phys
     166!Config  Desc = nombre de pas par jour
     167!Config  Def  = 1
     168!Config  Help = nombre de pas par jour (multiple de iperiod) (
     169!Config          ici pour  dt = 1 min )
     170       nsplit_phys = 1
     171       CALL getin('nsplit_phys',nsplit_phys)
    164172
    165173!Config  Key  = iperiod
     
    573581      CALL getin('config_inca',config_inca)
    574582
    575 
    576583!Config  Key  = ok_dynzon
    577584!Config  Desc = calcul et sortie des transports
     
    581588      ok_dynzon = .FALSE.
    582589      CALL getin('ok_dynzon',ok_dynzon)
     590
     591!Config  Key  = ok_dyn_ins
     592!Config  Desc = sorties instantanees dans la dynamique
     593!Config  Def  = n
     594!Config  Help =
     595!Config         
     596      ok_dyn_ins = .FALSE.
     597      CALL getin('ok_dyn_ins',ok_dyn_ins)
     598
     599!Config  Key  = ok_dyn_ave
     600!Config  Desc = sorties moyennes dans la dynamique
     601!Config  Def  = n
     602!Config  Help =
     603!Config         
     604      ok_dyn_ave = .FALSE.
     605      CALL getin('ok_dyn_ave',ok_dyn_ave)
     606
    583607
    584608      write(lunout,*)' #########################################'
     
    620644      write(lunout,*)' config_inca = ', config_inca
    621645      write(lunout,*)' ok_dynzon = ', ok_dynzon
     646      write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
     647      write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
    622648
    623649      RETURN
     
    746772
    747773!Config  Key  = ok_dynzon
    748 !Config  Desc = calcul et sortie des transports
     774!Config  Desc = sortie des transports zonaux dans la dynamique
    749775!Config  Def  = n
    750 !Config  Help = Permet de mettre en route le calcul des transports
     776!Config  Help =
    751777!Config         
    752778       ok_dynzon = .FALSE.
    753779       CALL getin('ok_dynzon',ok_dynzon)
     780
     781!Config  Key  = ok_dyn_ins
     782!Config  Desc = sorties instantanees dans la dynamique
     783!Config  Def  = n
     784!Config  Help =
     785!Config         
     786      ok_dyn_ins = .FALSE.
     787      CALL getin('ok_dyn_ins',ok_dyn_ins)
     788
     789!Config  Key  = ok_dyn_ave
     790!Config  Desc = sorties moyennes dans la dynamique
     791!Config  Def  = n
     792!Config  Help =
     793!Config         
     794      ok_dyn_ave = .FALSE.
     795      CALL getin('ok_dyn_ave',ok_dyn_ave)
    754796
    755797!Config key = ok_strato
     
    824866      write(lunout,*)' config_inca = ', config_inca
    825867      write(lunout,*)' ok_dynzon = ', ok_dynzon
     868      write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
     869      write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
    826870      write(lunout,*)' ok_strato = ', ok_strato
    827871      write(lunout,*)' ok_gradsfile = ', ok_gradsfile
  • LMDZ4/trunk/libf/dyn3d/defrun.F

    r956 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    66      SUBROUTINE defrun( tapedef, etatinit, clesphy0 )
    77c
     8      USE control_mod
     9 
    810      IMPLICIT NONE
    911c-----------------------------------------------------------------------
     
    2830#include "dimensions.h"
    2931#include "paramet.h"
    30 #include "control.h"
    3132#include "logic.h"
    3233#include "serre.h"
     
    239240       clesphy0(i) = 0.
    240241      ENDDO
    241                           clesphy0(1) = FLOAT( iflag_con )
    242                           clesphy0(2) = FLOAT( nbapp_rad )
     242                          clesphy0(1) = REAL( iflag_con )
     243                          clesphy0(2) = REAL( nbapp_rad )
    243244
    244245       IF( cycle_diurne  ) clesphy0(3) =  1.
  • LMDZ4/trunk/libf/dyn3d/disvert.F

    r1279 r1403  
    111111      snorm  = 0.
    112112      DO l = 1, llm
    113          x = 2.*asin(1.) * (FLOAT(l)-0.5) / float(llm+1)
     113         x = 2.*asin(1.) * (REAL(l)-0.5) / REAL(llm+1)
    114114
    115115         IF (ok_strato) THEN
     
    135135
    136136      DO l=1,llm
    137         nivsigs(l) = FLOAT(l)
     137        nivsigs(l) = REAL(l)
    138138      ENDDO
    139139
    140140      DO l=1,llmp1
    141         nivsig(l)= FLOAT(l)
     141        nivsig(l)= REAL(l)
    142142      ENDDO
    143143
  • LMDZ4/trunk/libf/dyn3d/dynetat0.F

    r1146 r1403  
    11!
    2 ! $Header$
     2! $Id $
    33!
    44      SUBROUTINE dynetat0(fichnom,vcov,ucov,
     
    3434#include "serre.h"
    3535#include "logic.h"
     36#include "iniprint.h"
    3637
    3738c   Arguments:
     
    5859      ierr = NF_OPEN (fichnom, NF_NOWRITE,nid)
    5960      IF (ierr.NE.NF_NOERR) THEN
    60         write(6,*)' Pb d''ouverture du fichier start.nc'
    61         write(6,*)' ierr = ', ierr
     61        write(lunout,*)'dynetat0: Pb d''ouverture du fichier start.nc'
     62        write(lunout,*)' ierr = ', ierr
    6263        CALL ABORT
    6364      ENDIF
     
    6667      ierr = NF_INQ_VARID (nid, "controle", nvarid)
    6768      IF (ierr .NE. NF_NOERR) THEN
    68          PRINT*, "dynetat0: Le champ <controle> est absent"
     69         write(lunout,*)"dynetat0: Le champ <controle> est absent"
    6970         CALL abort
    7071      ENDIF
     
    7576#endif
    7677      IF (ierr .NE. NF_NOERR) THEN
    77          PRINT*, "dynetat0: Lecture echoue pour <controle>"
     78         write(lunout,*)"dynetat0: Lecture echoue pour <controle>"
    7879         CALL abort
    7980      ENDIF
     
    121122c
    122123c
    123       PRINT*,'rad,omeg,g,cpp,kappa',rad,omeg,g,cpp,kappa
     124      write(lunout,*)'dynetat0: rad,omeg,g,cpp,kappa',
     125     &               rad,omeg,g,cpp,kappa
    124126
    125127      IF(   im.ne.iim           )  THEN
     
    136138      ierr = NF_INQ_VARID (nid, "rlonu", nvarid)
    137139      IF (ierr .NE. NF_NOERR) THEN
    138          PRINT*, "dynetat0: Le champ <rlonu> est absent"
     140         write(lunout,*)"dynetat0: Le champ <rlonu> est absent"
    139141         CALL abort
    140142      ENDIF
     
    145147#endif
    146148      IF (ierr .NE. NF_NOERR) THEN
    147          PRINT*, "dynetat0: Lecture echouee pour <rlonu>"
     149         write(lunout,*)"dynetat0: Lecture echouee pour <rlonu>"
    148150         CALL abort
    149151      ENDIF
     
    151153      ierr = NF_INQ_VARID (nid, "rlatu", nvarid)
    152154      IF (ierr .NE. NF_NOERR) THEN
    153          PRINT*, "dynetat0: Le champ <rlatu> est absent"
     155         write(lunout,*)"dynetat0: Le champ <rlatu> est absent"
    154156         CALL abort
    155157      ENDIF
     
    160162#endif
    161163      IF (ierr .NE. NF_NOERR) THEN
    162          PRINT*, "dynetat0: Lecture echouee pour <rlatu>"
     164         write(lunout,*)"dynetat0: Lecture echouee pour <rlatu>"
    163165         CALL abort
    164166      ENDIF
     
    166168      ierr = NF_INQ_VARID (nid, "rlonv", nvarid)
    167169      IF (ierr .NE. NF_NOERR) THEN
    168          PRINT*, "dynetat0: Le champ <rlonv> est absent"
     170         write(lunout,*)"dynetat0: Le champ <rlonv> est absent"
    169171         CALL abort
    170172      ENDIF
     
    175177#endif
    176178      IF (ierr .NE. NF_NOERR) THEN
    177          PRINT*, "dynetat0: Lecture echouee pour <rlonv>"
     179         write(lunout,*)"dynetat0: Lecture echouee pour <rlonv>"
    178180         CALL abort
    179181      ENDIF
     
    181183      ierr = NF_INQ_VARID (nid, "rlatv", nvarid)
    182184      IF (ierr .NE. NF_NOERR) THEN
    183          PRINT*, "dynetat0: Le champ <rlatv> est absent"
     185         write(lunout,*)"dynetat0: Le champ <rlatv> est absent"
    184186         CALL abort
    185187      ENDIF
     
    190192#endif
    191193      IF (ierr .NE. NF_NOERR) THEN
    192          PRINT*, "dynetat0: Lecture echouee pour rlatv"
     194         write(lunout,*)"dynetat0: Lecture echouee pour rlatv"
    193195         CALL abort
    194196      ENDIF
     
    196198      ierr = NF_INQ_VARID (nid, "cu", nvarid)
    197199      IF (ierr .NE. NF_NOERR) THEN
    198          PRINT*, "dynetat0: Le champ <cu> est absent"
     200         write(lunout,*)"dynetat0: Le champ <cu> est absent"
    199201         CALL abort
    200202      ENDIF
     
    205207#endif
    206208      IF (ierr .NE. NF_NOERR) THEN
    207          PRINT*, "dynetat0: Lecture echouee pour <cu>"
     209         write(lunout,*)"dynetat0: Lecture echouee pour <cu>"
    208210         CALL abort
    209211      ENDIF
     
    211213      ierr = NF_INQ_VARID (nid, "cv", nvarid)
    212214      IF (ierr .NE. NF_NOERR) THEN
    213          PRINT*, "dynetat0: Le champ <cv> est absent"
     215         write(lunout,*)"dynetat0: Le champ <cv> est absent"
    214216         CALL abort
    215217      ENDIF
     
    220222#endif
    221223      IF (ierr .NE. NF_NOERR) THEN
    222          PRINT*, "dynetat0: Lecture echouee pour <cv>"
     224         write(lunout,*)"dynetat0: Lecture echouee pour <cv>"
    223225         CALL abort
    224226      ENDIF
     
    226228      ierr = NF_INQ_VARID (nid, "aire", nvarid)
    227229      IF (ierr .NE. NF_NOERR) THEN
    228          PRINT*, "dynetat0: Le champ <aire> est absent"
     230         write(lunout,*)"dynetat0: Le champ <aire> est absent"
    229231         CALL abort
    230232      ENDIF
     
    235237#endif
    236238      IF (ierr .NE. NF_NOERR) THEN
    237          PRINT*, "dynetat0: Lecture echouee pour <aire>"
     239         write(lunout,*)"dynetat0: Lecture echouee pour <aire>"
    238240         CALL abort
    239241      ENDIF
     
    241243      ierr = NF_INQ_VARID (nid, "phisinit", nvarid)
    242244      IF (ierr .NE. NF_NOERR) THEN
    243          PRINT*, "dynetat0: Le champ <phisinit> est absent"
     245         write(lunout,*)"dynetat0: Le champ <phisinit> est absent"
    244246         CALL abort
    245247      ENDIF
     
    250252#endif
    251253      IF (ierr .NE. NF_NOERR) THEN
    252          PRINT*, "dynetat0: Lecture echouee pour <phisinit>"
     254         write(lunout,*)"dynetat0: Lecture echouee pour <phisinit>"
    253255         CALL abort
    254256      ENDIF
     
    256258      ierr = NF_INQ_VARID (nid, "temps", nvarid)
    257259      IF (ierr .NE. NF_NOERR) THEN
    258          PRINT*, "dynetat0: Le champ <temps> est absent"
     260         write(lunout,*)"dynetat0: Le champ <temps> est absent"
    259261         CALL abort
    260262      ENDIF
     
    265267#endif
    266268      IF (ierr .NE. NF_NOERR) THEN
    267          PRINT*, "dynetat0: Lecture echouee <temps>"
     269         write(lunout,*)"dynetat0: Lecture echouee <temps>"
    268270         CALL abort
    269271      ENDIF
     
    271273      ierr = NF_INQ_VARID (nid, "ucov", nvarid)
    272274      IF (ierr .NE. NF_NOERR) THEN
    273          PRINT*, "dynetat0: Le champ <ucov> est absent"
     275         write(lunout,*)"dynetat0: Le champ <ucov> est absent"
    274276         CALL abort
    275277      ENDIF
     
    280282#endif
    281283      IF (ierr .NE. NF_NOERR) THEN
    282          PRINT*, "dynetat0: Lecture echouee pour <ucov>"
     284         write(lunout,*)"dynetat0: Lecture echouee pour <ucov>"
    283285         CALL abort
    284286      ENDIF
     
    286288      ierr = NF_INQ_VARID (nid, "vcov", nvarid)
    287289      IF (ierr .NE. NF_NOERR) THEN
    288          PRINT*, "dynetat0: Le champ <vcov> est absent"
     290         write(lunout,*)"dynetat0: Le champ <vcov> est absent"
    289291         CALL abort
    290292      ENDIF
     
    295297#endif
    296298      IF (ierr .NE. NF_NOERR) THEN
    297          PRINT*, "dynetat0: Lecture echouee pour <vcov>"
     299         write(lunout,*)"dynetat0: Lecture echouee pour <vcov>"
    298300         CALL abort
    299301      ENDIF
     
    301303      ierr = NF_INQ_VARID (nid, "teta", nvarid)
    302304      IF (ierr .NE. NF_NOERR) THEN
    303          PRINT*, "dynetat0: Le champ <teta> est absent"
     305         write(lunout,*)"dynetat0: Le champ <teta> est absent"
    304306         CALL abort
    305307      ENDIF
     
    310312#endif
    311313      IF (ierr .NE. NF_NOERR) THEN
    312          PRINT*, "dynetat0: Lecture echouee pour <teta>"
     314         write(lunout,*)"dynetat0: Lecture echouee pour <teta>"
    313315         CALL abort
    314316      ENDIF
     
    319321        ierr =  NF_INQ_VARID (nid, tname(iq), nvarid)
    320322        IF (ierr .NE. NF_NOERR) THEN
    321            PRINT*, "dynetat0: Le champ <"//tname(iq)//"> est absent"
    322            PRINT*, "          Il est donc initialise a zero"
     323           write(lunout,*)"dynetat0: Le champ <"//tname(iq)//
     324     &                    "> est absent"
     325           write(lunout,*)"          Il est donc initialise a zero"
    323326           q(:,:,iq)=0.
    324327        ELSE
     
    329332#endif
    330333          IF (ierr .NE. NF_NOERR) THEN
    331              PRINT*, "dynetat0: Lecture echouee pour "//tname(iq)
    332              CALL abort
     334            write(lunout,*)"dynetat0: Lecture echouee pour "//tname(iq)
     335            CALL abort
    333336          ENDIF
    334337        ENDIF
     
    338341      ierr = NF_INQ_VARID (nid, "masse", nvarid)
    339342      IF (ierr .NE. NF_NOERR) THEN
    340          PRINT*, "dynetat0: Le champ <masse> est absent"
     343         write(lunout,*)"dynetat0: Le champ <masse> est absent"
    341344         CALL abort
    342345      ENDIF
     
    347350#endif
    348351      IF (ierr .NE. NF_NOERR) THEN
    349          PRINT*, "dynetat0: Lecture echouee pour <masse>"
     352         write(lunout,*)"dynetat0: Lecture echouee pour <masse>"
    350353         CALL abort
    351354      ENDIF
     
    353356      ierr = NF_INQ_VARID (nid, "ps", nvarid)
    354357      IF (ierr .NE. NF_NOERR) THEN
    355          PRINT*, "dynetat0: Le champ <ps> est absent"
     358         write(lunout,*)"dynetat0: Le champ <ps> est absent"
    356359         CALL abort
    357360      ENDIF
     
    362365#endif
    363366      IF (ierr .NE. NF_NOERR) THEN
    364          PRINT*, "dynetat0: Lecture echouee pour <ps>"
     367         write(lunout,*)"dynetat0: Lecture echouee pour <ps>"
    365368         CALL abort
    366369      ENDIF
  • LMDZ4/trunk/libf/dyn3d/dynredem.F

    r1279 r1403  
    88#endif
    99      USE infotrac
     10 
    1011      IMPLICIT NONE
    1112c=======================================================================
     
    2526#include "description.h"
    2627#include "serre.h"
     28#include "iniprint.h"
    2729
    2830c   Arguments:
     
    7274       tab_cntrl(l) = 0.
    7375      ENDDO
    74        tab_cntrl(1)  = FLOAT(iim)
    75        tab_cntrl(2)  = FLOAT(jjm)
    76        tab_cntrl(3)  = FLOAT(llm)
    77        tab_cntrl(4)  = FLOAT(day_ref)
    78        tab_cntrl(5)  = FLOAT(annee_ref)
     76       tab_cntrl(1)  = REAL(iim)
     77       tab_cntrl(2)  = REAL(jjm)
     78       tab_cntrl(3)  = REAL(llm)
     79       tab_cntrl(4)  = REAL(day_ref)
     80       tab_cntrl(5)  = REAL(annee_ref)
    7981       tab_cntrl(6)  = rad
    8082       tab_cntrl(7)  = omeg
     
    116118      ENDIF
    117119
    118        tab_cntrl(30) = FLOAT(iday_end)
    119        tab_cntrl(31) = FLOAT(itau_dyn + itaufin)
     120       tab_cntrl(30) = REAL(iday_end)
     121       tab_cntrl(31) = REAL(itau_dyn + itaufin)
    120122c
    121123c    .........................................................
     
    125127      ierr = NF_CREATE(fichnom, NF_CLOBBER, nid)
    126128      IF (ierr.NE.NF_NOERR) THEN
    127          WRITE(6,*)" Pb d ouverture du fichier "//fichnom
    128          WRITE(6,*)' ierr = ', ierr
     129         write(lunout,*)"dynredem0: Pb d ouverture du fichier "
     130     &                  //trim(fichnom)
     131         write(lunout,*)' ierr = ', ierr
    129132         CALL ABORT
    130133      ENDIF
     
    508511      ierr = NF_CLOSE(nid) ! fermer le fichier
    509512
    510       PRINT*,'iim,jjm,llm,iday_end',iim,jjm,llm,iday_end
    511       PRINT*,'rad,omeg,g,cpp,kappa',
    512      ,        rad,omeg,g,cpp,kappa
     513      write(lunout,*)'dynredem0: iim,jjm,llm,iday_end',
     514     &               iim,jjm,llm,iday_end
     515      write(lunout,*)'dynredem0: rad,omeg,g,cpp,kappa',
     516     &        rad,omeg,g,cpp,kappa
    513517
    514518      RETURN
     
    517521     .                     vcov,ucov,teta,q,masse,ps)
    518522      USE infotrac
     523      USE control_mod
     524 
    519525      IMPLICIT NONE
    520526c=================================================================
     
    528534#include "comgeom.h"
    529535#include "temps.h"
    530 #include "control.h"
     536#include "iniprint.h"
     537
    531538
    532539      INTEGER l
     
    555562      ierr = NF_OPEN(fichnom, NF_WRITE, nid)
    556563      IF (ierr .NE. NF_NOERR) THEN
    557          PRINT*, "Pb. d ouverture "//fichnom
     564         write(lunout,*)"dynredem1: Pb. d ouverture "//trim(fichnom)
    558565         CALL abort
    559566      ENDIF
     
    564571      ierr = NF_INQ_VARID(nid, "temps", nvarid)
    565572      IF (ierr .NE. NF_NOERR) THEN
    566          print *, NF_STRERROR(ierr)
     573         write(lunout,*) NF_STRERROR(ierr)
    567574         abort_message='Variable temps n est pas definie'
    568575         CALL abort_gcm(modname,abort_message,ierr)
     
    573580      ierr = NF_PUT_VAR1_REAL (nid,nvarid,nb,time)
    574581#endif
    575       PRINT*, "Enregistrement pour ", nb, time
     582      write(lunout,*) "dynredem1: Enregistrement pour ", nb, time
    576583
    577584c
     
    589596      ierr = NF_GET_VAR_REAL(nid, nvarid, tab_cntrl)
    590597#endif
    591        tab_cntrl(31) = FLOAT(itau_dyn + itaufin)
     598       tab_cntrl(31) = REAL(itau_dyn + itaufin)
    592599#ifdef NC_DOUBLE
    593600      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tab_cntrl)
     
    600607      ierr = NF_INQ_VARID(nid, "ucov", nvarid)
    601608      IF (ierr .NE. NF_NOERR) THEN
    602          PRINT*, "Variable ucov n est pas definie"
    603          CALL abort
     609         abort_message="Variable ucov n est pas definie"
     610         ierr=1
     611         CALL abort_gcm(modname,abort_message,ierr)
    604612      ENDIF
    605613#ifdef NC_DOUBLE
     
    611619      ierr = NF_INQ_VARID(nid, "vcov", nvarid)
    612620      IF (ierr .NE. NF_NOERR) THEN
    613          PRINT*, "Variable vcov n est pas definie"
    614          CALL abort
     621         abort_message="Variable vcov n est pas definie"
     622         ierr=1
     623         CALL abort_gcm(modname,abort_message,ierr)
    615624      ENDIF
    616625#ifdef NC_DOUBLE
     
    622631      ierr = NF_INQ_VARID(nid, "teta", nvarid)
    623632      IF (ierr .NE. NF_NOERR) THEN
    624          PRINT*, "Variable teta n est pas definie"
    625          CALL abort
     633         abort_message="Variable teta n est pas definie"
     634         ierr=1
     635         CALL abort_gcm(modname,abort_message,ierr)
    626636      ENDIF
    627637#ifdef NC_DOUBLE
     
    635645         ierr_file = NF_OPEN ("start_trac.nc", NF_NOWRITE,nid_trac)
    636646         IF (ierr_file .NE.NF_NOERR) THEN
    637             write(6,*)' Pb d''ouverture du fichier start_trac.nc'
    638             write(6,*)' ierr = ', ierr_file
     647            write(lunout,*)'dynredem1: Pb d''ouverture du fichier',
     648     &                     ' start_trac.nc'
     649            write(lunout,*)' ierr = ', ierr_file
    639650         ENDIF
    640651      END IF
     
    646657            ierr = NF_INQ_VARID(nid, tname(iq), nvarid)
    647658            IF (ierr .NE. NF_NOERR) THEN
    648                PRINT*, "Variable  tname(iq) n est pas definie"
    649                CALL abort
     659               abort_message="Variable  tname(iq) n est pas definie"
     660               ierr=1
     661               CALL abort_gcm(modname,abort_message,ierr)
    650662            ENDIF
    651663#ifdef NC_DOUBLE
     
    659671             ierr = NF_INQ_VARID (nid_trac, tname(iq), nvarid_trac)
    660672             IF (ierr .NE. NF_NOERR) THEN
    661                 PRINT*, tname(iq),"est absent de start_trac.nc"
     673                write(lunout,*) "dynredem1: ",trim(tname(iq)),
     674     &                          " est absent de start_trac.nc"
    662675                ierr = NF_INQ_VARID(nid, tname(iq), nvarid)
    663676                IF (ierr .NE. NF_NOERR) THEN
    664                    PRINT*, "Variable ", tname(iq)," n est pas definie"
    665                    CALL abort
     677                   abort_message="dynredem1: Variable "//
     678     &                     trim(tname(iq))//" n est pas definie"
     679                   ierr=1
     680                   CALL abort_gcm(modname,abort_message,ierr)
    666681                ENDIF
    667682#ifdef NC_DOUBLE
     
    672687               
    673688             ELSE
    674                 PRINT*, tname(iq), "est present dans start_trac.nc"
     689                write(lunout,*) "dynredem1: ",trim(tname(iq)),
     690     &              " est present dans start_trac.nc"
    675691#ifdef NC_DOUBLE
    676692               ierr = NF_GET_VAR_DOUBLE(nid_trac, nvarid_trac, trac_tmp)
     
    679695#endif
    680696                IF (ierr .NE. NF_NOERR) THEN
    681                    PRINT*, "Lecture echouee pour", tname(iq)
    682                    CALL abort
     697                   abort_message="dynredem1: Lecture echouee pour"//
     698     &                    trim(tname(iq))
     699                   ierr=1
     700                   CALL abort_gcm(modname,abort_message,ierr)
    683701                ENDIF
    684702                ierr = NF_INQ_VARID(nid, tname(iq), nvarid)
    685703                IF (ierr .NE. NF_NOERR) THEN
    686                    PRINT*, "Variable ", tname(iq)," n est pas definie"
    687                    CALL abort
     704                   abort_message="dynredem1: Variable "//
     705     &                trim(tname(iq))//" n est pas definie"
     706                   ierr=1
     707                   CALL abort_gcm(modname,abort_message,ierr)
    688708                ENDIF
    689709#ifdef NC_DOUBLE
     
    699719             ierr = NF_INQ_VARID(nid, tname(iq), nvarid)
    700720             IF (ierr .NE. NF_NOERR) THEN
    701                 PRINT*, "Variable  tname(iq) n est pas definie"
    702                 CALL abort
     721                abort_message="dynredem1: Variable "//
     722     &                trim(tname(iq))//" n est pas definie"
     723                   ierr=1
     724                   CALL abort_gcm(modname,abort_message,ierr)
    703725             ENDIF
    704726#ifdef NC_DOUBLE
     
    715737      ierr = NF_INQ_VARID(nid, "masse", nvarid)
    716738      IF (ierr .NE. NF_NOERR) THEN
    717          PRINT*, "Variable masse n est pas definie"
    718          CALL abort
     739         abort_message="dynredem1: Variable masse n est pas definie"
     740         ierr=1
     741         CALL abort_gcm(modname,abort_message,ierr)
    719742      ENDIF
    720743#ifdef NC_DOUBLE
     
    726749      ierr = NF_INQ_VARID(nid, "ps", nvarid)
    727750      IF (ierr .NE. NF_NOERR) THEN
    728          PRINT*, "Variable ps n est pas definie"
    729          CALL abort
     751         abort_message="dynredem1: Variable ps n est pas definie"
     752         ierr=1
     753         CALL abort_gcm(modname,abort_message,ierr)
    730754      ENDIF
    731755#ifdef NC_DOUBLE
  • LMDZ4/trunk/libf/dyn3d/etat0_netcdf.F90

    r1328 r1403  
    1111! Note: This routine is designed to work for Earth
    1212!-------------------------------------------------------------------------------
     13  USE control_mod
    1314#ifdef CPP_EARTH
    1415  USE startvar
     
    7273
    7374#include "comdissnew.h"
    74 #include "control.h"
    7575#include "serre.h"
    7676#include "clesphys.h"
     
    103103  REAL    :: tau_thermals, solarlong0,  seuil_inversion
    104104  INTEGER :: read_climoz ! read ozone climatology
     105  REAL    :: alp_offset
    105106!  Allowed values are 0, 1 and 2
    106107!     0: do not read an ozone climatology
     
    132133                   iflag_thermals,nsplit_thermals,tau_thermals,         &
    133134                   iflag_thermals_ed,iflag_thermals_optflux,            &
    134                    iflag_coupl,iflag_clos,iflag_wake, read_climoz )
     135                   iflag_coupl,iflag_clos,iflag_wake, read_climoz,      &
     136                   alp_offset )
    135137
    136138! co2_ppm0 : initial value of atmospheric CO2 from .def file (co2_ppm value)
  • LMDZ4/trunk/libf/dyn3d/exner_hyb.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id $
    33!
    44      SUBROUTINE  exner_hyb ( ngrid, ps, p,alpha,beta, pks, pk, pkf )
     
    5151      REAL SSUM
    5252c
     53
     54      if (llm.eq.1) then
     55        ! Specific behaviour for Shallow Water (1 vertical layer) case
    5356     
     57        ! Sanity checks
     58        if (kappa.ne.1) then
     59          call abort_gcm("exner_hyb",
     60     &    "kappa!=1 , but running in Shallow Water mode!!",42)
     61        endif
     62        if (cpp.ne.r) then
     63        call abort_gcm("exner_hyb",
     64     &    "cpp!=r , but running in Shallow Water mode!!",42)
     65        endif
     66       
     67        ! Compute pks(:),pk(:),pkf(:)
     68       
     69        DO   ij  = 1, ngrid
     70          pks(ij) = (cpp/preff) * ps(ij)
     71          pk(ij,1) = .5*pks(ij)
     72        ENDDO
     73       
     74        CALL SCOPY   ( ngrid * llm, pk, 1, pkf, 1 )
     75        CALL filtreg ( pkf, jmp1, llm, 2, 1, .TRUE., 1 )
     76       
     77        ! our work is done, exit routine
     78        return
     79      endif ! of if (llm.eq.1)
     80
     81     
    5482      unpl2k    = 1.+ 2.* kappa
    5583c
  • LMDZ4/trunk/libf/dyn3d/extrapol.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44C
     
    158158               jlat = jy(k)
    159159               pwork(i,j) = pwork(i,j)
    160      $                      + pfild(ilon,jlat) * zmask(k)/FLOAT(inbor)
     160     $                      + pfild(ilon,jlat) * zmask(k)/REAL(inbor)
    161161            ENDDO
    162162         ENDIF
  • LMDZ4/trunk/libf/dyn3d/fluxstokenc.F

    r1279 r1403  
    44      SUBROUTINE fluxstokenc(pbaru,pbarv,masse,teta,phi,phis,
    55     . time_step,itau )
    6 #ifdef CPP_EARTH
    7 ! This routine is designed to work for Earth and with ioipsl
     6#ifdef CPP_IOIPSL
     7! This routine is designed to work with ioipsl
    88
    99       USE IOIPSL
     
    114114      DO l=1,llm
    115115         DO ij = 1,ip1jmp1
    116             pbaruc(ij,l) = pbaruc(ij,l)/float(istdyn)
    117             tetac(ij,l) = tetac(ij,l)/float(istdyn)
    118             phic(ij,l) = phic(ij,l)/float(istdyn)
     116            pbaruc(ij,l) = pbaruc(ij,l)/REAL(istdyn)
     117            tetac(ij,l) = tetac(ij,l)/REAL(istdyn)
     118            phic(ij,l) = phic(ij,l)/REAL(istdyn)
    119119         ENDDO
    120120         DO ij = 1,ip1jm
    121             pbarvc(ij,l) = pbarvc(ij,l)/float(istdyn)
     121            pbarvc(ij,l) = pbarvc(ij,l)/REAL(istdyn)
    122122         ENDDO
    123123      ENDDO
     
    141141
    142142         iadvtr=0
    143         Print*,'ITAU auqel on stoke les fluxmasses',itau
     143        write(lunout,*)'ITAU auquel on stoke les fluxmasses',itau
    144144       
    145145        call histwrite(fluxid, 'masse', itau, massem,
     
    167167#else
    168168      write(lunout,*)
    169      & 'fluxstokenc: Needs Earth physics (and ioipsl) to function'
     169     & 'fluxstokenc: Needs IOIPSL to function'
    170170#endif
    171 ! of #ifdef CPP_EARTH
     171! of #ifdef CPP_IOIPSL
    172172      RETURN
    173173      END
  • LMDZ4/trunk/libf/dyn3d/friction.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c=======================================================================
    55      SUBROUTINE friction(ucov,vcov,pdt)
     6
     7      USE control_mod
     8 
    69      IMPLICIT NONE
    710
     
    2124#include "paramet.h"
    2225#include "comgeom2.h"
    23 #include "control.h"
    2426#include "comconst.h"
    2527
  • LMDZ4/trunk/libf/dyn3d/fxhyp.F

    r1279 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    8989
    9090       DO i = 0, nmax2
    91         xtild(i) = - pi + FLOAT(i) * depi /nmax2
     91        xtild(i) = - pi + REAL(i) * depi /nmax2
    9292       ENDDO
    9393
     
    235235      DO 1500 i = ii1, ii2
    236236
    237       xlon2 = - pi + (FLOAT(i) + xuv - decalx) * depi / FLOAT(iim)
     237      xlon2 = - pi + (REAL(i) + xuv - decalx) * depi / REAL(iim)
    238238
    239239      Xfi    = xlon2
     
    280280550   CONTINUE
    281281
    282        xxprim(i) = depi/ ( FLOAT(iim) * Xprimin )
     282       xxprim(i) = depi/ ( REAL(iim) * Xprimin )
    283283       xvrai(i)  =  xi + xzoom
    284284
  • LMDZ4/trunk/libf/dyn3d/fxy.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44      SUBROUTINE fxy (rlatu,yprimu,rlatv,yprimv,rlatu1,yprimu1,
     
    3232c
    3333       DO j = 1, jjm + 1
    34           rlatu(j) = fy    ( FLOAT( j )        )
    35          yprimu(j) = fyprim( FLOAT( j )        )
     34          rlatu(j) = fy    ( REAL( j )        )
     35         yprimu(j) = fyprim( REAL( j )        )
    3636       ENDDO
    3737
     
    3939       DO j = 1, jjm
    4040
    41          rlatv(j)  = fy    ( FLOAT( j ) + 0.5  )
    42          rlatu1(j) = fy    ( FLOAT( j ) + 0.25 )
    43          rlatu2(j) = fy    ( FLOAT( j ) + 0.75 )
     41         rlatv(j)  = fy    ( REAL( j ) + 0.5  )
     42         rlatu1(j) = fy    ( REAL( j ) + 0.25 )
     43         rlatu2(j) = fy    ( REAL( j ) + 0.75 )
    4444
    45         yprimv(j)  = fyprim( FLOAT( j ) + 0.5  )
    46         yprimu1(j) = fyprim( FLOAT( j ) + 0.25 )
    47         yprimu2(j) = fyprim( FLOAT( j ) + 0.75 )
     45        yprimv(j)  = fyprim( REAL( j ) + 0.5  )
     46        yprimu1(j) = fyprim( REAL( j ) + 0.25 )
     47        yprimu2(j) = fyprim( REAL( j ) + 0.75 )
    4848
    4949       ENDDO
     
    5353c
    5454       DO i = 1, iim + 1
    55            rlonv(i)     = fx    (   FLOAT( i )          )
    56            rlonu(i)     = fx    (   FLOAT( i ) + 0.5    )
    57         rlonm025(i)     = fx    (   FLOAT( i ) - 0.25  )
    58         rlonp025(i)     = fx    (   FLOAT( i ) + 0.25  )
     55           rlonv(i)     = fx    (   REAL( i )          )
     56           rlonu(i)     = fx    (   REAL( i ) + 0.5    )
     57        rlonm025(i)     = fx    (   REAL( i ) - 0.25  )
     58        rlonp025(i)     = fx    (   REAL( i ) + 0.25  )
    5959
    60          xprimv  (i)    = fxprim (  FLOAT( i )          )
    61          xprimu  (i)    = fxprim (  FLOAT( i ) + 0.5    )
    62         xprimm025(i)    = fxprim (  FLOAT( i ) - 0.25   )
    63         xprimp025(i)    = fxprim (  FLOAT( i ) + 0.25   )
     60         xprimv  (i)    = fxprim (  REAL( i )          )
     61         xprimu  (i)    = fxprim (  REAL( i ) + 0.5    )
     62        xprimm025(i)    = fxprim (  REAL( i ) - 0.25   )
     63        xprimp025(i)    = fxprim (  REAL( i ) + 0.25   )
    6464       ENDDO
    6565
  • LMDZ4/trunk/libf/dyn3d/fxysinus.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44      SUBROUTINE fxysinus (rlatu,yprimu,rlatv,yprimv,rlatu1,yprimu1,
     
    3232c
    3333       DO j = 1, jjm + 1
    34           rlatu(j) = fy    ( FLOAT( j )        )
    35          yprimu(j) = fyprim( FLOAT( j )        )
     34          rlatu(j) = fy    ( REAL( j )        )
     35         yprimu(j) = fyprim( REAL( j )        )
    3636       ENDDO
    3737
     
    3939       DO j = 1, jjm
    4040
    41          rlatv(j)  = fy    ( FLOAT( j ) + 0.5  )
    42          rlatu1(j) = fy    ( FLOAT( j ) + 0.25 )
    43          rlatu2(j) = fy    ( FLOAT( j ) + 0.75 )
     41         rlatv(j)  = fy    ( REAL( j ) + 0.5  )
     42         rlatu1(j) = fy    ( REAL( j ) + 0.25 )
     43         rlatu2(j) = fy    ( REAL( j ) + 0.75 )
    4444
    45         yprimv(j)  = fyprim( FLOAT( j ) + 0.5  )
    46         yprimu1(j) = fyprim( FLOAT( j ) + 0.25 )
    47         yprimu2(j) = fyprim( FLOAT( j ) + 0.75 )
     45        yprimv(j)  = fyprim( REAL( j ) + 0.5  )
     46        yprimu1(j) = fyprim( REAL( j ) + 0.25 )
     47        yprimu2(j) = fyprim( REAL( j ) + 0.75 )
    4848
    4949       ENDDO
     
    5353c
    5454       DO i = 1, iim + 1
    55            rlonv(i)     = fx    (   FLOAT( i )          )
    56            rlonu(i)     = fx    (   FLOAT( i ) + 0.5    )
    57         rlonm025(i)     = fx    (   FLOAT( i ) - 0.25  )
    58         rlonp025(i)     = fx    (   FLOAT( i ) + 0.25  )
     55           rlonv(i)     = fx    (   REAL( i )          )
     56           rlonu(i)     = fx    (   REAL( i ) + 0.5    )
     57        rlonm025(i)     = fx    (   REAL( i ) - 0.25  )
     58        rlonp025(i)     = fx    (   REAL( i ) + 0.25  )
    5959
    60          xprimv  (i)    = fxprim (  FLOAT( i )          )
    61          xprimu  (i)    = fxprim (  FLOAT( i ) + 0.5    )
    62         xprimm025(i)    = fxprim (  FLOAT( i ) - 0.25   )
    63         xprimp025(i)    = fxprim (  FLOAT( i ) + 0.25   )
     60         xprimv  (i)    = fxprim (  REAL( i )          )
     61         xprimu  (i)    = fxprim (  REAL( i ) + 0.5    )
     62        xprimm025(i)    = fxprim (  REAL( i ) - 0.25   )
     63        xprimp025(i)    = fxprim (  REAL( i ) + 0.25   )
    6464       ENDDO
    6565
  • LMDZ4/trunk/libf/dyn3d/fyhyp.F

    r1279 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    7575       depi     = 2. * pi
    7676       pis2     = pi/2.
    77        pisjm    = pi/ FLOAT(jjm)
     77       pisjm    = pi/ REAL(jjm)
    7878       epsilon  = 1.e-3
    7979       y0       =  yzoomdeg * pi/180.
     
    9494
    9595       DO i = 0, nmax2
    96         yt(i) = - pis2  + FLOAT(i)* pi /nmax2
     96        yt(i) = - pis2  + REAL(i)* pi /nmax2
    9797       ENDDO
    9898
     
    210210       DO 1500 j =  1,jlat
    211211        yo1   = 0.
    212         ylon2 =  - pis2 + pisjm * ( FLOAT(j)  + yuv  -1.) 
     212        ylon2 =  - pis2 + pisjm * ( REAL(j)  + yuv  -1.) 
    213213        yfi    = ylon2
    214214c
  • LMDZ4/trunk/libf/dyn3d/gcm.F

    r1315 r1403  
    1515      USE filtreg_mod
    1616      USE infotrac
     17      USE control_mod
    1718
    1819!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    6869#include "logic.h"
    6970#include "temps.h"
    70 #include "control.h"
     71!!!!!!!!!!!#include "control.h"
    7172#include "ener.h"
    7273#include "description.h"
    7374#include "serre.h"
    74 #include "com_io_dyn.h"
     75!#include "com_io_dyn.h"
    7576#include "iniprint.h"
    7677#include "tracstoke.h"
     78#ifdef INCA
     79! Only INCA needs these informations (from the Earth's physics)
    7780#include "indicesol.h"
    78 
     81#endif
    7982      INTEGER         longcles
    8083      PARAMETER     ( longcles = 20 )
     
    181184      if (planet_type.eq."earth") then
    182185#ifdef CPP_EARTH
    183       CALL Init_Phys_lmdz(iim,jjp1,llm,1,(jjm-1)*iim+2)
     186      CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))
    184187      call InitComgeomphy
    185188#endif
     
    241244      if (read_start) then
    242245      ! we still need to run iniacademic to initialize some
    243       ! constants & fields, if we run the 'newtonian' case:
    244         if (iflag_phys.eq.2) then
     246      ! constants & fields, if we run the 'newtonian' or 'SW' cases:
     247        if (iflag_phys.ne.1) then
    245248          CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0)
    246249        endif
    247 !#ifdef CPP_IOIPSL
     250
    248251        if (planet_type.eq."earth") then
    249252#ifdef CPP_EARTH
    250253! Load an Earth-format start file
    251254         CALL dynetat0("start.nc",vcov,ucov,
    252      .              teta,q,masse,ps,phis, time_0)
     255     &              teta,q,masse,ps,phis, time_0)
     256#else
     257        ! SW model also has Earth-format start files
     258        ! (but can be used without the CPP_EARTH directive)
     259          if (iflag_phys.eq.0) then
     260            CALL dynetat0("start.nc",vcov,ucov,
     261     &              teta,q,masse,ps,phis, time_0)
     262          endif
    253263#endif
    254264        endif ! of if (planet_type.eq."earth")
     265       
    255266c       write(73,*) 'ucov',ucov
    256267c       write(74,*) 'vcov',vcov
     
    294305      ENDIF
    295306
    296       zdtvr    = daysec/FLOAT(day_step)
     307      zdtvr    = daysec/REAL(day_step)
    297308        IF(dtvr.NE.zdtvr) THEN
    298309         WRITE(lunout,*)
     
    303314C on remet le calendrier à zero si demande
    304315c
    305       if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then
     316      IF (raz_date == 1) THEN
     317        annee_ref = anneeref
     318        day_ref = dayref
     319        day_ini = dayref
     320        itau_dyn = 0
     321        itau_phy = 0
     322        time_0 = 0.
     323        write(lunout,*)
     324     .   'GCM: On reinitialise a la date lue dans gcm.def'
     325      ELSE IF (annee_ref .ne. anneeref .or. day_ref .ne. dayref) THEN
    306326        write(lunout,*)
    307327     .  'GCM: Attention les dates initiales lues dans le fichier'
     
    309329     .  ' restart ne correspondent pas a celles lues dans '
    310330        write(lunout,*)' gcm.def'
    311         write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
    312         write(lunout,*)' day_ref=',day_ref," dayref=",dayref
    313         if (raz_date .ne. 1) then
    314           write(lunout,*)
    315      .    'GCM: On garde les dates du fichier restart'
    316         else
    317           annee_ref = anneeref
    318           day_ref = dayref
    319           day_ini = dayref
    320           itau_dyn = 0
    321           itau_phy = 0
    322           time_0 = 0.
    323           write(lunout,*)
    324      .   'GCM: On reinitialise a la date lue dans gcm.def'
    325         endif
    326       ELSE
    327         raz_date = 0
    328       endif
     331        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     332        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
     333        write(lunout,*)' Pas de remise a zero'
     334      ENDIF
     335
     336c      if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then
     337c        write(lunout,*)
     338c     .  'GCM: Attention les dates initiales lues dans le fichier'
     339c        write(lunout,*)
     340c     .  ' restart ne correspondent pas a celles lues dans '
     341c        write(lunout,*)' gcm.def'
     342c        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     343c        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
     344c        if (raz_date .ne. 1) then
     345c          write(lunout,*)
     346c     .    'GCM: On garde les dates du fichier restart'
     347c        else
     348c          annee_ref = anneeref
     349c          day_ref = dayref
     350c          day_ini = dayref
     351c          itau_dyn = 0
     352c          itau_phy = 0
     353c          time_0 = 0.
     354c          write(lunout,*)
     355c     .   'GCM: On reinitialise a la date lue dans gcm.def'
     356c        endif
     357c      ELSE
     358c        raz_date = 0
     359c      endif
    329360
    330361#ifdef CPP_IOIPSL
     
    355386      nbetatmoy = nday / periodav + 1
    356387
     388      if (iflag_phys.eq.1) then
     389      ! these initialisations have already been done (via iniacademic)
     390      ! if running in SW or Newtonian mode
    357391c-----------------------------------------------------------------------
    358392c   Initialisation des constantes dynamiques :
    359393c   ------------------------------------------
    360       dtvr = zdtvr
    361       CALL iniconst
     394        dtvr = zdtvr
     395        CALL iniconst
    362396
    363397c-----------------------------------------------------------------------
    364398c   Initialisation de la geometrie :
    365399c   --------------------------------
    366       CALL inigeom
     400        CALL inigeom
    367401
    368402c-----------------------------------------------------------------------
    369403c   Initialisation du filtre :
    370404c   --------------------------
    371       CALL inifilr
     405        CALL inifilr
     406      endif ! of if (iflag_phys.eq.1)
    372407c
    373408c-----------------------------------------------------------------------
     
    405440         if (planet_type.eq."earth") then
    406441#ifdef CPP_EARTH
    407          CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys ,
     442         CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys ,
    408443     ,                latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp     )
    409444#endif
     
    440475
    441476#ifdef CPP_IOIPSL
    442       if ( 1.eq.1) then
    443477      time_step = zdtvr
    444       t_ops = iecri * daysec
    445       t_wrt = iecri * daysec
    446 !      CALL inithist(dynhist_file,day_ref,annee_ref,time_step,
    447 !    .              t_ops, t_wrt, histid, histvid)
    448 
    449 !     IF (ok_dynzon) THEN
    450 !        t_ops = iperiod * time_step
    451 !        t_wrt = periodav * daysec
    452 !        CALL initdynav(dynhistave_file,day_ref,annee_ref,time_step,
    453 !    .        t_ops, t_wrt, histaveid)
    454 !     END IF
     478      if (ok_dyn_ins) then
     479        ! initialize output file for instantaneous outputs
     480        ! t_ops = iecri * daysec ! do operations every t_ops
     481        t_ops =((1.0*iecri)/day_step) * daysec 
     482        t_wrt = daysec ! iecri * daysec ! write output every t_wrt
     483        CALL inithist(day_ref,annee_ref,time_step,
     484     &              t_ops,t_wrt)
     485      endif
     486
     487      IF (ok_dyn_ave) THEN
     488        ! initialize output file for averaged outputs
     489        t_ops = iperiod * time_step ! do operations every t_ops
     490        t_wrt = periodav * daysec   ! write output every t_wrt
     491        CALL initdynav(day_ref,annee_ref,time_step,
     492     &       t_ops,t_wrt)
     493      END IF
    455494      dtav = iperiod*dtvr/daysec
    456       endif
    457 
    458 
    459495#endif
    460496! #endif of #ifdef CPP_IOIPSL
  • LMDZ4/trunk/libf/dyn3d/grid_atob.F

    r1279 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44      SUBROUTINE grille_m(imdep, jmdep, xdata, ydata, entree,
     
    717717c Calculs intermediares:
    718718c
    719       xtmp(1) = -180.0 + 360.0/FLOAT(imtmp) / 2.0
     719      xtmp(1) = -180.0 + 360.0/REAL(imtmp) / 2.0
    720720      DO i = 2, imtmp
    721          xtmp(i) = xtmp(i-1) + 360.0/FLOAT(imtmp)
     721         xtmp(i) = xtmp(i-1) + 360.0/REAL(imtmp)
    722722      ENDDO
    723723      DO i = 1, imtmp
    724724         xtmp(i) = xtmp(i) /180.0 * 4.0*ATAN(1.0)
    725725      ENDDO
    726       ytmp(1) = -90.0 + 180.0/FLOAT(jmtmp) / 2.0
     726      ytmp(1) = -90.0 + 180.0/REAL(jmtmp) / 2.0
    727727      DO j = 2, jmtmp
    728          ytmp(j) = ytmp(j-1) + 180.0/FLOAT(jmtmp)
     728         ytmp(j) = ytmp(j-1) + 180.0/REAL(jmtmp)
    729729      ENDDO
    730730      DO j = 1, jmtmp
  • LMDZ4/trunk/libf/dyn3d/grid_noro.F

    r773 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    9393      xpi=acos(-1.)
    9494      rad    = 6 371 229.
    95       zdeltay=2.*xpi/float(jusn)*rad
     95      zdeltay=2.*xpi/REAL(jusn)*rad
    9696c
    9797c utilise-t'on un masque lu?
     
    215215c  SUMMATION OVER GRIDPOINT AREA
    216216c
    217       zleny=xpi/float(jusn)*rad
    218       xincr=xpi/2./float(jusn)
     217      zleny=xpi/REAL(jusn)*rad
     218      xincr=xpi/2./REAL(jusn)
    219219       DO ii = 1, imar+1
    220220       DO jj = 1, jmar
     
    468468      DO IS=-1,1
    469469        DO JS=-1,1
    470           WEIGHTpb(IS,JS)=1./FLOAT((1+IS**2)*(1+JS**2))
     470          WEIGHTpb(IS,JS)=1./REAL((1+IS**2)*(1+JS**2))
    471471          SUM=SUM+WEIGHTpb(IS,JS)
    472472        ENDDO
  • LMDZ4/trunk/libf/dyn3d/grilles_gcm_netcdf.F

    r636 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    218218      open (20,file='grille.dat',form='unformatted',access='direct'
    219219     s      ,recl=4*ip1jmp1)
    220       write(20,rec=1) ((float(mod(i,2)+mod(j,2)),i=1,iip1),j=1,jjp1)
    221       write(20,rec=2) ((float(mod(i,2)*mod(j,2)),i=1,iip1),j=1,jjp1)
     220      write(20,rec=1) ((REAL(mod(i,2)+mod(j,2)),i=1,iip1),j=1,jjp1)
     221      write(20,rec=2) ((REAL(mod(i,2)*mod(j,2)),i=1,iip1),j=1,jjp1)
    222222      do j=2,jjm
    223223         dlat1(j)=180.*(rlatv(j)-rlatv(j-1))/pi
    224 c        dlat2(j)=180.*fyprim(float(j))/pi
     224c        dlat2(j)=180.*fyprim(REAL(j))/pi
    225225      enddo
    226226      do i=2,iip1
    227227         dlon1(i)=180.*(rlonu(i)-rlonu(i-1))/pi
    228 c        dlon2(i)=180.*fxprim(float(i))/pi
     228c        dlon2(i)=180.*fxprim(REAL(i))/pi
    229229      enddo
    230230      do j=2,jjm
  • LMDZ4/trunk/libf/dyn3d/guide_mod.F90

    r1304 r1403  
    6262  SUBROUTINE guide_init
    6363
     64    USE control_mod
     65
    6466    IMPLICIT NONE
    6567 
     
    6769    INCLUDE "paramet.h"
    6870    INCLUDE "netcdf.inc"
    69     INCLUDE "control.h"
    7071
    7172    INTEGER                :: error,ncidpl,rid,rcod
     
    269270!=======================================================================
    270271  SUBROUTINE guide_main(itau,ucov,vcov,teta,q,masse,ps)
     272
     273    USE control_mod
    271274 
    272275    IMPLICIT NONE
     
    274277    INCLUDE "dimensions.h"
    275278    INCLUDE "paramet.h"
    276     INCLUDE "control.h"
    277279    INCLUDE "comconst.h"
    278280    INCLUDE "comvert.h"
     
    354356      dday_step=real(day_step)
    355357      IF (iguide_read.LT.0) THEN
    356           tau=ditau/dday_step/FLOAT(iguide_read)
     358          tau=ditau/dday_step/REAL(iguide_read)
    357359      ELSE
    358           tau=FLOAT(iguide_read)*ditau/dday_step
     360          tau=REAL(iguide_read)*ditau/dday_step
    359361      ENDIF
    360362      reste=tau-AINT(tau)
     
    541543            ENDDO
    542544        ENDDO
    543         fieldm(:,l)=fieldm(:,l)/FLOAT(imax(typ)-imin(typ)+1)
     545        fieldm(:,l)=fieldm(:,l)/REAL(imax(typ)-imin(typ)+1)
    544546    ! Compute forcing
    545547        DO j=1,hsize
  • LMDZ4/trunk/libf/dyn3d/infotrac.F90

    r1279 r1403  
    3131
    3232  SUBROUTINE infotrac_init
     33
     34    USE control_mod
     35 
    3336    IMPLICIT NONE
    3437!=======================================================================
     
    4952
    5053    INCLUDE "dimensions.h"
    51     INCLUDE "control.h"
    5254    INCLUDE "iniprint.h"
    5355
     
    217219          new_iq=new_iq+10 ! 9 tracers added
    218220       ELSE
    219           WRITE(lunout,*) 'This choice of advection schema is not available'
     221          WRITE(lunout,*) 'This choice of advection schema is not available',iq,hadv(iq),vadv(iq)
    220222          CALL abort_gcm('infotrac_init','Bad choice of advection schema - 1',1)
    221223       END IF
     
    258260          iadv(new_iq)=11
    259261       ELSE
    260           WRITE(lunout,*)'This choice of advection schema is not available'
     262          WRITE(lunout,*)'This choice of advection schema is not available',iq,hadv(iq),vadv(iq)
    261263          CALL abort_gcm('infotrac_init','Bad choice of advection schema - 2',1)
    262264       END IF
  • LMDZ4/trunk/libf/dyn3d/iniacademic.F

    r1279 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    88      USE filtreg_mod
    99      USE infotrac, ONLY : nqtot
     10      USE control_mod
     11 
    1012
    1113c%W%    %G%
     
    4446#include "ener.h"
    4547#include "temps.h"
    46 #include "control.h"
    4748#include "iniprint.h"
     49#include "logic.h"
    4850
    4951c   Arguments:
     
    8486        time_0=0.
    8587        day_ref=0
    86         annee_ref=0
     88        annee_ref=0
    8789
    8890        im         = iim
     
    9395        g      = 9.8
    9496        daysec = 86400.
    95         dtvr    = daysec/FLOAT(day_step)
     97        dtvr    = daysec/REAL(day_step)
    9698        zdtvr=dtvr
    9799        kappa  = 0.2857143
     
    105107        ang0       = 0.
    106108
     109        if (llm.eq.1) then
     110          ! specific initializations for the shallow water case
     111          kappa=1
     112        endif
     113       
    107114        CALL iniconst
    108115        CALL inigeom
    109116        CALL inifilr
    110117
    111         ps=0.
    112         phis=0.
     118        if (llm.eq.1) then
     119          ! initialize fields for the shallow water case, if required
     120          if (.not.read_start) then
     121            phis(:)=0.
     122            q(:,:,1)=1.e-10
     123            q(:,:,2)=1.e-15
     124            q(:,:,3:nqtot)=0.
     125            CALL sw_case_williamson91_6(vcov,ucov,teta,masse,ps)
     126          endif
     127        endif
     128
     129        if (iflag_phys.eq.2) then
     130          ! initializations for the academic case
     131          ps(:)=1.e5
     132          phis(:)=0.
    113133c---------------------------------------------------------------------
    114134
    115         taurappel=10.*daysec
     135          taurappel=10.*daysec
    116136
    117137c---------------------------------------------------------------------
     
    119139c   --------------------------------------
    120140
    121         DO l=1,llm
    122          zsig=ap(l)/preff+bp(l)
    123          if (zsig.gt.0.3) then
    124            lsup=l
    125            tetarappell=1./8.*(-log(zsig)-.5)
    126            DO j=1,jjp1
     141          DO l=1,llm
     142            zsig=ap(l)/preff+bp(l)
     143            if (zsig.gt.0.3) then
     144             lsup=l
     145             tetarappell=1./8.*(-log(zsig)-.5)
     146             DO j=1,jjp1
    127147             ddsin=sin(rlatu(j))-sin(pi/20.)
    128148             tetajl(j,l)=300.*(1+1./18.*(1.-3.*ddsin*ddsin)+tetarappell)
    129            ENDDO
    130           else
     149             ENDDO
     150            else
    131151c   Choix isotherme au-dessus de 300 mbar
    132            do j=1,jjp1
    133              tetajl(j,l)=tetajl(j,lsup)*(0.3/zsig)**kappa
    134            enddo
    135           endif ! of if (zsig.gt.0.3)
    136         ENDDO ! of DO l=1,llm
    137 
    138         do l=1,llm
    139            do j=1,jjp1
     152             do j=1,jjp1
     153               tetajl(j,l)=tetajl(j,lsup)*(0.3/zsig)**kappa
     154             enddo
     155            endif ! of if (zsig.gt.0.3)
     156          ENDDO ! of DO l=1,llm
     157
     158          do l=1,llm
     159            do j=1,jjp1
    140160              do i=1,iip1
    141161                 ij=(j-1)*iip1+i
    142162                 tetarappel(ij,l)=tetajl(j,l)
    143163              enddo
    144            enddo
    145         enddo
     164            enddo
     165          enddo
    146166
    147167c       call dump2d(jjp1,llm,tetajl,'TEQ   ')
    148168
    149         ps=1.e5
    150         phis=0.
    151         CALL pression ( ip1jmp1, ap, bp, ps, p       )
    152         CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf )
    153         CALL massdair(p,masse)
     169          CALL pression ( ip1jmp1, ap, bp, ps, p       )
     170          CALL exner_hyb( ip1jmp1, ps, p,alpha,beta, pks, pk, pkf )
     171          CALL massdair(p,masse)
    154172
    155173c  intialisation du vent et de la temperature
    156         teta(:,:)=tetarappel(:,:)
    157         CALL geopot(ip1jmp1,teta,pk,pks,phis,phi)
    158         call ugeostr(phi,ucov)
    159         vcov=0.
    160         q(:,:,1   )=1.e-10
    161         q(:,:,2   )=1.e-15
    162         q(:,:,3:nqtot)=0.
     174          teta(:,:)=tetarappel(:,:)
     175          CALL geopot(ip1jmp1,teta,pk,pks,phis,phi)
     176          call ugeostr(phi,ucov)
     177          vcov=0.
     178          q(:,:,1   )=1.e-10
     179          q(:,:,2   )=1.e-15
     180          q(:,:,3:nqtot)=0.
    163181
    164182
    165183c   perturbation aleatoire sur la temperature
    166         idum  = -1
    167         zz = ran1(idum)
    168         idum  = 0
    169         do l=1,llm
    170            do ij=iip2,ip1jm
     184          idum  = -1
     185          zz = ran1(idum)
     186          idum  = 0
     187          do l=1,llm
     188            do ij=iip2,ip1jm
    171189              teta(ij,l)=teta(ij,l)*(1.+0.005*ran1(idum))
    172            enddo
    173         enddo
    174 
    175         do l=1,llm
    176            do ij=1,ip1jmp1,iip1
     190            enddo
     191          enddo
     192
     193          do l=1,llm
     194            do ij=1,ip1jmp1,iip1
    177195              teta(ij+iim,l)=teta(ij,l)
    178            enddo
    179         enddo
     196            enddo
     197          enddo
    180198
    181199
     
    187205
    188206c   initialisation d'un traceur sur une colonne
    189         j=jjp1*3/4
    190         i=iip1/2
    191         ij=(j-1)*iip1+i
    192         q(ij,:,3)=1.
    193      
     207          j=jjp1*3/4
     208          i=iip1/2
     209          ij=(j-1)*iip1+i
     210          q(ij,:,3)=1.
     211        endif ! of if (iflag_phys.eq.2)
     212       
    194213      else
    195214        write(lunout,*)"iniacademic: planet types other than earth",
  • LMDZ4/trunk/libf/dyn3d/iniconst.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44      SUBROUTINE iniconst
     5
     6      USE control_mod
    57
    68      IMPLICIT NONE
     
    1618#include "comconst.h"
    1719#include "temps.h"
    18 #include "control.h"
    1920#include "comvert.h"
     21#include "iniprint.h"
    2022
    2123
     
    4749      r       = cpp * kappa
    4850
    49       PRINT*,' R  CP  Kappa ',  r , cpp,  kappa
     51      write(lunout,*)'iniconst: R  CP  Kappa ',  r , cpp,  kappa
    5052c
    5153c-----------------------------------------------------------------------
  • LMDZ4/trunk/libf/dyn3d/inidissip.F

    r1279 r1403  
    1111c   -------------
    1212
     13      USE control_mod
     14
    1315      IMPLICIT NONE
    1416#include "dimensions.h"
     
    1719#include "comconst.h"
    1820#include "comvert.h"
    19 #include "control.h"
    2021#include "logic.h"
    2122
     
    165166
    166167c     IF(.NOT.lstardis) THEN
    167          fact    = rad*24./float(jjm)
     168         fact    = rad*24./REAL(jjm)
    168169         fact    = fact*fact
    169170         PRINT*,'coef u ', fact/cdivu, 1./cdivu
  • LMDZ4/trunk/libf/dyn3d/inigeom.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    168168c
    169169      IF( nitergdiv.NE.2 ) THEN
    170         gamdi_gdiv = coefdis/ ( float(nitergdiv) -2. )
     170        gamdi_gdiv = coefdis/ ( REAL(nitergdiv) -2. )
    171171      ELSE
    172172        gamdi_gdiv = 0.
    173173      ENDIF
    174174      IF( nitergrot.NE.2 ) THEN
    175         gamdi_grot = coefdis/ ( float(nitergrot) -2. )
     175        gamdi_grot = coefdis/ ( REAL(nitergrot) -2. )
    176176      ELSE
    177177        gamdi_grot = 0.
    178178      ENDIF
    179179      IF( niterh.NE.2 ) THEN
    180         gamdi_h = coefdis/ ( float(niterh) -2. )
     180        gamdi_h = coefdis/ ( REAL(niterh) -2. )
    181181      ELSE
    182182        gamdi_h = 0.
     
    381381       yprp               = yprimu2(j-1)
    382382       rlatp              = rlatu2 (j-1)
    383 ccc       yprp             = fyprim( FLOAT(j) - 0.25 )
    384 ccc       rlatp            = fy    ( FLOAT(j) - 0.25 )
     383ccc       yprp             = fyprim( REAL(j) - 0.25 )
     384ccc       rlatp            = fy    ( REAL(j) - 0.25 )
    385385c
    386386      coslatp             = COS( rlatp )
     
    416416        rlatm    = rlatu1 (  j  )
    417417        yprm     = yprimu1(  j  )
    418 cc         rlatp    = fy    ( FLOAT(j) - 0.25 )
    419 cc         yprp     = fyprim( FLOAT(j) - 0.25 )
    420 cc         rlatm    = fy    ( FLOAT(j) + 0.25 )
    421 cc         yprm     = fyprim( FLOAT(j) + 0.25 )
     418cc         rlatp    = fy    ( REAL(j) - 0.25 )
     419cc         yprp     = fyprim( REAL(j) - 0.25 )
     420cc         rlatm    = fy    ( REAL(j) + 0.25 )
     421cc         yprm     = fyprim( REAL(j) + 0.25 )
    422422
    423423         coslatm  = COS( rlatm )
  • LMDZ4/trunk/libf/dyn3d/integrd.F

    r1279 r1403  
    55     $  (  nq,vcovm1,ucovm1,tetam1,psm1,massem1,
    66     $     dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps,masse,phis,finvmaold )
     7
     8      USE control_mod
    79
    810      IMPLICIT NONE
     
    3234#include "temps.h"
    3335#include "serre.h"
    34 #include "control.h"
    3536
    3637c   Arguments:
  • LMDZ4/trunk/libf/dyn3d/interp_horiz.F

    r616 r1403  
    11c
    2 c $Header$
     2c $Id$
    33c
    44      subroutine interp_horiz (varo,varn,imo,jmo,imn,jmn,lm,
     
    101101           end do
    102102           do ii =1, imn+1
    103              varn(ii,1,l) = totn/float(imn+1)
    104              varn(ii,jmn+1,l) = tots/float(imn+1)
     103             varn(ii,1,l) = totn/REAL(imn+1)
     104             varn(ii,jmn+1,l) = tots/REAL(imn+1)
    105105           end do
    106106       end do
  • LMDZ4/trunk/libf/dyn3d/interpre.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44       subroutine interpre(q,qppm,w,fluxwppm,masse,
    55     s            apppm,bpppm,massebx,masseby,pbaru,pbarv,
    66     s            unatppm,vnatppm,psppm)
     7
     8      USE control_mod
    79
    810       implicit none
     
    1719#include "logic.h"
    1820#include "temps.h"
    19 #include "control.h"
    2021#include "ener.h"
    2122#include "description.h"
  • LMDZ4/trunk/libf/dyn3d/juldate.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44        subroutine juldate(ian,imoi,ijou,oh,om,os,tjd,tjdsec)
  • LMDZ4/trunk/libf/dyn3d/leapfrog.F

    r1286 r1403  
    1515      USE guide_mod, ONLY : guide_main
    1616      USE write_field
     17      USE control_mod
    1718      IMPLICIT NONE
    1819
     
    5657#include "logic.h"
    5758#include "temps.h"
    58 #include "control.h"
    5959#include "ener.h"
    6060#include "description.h"
    6161#include "serre.h"
    62 #include "com_io_dyn.h"
     62!#include "com_io_dyn.h"
    6363#include "iniprint.h"
    6464#include "academic.h"
     
    197197
    198198      itau = 0
    199 c$$$      iday = day_ini+itau/day_step
    200 c$$$      time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0
    201 c$$$         IF(time.GT.1.) THEN
    202 c$$$          time = time-1.
    203 c$$$          iday = iday+1
    204 c$$$         ENDIF
     199c      iday = day_ini+itau/day_step
     200c      time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
     201c         IF(time.GT.1.) THEN
     202c          time = time-1.
     203c          iday = iday+1
     204c         ENDIF
    205205
    206206
     
    276276
    277277      IF( purmats ) THEN
     278      ! Purely Matsuno time stepping
    278279         IF( MOD(itau,iconser) .EQ.0.AND.  forward    ) conser = .TRUE.
    279280         IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE.
     
    281282     s          .and. iflag_phys.EQ.1                 ) apphys = .TRUE.
    282283      ELSE
     284      ! Leapfrog/Matsuno time stepping
    283285         IF( MOD(itau   ,iconser) .EQ. 0              ) conser = .TRUE.
    284286         IF( MOD(itau+1,idissip)  .EQ. 0              ) apdiss = .TRUE.
    285287         IF( MOD(itau+1,iphysiq).EQ.0.AND.iflag_phys.EQ.1) apphys=.TRUE.
    286288      END IF
     289
     290! Ehouarn: for Shallow Water case (ie: 1 vertical layer),
     291!          supress dissipation step
     292      if (llm.eq.1) then
     293        apdiss=.false.
     294      endif
    287295
    288296c-----------------------------------------------------------------------
     
    522530            IF(forward. OR. leapf) THEN
    523531              itau= itau + 1
    524 c$$$              iday= day_ini+itau/day_step
    525 c$$$              time= FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0
    526 c$$$                IF(time.GT.1.) THEN
    527 c$$$                  time = time-1.
    528 c$$$                  iday = iday+1
    529 c$$$                ENDIF
     532c              iday= day_ini+itau/day_step
     533c              time= REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
     534c                IF(time.GT.1.) THEN
     535c                  time = time-1.
     536c                  iday = iday+1
     537c                ENDIF
    530538            ENDIF
    531539
     
    559567               IF (ok_dynzon) THEN
    560568#ifdef CPP_IOIPSL
    561 !                  CALL writedynav(histaveid, itau,vcov ,
    562 !     ,                 ucov,teta,pk,phi,q,masse,ps,phis)
    563                   CALL bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav,
    564      ,                 ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q)
     569                 CALL bilan_dyn(2,dtvr*iperiod,dtvr*day_step*periodav,
     570     &                 ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q)
    565571#endif
    566572               END IF
    567 
    568             ENDIF
     573               IF (ok_dyn_ave) THEN
     574#ifdef CPP_IOIPSL
     575                 CALL writedynav(itau,vcov,
     576     &                 ucov,teta,pk,phi,q,masse,ps,phis)
     577#endif
     578               ENDIF
     579
     580            ENDIF ! of IF((MOD(itau,iperiod).EQ.0).OR.(itau.EQ.itaufin))
    569581
    570582c-----------------------------------------------------------------------
     
    572584c   ------------------------------
    573585
    574             IF( MOD(itau,iecri         ).EQ.0) THEN
    575 c           IF( MOD(itau,iecri*day_step).EQ.0) THEN
    576 
     586            IF( MOD(itau,iecri).EQ.0) THEN
     587             ! Ehouarn: output only during LF or Backward Matsuno
     588             if (leapf.or.(.not.leapf.and.(.not.forward))) then
    577589              nbetat = nbetatdem
    578590              CALL geopot(ip1jmp1,teta,pk,pks,phis,phi)
     
    583595              enddo
    584596#ifdef CPP_IOIPSL
    585 c             CALL writehist(histid,histvid,itau,vcov,
    586 c     &                      ucov,teta,phi,q,masse,ps,phis)
     597              if (ok_dyn_ins) then
     598!               write(lunout,*) "leapfrog: call writehist, itau=",itau
     599               CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis)
     600!               call WriteField('ucov',reshape(ucov,(/iip1,jmp1,llm/)))
     601!               call WriteField('vcov',reshape(vcov,(/iip1,jjm,llm/)))
     602!              call WriteField('teta',reshape(teta,(/iip1,jmp1,llm/)))
     603!               call WriteField('ps',reshape(ps,(/iip1,jmp1/)))
     604!               call WriteField('masse',reshape(masse,(/iip1,jmp1,llm/)))
     605              endif ! of if (ok_dyn_ins)
    587606#endif
    588607! For some Grads outputs of fields
    589              if (output_grads_dyn) then
     608              if (output_grads_dyn) then
    590609#include "write_grads_dyn.h"
    591              endif
    592 
     610              endif
     611             endif ! of if (leapf.or.(.not.leapf.and.(.not.forward)))
    593612            ENDIF ! of IF(MOD(itau,iecri).EQ.0)
    594613
     
    645664
    646665             itau =  itau + 1
    647 c$$$             iday = day_ini+itau/day_step
    648 c$$$             time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0
    649 c$$$
    650 c$$$                  IF(time.GT.1.) THEN
    651 c$$$                   time = time-1.
    652 c$$$                   iday = iday+1
    653 c$$$                  ENDIF
     666c             iday = day_ini+itau/day_step
     667c             time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
     668c
     669c                  IF(time.GT.1.) THEN
     670c                   time = time-1.
     671c                   iday = iday+1
     672c                  ENDIF
    654673
    655674               forward =  .FALSE.
     
    660679               GO TO 2
    661680
    662             ELSE ! of IF(forward)
     681            ELSE ! of IF(forward) i.e. backward step
    663682
    664683              IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN
     
    671690               IF (ok_dynzon) THEN
    672691#ifdef CPP_IOIPSL
    673 !                  CALL writedynav(histaveid, itau,vcov ,
    674 !     ,                 ucov,teta,pk,phi,q,masse,ps,phis)
    675                   CALL bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav,
    676      ,                 ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q)
    677 #endif
    678                END IF
     692                 CALL bilan_dyn(2,dtvr*iperiod,dtvr*day_step*periodav,
     693     &                 ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q)
     694#endif
     695               ENDIF
     696               IF (ok_dyn_ave) THEN
     697#ifdef CPP_IOIPSL
     698                 CALL writedynav(itau,vcov,
     699     &                 ucov,teta,pk,phi,q,masse,ps,phis)
     700#endif
     701               ENDIF
    679702
    680703              ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin)
     
    690713                enddo
    691714#ifdef CPP_IOIPSL
    692 c               CALL writehist( histid, histvid, itau,vcov ,
    693 c    &                           ucov,teta,phi,q,masse,ps,phis)
     715              if (ok_dyn_ins) then
     716!                write(lunout,*) "leapfrog: call writehist (b)",
     717!     &                        itau,iecri
     718                CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis)
     719              endif ! of if (ok_dyn_ins)
    694720#endif
    695721! For some Grads outputs
  • LMDZ4/trunk/libf/dyn3d/limit_netcdf.F90

    r1328 r1403  
    2020!  *    12/2009: D. Cugnet   (f77->f90, calendars, files from coupled runs)
    2121!-------------------------------------------------------------------------------
     22  USE control_mod
    2223#ifdef CPP_EARTH
    2324  USE dimphy
     
    2728                   NF90_DEF_DIM, NF90_DEF_VAR, NF90_PUT_VAR, NF90_PUT_ATT,     &
    2829                   NF90_NOERR,   NF90_NOWRITE, NF90_DOUBLE,  NF90_GLOBAL,      &
    29                    NF90_CLOBBER, NF90_ENDDEF,  NF90_UNLIMITED
     30                   NF90_CLOBBER, NF90_ENDDEF,  NF90_UNLIMITED, NF90_FLOAT
    3031  USE inter_barxy_m, only: inter_barxy
    3132#endif
     
    4546!-------------------------------------------------------------------------------
    4647! Local variables:
    47 #include "control.h"
    4848#include "logic.h"
    4949#include "comvert.h"
     
    293293  USE dimphy, ONLY : klon
    294294  USE phys_state_var_mod, ONLY : pctsrf
     295  USE control_mod
    295296  IMPLICIT NONE
    296297#include "dimensions.h"
    297298#include "paramet.h"
    298299#include "comgeom2.h"
    299 #include "control.h"
    300300#include "indicesol.h"
    301301#include "iniprint.h"
  • LMDZ4/trunk/libf/dyn3d/ppm3d.F

    r695 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44
     
    345345C
    346346      PI = 4. * ATAN(1.)
    347       DL = 2.*PI / float(IMR)
    348       DP =    PI / float(JMR)
     347      DL = 2.*PI / REAL(IMR)
     348      DP =    PI / REAL(JMR)
    349349C
    350350      if(IGD.eq.0) then
     
    388388      ZTC  = acos(CR1) * (180./PI)
    389389C
    390       JS0 = float(JMR)*(90.-ZTC)/180. + 2
     390      JS0 = REAL(JMR)*(90.-ZTC)/180. + 2
    391391      JS0 = max(JS0, J1+1)
    392392      IML = min(6*JS0/(J1-1)+2, 4*IMR/5)
     
    628628C Contribution from the N-S advection
    629629      do i=1,imr*(j2-j1+1)
    630       JT = float(J1) - VA(i,j1)
     630      JT = REAL(J1) - VA(i,j1)
    631631      wk1(i,j1,2) = VA(i,j1) * (q(i,jt,k,IC) - q(i,jt+1,k,IC))
    632632      enddo
     
    949949      IF(IORD.eq.1 .or. j.eq.j1. or. j.eq.j2) THEN
    950950      DO 1406 i=1,IMR
    951       iu = float(i) - uc(i,j)
     951      iu = REAL(i) - uc(i,j)
    9529521406  fx1(i) = qtmp(iu)
    953953      ELSE
     
    957957      if(IORD.eq.2 .or. j.le.j1vl .or. j.ge.j2vl) then
    958958      DO 1408 i=1,IMR
    959       iu = float(i) - uc(i,j)
     959      iu = REAL(i) - uc(i,j)
    9609601408  fx1(i) = qtmp(iu) + DC(iu)*(sign(1.,uc(i,j))-uc(i,j))
    961961      else
     
    11111111      if(JORD.eq.1) then
    11121112      DO 1000 i=1,len
    1113       JT = float(J1) - VC(i,J1)
     1113      JT = REAL(J1) - VC(i,J1)
    111411141000  fx(i,j1) = p(i,JT)
    11151115      else
     
    11231123      else
    11241124      DO 1200 i=1,len
    1125       JT = float(J1) - VC(i,J1)
     1125      JT = REAL(J1) - VC(i,J1)
    112611261200  fx(i,j1) = p(i,JT) + (sign(1.,VC(i,j1))-VC(i,j1))*DC2(i,JT)
    11271127      endif
     
    13581358        do j=j1-1,j2+1
    13591359      do i=1,imr
    1360       JP = float(j)-VA(i,j)
     1360      JP = REAL(j)-VA(i,j)
    13611361      ady(i,j) = VA(i,j)*(wk(i,jp)-wk(i,jp+1))
    13621362      enddo
     
    15821582      JMR = JNP-1
    15831583      do 55 j=2,JNP
    1584         ph5  =  -0.5*PI + (FLOAT(J-1)-0.5)*DP
     1584        ph5  =  -0.5*PI + (REAL(J-1)-0.5)*DP
    1585158555      cose(j) = cos(ph5)
    15861586C
     
    18341834C
    18351835c      if(first) then
    1836       DP = 4.*ATAN(1.)/float(JNP-1)
     1836      DP = 4.*ATAN(1.)/REAL(JNP-1)
    18371837      CAP1 = IMR*(1.-COS((j1-1.5)*DP))/DP
    18381838c      first = .false.
     
    18891889C Check Poles.
    18901890      if(q(1,1).lt.0.) then
    1891       dq = q(1,1)*cap1/float(IMR)*acosp(j1)
     1891      dq = q(1,1)*cap1/REAL(IMR)*acosp(j1)
    18921892      do i=1,imr
    18931893      q(i,1) = 0.
     
    18981898C
    18991899      if(q(1,JNP).lt.0.) then
    1900       dq = q(1,JNP)*cap1/float(IMR)*acosp(j2)
     1900      dq = q(1,JNP)*cap1/REAL(IMR)*acosp(j2)
    19011901      do i=1,imr
    19021902      q(i,JNP) = 0.
  • LMDZ4/trunk/libf/dyn3d/ran1.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44      FUNCTION RAN1(IDUM)
     
    2020          IX1=MOD(IA1*IX1+IC1,M1)
    2121          IX2=MOD(IA2*IX2+IC2,M2)
    22           R(J)=(FLOAT(IX1)+FLOAT(IX2)*RM2)*RM1
     22          R(J)=(REAL(IX1)+REAL(IX2)*RM2)*RM1
    232311      CONTINUE
    2424        IDUM=1
     
    3030      IF(J.GT.97.OR.J.LT.1)PAUSE
    3131      RAN1=R(J)
    32       R(J)=(FLOAT(IX1)+FLOAT(IX2)*RM2)*RM1
     32      R(J)=(REAL(IX1)+REAL(IX2)*RM2)*RM1
    3333      RETURN
    3434      END
  • LMDZ4/trunk/libf/dyn3d/sortvarc.F

    r1279 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44      SUBROUTINE sortvarc
     
    5959
    6060       dtvrs1j   = dtvr/daysec
    61        rjour     = FLOAT( INT( itau * dtvrs1j ))
     61       rjour     = REAL( INT( itau * dtvrs1j ))
    6262       heure     = ( itau*dtvrs1j-rjour ) * 24.
    6363       imjmp1    = iim * jjp1
     
    129129      ang   = SSUM(     llm,  angl, 1 )
    130130
    131 c      rday = FLOAT(INT ( day_ini + time ))
     131c      rday = REAL(INT ( day_ini + time ))
    132132c
    133        rday = FLOAT(INT(time-jD_ref-jH_ref))
     133       rday = REAL(INT(time-jD_ref-jH_ref))
    134134      IF(ptot0.eq.0.)  THEN
    135135         PRINT 3500, itau, rday, heure,time
  • LMDZ4/trunk/libf/dyn3d/sortvarc0.F

    r1279 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44      SUBROUTINE sortvarc0
     
    6060
    6161       dtvrs1j   = dtvr/daysec
    62        rjour     = FLOAT( INT( itau * dtvrs1j ))
     62       rjour     = REAL( INT( itau * dtvrs1j ))
    6363       heure     = ( itau*dtvrs1j-rjour ) * 24.
    6464       imjmp1    = iim * jjp1
     
    130130      ang0   = SSUM(     llm,  angl, 1 )
    131131
    132       rday = FLOAT(INT (time ))
     132      rday = REAL(INT (time ))
    133133c
    134134      PRINT 3500, itau, rday, heure, time
  • LMDZ4/trunk/libf/dyn3d/tourabs.F

    r644 r1403  
    5757        ELSE
    5858         rot( ij,l ) = (vcov(ij+1,l)/cv(ij+1)-vcov(ij,l)/cv(ij))/
    59      $                 (2.*pi*RAD*cos(rlatv(j)))*float(iim)
     59     $                 (2.*pi*RAD*cos(rlatv(j)))*REAL(iim)
    6060     $                +(ucov(ij+iip1,l)/cu(ij+iip1)-ucov(ij,l)/cu(ij))/
    61      $                 (pi*RAD)*(float(jjm)-1.)
     61     $                 (pi*RAD)*(REAL(jjm)-1.)
    6262c
    6363        ENDIF
  • LMDZ4/trunk/libf/dyn3d/traceurpole.F

    r524 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44          subroutine traceurpole(q,masse)
     5
     6      USE control_mod
    57
    68          implicit none
     
    1517#include "logic.h"
    1618#include "temps.h"
    17 #include "control.h"
    1819#include "ener.h"
    1920#include "description.h"
  • LMDZ4/trunk/libf/dyn3d/ugeostr.F

    r1279 r1403  
    4040            DO i=1,iim
    4141               u(i,j,l)=fact*(phi(i,j+1,l)-phi(i,j,l))
    42                um(j,l)=um(j,l)+u(i,j,l)/float(iim)
     42               um(j,l)=um(j,l)+u(i,j,l)/REAL(iim)
    4343            ENDDO
    4444         ENDDO
  • LMDZ4/trunk/libf/dyn3d/write_paramLMDZ_dyn.h

    r1279 r1403  
    77      itau_w=itau_dyn+itau
    88c
    9       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(prt_level)
     9      zx_tmp_2d(1:iip1,1:jjp1)=REAL(prt_level)
    1010      CALL histwrite(nid_ctesGCM, "prt_level", itau_w,
    1111     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    1212c
    13       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(dayref)
     13      zx_tmp_2d(1:iip1,1:jjp1)=REAL(dayref)
    1414      CALL histwrite(nid_ctesGCM, "dayref", itau_w,
    1515     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    1616c
    17       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(anneeref)
     17      zx_tmp_2d(1:iip1,1:jjp1)=REAL(anneeref)
    1818      CALL histwrite(nid_ctesGCM, "anneeref", itau_w,
    1919     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    2020c
    21       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(raz_date)
     21      zx_tmp_2d(1:iip1,1:jjp1)=REAL(raz_date)
    2222      CALL histwrite(nid_ctesGCM, "raz_date", itau_w,
    2323     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    2424c
    25       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(nday)
     25      zx_tmp_2d(1:iip1,1:jjp1)=REAL(nday)
    2626      CALL histwrite(nid_ctesGCM, "nday", itau_w,
    2727     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    2828c
    29       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(day_step)
     29      zx_tmp_2d(1:iip1,1:jjp1)=REAL(day_step)
    3030      CALL histwrite(nid_ctesGCM, "day_step", itau_w,
    3131     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    3232c
    33       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iperiod)
     33      zx_tmp_2d(1:iip1,1:jjp1)=REAL(iperiod)
    3434      CALL histwrite(nid_ctesGCM, "iperiod", itau_w,
    3535     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    3636c
    37       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iapp_tracvl)
     37      zx_tmp_2d(1:iip1,1:jjp1)=REAL(iapp_tracvl)
    3838      CALL histwrite(nid_ctesGCM, "iapp_tracvl", itau_w,
    3939     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    4040c
    41       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iconser)
     41      zx_tmp_2d(1:iip1,1:jjp1)=REAL(iconser)
    4242      CALL histwrite(nid_ctesGCM, "iconser", itau_w,
    4343     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    4444c
    45       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iecri)
     45      zx_tmp_2d(1:iip1,1:jjp1)=REAL(iecri)
    4646      CALL histwrite(nid_ctesGCM, "iecri", itau_w,
    4747     .               zx_tmp_2d,iip1*jjp1,ndex2d)
     
    5151     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    5252c
    53       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(idissip)
     53      zx_tmp_2d(1:iip1,1:jjp1)=REAL(idissip)
    5454      CALL histwrite(nid_ctesGCM, "idissip", itau_w,
    5555     .               zx_tmp_2d,iip1*jjp1,ndex2d)
     
    6363     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    6464c
    65       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(nitergdiv)
     65      zx_tmp_2d(1:iip1,1:jjp1)=REAL(nitergdiv)
    6666      CALL histwrite(nid_ctesGCM, "nitergdiv", itau_w,
    6767     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    6868c
    69       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(nitergrot)
     69      zx_tmp_2d(1:iip1,1:jjp1)=REAL(nitergrot)
    7070      CALL histwrite(nid_ctesGCM, "nitergrot", itau_w,
    7171     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    7272c
    73       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(niterh)
     73      zx_tmp_2d(1:iip1,1:jjp1)=REAL(niterh)
    7474      CALL histwrite(nid_ctesGCM, "niterh", itau_w,
    7575     .               zx_tmp_2d,iip1*jjp1,ndex2d)
     
    118118     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    119119c
    120       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iflag_phys)
     120      zx_tmp_2d(1:iip1,1:jjp1)=REAL(iflag_phys)
    121121      CALL histwrite(nid_ctesGCM, "iflag_phys", itau_w,
    122122     .               zx_tmp_2d,iip1*jjp1,ndex2d)
    123123c
    124       zx_tmp_2d(1:iip1,1:jjp1)=FLOAT(iphysiq)
     124      zx_tmp_2d(1:iip1,1:jjp1)=REAL(iphysiq)
    125125      CALL histwrite(nid_ctesGCM, "iphysiq", itau_w,
    126126     .               zx_tmp_2d,iip1*jjp1,ndex2d)
Note: See TracChangeset for help on using the changeset viewer.