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
44 edited
4 copied

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk

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

    r774 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44      subroutine adaptdt(nadv,dtbon,n,pbaru,
    55     c                   masse)
     6
     7      USE control_mod
    68
    79      IMPLICIT NONE
     
    1618#include "logic.h"
    1719#include "temps.h"
    18 #include "control.h"
    1920#include "ener.h"
    2021#include "description.h"
  • LMDZ4/trunk/libf/dyn3dpar/advtrac_p.F

    r1146 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    2323      USE times
    2424      USE infotrac
     25      USE control_mod
    2526      IMPLICIT NONE
    2627c
     
    3334#include "logic.h"
    3435#include "temps.h"
    35 #include "control.h"
    3636#include "ener.h"
    3737#include "description.h"
     
    215215         ijb=ij_begin
    216216         ije=ij_end
    217          flxw(ijb:ije,1:llm)=wg(ijb:ije,1:llm)/FLOAT(iapp_tracvl)
     217         flxw(ijb:ije,1:llm)=wg(ijb:ije,1:llm)/REAL(iapp_tracvl)
    218218
    219219c  test sur l'eventuelle creation de valeurs negatives de la masse
  • LMDZ4/trunk/libf/dyn3dpar/bilan_dyn_p.F

    r1279 r1403  
    511511     .                        /masse_cum(:,jjb:jje,:)
    512512      enddo
    513       zz=1./float(ncum)
     513      zz=1./REAL(ncum)
    514514
    515515      jjb=jj_begin
  • LMDZ4/trunk/libf/dyn3dpar/caladvtrac_p.F

    r1279 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    99      USE parallel
    1010      USE infotrac
     11      USE control_mod
    1112c
    1213      IMPLICIT NONE
     
    2526#include "paramet.h"
    2627#include "comconst.h"
    27 #include "control.h"
    2828
    2929c   Arguments:
  • LMDZ4/trunk/libf/dyn3dpar/calfis_p.F

    r1279 r1403  
    3434      USE dimphy
    3535      USE mod_phys_lmdz_para, mpi_root_xx=>mpi_root
     36      USE mod_interface_dyn_phys
     37      USE IOPHY
     38#endif
    3639      USE parallel, ONLY : omp_chunk, using_mpi
    37       USE mod_interface_dyn_phys
    3840      USE Write_Field
    3941      Use Write_field_p
    4042      USE Times
    41       USE IOPHY
    4243      USE infotrac
     44      USE control_mod
    4345
    4446      IMPLICIT NONE
     
    107109#include "comvert.h"
    108110#include "comgeom2.h"
    109 #include "control.h"
     111#include "iniprint.h"
    110112#ifdef CPP_MPI
    111113      include 'mpif.h'
     
    114116c    -----------
    115117      LOGICAL  lafin
    116       REAL heure
    117 
     118!      REAL heure
     119      REAL, intent(in):: jD_cur, jH_cur
    118120      REAL pvcov(iip1,jjm,llm)
    119121      REAL pucov(iip1,jjp1,llm)
     
    128130      REAL pdteta(iip1,jjp1,llm)
    129131      REAL pdq(iip1,jjp1,llm,nqtot)
     132      REAL flxw(iip1,jjp1,llm)  ! Flux de masse verticale sur la grille dynamique
    130133c
    131134      REAL pps(iip1,jjp1)
     
    143146      REAL clesphy0( longcles )
    144147
    145 
     148#ifdef CPP_EARTH
    146149c    Local variables :
    147150c    -----------------
     
    180183      REAL,SAVE,ALLOCATABLE ::  flxwfi_omp(:,:)     ! Flux de masse verticale sur la grille physiq
    181184
     185!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     186! Introduction du splitting (FH)
     187! Question pour Yann :
     188! J'ai été surpris au début que les tableaux zufi_omp, zdufi_omp n'co soitent
     189! en SAVE. Je crois comprendre que c'est parce que tu voulais qu'il
     190! soit allocatable (plutot par exemple que de passer une dimension
     191! dépendant du process en argument des routines) et que, du coup,
     192! le SAVE évite d'avoir à refaire l'allocation à chaque appel.
     193! Tu confirmes ?
     194! J'ai suivi le même principe pour les zdufic_omp
     195! Mais c'est surement bien que tu controles.
     196!
     197
     198      REAL,ALLOCATABLE,SAVE :: zdufic_omp(:,:)
     199      REAL,ALLOCATABLE,SAVE :: zdvfic_omp(:,:)
     200      REAL,ALLOCATABLE,SAVE :: zdtfic_omp(:,:)
     201      REAL,ALLOCATABLE,SAVE :: zdqfic_omp(:,:,:)
     202      REAL jH_cur_split,zdt_split
     203      LOGICAL debut_split,lafin_split
     204      INTEGER isplit
     205!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     206
    182207c$OMP THREADPRIVATE(zplev_omp,zplay_omp,zphi_omp,zphis_omp,
    183208c$OMP+                 presnivs_omp,zufi_omp,zvfi_omp,ztfi_omp,
    184209c$OMP+                 zqfi_omp,zdufi_omp,zdvfi_omp,
    185 c$OMP+                 zdtfi_omp,zdqfi_omp,zdpsrf_omp,flxwfi_omp)       
     210c$OMP+                 zdtfi_omp,zdqfi_omp,zdpsrf_omp,flxwfi_omp,
     211c$OMP+                 zdufic_omp,zdvfic_omp,zdtfic_omp,zdqfic_omp)       
    186212
    187213      LOGICAL,SAVE :: first_omp=.true.
     
    199225      REAL PVteta(klon,ntetaSTD)
    200226     
    201       REAL flxw(iip1,jjp1,llm)  ! Flux de masse verticale sur la grille dynamique
    202227     
    203228      REAL SSUM
     
    207232      SAVE firstcal,debut
    208233c$OMP THREADPRIVATE(firstcal,debut)
    209       REAL, intent(in):: jD_cur, jH_cur
    210234     
    211235      REAL,SAVE,dimension(1:iim,1:llm):: du_send,du_recv,dv_send,dv_recv
     
    235259        debut = .TRUE.
    236260        IF (ngridmx.NE.2+(jjm-1)*iim) THEN
    237          PRINT*,'STOP dans calfis'
    238          PRINT*,'La dimension ngridmx doit etre egale a 2 + (jjm-1)*iim'
    239          PRINT*,'  ngridmx  jjm   iim   '
    240          PRINT*,ngridmx,jjm,iim
     261         write(lunout,*) 'STOP dans calfis'
     262         write(lunout,*)
     263     &   'La dimension ngridmx doit etre egale a 2 + (jjm-1)*iim'
     264         write(lunout,*) '  ngridmx  jjm   iim   '
     265         write(lunout,*) ngridmx,jjm,iim
    241266         STOP
    242267        ENDIF
     
    498523        allocate(zdtfi_omp(klon,llm))
    499524        allocate(zdqfi_omp(klon,llm,nqtot))
     525        allocate(zdufic_omp(klon,llm))
     526        allocate(zdvfic_omp(klon,llm))
     527        allocate(zdtfic_omp(klon,llm))
     528        allocate(zdqfic_omp(klon,llm,nqtot))
    500529        allocate(zdpsrf_omp(klon))
    501530        allocate(flxwfi_omp(klon,llm))
     
    600629      if (planet_type=="earth") then
    601630#ifdef CPP_EARTH
     631
     632!$OMP MASTER
     633      write(lunout,*) 'PHYSIQUE AVEC NSPLIT_PHYS=',nsplit_phys
     634!$OMP END MASTER
     635      zdt_split=dtphys/nsplit_phys
     636      zdufic_omp(:,:)=0.
     637      zdvfic_omp(:,:)=0.
     638      zdtfic_omp(:,:)=0.
     639      zdqfic_omp(:,:,:)=0.
     640
     641      do isplit=1,nsplit_phys
     642
     643         jH_cur_split=jH_cur+(isplit-1) * dtvr / (daysec *nsplit_phys)
     644         debut_split=debut.and.isplit==1
     645         lafin_split=lafin.and.isplit==nsplit_phys
     646
     647
    602648      CALL physiq (klon,
    603649     .             llm,
    604      .             debut,
    605      .             lafin,
     650     .             debut_split,
     651     .             lafin_split,
    606652     .             jD_cur,
    607      .             jH_cur,
    608      .             dtphys,
     653     .             jH_cur_split,
     654     .             zdt_split,
    609655     .             zplev_omp,
    610656     .             zplay_omp,
     
    628674     .             pducov,
    629675     .             PVteta)
     676
     677         zufi_omp(:,:)=zufi_omp(:,:)+zdufi_omp(:,:)*zdt_split
     678         zvfi_omp(:,:)=zvfi_omp(:,:)+zdvfi_omp(:,:)*zdt_split
     679         ztfi_omp(:,:)=ztfi_omp(:,:)+zdtfi_omp(:,:)*zdt_split
     680         zqfi_omp(:,:,:)=zqfi_omp(:,:,:)+zdqfi_omp(:,:,:)*zdt_split
     681
     682         zdufic_omp(:,:)=zdufic_omp(:,:)+zdufi_omp(:,:)
     683         zdvfic_omp(:,:)=zdvfic_omp(:,:)+zdvfi_omp(:,:)
     684         zdtfic_omp(:,:)=zdtfic_omp(:,:)+zdtfi_omp(:,:)
     685         zdqfic_omp(:,:,:)=zdqfic_omp(:,:,:)+zdqfi_omp(:,:,:)
     686
     687      enddo
     688
     689      zdufi_omp(:,:)=zdufic_omp(:,:)/nsplit_phys
     690      zdvfi_omp(:,:)=zdvfic_omp(:,:)/nsplit_phys
     691      zdtfi_omp(:,:)=zdtfic_omp(:,:)/nsplit_phys
     692      zdqfi_omp(:,:,:)=zdqfic_omp(:,:,:)/nsplit_phys
     693
    630694#endif
    631695      endif !of if (planet_type=="earth")
     
    10471111
    10481112#else
    1049       write(*,*) "calfis_p: for now can only work with parallel physics"
     1113      write(lunout,*)
     1114     & "calfis_p: for now can only work with parallel physics"
    10501115      stop
    10511116#endif
  • LMDZ4/trunk/libf/dyn3dpar/ce0l.F90

    r1319 r1403  
    1515!     masque is created in etat0, passed to limit to ensure consistancy.
    1616!-------------------------------------------------------------------------------
     17  USE control_mod
    1718#ifdef CPP_EARTH
    1819! This prog. is designed to work for Earth
     
    3940#include "indicesol.h"
    4041#include "iniprint.h"
    41 #include "control.h"
    4242#include "temps.h"
    4343#include "logic.h"
  • LMDZ4/trunk/libf/dyn3dpar/conf_gcm.F

    r1323 r1403  
    1616      use mod_hallo, ONLY : use_mpi_alloc
    1717      use parallel, ONLY : omp_chunk
     18      USE control_mod
    1819      IMPLICIT NONE
    1920c-----------------------------------------------------------------------
     
    3839#include "dimensions.h"
    3940#include "paramet.h"
    40 #include "control.h"
    4141#include "logic.h"
    4242#include "serre.h"
     
    173173       CALL getin('day_step',day_step)
    174174
     175!Config  Key  = nsplit_phys
     176!Config  Desc = nombre d'iteration de la physique
     177!Config  Def  = 240
     178!Config  Help = nombre d'itration de la physique
     179!
     180       nsplit_phys = 1
     181       CALL getin('nsplit_phys',nsplit_phys)
     182
    175183!Config  Key  = iperiod
    176184!Config  Desc = periode pour le pas Matsuno
     
    589597      CALL getin('ok_dynzon',ok_dynzon)
    590598
     599!Config  Key  = ok_dyn_ins
     600!Config  Desc = sorties instantanees dans la dynamique
     601!Config  Def  = n
     602!Config  Help =
     603!Config         
     604      ok_dyn_ins = .FALSE.
     605      CALL getin('ok_dyn_ins',ok_dyn_ins)
     606
     607!Config  Key  = ok_dyn_ave
     608!Config  Desc = sorties moyennes dans la dynamique
     609!Config  Def  = n
     610!Config  Help =
     611!Config         
     612      ok_dyn_ave = .FALSE.
     613      CALL getin('ok_dyn_ave',ok_dyn_ave)
    591614
    592615      write(lunout,*)' #########################################'
     
    599622      write(lunout,*)' day_step = ', day_step
    600623      write(lunout,*)' iperiod = ', iperiod
     624      write(lunout,*)' nsplit_phys = ', nsplit_phys
    601625      write(lunout,*)' iconser = ', iconser
    602626      write(lunout,*)' iecri = ', iecri
     
    628652      write(lunout,*)' config_inca = ', config_inca
    629653      write(lunout,*)' ok_dynzon = ', ok_dynzon
     654      write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
     655      write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
    630656
    631657      RETURN
     
    760786      ok_dynzon = .FALSE.
    761787      CALL getin('ok_dynzon',ok_dynzon)
     788
     789!Config  Key  = ok_dyn_ins
     790!Config  Desc = sorties instantanees dans la dynamique
     791!Config  Def  = n
     792!Config  Help =
     793!Config         
     794      ok_dyn_ins = .FALSE.
     795      CALL getin('ok_dyn_ins',ok_dyn_ins)
     796
     797!Config  Key  = ok_dyn_ave
     798!Config  Desc = sorties moyennes dans la dynamique
     799!Config  Def  = n
     800!Config  Help =
     801!Config         
     802      ok_dyn_ave = .FALSE.
     803      CALL getin('ok_dyn_ave',ok_dyn_ave)
    762804
    763805!Config  Key  = use_filtre_fft
     
    870912      write(lunout,*)' config_inca = ', config_inca
    871913      write(lunout,*)' ok_dynzon = ', ok_dynzon
     914      write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
     915      write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
    872916      write(lunout,*)' use_filtre_fft = ', use_filtre_fft
    873917      write(lunout,*)' use_mpi_alloc = ', use_mpi_alloc
  • LMDZ4/trunk/libf/dyn3dpar/defrun.F

    r985 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c
     
    66      SUBROUTINE defrun( tapedef, etatinit, clesphy0 )
    77c
     8      USE control_mod
    89      IMPLICIT NONE
    910c-----------------------------------------------------------------------
     
    2829#include "dimensions.h"
    2930#include "paramet.h"
    30 #include "control.h"
    3131#include "logic.h"
    3232#include "serre.h"
     
    241241       clesphy0(i) = 0.
    242242      ENDDO
    243                           clesphy0(1) = FLOAT( iflag_con )
    244                           clesphy0(2) = FLOAT( nbapp_rad )
     243                          clesphy0(1) = REAL( iflag_con )
     244                          clesphy0(2) = REAL( nbapp_rad )
    245245
    246246       IF( cycle_diurne  ) clesphy0(3) =  1.
  • LMDZ4/trunk/libf/dyn3dpar/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/dyn3dpar/dynetat0.F

    r1146 r1403  
    11!
    2 ! $Header$
     2! $Id $
    33!
    44      SUBROUTINE dynetat0(fichnom,vcov,ucov,
    55     .                    teta,q,masse,ps,phis,time)
     6
    67      USE infotrac
    78      IMPLICIT NONE
     
    3334#include "serre.h"
    3435#include "logic.h"
     36#include "iniprint.h"
    3537
    3638c   Arguments:
     
    5254
    5355c-----------------------------------------------------------------------
     56
    5457c  Ouverture NetCDF du fichier etat initial
    5558
    5659      ierr = NF_OPEN (fichnom, NF_NOWRITE,nid)
    5760      IF (ierr.NE.NF_NOERR) THEN
    58         write(6,*)' Pb d''ouverture du fichier start.nc'
    59         write(6,*)' ierr = ', ierr
     61        write(lunout,*)'dynetat0: Pb d''ouverture du fichier start.nc'
     62        write(lunout,*)' ierr = ', ierr
    6063        CALL ABORT
    6164      ENDIF
     
    6467      ierr = NF_INQ_VARID (nid, "controle", nvarid)
    6568      IF (ierr .NE. NF_NOERR) THEN
    66          PRINT*, "dynetat0: Le champ <controle> est absent"
     69         write(lunout,*)"dynetat0: Le champ <controle> est absent"
    6770         CALL abort
    6871      ENDIF
     
    7376#endif
    7477      IF (ierr .NE. NF_NOERR) THEN
    75          PRINT*, "dynetat0: Lecture echoue pour <controle>"
     78         write(lunout,*)"dynetat0: Lecture echoue pour <controle>"
    7679         CALL abort
    7780      ENDIF
     
    119122c
    120123c
    121       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
    122126
    123127      IF(   im.ne.iim           )  THEN
     
    134138      ierr = NF_INQ_VARID (nid, "rlonu", nvarid)
    135139      IF (ierr .NE. NF_NOERR) THEN
    136          PRINT*, "dynetat0: Le champ <rlonu> est absent"
     140         write(lunout,*)"dynetat0: Le champ <rlonu> est absent"
    137141         CALL abort
    138142      ENDIF
     
    143147#endif
    144148      IF (ierr .NE. NF_NOERR) THEN
    145          PRINT*, "dynetat0: Lecture echouee pour <rlonu>"
     149         write(lunout,*)"dynetat0: Lecture echouee pour <rlonu>"
    146150         CALL abort
    147151      ENDIF
     
    149153      ierr = NF_INQ_VARID (nid, "rlatu", nvarid)
    150154      IF (ierr .NE. NF_NOERR) THEN
    151          PRINT*, "dynetat0: Le champ <rlatu> est absent"
     155         write(lunout,*)"dynetat0: Le champ <rlatu> est absent"
    152156         CALL abort
    153157      ENDIF
     
    158162#endif
    159163      IF (ierr .NE. NF_NOERR) THEN
    160          PRINT*, "dynetat0: Lecture echouee pour <rlatu>"
     164         write(lunout,*)"dynetat0: Lecture echouee pour <rlatu>"
    161165         CALL abort
    162166      ENDIF
     
    164168      ierr = NF_INQ_VARID (nid, "rlonv", nvarid)
    165169      IF (ierr .NE. NF_NOERR) THEN
    166          PRINT*, "dynetat0: Le champ <rlonv> est absent"
     170         write(lunout,*)"dynetat0: Le champ <rlonv> est absent"
    167171         CALL abort
    168172      ENDIF
     
    173177#endif
    174178      IF (ierr .NE. NF_NOERR) THEN
    175          PRINT*, "dynetat0: Lecture echouee pour <rlonv>"
     179         write(lunout,*)"dynetat0: Lecture echouee pour <rlonv>"
    176180         CALL abort
    177181      ENDIF
     
    179183      ierr = NF_INQ_VARID (nid, "rlatv", nvarid)
    180184      IF (ierr .NE. NF_NOERR) THEN
    181          PRINT*, "dynetat0: Le champ <rlatv> est absent"
     185         write(lunout,*)"dynetat0: Le champ <rlatv> est absent"
    182186         CALL abort
    183187      ENDIF
     
    188192#endif
    189193      IF (ierr .NE. NF_NOERR) THEN
    190          PRINT*, "dynetat0: Lecture echouee pour rlatv"
     194         write(lunout,*)"dynetat0: Lecture echouee pour rlatv"
    191195         CALL abort
    192196      ENDIF
     
    194198      ierr = NF_INQ_VARID (nid, "cu", nvarid)
    195199      IF (ierr .NE. NF_NOERR) THEN
    196          PRINT*, "dynetat0: Le champ <cu> est absent"
     200         write(lunout,*)"dynetat0: Le champ <cu> est absent"
    197201         CALL abort
    198202      ENDIF
     
    203207#endif
    204208      IF (ierr .NE. NF_NOERR) THEN
    205          PRINT*, "dynetat0: Lecture echouee pour <cu>"
     209         write(lunout,*)"dynetat0: Lecture echouee pour <cu>"
    206210         CALL abort
    207211      ENDIF
     
    209213      ierr = NF_INQ_VARID (nid, "cv", nvarid)
    210214      IF (ierr .NE. NF_NOERR) THEN
    211          PRINT*, "dynetat0: Le champ <cv> est absent"
     215         write(lunout,*)"dynetat0: Le champ <cv> est absent"
    212216         CALL abort
    213217      ENDIF
     
    218222#endif
    219223      IF (ierr .NE. NF_NOERR) THEN
    220          PRINT*, "dynetat0: Lecture echouee pour <cv>"
     224         write(lunout,*)"dynetat0: Lecture echouee pour <cv>"
    221225         CALL abort
    222226      ENDIF
     
    224228      ierr = NF_INQ_VARID (nid, "aire", nvarid)
    225229      IF (ierr .NE. NF_NOERR) THEN
    226          PRINT*, "dynetat0: Le champ <aire> est absent"
     230         write(lunout,*)"dynetat0: Le champ <aire> est absent"
    227231         CALL abort
    228232      ENDIF
     
    233237#endif
    234238      IF (ierr .NE. NF_NOERR) THEN
    235          PRINT*, "dynetat0: Lecture echouee pour <aire>"
     239         write(lunout,*)"dynetat0: Lecture echouee pour <aire>"
    236240         CALL abort
    237241      ENDIF
     
    239243      ierr = NF_INQ_VARID (nid, "phisinit", nvarid)
    240244      IF (ierr .NE. NF_NOERR) THEN
    241          PRINT*, "dynetat0: Le champ <phisinit> est absent"
     245         write(lunout,*)"dynetat0: Le champ <phisinit> est absent"
    242246         CALL abort
    243247      ENDIF
     
    248252#endif
    249253      IF (ierr .NE. NF_NOERR) THEN
    250          PRINT*, "dynetat0: Lecture echouee pour <phisinit>"
     254         write(lunout,*)"dynetat0: Lecture echouee pour <phisinit>"
    251255         CALL abort
    252256      ENDIF
     
    254258      ierr = NF_INQ_VARID (nid, "temps", nvarid)
    255259      IF (ierr .NE. NF_NOERR) THEN
    256          PRINT*, "dynetat0: Le champ <temps> est absent"
     260         write(lunout,*)"dynetat0: Le champ <temps> est absent"
    257261         CALL abort
    258262      ENDIF
     
    263267#endif
    264268      IF (ierr .NE. NF_NOERR) THEN
    265          PRINT*, "dynetat0: Lecture echouee <temps>"
     269         write(lunout,*)"dynetat0: Lecture echouee <temps>"
    266270         CALL abort
    267271      ENDIF
     
    269273      ierr = NF_INQ_VARID (nid, "ucov", nvarid)
    270274      IF (ierr .NE. NF_NOERR) THEN
    271          PRINT*, "dynetat0: Le champ <ucov> est absent"
     275         write(lunout,*)"dynetat0: Le champ <ucov> est absent"
    272276         CALL abort
    273277      ENDIF
     
    278282#endif
    279283      IF (ierr .NE. NF_NOERR) THEN
    280          PRINT*, "dynetat0: Lecture echouee pour <ucov>"
     284         write(lunout,*)"dynetat0: Lecture echouee pour <ucov>"
    281285         CALL abort
    282286      ENDIF
     
    284288      ierr = NF_INQ_VARID (nid, "vcov", nvarid)
    285289      IF (ierr .NE. NF_NOERR) THEN
    286          PRINT*, "dynetat0: Le champ <vcov> est absent"
     290         write(lunout,*)"dynetat0: Le champ <vcov> est absent"
    287291         CALL abort
    288292      ENDIF
     
    293297#endif
    294298      IF (ierr .NE. NF_NOERR) THEN
    295          PRINT*, "dynetat0: Lecture echouee pour <vcov>"
     299         write(lunout,*)"dynetat0: Lecture echouee pour <vcov>"
    296300         CALL abort
    297301      ENDIF
     
    299303      ierr = NF_INQ_VARID (nid, "teta", nvarid)
    300304      IF (ierr .NE. NF_NOERR) THEN
    301          PRINT*, "dynetat0: Le champ <teta> est absent"
     305         write(lunout,*)"dynetat0: Le champ <teta> est absent"
    302306         CALL abort
    303307      ENDIF
     
    308312#endif
    309313      IF (ierr .NE. NF_NOERR) THEN
    310          PRINT*, "dynetat0: Lecture echouee pour <teta>"
    311          CALL abort
    312       ENDIF
    313 
    314 
     314         write(lunout,*)"dynetat0: Lecture echouee pour <teta>"
     315         CALL abort
     316      ENDIF
     317
     318
     319      IF(nqtot.GE.1) THEN
    315320      DO iq=1,nqtot
    316321        ierr =  NF_INQ_VARID (nid, tname(iq), nvarid)
    317322        IF (ierr .NE. NF_NOERR) THEN
    318            PRINT*, "dynetat0: Le champ <"//tname(iq)//"> est absent"
    319            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"
    320326           q(:,:,iq)=0.
    321327        ELSE
     
    326332#endif
    327333          IF (ierr .NE. NF_NOERR) THEN
    328              PRINT*, "dynetat0: Lecture echouee pour "//tname(iq)
    329              CALL abort
     334            write(lunout,*)"dynetat0: Lecture echouee pour "//tname(iq)
     335            CALL abort
    330336          ENDIF
    331337        ENDIF
    332338      ENDDO
     339      ENDIF
    333340
    334341      ierr = NF_INQ_VARID (nid, "masse", nvarid)
    335342      IF (ierr .NE. NF_NOERR) THEN
    336          PRINT*, "dynetat0: Le champ <masse> est absent"
     343         write(lunout,*)"dynetat0: Le champ <masse> est absent"
    337344         CALL abort
    338345      ENDIF
     
    343350#endif
    344351      IF (ierr .NE. NF_NOERR) THEN
    345          PRINT*, "dynetat0: Lecture echouee pour <masse>"
     352         write(lunout,*)"dynetat0: Lecture echouee pour <masse>"
    346353         CALL abort
    347354      ENDIF
     
    349356      ierr = NF_INQ_VARID (nid, "ps", nvarid)
    350357      IF (ierr .NE. NF_NOERR) THEN
    351          PRINT*, "dynetat0: Le champ <ps> est absent"
     358         write(lunout,*)"dynetat0: Le champ <ps> est absent"
    352359         CALL abort
    353360      ENDIF
     
    358365#endif
    359366      IF (ierr .NE. NF_NOERR) THEN
    360          PRINT*, "dynetat0: Lecture echouee pour <ps>"
     367         write(lunout,*)"dynetat0: Lecture echouee pour <ps>"
    361368         CALL abort
    362369      ENDIF
  • LMDZ4/trunk/libf/dyn3dpar/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/dyn3dpar/dynredem_p.F

    r1279 r1403  
    7474       tab_cntrl(l) = 0.
    7575      ENDDO
    76        tab_cntrl(1)  = FLOAT(iim)
    77        tab_cntrl(2)  = FLOAT(jjm)
    78        tab_cntrl(3)  = FLOAT(llm)
    79        tab_cntrl(4)  = FLOAT(day_ref)
    80        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)
    8181       tab_cntrl(6)  = rad
    8282       tab_cntrl(7)  = omeg
     
    118118      ENDIF
    119119
    120        tab_cntrl(30) = FLOAT(iday_end)
    121        tab_cntrl(31) = FLOAT(itau_dyn + itaufin)
     120       tab_cntrl(30) =  REAL(iday_end)
     121       tab_cntrl(31) =  REAL(itau_dyn + itaufin)
    122122c
    123123c    .........................................................
     
    521521      USE parallel
    522522      USE infotrac
     523      USE control_mod
    523524      IMPLICIT NONE
    524525c=================================================================
     
    532533#include "comgeom.h"
    533534#include "temps.h"
    534 #include "control.h"
    535535
    536536      INTEGER l
     
    608608      ierr = NF_GET_VAR_REAL(nid, nvarid, tab_cntrl)
    609609#endif
    610        tab_cntrl(31) = FLOAT(itau_dyn + itaufin)
     610       tab_cntrl(31) =  REAL(itau_dyn + itaufin)
    611611#ifdef NC_DOUBLE
    612612      ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tab_cntrl)
  • LMDZ4/trunk/libf/dyn3dpar/etat0_netcdf.F90

    r1328 r1403  
    2424  USE netcdf, ONLY : NF90_OPEN, NF90_NOWRITE, NF90_CLOSE, NF90_NOERR
    2525#endif
     26  USE control_mod
    2627  IMPLICIT NONE
    2728!-------------------------------------------------------------------------------
     
    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/dyn3dpar/exner_hyb.F

    r774 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/dyn3dpar/exner_hyb_p.F

    r985 r1403  
     1!
     2! $Id $
     3!
    14      SUBROUTINE  exner_hyb_p ( ngrid, ps, p,alpha,beta, pks, pk, pkf )
    25c
     
    5154      INTEGER ije,ijb,jje,jjb
    5255c
    53 c$OMP BARRIER           
     56c$OMP BARRIER
     57
     58      if (llm.eq.1) then
     59        ! Specific behaviour for Shallow Water (1 vertical layer) case
     60     
     61        ! Sanity checks
     62        if (kappa.ne.1) then
     63          call abort_gcm("exner_hyb",
     64     &    "kappa!=1 , but running in Shallow Water mode!!",42)
     65        endif
     66        if (cpp.ne.r) then
     67        call abort_gcm("exner_hyb",
     68     &    "cpp!=r , but running in Shallow Water mode!!",42)
     69        endif
     70       
     71        ! Compute pks(:),pk(:),pkf(:)
     72        ijb=ij_begin
     73        ije=ij_end
     74!$OMP DO SCHEDULE(STATIC)
     75        DO ij=ijb, ije
     76          pks(ij)=(cpp/preff)*ps(ij)
     77          pk(ij,1) = .5*pks(ij)
     78          pkf(ij,1)=pk(ij,1)
     79        ENDDO
     80!$OMP ENDDO
     81
     82!$OMP MASTER
     83      if (pole_nord) then
     84        DO  ij   = 1, iim
     85          ppn(ij) = aire(   ij   ) * pks(  ij     )
     86        ENDDO
     87        xpn      = SSUM(iim,ppn,1) /apoln
     88 
     89        DO ij   = 1, iip1
     90          pks(   ij     )  =  xpn
     91          pk(ij,1) = .5*pks(ij)
     92          pkf(ij,1)=pk(ij,1)
     93        ENDDO
     94      endif
     95     
     96      if (pole_sud) then
     97        DO  ij   = 1, iim
     98          pps(ij) = aire(ij+ip1jm) * pks(ij+ip1jm )
     99        ENDDO
     100        xps      = SSUM(iim,pps,1) /apols
     101 
     102        DO ij   = 1, iip1
     103          pks( ij+ip1jm )  =  xps
     104          pk(ij+ip1jm,1)=.5*pks(ij+ip1jm)
     105          pkf(ij+ip1jm,1)=pk(ij+ip1jm,1)
     106        ENDDO
     107      endif
     108!$OMP END MASTER
     109
     110        jjb=jj_begin
     111        jje=jj_end
     112        CALL filtreg_p ( pkf,jjb,jje, jmp1, llm, 2, 1, .TRUE., 1 )
     113
     114        ! our work is done, exit routine
     115        return
     116      endif ! of if (llm.eq.1)
     117
     118
    54119      unpl2k    = 1.+ 2.* kappa
    55120c
  • LMDZ4/trunk/libf/dyn3dpar/extrapol.F

    r774 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/dyn3dpar/fluxstokenc_p.F

    r1279 r1403  
    44      SUBROUTINE fluxstokenc_p(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
     
    153153      DO l=1,llm
    154154         DO ij = ijb,ije
    155             pbaruc(ij,l) = pbaruc(ij,l)/float(istdyn)
    156             tetac(ij,l) = tetac(ij,l)/float(istdyn)
    157             phic(ij,l) = phic(ij,l)/float(istdyn)
     155            pbaruc(ij,l) = pbaruc(ij,l)/REAL(istdyn)
     156            tetac(ij,l) = tetac(ij,l)/REAL(istdyn)
     157            phic(ij,l) = phic(ij,l)/REAL(istdyn)
    158158         ENDDO
    159159      ENDDO
     
    165165      DO l=1,llm
    166166          DO ij = ijb,ije
    167             pbarvc(ij,l) = pbarvc(ij,l)/float(istdyn)
     167            pbarvc(ij,l) = pbarvc(ij,l)/REAL(istdyn)
    168168         ENDDO
    169169      ENDDO
     
    202202     
    203203         iadvtr=0
    204         Print*,'ITAU auqel on stoke les fluxmasses',itau
     204        write(lunout,*)'ITAU auquel on stoke les fluxmasses',itau
    205205       
    206206        ijb=ij_begin
     
    244244#else
    245245      write(lunout,*)
    246      & 'fluxstokenc: Needs Earth physics (and ioipsl) to function'
     246     & 'fluxstokenc: Needs IOIPSL to function'
    247247#endif
    248 ! of #ifdef CPP_EARTH
     248! of #ifdef CPP_IOIPSL
    249249      RETURN
    250250      END
  • LMDZ4/trunk/libf/dyn3dpar/friction_p.F

    r774 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44c=======================================================================
    55      SUBROUTINE friction_p(ucov,vcov,pdt)
    66      USE parallel
     7      USE control_mod
    78      IMPLICIT NONE
    89
     
    2223#include "paramet.h"
    2324#include "comgeom2.h"
    24 #include "control.h"
    2525#include "comconst.h"
    2626
  • LMDZ4/trunk/libf/dyn3dpar/fxhyp.F

    r764 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/dyn3dpar/fxy.F

    r774 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/dyn3dpar/fxysinus.F

    r774 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/dyn3dpar/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/dyn3dpar/gcm.F

    r1315 r1403  
    1818      USE getparam
    1919      USE filtreg_mod
     20      USE control_mod
    2021
    2122! Ehouarn: for now these only apply to Earth:
     
    6667#include "logic.h"
    6768#include "temps.h"
    68 #include "control.h"
    6969#include "ener.h"
    7070#include "description.h"
    7171#include "serre.h"
    72 #include "com_io_dyn.h"
     72!#include "com_io_dyn.h"
    7373#include "iniprint.h"
    7474#include "tracstoke.h"
     75
     76#ifdef INCA
     77! Only INCA needs these informations (from the Earth's physics)
    7578#include "indicesol.h"
     79#endif
    7680
    7781      INTEGER         longcles
     
    267271      if (read_start) then
    268272      ! we still need to run iniacademic to initialize some
    269       ! constants & fields, if we run the 'newtonian' case:
    270         if (iflag_phys.eq.2) then
     273      ! constants & fields, if we run the 'newtonian' or 'SW' cases:
     274        if (iflag_phys.ne.1) then
    271275          CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0)
    272276        endif
    273 !#ifdef CPP_IOIPSL
     277
    274278        if (planet_type.eq."earth") then
    275279#ifdef CPP_EARTH
    276280! Load an Earth-format start file
    277281         CALL dynetat0("start.nc",vcov,ucov,
    278      .              teta,q,masse,ps,phis, time_0)
     282     &              teta,q,masse,ps,phis, time_0)
     283#else
     284        ! SW model also has Earth-format start files
     285        ! (but can be used without the CPP_EARTH directive)
     286          if (iflag_phys.eq.0) then
     287            CALL dynetat0("start.nc",vcov,ucov,
     288     &              teta,q,masse,ps,phis, time_0)
     289          endif
    279290#endif
    280291        endif ! of if (planet_type.eq."earth")
     
    311322      ENDIF
    312323
    313       zdtvr    = daysec/FLOAT(day_step)
     324      zdtvr    = daysec/REAL(day_step)
    314325        IF(dtvr.NE.zdtvr) THEN
    315326         WRITE(lunout,*)
     
    320331C on remet le calendrier à zero si demande
    321332c
    322       if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then
     333      IF (raz_date == 1) THEN
     334        annee_ref = anneeref
     335        day_ref = dayref
     336        day_ini = dayref
     337        itau_dyn = 0
     338        itau_phy = 0
     339        time_0 = 0.
     340        write(lunout,*)
     341     .   'GCM: On reinitialise a la date lue dans gcm.def'
     342      ELSE IF (annee_ref .ne. anneeref .or. day_ref .ne. dayref) THEN
    323343        write(lunout,*)
    324344     .  'GCM: Attention les dates initiales lues dans le fichier'
     
    326346     .  ' restart ne correspondent pas a celles lues dans '
    327347        write(lunout,*)' gcm.def'
    328         write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
    329         write(lunout,*)' day_ref=',day_ref," dayref=",dayref
    330         if (raz_date .ne. 1) then
    331           write(lunout,*)
    332      .    'GCM: On garde les dates du fichier restart'
    333         else
    334           annee_ref = anneeref
    335           day_ref = dayref
    336           day_ini = dayref
    337           itau_dyn = 0
    338           itau_phy = 0
    339           time_0 = 0.
    340           write(lunout,*)
    341      .   'GCM: On reinitialise a la date lue dans gcm.def'
    342         endif
    343       ELSE
    344         raz_date = 0
    345       endif
     348        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     349        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
     350        write(lunout,*)' Pas de remise a zero'
     351      ENDIF
     352c      if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then
     353c        write(lunout,*)
     354c     .  'GCM: Attention les dates initiales lues dans le fichier'
     355c        write(lunout,*)
     356c     .  ' restart ne correspondent pas a celles lues dans '
     357c        write(lunout,*)' gcm.def'
     358c        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     359c        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
     360c        if (raz_date .ne. 1) then
     361c          write(lunout,*)
     362c     .    'GCM: On garde les dates du fichier restart'
     363c        else
     364c          annee_ref = anneeref
     365c          day_ref = dayref
     366c          day_ini = dayref
     367c          itau_dyn = 0
     368c          itau_phy = 0
     369c          time_0 = 0.
     370c          write(lunout,*)
     371c     .   'GCM: On reinitialise a la date lue dans gcm.def'
     372c        endif
     373c      ELSE
     374c        raz_date = 0
     375c      endif
    346376
    347377#ifdef CPP_IOIPSL
     
    372402      nbetatmoy = nday / periodav + 1
    373403
     404      if (iflag_phys.eq.1) then
     405      ! these initialisations have already been done (via iniacademic)
     406      ! if running in SW or Newtonian mode
    374407c-----------------------------------------------------------------------
    375408c   Initialisation des constantes dynamiques :
    376409c   ------------------------------------------
    377       dtvr = zdtvr
    378       CALL iniconst
     410        dtvr = zdtvr
     411        CALL iniconst
    379412
    380413c-----------------------------------------------------------------------
    381414c   Initialisation de la geometrie :
    382415c   --------------------------------
    383       CALL inigeom
     416        CALL inigeom
    384417
    385418c-----------------------------------------------------------------------
    386419c   Initialisation du filtre :
    387420c   --------------------------
    388       CALL inifilr
     421        CALL inifilr
     422      endif ! of if (iflag_phys.eq.1)
    389423c
    390424c-----------------------------------------------------------------------
     
    422456         if (planet_type.eq."earth") then
    423457#ifdef CPP_EARTH
    424          CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys ,
     458         CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys/nsplit_phys ,
    425459     ,                latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp     )
    426460#endif
     
    467501
    468502#ifdef CPP_IOIPSL
    469       if ( 1.eq.1) then
    470503      time_step = zdtvr
    471       t_ops = iecri * daysec
    472       t_wrt = iecri * daysec
    473 !      CALL inithist_p(dynhist_file,day_ref,annee_ref,time_step,
    474 !     .              t_ops, t_wrt, histid, histvid)
    475 
    476       IF (ok_dynzon) THEN
    477          t_ops = iperiod * time_step
    478          t_wrt = periodav * daysec
     504      IF (mpi_rank==0) then
     505        if (ok_dyn_ins) then
     506          ! initialize output file for instantaneous outputs
     507          ! t_ops = iecri * daysec ! do operations every t_ops
     508          t_ops =((1.0*iecri)/day_step) * daysec 
     509          t_wrt = daysec ! iecri * daysec ! write output every t_wrt
     510          t_wrt = daysec ! iecri * daysec ! write output every t_wrt
     511          CALL inithist(day_ref,annee_ref,time_step,
     512     &                  t_ops,t_wrt)
     513        endif
     514
     515        IF (ok_dyn_ave) THEN
     516          ! initialize output file for averaged outputs
     517          t_ops = iperiod * time_step ! do operations every t_ops
     518          t_wrt = periodav * daysec   ! write output every t_wrt
     519          CALL initdynav(day_ref,annee_ref,time_step,
     520     &                   t_ops,t_wrt)
    479521!         CALL initdynav_p(dynhistave_file,day_ref,annee_ref,time_step,
    480522!     .        t_ops, t_wrt, histaveid)
    481       END IF
     523        END IF
     524      ENDIF
    482525      dtav = iperiod*dtvr/daysec
    483       endif
    484 
    485 
    486526#endif
    487527! #endif of #ifdef CPP_IOIPSL
  • LMDZ4/trunk/libf/dyn3dpar/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/dyn3dpar/grid_noro.F

    r764 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/dyn3dpar/grilles_gcm_netcdf.F

    r764 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/dyn3dpar/guide_p_mod.F90

    r1304 r1403  
    11!
    2 ! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/guide.F,v 1.3.4.1 2006/11/06 15:51:16 fairhead Exp $
     2! $Id$
    33!
    44MODULE guide_p_mod
     
    6666  SUBROUTINE guide_init
    6767
     68    USE control_mod
    6869    IMPLICIT NONE
    6970 
     
    7172    INCLUDE "paramet.h"
    7273    INCLUDE "netcdf.inc"
    73     INCLUDE "control.h"
    7474
    7575    INTEGER                :: error,ncidpl,rid,rcod
     
    274274  SUBROUTINE guide_main(itau,ucov,vcov,teta,q,masse,ps)
    275275    use parallel
     276    USE control_mod
    276277   
    277278    IMPLICIT NONE
     
    279280    INCLUDE "dimensions.h"
    280281    INCLUDE "paramet.h"
    281     INCLUDE "control.h"
    282282    INCLUDE "comconst.h"
    283283    INCLUDE "comvert.h"
     
    380380      dday_step=real(day_step)
    381381      IF (iguide_read.LT.0) THEN
    382           tau=ditau/dday_step/FLOAT(iguide_read)
     382          tau=ditau/dday_step/ REAL(iguide_read)
    383383      ELSE
    384           tau=FLOAT(iguide_read)*ditau/dday_step
     384          tau= REAL(iguide_read)*ditau/dday_step
    385385      ENDIF
    386386      reste=tau-AINT(tau)
     
    580580              ENDDO
    581581          ENDDO
    582           fieldm(:,l)=fieldm(:,l)/FLOAT(imax(typ)-imin(typ)+1)
     582          fieldm(:,l)=fieldm(:,l)/ REAL(imax(typ)-imin(typ)+1)
    583583    ! Compute forcing
    584584          DO j=jjb_v,jje_v
     
    598598              ENDDO
    599599          ENDDO
    600           fieldm(:,l)=fieldm(:,l)/FLOAT(imax(typ)-imin(typ)+1)
     600          fieldm(:,l)=fieldm(:,l)/ REAL(imax(typ)-imin(typ)+1)
    601601    ! Compute forcing
    602602          DO j=jjb_u,jje_u
  • LMDZ4/trunk/libf/dyn3dpar/infotrac.F90

    r1279 r1403  
    3131
    3232  SUBROUTINE infotrac_init
     33    USE control_mod
    3334    IMPLICIT NONE
    3435!=======================================================================
     
    4950
    5051    INCLUDE "dimensions.h"
    51     INCLUDE "control.h"
    5252    INCLUDE "iniprint.h"
    5353
  • LMDZ4/trunk/libf/dyn3dpar/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:
     
    5557      REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants
    5658      REAL teta(ip1jmp1,llm)                 ! temperature potentielle
    57       REAL q(ip1jmp1,llm,nqtot)              ! champs advectes
     59      REAL q(ip1jmp1,llm,nqtot)               ! champs advectes
    5860      REAL ps(ip1jmp1)                       ! pression  au sol
    5961      REAL masse(ip1jmp1,llm)                ! masse d'air
     
    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/dyn3dpar/iniconst.F

    r774 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/dyn3dpar/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/dyn3dpar/inigeom.F

    r774 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/dyn3dpar/integrd_p.F

    r1279 r1403  
    66     $     dv,du,dteta,dq,dp,vcov,ucov,teta,q,ps0,masse,phis,finvmaold)
    77      USE parallel
     8      USE control_mod
    89      IMPLICIT NONE
    910
     
    3233#include "temps.h"
    3334#include "serre.h"
    34 #include "control.h"
    3535
    3636c   Arguments:
  • LMDZ4/trunk/libf/dyn3dpar/interpre.F

    r774 r1403  
    11!
    2 ! $Header$
     2! $Id$
    33!
    44       subroutine interpre(q,qppm,w,fluxwppm,masse,
     
    66     s            unatppm,vnatppm,psppm)
    77
    8        implicit none
     8      USE control_mod
     9      implicit none
    910
    1011#include "dimensions.h"
     
    1718#include "logic.h"
    1819#include "temps.h"
    19 #include "control.h"
    2020#include "ener.h"
    2121#include "description.h"
  • LMDZ4/trunk/libf/dyn3dpar/leapfrog_p.F

    r1286 r1403  
    2020       USE guide_p_mod, ONLY : guide_main
    2121       USE getparam
     22       USE control_mod
    2223
    2324      IMPLICIT NONE
     
    6263#include "logic.h"
    6364#include "temps.h"
    64 #include "control.h"
    6565#include "ener.h"
    6666#include "description.h"
    6767#include "serre.h"
    68 #include "com_io_dyn.h"
     68!#include "com_io_dyn.h"
    6969#include "iniprint.h"
    7070#include "academic.h"
     
    212212      itau = 0
    213213!      iday = day_ini+itau/day_step
    214 !      time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0
     214!      time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
    215215!         IF(time.GT.1.) THEN
    216216!          time = time-1.
     
    352352c      idissip=1
    353353      IF( purmats ) THEN
     354      ! Purely Matsuno time stepping
    354355         IF( MOD(itau,iconser) .EQ.0.AND.  forward    ) conser = .TRUE.
    355356         IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE.
     
    357358     s          .and. iflag_phys.EQ.1                 ) apphys = .TRUE.
    358359      ELSE
     360      ! Leapfrog/Matsuno time stepping
    359361         IF( MOD(itau   ,iconser) .EQ. 0              ) conser = .TRUE.
    360362         IF( MOD(itau+1,idissip)  .EQ. 0              ) apdiss = .TRUE.
     
    362364      END IF
    363365
     366! Ehouarn: for Shallow Water case (ie: 1 vertical layer),
     367!          supress dissipation step
     368      if (llm.eq.1) then
     369        apdiss=.false.
     370      endif
     371
    364372cym    ---> Pour le moment     
    365373cym      apphys = .FALSE.
    366374      statcl = .FALSE.
    367       conser = .FALSE.
     375      conser = .FALSE. ! ie: no output of control variables to stdout in //
    368376     
    369377      if (firstCaldyn) then
     
    677685         call suspend_timer(timer_caldyn)
    678686
     687        if (prt_level >= 10) then
    679688         write(lunout,*)
    680689     &   'leapfrog_p: Entree dans la physique : Iteration No ',true_itau
     690        endif
    681691c$OMP END MASTER
    682692
     
    964974       ijb=ij_begin
    965975       ije=ij_end
    966        teta(ijb:ije,:)=teta(ijb:ije,:)
    967      s  -iphysiq*dtvr*(teta(ijb:ije,:)-tetarappel(ijb:ije,:))/taurappel
     976!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
     977       do l=1,llm
     978       teta(ijb:ije,l)=teta(ijb:ije,l)
     979     &  -iphysiq*dtvr*(teta(ijb:ije,l)-tetarappel(ijb:ije,l))/taurappel
     980       enddo
     981!$OMP END DO
    968982
    969983       call Register_Hallo(ucov,ip1jmp1,llm,0,1,1,0,Request_Physic)
     
    972986c$OMP BARRIER
    973987       call WaitRequest(Request_Physic)     
    974 
     988c$OMP BARRIER
     989!$OMP MASTER
    975990       call friction_p(ucov,vcov,iphysiq*dtvr)
     991!$OMP END MASTER
     992!$OMP BARRIER
    976993      ENDIF ! of IF(iflag_phys.EQ.2)
    977994
     
    10891106            enddo
    10901107c$OMP END DO NOWAIT           
    1091        endif
     1108       endif ! of if (dissip_conservative)
    10921109
    10931110       ijb=ij_begin
     
    11981215c$OMP END MASTER
    11991216c$OMP BARRIER
    1200       END IF
     1217      END IF ! of IF(apdiss)
    12011218
    12021219cc$OMP END PARALLEL
     
    12801297              itau= itau + 1
    12811298!              iday= day_ini+itau/day_step
    1282 !              time= FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0
     1299!              time= REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
    12831300!                IF(time.GT.1.) THEN
    12841301!                  time = time-1.
     
    13371354              ENDIF !ok_dynzon
    13381355#endif
    1339             ENDIF
     1356               IF (ok_dyn_ave) THEN
     1357!$OMP MASTER
     1358#ifdef CPP_IOIPSL
     1359! Ehouarn: Gather fields and make master send to output
     1360                call Gather_Field(vcov,ip1jm,llm,0)
     1361                call Gather_Field(ucov,ip1jmp1,llm,0)
     1362                call Gather_Field(teta,ip1jmp1,llm,0)
     1363                call Gather_Field(pk,ip1jmp1,llm,0)
     1364                call Gather_Field(phi,ip1jmp1,llm,0)
     1365                do iq=1,nqtot
     1366                  call Gather_Field(q(1,1,iq),ip1jmp1,llm,0)
     1367                enddo
     1368                call Gather_Field(masse,ip1jmp1,llm,0)
     1369                call Gather_Field(ps,ip1jmp1,1,0)
     1370                call Gather_Field(phis,ip1jmp1,1,0)
     1371                if (mpi_rank==0) then
     1372                 CALL writedynav(itau,vcov,
     1373     &                 ucov,teta,pk,phi,q,masse,ps,phis)
     1374                endif
     1375#endif
     1376!$OMP END MASTER
     1377               ENDIF ! of IF (ok_dyn_ave)
     1378            ENDIF ! of IF((MOD(itau,iperiod).EQ.0).OR.(itau.EQ.itaufin))
    13401379
    13411380c-----------------------------------------------------------------------
     
    13431382c   ------------------------------
    13441383
    1345 c      IF( MOD(itau,iecri         ).EQ.0) THEN
    1346 
    1347             IF( MOD(itau,iecri*day_step).EQ.0) THEN
     1384            IF( MOD(itau,iecri).EQ.0) THEN
     1385             ! Ehouarn: output only during LF or Backward Matsuno
     1386             if (leapf.or.(.not.leapf.and.(.not.forward))) then
    13481387c$OMP BARRIER
    13491388c$OMP MASTER
     
    13791418       
    13801419#ifdef CPP_IOIPSL
    1381  
     1420              if (ok_dyn_ins) then
     1421! Ehouarn: Gather fields and make master write to output
     1422                call Gather_Field(vcov,ip1jm,llm,0)
     1423                call Gather_Field(ucov,ip1jmp1,llm,0)
     1424                call Gather_Field(teta,ip1jmp1,llm,0)
     1425                call Gather_Field(phi,ip1jmp1,llm,0)
     1426                do iq=1,nqtot
     1427                  call Gather_Field(q(1,1,iq),ip1jmp1,llm,0)
     1428                enddo
     1429                call Gather_Field(masse,ip1jmp1,llm,0)
     1430                call Gather_Field(ps,ip1jmp1,1,0)
     1431                call Gather_Field(phis,ip1jmp1,1,0)
     1432                if (mpi_rank==0) then
     1433                 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis)
     1434                endif
    13821435!              CALL writehist_p(histid,histvid, itau,vcov,
    13831436!     &                         ucov,teta,phi,q,masse,ps,phis)
    1384 
     1437! or use writefield_p
     1438!      call WriteField_p('ucov',reshape(ucov,(/iip1,jmp1,llm/)))
     1439!      call WriteField_p('vcov',reshape(vcov,(/iip1,jjm,llm/)))
     1440!      call WriteField_p('teta',reshape(teta,(/iip1,jmp1,llm/)))
     1441!      call WriteField_p('ps',reshape(ps,(/iip1,jmp1/)))
     1442              endif ! of if (ok_dyn_ins)
    13851443#endif
    13861444! For some Grads outputs of fields
     
    13991457              endif ! of if (output_grads_dyn)
    14001458c$OMP END MASTER
     1459             endif ! of if (leapf.or.(.not.leapf.and.(.not.forward)))
    14011460            ENDIF ! of IF(MOD(itau,iecri).EQ.0)
    14021461
     
    14581517             itau =  itau + 1
    14591518!             iday = day_ini+itau/day_step
    1460 !             time = FLOAT(itau-(iday-day_ini)*day_step)/day_step+time_0
     1519!             time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0
    14611520!
    14621521!                  IF(time.GT.1.) THEN
     
    14771536               GO TO 2
    14781537
    1479             ELSE ! of IF(forward)
     1538            ELSE ! of IF(forward) i.e. backward step
    14801539
    14811540              IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN
     
    14881547               IF (ok_dynzon) THEN
    14891548c$OMP BARRIER
    1490 
    14911549               call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest)
    14921550               call SendRequest(TestRequest)
    14931551c$OMP BARRIER
    14941552               call WaitRequest(TestRequest)
    1495 
    14961553c$OMP BARRIER
    14971554c$OMP MASTER
     
    15031560               END IF !ok_dynzon
    15041561#endif
     1562               IF (ok_dyn_ave) THEN
     1563!$OMP MASTER
     1564#ifdef CPP_IOIPSL
     1565! Ehouarn: Gather fields and make master send to output
     1566                call Gather_Field(vcov,ip1jm,llm,0)
     1567                call Gather_Field(ucov,ip1jmp1,llm,0)
     1568                call Gather_Field(teta,ip1jmp1,llm,0)
     1569                call Gather_Field(pk,ip1jmp1,llm,0)
     1570                call Gather_Field(phi,ip1jmp1,llm,0)
     1571                do iq=1,nqtot
     1572                  call Gather_Field(q(1,1,iq),ip1jmp1,llm,0)
     1573                enddo
     1574                call Gather_Field(masse,ip1jmp1,llm,0)
     1575                call Gather_Field(ps,ip1jmp1,1,0)
     1576                call Gather_Field(phis,ip1jmp1,1,0)
     1577                if (mpi_rank==0) then
     1578                 CALL writedynav(itau,vcov,
     1579     &                 ucov,teta,pk,phi,q,masse,ps,phis)
     1580                endif
     1581#endif
     1582!$OMP END MASTER
     1583               ENDIF ! of IF (ok_dyn_ave)
     1584
    15051585              ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin)
    15061586
    15071587
    1508 c               IF(MOD(itau,iecri         ).EQ.0) THEN
    1509               IF(MOD(itau,iecri*day_step).EQ.0) THEN
     1588               IF(MOD(itau,iecri         ).EQ.0) THEN
     1589c              IF(MOD(itau,iecri*day_step).EQ.0) THEN
    15101590c$OMP BARRIER
    15111591c$OMP MASTER
     
    15401620
    15411621#ifdef CPP_IOIPSL
    1542 
     1622              if (ok_dyn_ins) then
     1623! Ehouarn: Gather fields and make master send to output
     1624                call Gather_Field(vcov,ip1jm,llm,0)
     1625                call Gather_Field(ucov,ip1jmp1,llm,0)
     1626                call Gather_Field(teta,ip1jmp1,llm,0)
     1627                call Gather_Field(phi,ip1jmp1,llm,0)
     1628                do iq=1,nqtot
     1629                  call Gather_Field(q(1,1,iq),ip1jmp1,llm,0)
     1630                enddo
     1631                call Gather_Field(masse,ip1jmp1,llm,0)
     1632                call Gather_Field(ps,ip1jmp1,1,0)
     1633                call Gather_Field(phis,ip1jmp1,1,0)
     1634                if (mpi_rank==0) then
     1635                 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis)
     1636                endif
    15431637!                CALL writehist_p(histid, histvid, itau,vcov ,
    15441638!     &                           ucov,teta,phi,q,masse,ps,phis)
     1639              endif ! of if (ok_dyn_ins)
    15451640#endif
    15461641! For some Grads output (but does it work?)
     
    15601655
    15611656c$OMP END MASTER
    1562               ENDIF ! of IF(MOD(itau,iecri*day_step).EQ.0)
     1657              ENDIF ! of IF(MOD(itau,iecri).EQ.0)
    15631658
    15641659              IF(itau.EQ.itaufin) THEN
  • LMDZ4/trunk/libf/dyn3dpar/limit_netcdf.F90

    r1328 r1403  
    3030  USE inter_barxy_m, only: inter_barxy
    3131#endif
     32  USE control_mod
    3233  IMPLICIT NONE
    3334!-------------------------------------------------------------------------------
     
    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/dyn3dpar/ppm3d.F

    r764 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/dyn3dpar/ran1.F

    r774 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/dyn3dpar/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/dyn3dpar/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/dyn3dpar/tourabs.F

    r763 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/dyn3dpar/traceurpole.F

    r774 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/dyn3dpar/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
Note: See TracChangeset for help on using the changeset viewer.