Changeset 2271 for LMDZ5


Ignore:
Timestamp:
May 12, 2015, 6:27:47 PM (9 years ago)
Author:
musat
Message:

Corrections for standard level pressure outputs hist*NMC.nc by XIOS and IOIPSL.
For XIOS one need to specify a default_value="1.e+20" in the field_def_lmdz.xml and
a detect_missing_value=".true." in the file_def_histins_lmdz.xml,
file_def_histday_lmdz.xml, etc files.

Location:
LMDZ5/trunk/libf
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/misc/wxios.F90

    r2137 r2271  
    2121    CHARACTER(len=100) :: g_field_name = "nofield"
    2222!$OMP THREADPRIVATE(g_flag_xml,g_field_name)
    23 
     23    REAL :: missing_val_omp
     24    REAL :: missing_val
     25!$OMP THREADPRIVATE(missing_val)
    2426
    2527    CONTAINS
  • LMDZ5/trunk/libf/phylmd/calcul_STDlev.h

    r1912 r2271  
    44!IM on initialise les variables
    55!
    6         missing_val=nf90_fill_real
     6!       missing_val=nf90_fill_real
    77!
    88        CALL ini_undefSTD(itap,itapm1)
  • LMDZ5/trunk/libf/phylmd/declare_STDlev.h

    r1907 r2271  
    5757      REAL zx_tmp_fiNC(klon,nlevSTD)
    5858
    59       REAL missing_val
     59!     REAL missing_val
    6060      REAL, SAVE :: freq_moyNMC(nout)
    6161!$OMP THREADPRIVATE(freq_moyNMC)
  • LMDZ5/trunk/libf/phylmd/moy_undefSTD.F90

    r1992 r2271  
    55  USE netcdf
    66  USE dimphy
     7#ifdef CPP_IOIPSL
    78  USE phys_state_var_mod
     9#endif
     10
    811  USE phys_cal_mod, ONLY: mth_len
    912  IMPLICIT NONE
    1013  include "clesphys.h"
     14#ifdef CPP_IOIPSL
     15  REAL :: missing_val
     16#endif
    1117
    1218  ! ====================================================================
     
    5157  REAL un_jour
    5258  PARAMETER (un_jour=86400.)
    53   REAL missing_val
     59! REAL missing_val
    5460
    55   missing_val = nf90_fill_real
     61! missing_val = nf90_fill_real
     62#ifndef CPP_XIOS
     63      missing_val=missing_val_nf90
     64#endif
    5665
    5766  DO n = 1, nout
  • LMDZ5/trunk/libf/phylmd/phys_output_ctrlout_mod.F90

    r2255 r2271  
    604604
    605605  TYPE(ctrl_out), SAVE, DIMENSION(7) :: o_wSTDlevs     = (/                    &
    606       ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'w850', "Vertical wind 1hPa", "Pa/s", &
     606      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'w850', "Vertical wind 850hPa", "Pa/s", &
    607607      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
    608608      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'w700', "Vertical wind 700hPa", "Pa/s", &
     
    620620
    621621  TYPE(ctrl_out), SAVE, DIMENSION(7) :: o_tSTDlevs     = (/                    &
    622       ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'t850', "Temperature 1hPa", "K",      &
     622      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'t850', "Temperature 850hPa", "K",      &
    623623      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
    624624      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'t700', "Temperature 700hPa", "K",      &
     
    636636
    637637  TYPE(ctrl_out), SAVE, DIMENSION(7) :: o_qSTDlevs     = (/                             &
    638       ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'q850', "Specific humidity 1hPa", &
     638      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'q850', "Specific humidity 850hPa", &
    639639      "kg/kg", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
    640640      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'q700', "Specific humidity 700hPa", &
     
    652652
    653653  TYPE(ctrl_out), SAVE, DIMENSION(7) :: o_zSTDlevs   = (/                           &
    654       ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'z850', "Geopotential height 1hPa",        &
     654      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'z850', "Geopotential height 850hPa",        &
    655655      "m", (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /)), &
    656656      ctrl_out((/ 1, 7, 7, 10, 10, 10, 11, 11, 11 /),'z700', "Geopotential height 700hPa",        &
  • LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90

    r2255 r2271  
    174174         vqsumSTD, vTsumSTD, O3daysumSTD, wqsumSTD, &
    175175         vphisumSTD, wTsumSTD, u2sumSTD, v2sumSTD, &
    176          T2sumSTD, nlevSTD, du_gwd_rando, dv_gwd_rando
     176         T2sumSTD, nlevSTD, du_gwd_rando, dv_gwd_rando, &
     177         ulevSTD, vlevSTD, wlevSTD, philevSTD, qlevSTD, tlevSTD, &
     178         missing_val_nf90
    177179
    178180    USE phys_local_var_mod, only: zxfluxlat, slp, zxtsol, zt2m, &
     
    244246    ! ug Pour les sorties XIOS
    245247    USE xios, ONLY: xios_update_calendar
    246     USE wxios, only: wxios_closedef
     248    USE wxios, only: wxios_closedef, missing_val
    247249#endif
    248250    USE phys_cal_mod, only : mth_len
     
    290292    INTEGER, DIMENSION(iim*jjmp1*klev) :: ndex3d
    291293    REAL, PARAMETER :: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2
    292     REAL, PARAMETER :: missing_val=nf90_fill_real
     294!   REAL, PARAMETER :: missing_val=nf90_fill_real
     295#ifndef CPP_XIOS
     296    REAL :: missing_val
     297#endif
    293298    REAL, PARAMETER :: un_jour=86400.
    294299
     
    658663       !       ENDIF
    659664
     665  IF (.NOT.ok_all_xml) THEN
    660666       ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX:
    661667       ! Champs interpolles sur des niveaux de pression
     668#ifndef CPP_XIOS
     669       missing_val=missing_val_nf90
     670#endif
    662671       DO iff=1, nfiles
    663672          ll=0
     
    681690          ENDDO
    682691       ENDDO
    683 
     692  ELSE
     693!XIOS  CALL xios_get_field_attr("u850",default_value=missing_val)
     694!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     695       DO iff=1, nfiles
     696          ll=0
     697          DO k=1, nlevSTD
     698             bb2=clevSTD(k)
     699             IF(bb2.EQ."850".OR.bb2.EQ."700".OR. &
     700                bb2.EQ."500".OR.bb2.EQ."200".OR. &
     701                bb2.EQ."100".OR. &
     702                bb2.EQ."50".OR.bb2.EQ."10") THEN
     703                ll=ll+1
     704                CALL histwrite_phy(o_uSTDlevs(ll),ulevSTD(:,k), iff)
     705                CALL histwrite_phy(o_vSTDlevs(ll),vlevSTD(:,k), iff)
     706                CALL histwrite_phy(o_wSTDlevs(ll),wlevSTD(:,k), iff)
     707                CALL histwrite_phy(o_zSTDlevs(ll),philevSTD(:,k), iff)
     708                CALL histwrite_phy(o_qSTDlevs(ll),qlevSTD(:,k), iff)
     709                CALL histwrite_phy(o_tSTDlevs(ll),tlevSTD(:,k), iff)
     710             ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR.
     711          ENDDO
     712       ENDDO
     713  ENDIF
    684714       IF (vars_defined) THEN
    685715          DO i=1, klon
  • LMDZ5/trunk/libf/phylmd/phys_state_var_mod.F90

    r2243 r2271  
    1010! Declaration des variables
    1111      USE dimphy
     12      USE netcdf, only: nf90_fill_real
    1213      INTEGER, PARAMETER :: nlevSTD=17
    1314      INTEGER, PARAMETER :: nlevSTD8=8
     
    1617      INTEGER, PARAMETER :: napisccp=1
    1718      INTEGER, SAVE :: radpas
     19      REAL, PARAMETER :: missing_val_nf90=nf90_fill_real
    1820!$OMP THREADPRIVATE(radpas)
    1921      REAL, SAVE :: dtime, solaire_etat0
  • LMDZ5/trunk/libf/phylmd/physiq.F90

    r2262 r2271  
    4747  use phyaqua_mod, only: zenang_an
    4848  USE control_mod
     49#ifdef CPP_XIOS
     50  USE wxios, ONLY: missing_val, missing_val_omp
     51  USE xios, ONLY: xios_get_field_attr
     52#endif
    4953#ifdef REPROBUS
    5054  USE CHEM_REP, ONLY : Init_chem_rep_xjour
     
    240244  real da(klon,klev),phi(klon,klev,klev),mp(klon,klev)
    241245  real wght_cvfd(klon,klev)
     246#ifndef CPP_XIOS
     247  REAL, SAVE :: missing_val
     248#endif
    242249  ! Variables pour le lessivage convectif
    243250  ! RomP >>>
     
    39623969  !IM Interpolation sur les niveaux de pression du NMC
    39633970  !   -------------------------------------------------
     3971#ifdef CPP_XIOS
     3972          !$OMP MASTER
     3973          !On recupere la valeur de la missing value donnee dans le xml
     3974          CALL xios_get_field_attr("t850",default_value=missing_val_omp)
     3975!         PRINT *,"ARNAUD value missing ",missing_val_omp
     3976          !$OMP END MASTER
     3977          !$OMP BARRIER
     3978          missing_val=missing_val_omp
     3979#endif
     3980#ifndef CPP_XIOS
     3981          missing_val=missing_val_nf90
     3982#endif
    39643983  !
    39653984  include "calcul_STDlev.h"
  • LMDZ5/trunk/libf/phylmd/plevel.F90

    r1992 r2271  
    99  USE netcdf
    1010  USE dimphy
     11#ifdef CPP_IOIPSL
     12  USE phys_state_var_mod, ONLY: missing_val_nf90
     13#endif
     14#ifdef CPP_XIOS
     15  USE wxios, ONLY: missing_val
     16#endif
    1117  IMPLICIT NONE
    1218
     
    5662  INTEGER i, k
    5763
    58   REAL missing_val
     64! REAL missing_val
     65#ifndef CPP_XIOS
     66  REAL :: missing_val
     67#endif
    5968
    60   missing_val = nf90_fill_real
     69! missing_val = nf90_fill_real
     70
     71#ifndef CPP_XIOS
     72      missing_val=missing_val_nf90
     73#endif
    6174
    6275  IF (first) THEN
  • LMDZ5/trunk/libf/phylmd/plevel_new.F90

    r1992 r2271  
    1010  USE netcdf
    1111  USE dimphy
     12#ifdef CPP_IOIPSL
     13  USE phys_state_var_mod, ONLY: missing_val_nf90
     14#endif
     15#ifdef CPP_XIOS
     16  USE wxios, ONLY: missing_val
     17#endif
     18
    1219  IMPLICIT NONE
    1320
     
    5865  INTEGER i, k
    5966
    60   REAL missing_val
     67! REAL missing_val
     68#ifndef CPP_XIOS
     69  REAL :: missing_val
     70#endif
    6171
    62   missing_val = nf90_fill_real
     72! missing_val = nf90_fill_real
     73
     74#ifndef CPP_XIOS
     75      missing_val=missing_val_nf90
     76#endif
    6377
    6478  IF (first) THEN
  • LMDZ5/trunk/libf/phylmd/undefSTD.F90

    r1992 r2271  
    55  USE netcdf
    66  USE dimphy
    7   USE phys_state_var_mod ! Variables sauvegardees de la physique
     7#ifdef CPP_IOIPSL
     8  USE phys_state_var_mod
     9#endif
     10
    811  IMPLICIT NONE
    912  include "clesphys.h"
     13#ifdef CPP_IOIPSL
     14  REAL :: missing_val
     15#endif
    1016
    1117  ! ====================================================================
     
    5157  ! REAL tnondef(klon,klevSTD,nout)
    5258
    53   REAL missing_val
     59! REAL missing_val
    5460
    55   missing_val = nf90_fill_real
     61! missing_val = nf90_fill_real
     62#ifndef CPP_XIOS
     63      missing_val=missing_val_nf90
     64#endif
    5665
    5766  DO n = 1, nout
Note: See TracChangeset for help on using the changeset viewer.