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

    r1333 r1357  
    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#ifdef INCA
     76! Only INCA needs these informations (from the Earth's physics)
    7577#include "indicesol.h"
     78#endif
    7679
    7780      INTEGER         longcles
     
    335338     .  ' restart ne correspondent pas a celles lues dans '
    336339        write(lunout,*)' gcm.def'
    337         write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
    338         write(lunout,*)' day_ref=',day_ref," dayref=",dayref
    339         write(lunout,*)' Pas de remise a zero'
     340        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     341        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
     342        write(lunout,*)' Pas de remise a zero'
    340343      ENDIF
    341 c$$$      if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then
    342 c$$$        write(lunout,*)
    343 c$$$     .  'GCM: Attention les dates initiales lues dans le fichier'
    344 c$$$        write(lunout,*)
    345 c$$$     .  ' restart ne correspondent pas a celles lues dans '
    346 c$$$        write(lunout,*)' gcm.def'
    347 c$$$    write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
    348 c$$$    write(lunout,*)' day_ref=',day_ref," dayref=",dayref
    349 c$$$        if (raz_date .ne. 1) then
    350 c$$$          write(lunout,*)
    351 c$$$     .    'GCM: On garde les dates du fichier restart'
    352 c$$$        else
    353 c$$$          annee_ref = anneeref
    354 c$$$          day_ref = dayref
    355 c$$$          day_ini = dayref
    356 c$$$          itau_dyn = 0
    357 c$$$          itau_phy = 0
    358 c$$$          time_0 = 0.
    359 c$$$          write(lunout,*)
    360 c$$$     .   'GCM: On reinitialise a la date lue dans gcm.def'
    361 c$$$        endif
    362 c$$$      ELSE
    363 c$$$        raz_date = 0
    364 c$$$      endif
     344c      if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then
     345c        write(lunout,*)
     346c     .  'GCM: Attention les dates initiales lues dans le fichier'
     347c        write(lunout,*)
     348c     .  ' restart ne correspondent pas a celles lues dans '
     349c        write(lunout,*)' gcm.def'
     350c        write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref
     351c        write(lunout,*)' day_ref=',day_ref," dayref=",dayref
     352c        if (raz_date .ne. 1) then
     353c          write(lunout,*)
     354c     .    'GCM: On garde les dates du fichier restart'
     355c        else
     356c          annee_ref = anneeref
     357c          day_ref = dayref
     358c          day_ini = dayref
     359c          itau_dyn = 0
     360c          itau_phy = 0
     361c          time_0 = 0.
     362c          write(lunout,*)
     363c     .   'GCM: On reinitialise a la date lue dans gcm.def'
     364c        endif
     365c      ELSE
     366c        raz_date = 0
     367c      endif
    365368
    366369#ifdef CPP_IOIPSL
     
    486489
    487490#ifdef CPP_IOIPSL
    488       if ( 1.eq.1) then
    489491      time_step = zdtvr
    490       t_ops = iecri * daysec
    491       t_wrt = iecri * daysec
     492      if (ok_dyn_ins) then
     493        ! initialize output file for instantaneous outputs
     494        ! t_ops = iecri * daysec ! do operations every t_ops
     495        t_ops =((1.0*iecri)/day_step) * daysec 
     496        t_wrt = daysec ! iecri * daysec ! write output every t_wrt
     497        t_wrt = daysec ! iecri * daysec ! write output every t_wrt
     498        CALL inithist(day_ref,annee_ref,time_step,
     499     &              t_ops,t_wrt)
    492500!      CALL inithist_p(dynhist_file,day_ref,annee_ref,time_step,
    493501!     .              t_ops, t_wrt, histid, histvid)
    494 
    495       IF (ok_dynzon) THEN
    496          t_ops = iperiod * time_step
    497          t_wrt = periodav * daysec
     502      endif
     503
     504      IF (ok_dyn_ave) THEN
     505        ! initialize output file for averaged outputs
     506        t_ops = iperiod * time_step ! do operations every t_ops
     507        t_wrt = periodav * daysec   ! write output every t_wrt
     508        CALL initdynav(day_ref,annee_ref,time_step,
     509     &       t_ops,t_wrt)
    498510!         CALL initdynav_p(dynhistave_file,day_ref,annee_ref,time_step,
    499511!     .        t_ops, t_wrt, histaveid)
    500512      END IF
    501513      dtav = iperiod*dtvr/daysec
    502       endif
    503 
    504 
    505514#endif
    506515! #endif of #ifdef CPP_IOIPSL
Note: See TracChangeset for help on using the changeset viewer.