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

    r1333 r1357  
    7373#include "description.h"
    7474#include "serre.h"
    75 #include "com_io_dyn.h"
     75!#include "com_io_dyn.h"
    7676#include "iniprint.h"
    7777#include "tracstoke.h"
     78#ifdef INCA
     79! Only INCA needs these informations (from the Earth's physics)
    7880#include "indicesol.h"
    79 
     81#endif
    8082      INTEGER         longcles
    8183      PARAMETER     ( longcles = 20 )
     
    319321     .  ' restart ne correspondent pas a celles lues dans '
    320322        write(lunout,*)' gcm.def'
    321         write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
    322         write(lunout,*)' day_ref=',day_ref," dayref=",dayref
    323         write(lunout,*)' Pas de remise a zero'
     323        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     324        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
     325        write(lunout,*)' Pas de remise a zero'
    324326      ENDIF
    325327
    326 c$$$      if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then
    327 c$$$        write(lunout,*)
    328 c$$$     .  'GCM: Attention les dates initiales lues dans le fichier'
    329 c$$$        write(lunout,*)
    330 c$$$     .  ' restart ne correspondent pas a celles lues dans '
    331 c$$$        write(lunout,*)' gcm.def'
    332 c$$$    write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
    333 c$$$    write(lunout,*)' day_ref=',day_ref," dayref=",dayref
    334 c$$$        if (raz_date .ne. 1) then
    335 c$$$          write(lunout,*)
    336 c$$$     .    'GCM: On garde les dates du fichier restart'
    337 c$$$        else
    338 c$$$          annee_ref = anneeref
    339 c$$$          day_ref = dayref
    340 c$$$          day_ini = dayref
    341 c$$$          itau_dyn = 0
    342 c$$$          itau_phy = 0
    343 c$$$          time_0 = 0.
    344 c$$$          write(lunout,*)
    345 c$$$     .   'GCM: On reinitialise a la date lue dans gcm.def'
    346 c$$$        endif
    347 c$$$      ELSE
    348 c$$$        raz_date = 0
    349 c$$$      endif
     328c      if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then
     329c        write(lunout,*)
     330c     .  'GCM: Attention les dates initiales lues dans le fichier'
     331c        write(lunout,*)
     332c     .  ' restart ne correspondent pas a celles lues dans '
     333c        write(lunout,*)' gcm.def'
     334c        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     335c        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
     336c        if (raz_date .ne. 1) then
     337c          write(lunout,*)
     338c     .    'GCM: On garde les dates du fichier restart'
     339c        else
     340c          annee_ref = anneeref
     341c          day_ref = dayref
     342c          day_ini = dayref
     343c          itau_dyn = 0
     344c          itau_phy = 0
     345c          time_0 = 0.
     346c          write(lunout,*)
     347c     .   'GCM: On reinitialise a la date lue dans gcm.def'
     348c        endif
     349c      ELSE
     350c        raz_date = 0
     351c      endif
    350352
    351353#ifdef CPP_IOIPSL
     
    461463
    462464#ifdef CPP_IOIPSL
    463       if ( 1.eq.1) then
    464465      time_step = zdtvr
    465       t_ops = iecri * daysec
    466       t_wrt = iecri * daysec
    467 !      CALL inithist(dynhist_file,day_ref,annee_ref,time_step,
    468 !    .              t_ops, t_wrt, histid, histvid)
    469 
    470 !     IF (ok_dynzon) THEN
    471 !        t_ops = iperiod * time_step
    472 !        t_wrt = periodav * daysec
    473 !        CALL initdynav(dynhistave_file,day_ref,annee_ref,time_step,
    474 !    .        t_ops, t_wrt, histaveid)
    475 !     END IF
     466      if (ok_dyn_ins) then
     467        ! initialize output file for instantaneous outputs
     468        ! t_ops = iecri * daysec ! do operations every t_ops
     469        t_ops =((1.0*iecri)/day_step) * daysec 
     470        t_wrt = daysec ! iecri * daysec ! write output every t_wrt
     471        CALL inithist(day_ref,annee_ref,time_step,
     472     &              t_ops,t_wrt)
     473      endif
     474
     475      IF (ok_dyn_ave) THEN
     476        ! initialize output file for averaged outputs
     477        t_ops = iperiod * time_step ! do operations every t_ops
     478        t_wrt = periodav * daysec   ! write output every t_wrt
     479        CALL initdynav(day_ref,annee_ref,time_step,
     480     &       t_ops,t_wrt)
     481      END IF
    476482      dtav = iperiod*dtvr/daysec
    477       endif
    478 
    479 
    480483#endif
    481484! #endif of #ifdef CPP_IOIPSL
Note: See TracChangeset for help on using the changeset viewer.