Ignore:
Timestamp:
Apr 14, 2010, 4:03:19 PM (14 years ago)
Author:
Ehouarn Millour
Message:

Some cleanup and fixing the possibility to output fields in the dynamics, on the dynamical grids.

CLEANUPS:

  • arch-PW6_VARGAS.fcm : add potentially benefic compiling options
  • removed obsolete "control.h" in dyn3d/dyn3dpar (module control_mod.F90 is used instead)

OUTPUTS in the dynamics (3 sets of files, one for each grid: scalar, u, v):

  • removed "com_io_dyn.h" common; use module "com_io_dyn_mod.F90" instead
  • updated "initdynav.F","inithist.F","writehist.F" and "writedynav.F" in bibio: which field will be written is hard coded there.
  • flags "ok_dyn_ins" and "ok_dyn_ave" (loaded via conf_gcm.F) trigger output of fields in the dynamics: if ok_dyn_ins is true, then files "dyn_hist.nc", "dyn_histu.nc" and "dyn_histv.nc" are written (the frequency of the outputs is given by 'iecri' in run.def; values are written every 'iecri' dynamical step). if ok_dyn_ave is true then files "dyn_hist_ave.nc", "dyn_histu_ave.nc" and "dyn_histv_ave.nc" are written (the rate at which averages and made/written, in days, is given by 'periodav' in run.def).

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4V5.0-dev/libf/bibio/inithist.F

    r1279 r1357  
    22! $Id$
    33!
    4       subroutine inithist(infile,day0,anne0,tstep,t_ops,t_wrt,fileid,
    5      .                    filevid)
     4      subroutine inithist(day0,anne0,tstep,t_ops,t_wrt)
    65
    76#ifdef CPP_IOIPSL
     
    98#endif
    109       USE infotrac, ONLY : nqtot, ttext
     10       use com_io_dyn_mod, only : histid,histvid,histuid,               &
     11     &                        dynhist_file,dynhistv_file,dynhistu_file
    1112
    1213      implicit none
     
    3132C      nq: nombre de traceurs
    3233C
    33 C   Sortie:
    34 C      fileid: ID du fichier netcdf cree
    35 C      filevid:ID du fichier netcdf pour la grille v
    3634C
    3735C   L. Fairhead, LMD, 03/99
     
    5452C   Arguments
    5553C
    56       character*(*) infile
    5754      integer day0, anne0
    5855      real tstep, t_ops, t_wrt
    59       integer fileid, filevid
    6056
    6157#ifdef CPP_IOIPSL
     
    8379      tau0 = itau_dyn
    8480     
     81! -------------------------------------------------------------
     82! Creation des 3 fichiers pour les grilles horizontales U,V,Scal
     83! -------------------------------------------------------------
     84!Grille U     
    8585      do jj = 1, jjp1
    8686        do ii = 1, iip1
     
    9090      enddo
    9191       
    92       call histbeg(infile, iip1, rlong(:,1), jjp1, rlat(1,:),
     92      call histbeg(dynhistu_file, iip1, rlong(:,1), jjp1, rlat(1,:),
    9393     .             1, iip1, 1, jjp1,
    94      .             tau0, zjulian, tstep, uhoriid, fileid)
    95 C
    96 C  Creation du fichier histoire pour la grille en V (oblige pour l'instant,
    97 C  IOIPSL ne permet pas de grilles avec des nombres de point differents dans
    98 C  un meme fichier)
     94     .             tau0, zjulian, tstep, uhoriid, histuid)
    9995
     96! Grille V
    10097      do jj = 1, jjm
    10198        do ii = 1, iip1
     
    105102      enddo
    106103
    107       call histbeg('dyn_histv.nc', iip1, rlong(:,1), jjm, rlat(1,:),
     104      call histbeg(dynhistv_file, iip1, rlong(:,1), jjm, rlat(1,:),
    108105     .             1, iip1, 1, jjm,
    109      .             tau0, zjulian, tstep, vhoriid, filevid)
    110 C
    111 C  Appel a histhori pour rajouter les autres grilles horizontales
    112 C
     106     .             tau0, zjulian, tstep, vhoriid, histvid)
     107
     108!Grille Scalaire
    113109      do jj = 1, jjp1
    114110        do ii = 1, iip1
     
    118114      enddo
    119115
    120       call histhori(fileid, iip1, rlong, jjp1, rlat, 'scalar',
    121      .              'Grille points scalaires', thoriid)
     116      call histbeg(dynhist_file, iip1, rlong(:,1), jjp1, rlat(1,:),
     117     .             1, iip1, 1, jjp1,
     118     .             tau0, zjulian, tstep, thoriid, histid)
     119! -------------------------------------------------------------
     120C  Appel a histvert pour la grille verticale
     121! -------------------------------------------------------------
     122      call histvert(histid, 'presnivs', 'Niveaux pression','mb',
     123     .              llm, presnivs/100., zvertiid,'down')
     124      call histvert(histvid, 'presnivs', 'Niveaux pression','mb',
     125     .              llm, presnivs/100., zvertiid,'down')
     126      call histvert(histuid, 'presnivs', 'Niveaux pression','mb',
     127     .              llm, presnivs/100., zvertiid,'down')
    122128C
    123 C  Appel a histvert pour la grille verticale
    124 C
    125       call histvert(fileid, 'sig_s', 'Niveaux sigma','-',
    126      .              llm, nivsigs, zvertiid)
    127 C Pour le fichier V
    128       call histvert(filevid, 'sig_s', 'Niveaux sigma','-',
    129      .              llm, nivsigs, zvertiid)
    130 C
     129! -------------------------------------------------------------
    131130C  Appels a histdef pour la definition des variables a sauvegarder
     131! -------------------------------------------------------------
    132132C
    133133C  Vents U
    134134C
    135       call histdef(fileid, 'ucov', 'vents u covariants', 'm/s',
     135      call histdef(histuid, 'u', 'vent u', 'm/s',
    136136     .             iip1, jjp1, uhoriid, llm, 1, llm, zvertiid,
    137137     .             32, 'inst(X)', t_ops, t_wrt)
     
    139139C  Vents V
    140140C
    141       call histdef(filevid, 'vcov', 'vents v covariants', 'm/s',
     141      call histdef(histvid, 'v', 'vent v', 'm/s',
    142142     .             iip1, jjm, vhoriid, llm, 1, llm, zvertiid,
    143143     .             32, 'inst(X)', t_ops, t_wrt)
     
    146146C  Temperature potentielle
    147147C
    148       call histdef(fileid, 'teta', 'temperature potentielle', '-',
     148      call histdef(histid, 'teta', 'temperature potentielle', '-',
    149149     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
    150150     .             32, 'inst(X)', t_ops, t_wrt)
     
    152152C  Geopotentiel
    153153C
    154       call histdef(fileid, 'phi', 'geopotentiel instantane', '-',
     154      call histdef(histid, 'phi', 'geopotentiel', '-',
    155155     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
    156156     .             32, 'inst(X)', t_ops, t_wrt)
     
    158158C  Traceurs
    159159C
    160         DO iq=1,nqtot
    161           call histdef(fileid, ttext(iq),  ttext(iq), '-',
    162      .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
    163      .             32, 'inst(X)', t_ops, t_wrt)
    164         enddo
    165 C
     160!
     161!        DO iq=1,nqtot
     162!          call histdef(histid, ttext(iq),  ttext(iq), '-',
     163!     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
     164!     .             32, 'inst(X)', t_ops, t_wrt)
     165!        enddo
     166!C
    166167C  Masse
    167168C
    168       call histdef(fileid, 'masse', 'masse', 'kg',
    169      .             iip1, jjp1, thoriid, 1, 1, 1, -99,
     169      call histdef(histid, 'masse', 'masse', 'kg',
     170     .             iip1, jjp1, thoriid, llm, 1, llm, zvertiid,
    170171     .             32, 'inst(X)', t_ops, t_wrt)
    171172C
    172173C  Pression au sol
    173174C
    174       call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa',
     175      call histdef(histid, 'ps', 'pression naturelle au sol', 'Pa',
    175176     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
    176177     .             32, 'inst(X)', t_ops, t_wrt)
    177178C
    178 Pression au sol
    179 C
    180       call histdef(fileid, 'phis', 'geopotentiel au sol', '-',
    181      .             iip1, jjp1, thoriid, 1, 1, 1, -99,
    182      .             32, 'inst(X)', t_ops, t_wrt)
    183 C
     179Geopotentiel au sol
     180!C
     181!      call histdef(histid, 'phis', 'geopotentiel au sol', '-',
     182!     .             iip1, jjp1, thoriid, 1, 1, 1, -99,
     183!     .             32, 'inst(X)', t_ops, t_wrt)
     184!C
    184185C  Fin
    185186C
    186       call histend(fileid)
    187       call histend(filevid)
     187      call histend(histid)
     188      call histend(histuid)
     189      call histend(histvid)
    188190#else
    189191! tell the user this routine should be run with ioipsl
Note: See TracChangeset for help on using the changeset viewer.