Changeset 1486


Ignore:
Timestamp:
Feb 11, 2011, 1:07:39 PM (13 years ago)
Author:
Laurent Fairhead
Message:

Inclusion de la routine "stats" du modele martien qui permet de sortir
le cycle diurne moyen de différentes variables et l'écart-type.
Pour activer cette routine mettre
callstats=y
dans config.def. Les résultats seront placés dans le fichier stats.nc
Pour rajouter des variables: allez à la fin de physiq.F et prendre modèle sur
les lignes call wstats(...) et ne pas oublier de modifier le nombre de variables
sorties dans statto.h (n2dvar et n2dvar).
Attention: la routine n'est pas optimale (elle stocke ses résultats intermédiaires
dans le fichier stats.nc et les lit et écrit à chaque appel de la physique)
et n'a été testée dans LMDZ pour l'instant que sur PC/gfortran
et sur SX8/monoprocesseur. Encore du travail donc. Mais la routine est utilisée
régulièrement avec le modèle martien :-)


Inclusion of the martian model "stats" routine that outputs the mean diurnal
cycle of variables as well as their standard deviation.
To activate the routine, one needs to put
callstats=y
in the config.def file. Results will be output in a stats.nc file
To add more output variables: go to the end of physiq.F and use the call wstats(...)
lines as a template and do not forget to modify the number of output variables in
statto.h (n2dvar and n3dvar)
Caution: the routine is not optimal (as it stocks preliminary results in the stats.nc
file reading and writing at each physics step) and has only been tested in LMDZ
with a PC/gfortran setup and on a NEC-SX8/monoprocessor setup. Some work then still to
be done. But it is used regularly with the martial model :-)

Location:
LMDZ5/branches/LMDZ5V2.0-dev/libf
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/LMDZ5V2.0-dev/libf/dyn3d/etat0_netcdf.F90

    r1425 r1486  
    9898  REAL    :: dummy
    9999  LOGICAL :: ok_newmicro, ok_journe, ok_mensuel, ok_instan, ok_hf
    100   LOGICAL :: ok_LES, ok_ade, ok_aie, aerosol_couple, new_aod
     100  LOGICAL :: ok_LES, ok_ade, ok_aie, aerosol_couple, new_aod, callstats
    101101  INTEGER :: iflag_radia, flag_aerosol
    102102  REAL    :: bl95_b0, bl95_b1, fact_cldcon, facttemps, ratqsbas, ratqshaut
     
    130130!--- CONSTRUCT A GRID
    131131  CALL conf_phys(  ok_journe, ok_mensuel, ok_instan, ok_hf, ok_LES,     &
     132                   callstats,                                           &
    132133                   solarlong0,seuil_inversion,                          &
    133134                   fact_cldcon, facttemps,ok_newmicro,iflag_radia,      &
  • LMDZ5/branches/LMDZ5V2.0-dev/libf/dyn3dpar/etat0_netcdf.F90

    r1425 r1486  
    9898  REAL    :: dummy
    9999  LOGICAL :: ok_newmicro, ok_journe, ok_mensuel, ok_instan, ok_hf
    100   LOGICAL :: ok_LES, ok_ade, ok_aie, aerosol_couple, new_aod
     100  LOGICAL :: ok_LES, ok_ade, ok_aie, aerosol_couple, new_aod, callstats
    101101  INTEGER :: iflag_radia, flag_aerosol
    102102  REAL    :: bl95_b0, bl95_b1, fact_cldcon, facttemps, ratqsbas, ratqshaut
     
    130130!--- CONSTRUCT A GRID
    131131  CALL conf_phys(  ok_journe, ok_mensuel, ok_instan, ok_hf, ok_LES,     &
     132                   callstats,                                           &
    132133                   solarlong0,seuil_inversion,                          &
    133134                   fact_cldcon, facttemps,ok_newmicro,iflag_radia,      &
  • LMDZ5/branches/LMDZ5V2.0-dev/libf/phylmd/conf_phys.F90

    r1423 r1486  
    1313  subroutine conf_phys(ok_journe, ok_mensuel, ok_instan, ok_hf, &
    1414                       ok_LES,&
     15                       callstats,&
    1516                       solarlong0,seuil_inversion, &
    1617                       fact_cldcon, facttemps,ok_newmicro,iflag_radia,&
     
    6667  logical              :: ok_journe, ok_mensuel, ok_instan, ok_hf
    6768  logical              :: ok_LES
     69  LOGICAL              :: callstats
    6870  LOGICAL              :: ok_ade, ok_aie, aerosol_couple
    6971  INTEGER              :: flag_aerosol
     
    7981  logical,SAVE        :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp       
    8082  logical,SAVE        :: ok_LES_omp   
     83  LOGICAL,SAVE        :: callstats_omp
    8184  LOGICAL,SAVE        :: ok_ade_omp, ok_aie_omp, aerosol_couple_omp
    8285  INTEGER, SAVE       :: flag_aerosol_omp
     
    14181421  ok_LES_omp = .false.                                             
    14191422  call getin('OK_LES', ok_LES_omp)                                 
     1423
     1424!Config Key  = callstats                                               
     1425!Config Desc = Pour des sorties callstats                                 
     1426!Config Def  = .false.                                             
     1427!Config Help = Pour creer le fichier stats contenant les sorties 
     1428!              stats                                                 
     1429!                                                                   
     1430  callstats_omp = .false.                                             
     1431  call getin('callstats', callstats_omp)                                 
    14201432!
    14211433!Config Key  = ecrit_LES
     
    15811593    ok_hines = ok_hines_omp
    15821594    ok_LES = ok_LES_omp
     1595    callstats = callstats_omp
    15831596    ecrit_LES = ecrit_LES_omp
    15841597    carbon_cycle_tr = carbon_cycle_tr_omp
  • LMDZ5/branches/LMDZ5V2.0-dev/libf/phylmd/physiq.F

    r1466 r1486  
    158158      save ok_LES                           
    159159c$OMP THREADPRIVATE(ok_LES)                 
     160c
     161      LOGICAL callstats ! sortir le fichier stats
     162      save callstats                           
     163c$OMP THREADPRIVATE(callstats)                 
    160164c
    161165      LOGICAL ok_region ! sortir le fichier regional
     
    11501154!     and 360
    11511155
     1156      INTEGER ierr
    11521157#include "YOMCST.h"
    11531158#include "YOETHF.h"
     
    12221227     .     ok_instan, ok_hf,
    12231228     .     ok_LES,
     1229     .     callstats,
    12241230     .     solarlong0,seuil_inversion,
    12251231     .     fact_cldcon, facttemps,ok_newmicro,iflag_radia,
     
    36953701c====================================================================
    36963702c
    3697      
     3703
     3704c        -----------------------------------------------------------------
     3705c        WSTATS: Saving statistics
     3706c        -----------------------------------------------------------------
     3707c        ("stats" stores and accumulates 8 key variables in file "stats.nc"
     3708c        which can later be used to make the statistic files of the run:
     3709c        "stats")          only possible in 3D runs !
     3710
     3711         
     3712         IF (callstats) THEN
     3713
     3714           call wstats(klon,o_psol%name,"Surface pressure","Pa"
     3715     &                 ,2,paprs(:,1))
     3716           call wstats(klon,o_tsol%name,"Surface temperature","K",
     3717     &                 2,zxtsol)
     3718           zx_tmp_fi2d(:) = rain_fall(:) + snow_fall(:)
     3719           call wstats(klon,o_precip%name,"Precip Totale liq+sol",
     3720     &                 "kg/(s*m2)",2,zx_tmp_fi2d)
     3721           zx_tmp_fi2d(:) = rain_lsc(:) + snow_lsc(:)
     3722           call wstats(klon,o_plul%name,"Large-scale Precip",
     3723     &                 "kg/(s*m2)",2,zx_tmp_fi2d)
     3724           zx_tmp_fi2d(:) = rain_con(:) + snow_con(:)
     3725           call wstats(klon,o_pluc%name,"Convective Precip",
     3726     &                 "kg/(s*m2)",2,zx_tmp_fi2d)
     3727           call wstats(klon,o_sols%name,"Solar rad. at surf.",
     3728     &                 "W/m2",2,solsw)
     3729           call wstats(klon,o_soll%name,"IR rad. at surf.",
     3730     &                 "W/m2",2,sollw)
     3731          zx_tmp_fi2d(:) = topsw(:)-toplw(:)
     3732          call wstats(klon,o_nettop%name,"Net dn radiatif flux at TOA",
     3733     &                 "W/m2",2,zx_tmp_fi2d)
     3734
     3735
     3736
     3737           call wstats(klon,o_temp%name,"Air temperature","K",
     3738     &                 3,t_seri)
     3739           call wstats(klon,o_vitu%name,"Zonal wind","m.s-1",
     3740     &                 3,u_seri)
     3741           call wstats(klon,o_vitv%name,"Meridional wind",
     3742     &                "m.s-1",3,v_seri)
     3743           call wstats(klon,o_vitw%name,"Vertical wind",
     3744     &                "m.s-1",3,omega)
     3745           call wstats(klon,o_ovap%name,"Specific humidity", "kg/kg",
     3746     &                 3,q_seri)
     3747 
     3748
     3749
     3750           IF(lafin) THEN
     3751             write (*,*) "Writing stats..."
     3752             call mkstats(ierr)
     3753           ENDIF
     3754
     3755         ENDIF !if callstats
     3756     
    36983757
    36993758      IF (lafin) THEN
Note: See TracChangeset for help on using the changeset viewer.