Ignore:
Timestamp:
Jun 4, 2007, 4:34:47 PM (17 years ago)
Author:
Laurent Fairhead
Message:

Merge entre la version V3_conv et le HEAD
YM, JG, LF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk/libf/phylmd/write_histday.h

    r719 r766  
    1414      IF(lev_histday.GE.1) THEN
    1515c
    16        CALL gr_fi_ecrit(1,klon,iim,jjmp1,pphis,zx_tmp_2d)
    17        CALL histwrite(nid_day,"phis",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    18 c
    19 cIM 310804      CALL gr_fi_ecrit(1,klon,iim,jjmp1,paire,zx_tmp_2d)
    20          CALL gr_fi_ecrit(1,klon,iim,jjmp1,airephy,zx_tmp_2d)
    21        CALL histwrite(nid_day,"aire",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     16       CALL histwrite_phy(nid_day,"phis",itau_w,pphis)
     17 
     18c
     19       CALL histwrite_phy(nid_day,"aire",itau_w,airephy)
    2220c
    2321      DO i=1, klon
     
    2523      ENDDO
    2624c
    27       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    28       CALL histwrite(nid_day,"contfracATM",itau_w,
    29      $      zx_tmp_2d,iim*jjmp1,ndex2d)
    30 c
    31       CALL gr_fi_ecrit(1,klon,iim,jjmp1,pctsrf_new(:,is_ter),zx_tmp_2d)
    32       CALL histwrite(nid_day,"contfracOR",itau_w,
    33      $      zx_tmp_2d,iim*jjmp1,ndex2d)
    34 c
    35       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d)
    36       CALL histwrite(nid_day,"tsol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    37 C
    38       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zt2m,zx_tmp_2d)
    39       CALL histwrite(nid_day,"t2m",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     25cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     26      CALL histwrite_phy(nid_day,"contfracATM",itau_w,zx_tmp_fi2d)
     27c
     28cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,pctsrf_new(:,is_ter),zx_tmp_2d)
     29      CALL histwrite_phy(nid_day,"contfracOR",itau_w,
     30     &                   pctsrf_new(:,is_ter))
     31c
     32cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d)
     33      CALL histwrite_phy(nid_day,"tsol",itau_w,zxtsol)
     34C
     35cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zt2m,zx_tmp_2d)
     36      CALL histwrite_phy(nid_day,"t2m",itau_w,zt2m)
    4037c
    4138c   En attendant un eventuel debugage.
    4239
    43       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zt2m,zx_tmp_2d)
    44       CALL histwrite(nid_day,"t2m_min",itau_w,zx_tmp_2d,
    45      .               iim*jjmp1,ndex2d)
    46 c
    47       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zt2m,zx_tmp_2d)
    48       CALL histwrite(nid_day,"t2m_max",itau_w,zx_tmp_2d,
    49      .               iim*jjmp1,ndex2d)
     40cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zt2m,zx_tmp_2d)
     41      CALL histwrite_phy(nid_day,"t2m_min",itau_w,zt2m)
     42c
     43cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zt2m,zx_tmp_2d)
     44      CALL histwrite_phy(nid_day,"t2m_max",itau_w,zt2m)
    5045c
    5146      DO i = 1, klon
    5247         zx_tmp_fi2d(i) = rain_lsc(i) + snow_lsc(i)
    5348      ENDDO
    54       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    55       CALL histwrite(nid_day,"plul",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     49cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     50      CALL histwrite_phy(nid_day,"plul",itau_w,zx_tmp_fi2d)
    5651c
    5752      DO i = 1, klon
    5853         zx_tmp_fi2d(i) = rain_con(i) + snow_con(i)
    5954      ENDDO
    60       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    61       CALL histwrite(nid_day,"pluc",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    62 c
    63       CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_lsc,zx_tmp_2d)
    64       CALL histwrite(nid_day,"snowl",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     55cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     56      CALL histwrite_phy(nid_day,"pluc",itau_w,zx_tmp_fi2d)
     57c
     58cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_lsc,zx_tmp_2d)
     59      CALL histwrite_phy(nid_day,"snowl",itau_w,snow_lsc)
    6560c
    6661      IF(1.EQ.0) THEN
    67       CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_con,zx_tmp_2d)
    68       CALL histwrite(nid_day,"snowc",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     62cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_con,zx_tmp_2d)
     63      CALL histwrite_phy(nid_day,"snowc",itau_w,snow_con)
    6964      ENDIF
    7065c
    71       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxfluxlat,zx_tmp_2d)
    72       CALL histwrite(nid_day,"flat",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     66cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxfluxlat,zx_tmp_2d)
     67      CALL histwrite_phy(nid_day,"flat",itau_w,zxfluxlat)
    7368c
    7469      DO i = 1, klon
     
    7671      ENDDO
    7772c
    78       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    79       CALL histwrite(nid_day,"sicf",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    80 c
    81       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zq2m,zx_tmp_2d)
    82       CALL histwrite(nid_day,"q2m",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    83 c
    84       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zu10m,zx_tmp_2d)
    85       CALL histwrite(nid_day,"u10m",itau_w,zx_tmp_2d,iim*jjmp1,
    86      .               ndex2d)
    87 c
    88       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zv10m,zx_tmp_2d)
    89       CALL histwrite(nid_day,"v10m",itau_w,zx_tmp_2d,iim*jjmp1,
    90      .               ndex2d)
     73cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     74      CALL histwrite_phy(nid_day,"sicf",itau_w,zx_tmp_fi2d)
     75c
     76cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zq2m,zx_tmp_2d)
     77      CALL histwrite_phy(nid_day,"q2m",itau_w,zq2m)
     78c
     79cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zu10m,zx_tmp_2d)
     80      CALL histwrite_phy(nid_day,"u10m",itau_w,zu10m)
     81c
     82cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zv10m,zx_tmp_2d)
     83      CALL histwrite_phy(nid_day,"v10m",itau_w,zv10m)
    9184c
    9285      DO i=1, klon
    9386       zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i))
    9487      ENDDO
    95       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    96       CALL histwrite(nid_day,"wind10m",itau_w,zx_tmp_2d,
    97      $     iim*jjmp1,ndex2d)
    98 c
    99       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    100       CALL histwrite(nid_day,"wind10max",itau_w,zx_tmp_2d,
    101      .               iim*jjmp1,ndex2d)
     88cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)     
     89      CALL histwrite_phy(nid_day,"wind10m",itau_w,zx_tmp_fi2d)
     90c
     91cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     92      CALL histwrite_phy(nid_day,"wind10max",itau_w,zx_tmp_fi2d)
    10293c
    10394      DO i=1, klon
    10495         zx_tmp_fi2d(i) = paprs(i,1)
    10596      ENDDO
    106       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    107       CALL histwrite(nid_day,"psol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     97cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     98      CALL histwrite_phy(nid_day,"psol",itau_w,zx_tmp_fi2d)
    10899c
    109100      DO i=1, klon
    110101         zx_tmp_fi2d(i) = (rain_fall(i) + snow_fall(i))
    111102      ENDDO
    112       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    113       CALL histwrite(nid_day,"precip",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    114 c
    115       CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_fall,zx_tmp_2d)
    116       CALL histwrite(nid_day,"snowf",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     103cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     104      CALL histwrite_phy(nid_day,"precip",itau_w,zx_tmp_fi2d)
     105c
     106cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_fall,zx_tmp_2d)
     107      CALL histwrite_phy(nid_day,"snowf",itau_w,snow_fall)
    117108c
    118109cIM: 140404   CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxsnow,zx_tmp_2d)
     
    121112c    .               ndex2d)
    122113c
    123       CALL gr_fi_ecrit(1, klon,iim,jjmp1, evap,zx_tmp_2d)
    124       CALL histwrite(nid_day,"evap",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    125 c
    126       CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw,zx_tmp_2d)
    127       CALL histwrite(nid_day,"tops",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    128 c
    129       CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw,zx_tmp_2d)
    130       CALL histwrite(nid_day,"topl",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    131 c
    132       CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw,zx_tmp_2d)
    133       CALL histwrite(nid_day,"sols",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    134 c
    135       CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw,zx_tmp_2d)
    136       CALL histwrite(nid_day,"soll",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    137 c
    138       CALL gr_fi_ecrit(1, klon,iim,jjmp1, radsol,zx_tmp_2d)
    139       CALL histwrite(nid_day,"radsol",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    140 c
    141       CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldl,zx_tmp_2d)
    142       CALL histwrite(nid_day,"cldl",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    143 c
    144       CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldm,zx_tmp_2d)
    145       CALL histwrite(nid_day,"cldm",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    146 c
    147       CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldh,zx_tmp_2d)
    148       CALL histwrite(nid_day,"cldh",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    149 c
    150       CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldt,zx_tmp_2d)
    151       CALL histwrite(nid_day,"cldt",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    152 c
    153       CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldq,zx_tmp_2d)
    154       CALL histwrite(nid_day,"cldq",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    155 c
    156       CALL gr_fi_ecrit(1, klon,iim,jjmp1, prw,zx_tmp_2d)
    157       CALL histwrite(nid_day,"prw",itau_w,zx_tmp_2d,
    158      .               iim*jjmp1,ndex2d)
     114cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, evap,zx_tmp_2d)
     115      CALL histwrite_phy(nid_day,"evap",itau_w,evap)
     116c
     117cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw,zx_tmp_2d)
     118      CALL histwrite_phy(nid_day,"tops",itau_w,topsw)
     119c
     120cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw,zx_tmp_2d)
     121      CALL histwrite_phy(nid_day,"topl",itau_w,toplw)
     122c
     123cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw,zx_tmp_2d)
     124      CALL histwrite_phy(nid_day,"sols",itau_w,solsw)
     125c
     126cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw,zx_tmp_2d)
     127      CALL histwrite_phy(nid_day,"soll",itau_w,sollw)
     128c
     129cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, radsol,zx_tmp_2d)
     130      CALL histwrite_phy(nid_day,"radsol",itau_w,radsol)
     131c
     132cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldl,zx_tmp_2d)
     133      CALL histwrite_phy(nid_day,"cldl",itau_w,cldl)
     134c
     135cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldm,zx_tmp_2d)
     136      CALL histwrite_phy(nid_day,"cldm",itau_w,cldm)
     137c
     138cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldh,zx_tmp_2d)
     139      CALL histwrite_phy(nid_day,"cldh",itau_w,cldh)
     140c
     141cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldt,zx_tmp_2d)
     142      CALL histwrite_phy(nid_day,"cldt",itau_w,cldt)
     143c
     144cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldq,zx_tmp_2d)
     145      CALL histwrite_phy(nid_day,"cldq",itau_w,cldq)
     146c
     147cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, prw,zx_tmp_2d)
     148      CALL histwrite_phy(nid_day,"prw",itau_w,prw)
    159149
    160150c   Ecriture de champs dynamiques sur des niveaux de pression
     
    173163     $   .OR.bb2.EQ."500".OR.bb2.EQ."200") THEN
    174164c
    175         CALL gr_fi_ecrit(1, klon,iim,jjmp1,usumSTD(:,k,1),zx_tmp_2d)
    176         CALL histwrite(nid_day,"u"//bb2,itau_w,zx_tmp_2d,
    177      $       iim*jjmp1,ndex2d)
    178 c
    179         CALL gr_fi_ecrit(1, klon,iim,jjmp1,vsumSTD(:,k,1),zx_tmp_2d)
    180         CALL histwrite(nid_day,"v"//bb2,itau_w,zx_tmp_2d,
    181      $       iim*jjmp1,ndex2d)
     165cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1,usumSTD(:,k,1),zx_tmp_2d)
     166        CALL histwrite_phy(nid_day,"u"//bb2,itau_w,usumSTD(:,k,1))
     167c
     168cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1,vsumSTD(:,k,1),zx_tmp_2d)
     169        CALL histwrite_phy(nid_day,"v"//bb2,itau_w,vsumSTD(:,k,1))
    182170c
    183171      ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR.bb2.EQ."500".OR.bb2.EQ."200") THEN
     
    187175      IF(bb2.EQ."500") THEN
    188176c
    189       CALL gr_fi_ecrit(1, klon,iim,jjmp1,wsumSTD(:,k,1),zx_tmp_2d)
    190       CALL histwrite(nid_day,"w"//bb2,itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    191 c
    192       CALL gr_fi_ecrit(1, klon,iim,jjmp1,phisumSTD(:,k,1),zx_tmp_2d)
    193       CALL histwrite(nid_day,"phi"//bb2,itau_w,zx_tmp_2d,
    194      $     iim*jjmp1,ndex2d)
     177cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1,wsumSTD(:,k,1),zx_tmp_2d)
     178      CALL histwrite_phy(nid_day,"w"//bb2,itau_w,wsumSTD(:,k,1))
     179c
     180cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1,phisumSTD(:,k,1),zx_tmp_2d)
     181      CALL histwrite_phy(nid_day,"phi"//bb2,itau_w,phisumSTD(:,k,1))
    195182
    196183      ENDIF !(bb2.EQ."500") THEN
     
    198185      ENDDO !nlevSTD
    199186c
    200       CALL gr_fi_ecrit(1, klon,iim,jjmp1, slp,zx_tmp_2d)
    201       CALL histwrite(nid_day,"slp",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    202 
    203       CALL gr_fi_ecrit(1,klon,iim,jjmp1,cape,zx_tmp_2d)
    204       CALL histwrite(nid_day,"cape_max",itau_w,zx_tmp_2d,
    205      .               iim*jjmp1,ndex2d)
    206 c
    207       CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d)
    208       CALL histwrite(nid_day,"solldown",itau_w,zx_tmp_2d,iim*jjmp1,
    209      .               ndex2d)
     187cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, slp,zx_tmp_2d)
     188      CALL histwrite_phy(nid_day,"slp",itau_w,slp)
     189
     190cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,cape,zx_tmp_2d)
     191      CALL histwrite_phy(nid_day,"cape_max",itau_w,cape)
     192c
     193cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d)
     194      CALL histwrite_phy(nid_day,"solldown",itau_w,sollwdown)
    210195c
    211196      DO i=1, klon
    212197        zx_tmp_fi2d(i)=-1*sens(i)
    213198      ENDDO
    214       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    215       CALL histwrite(nid_day,"sens",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     199cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     200      CALL histwrite_phy(nid_day,"sens",itau_w,zx_tmp_fi2d)
    216201c
    217202      zx_tmp_fi2d(1 : klon) = swdn(1 : klon, 1)
    218203
    219       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    220       CALL histwrite(nid_day, "SWdnSFC",itau_w,zx_tmp_2d,
    221      .                               iim*jjmp1,ndex2d)
     204cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     205      CALL histwrite_phy(nid_day, "SWdnSFC",itau_w,zx_tmp_fi2d)
    222206c
    223207      IF (OCEAN.EQ.'force ') THEN
     
    232216      ENDIF
    233217      ENDDO
    234       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    235       CALL histwrite(nid_day,"lmt_bils",itau_w,
    236      .     zx_tmp_2d,iim*jjmp1,ndex2d)
     218cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     219      CALL histwrite_phy(nid_day,"lmt_bils",itau_w, zx_tmp_fi2d)
    237220c
    238221      ELSE IF (OCEAN.EQ.'slab  ') THEN
     
    247230      ENDIF
    248231      ENDDO
    249       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    250       CALL histwrite(nid_day,"slab_bils",itau_w,
    251      .     zx_tmp_2d,iim*jjmp1,ndex2d)
     232cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     233      CALL histwrite_phy(nid_day,"slab_bils",itau_w,zx_tmp_fi2d)
    252234c
    253235      DO i=1, klon
     
    259241       ENDIF
    260242      ENDDO !i=1, klon
    261       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    262       CALL histwrite(nid_day,"tslab",itau_w,zx_tmp_2d,
    263      .     iim*jjmp1,ndex2d)
    264 c
    265       CALL gr_fi_ecrit(1, klon,iim,jjmp1, seaice,zx_tmp_2d)
    266       CALL histwrite(nid_day,"seaice",itau_w,zx_tmp_2d,
    267      .     iim*jjmp1,ndex2d)
    268 c
    269       CALL gr_fi_ecrit(1, klon,iim,jjmp1, seaice/1000.,zx_tmp_2d)
    270       CALL histwrite(nid_day,"siceh",itau_w,zx_tmp_2d,
    271      .     iim*jjmp1,ndex2d)
     243cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     244      CALL histwrite_phy(nid_day,"tslab",itau_w,zx_tmp_fi2d)
     245c
     246cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, seaice,zx_tmp_2d)
     247      CALL histwrite_phy(nid_day,"seaice",itau_w,seaice)
     248c
     249cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, seaice/1000.,zx_tmp_2d)
     250      CALL histwrite_phy(nid_day,"siceh",itau_w,seaice/1000.)
    272251c
    273252      ENDIF !(OCEAN.EQ.'slab  ') THEN
     
    281260      ENDDO
    282261c
    283       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    284       CALL histwrite(nid_day,"fluxo",itau_w,zx_tmp_2d,
    285      .     iim*jjmp1,ndex2d)
     262cym     CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     263      CALL histwrite_phy(nid_day,"fluxo",itau_w,zx_tmp_fi2d)
    286264c
    287265      DO i=1, klon
     
    293271      ENDDO
    294272c
    295       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    296       CALL histwrite(nid_day,"fluxg",itau_w,zx_tmp_2d,
    297      .     iim*jjmp1,ndex2d)
     273cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     274      CALL histwrite_phy(nid_day,"fluxg",itau_w,zx_tmp_fi2d)
    298275c
    299276      ENDIF !lev_histday.GE.1
     
    301278      IF(lev_histday.GE.2) THEN
    302279c
    303       CALL gr_fi_ecrit(1, klon,iim,jjmp1, bils,zx_tmp_2d)
    304       CALL histwrite(nid_day,"bils",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    305 c
    306       CALL gr_fi_ecrit(1, klon,iim,jjmp1, fder,zx_tmp_2d)
    307       CALL histwrite(nid_day,"fder",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     280cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, bils,zx_tmp_2d)
     281      CALL histwrite_phy(nid_day,"bils",itau_w, bils)
     282c
     283cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, fder,zx_tmp_2d)
     284      CALL histwrite_phy(nid_day,"fder",itau_w,fder)
    308285c
    309286      ENDIF !lev_histday.GE.2
     
    317294c Champs 3D:
    318295c
    319       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, t_seri, zx_tmp_3d)
    320       CALL histwrite(nid_day,"temp",itau_w,zx_tmp_3d,
    321      .                                   iim*jjmp1*klev,ndex3d)
    322 c
    323       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, qx(1,1,ivap), zx_tmp_3d)
    324       CALL histwrite(nid_day,"ovap",itau_w,zx_tmp_3d,
    325      .                                   iim*jjmp1*klev,ndex3d)
    326 c
    327       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zphi, zx_tmp_3d)
    328       CALL histwrite(nid_day,"geop",itau_w,zx_tmp_3d,
    329      .                                   iim*jjmp1*klev,ndex3d)
    330 c
    331       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, u_seri, zx_tmp_3d)
    332       CALL histwrite(nid_day,"vitu",itau_w,zx_tmp_3d,
    333      .                                   iim*jjmp1*klev,ndex3d)
    334 c
    335       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, v_seri, zx_tmp_3d)
    336       CALL histwrite(nid_day,"vitv",itau_w,zx_tmp_3d,
    337      .                                   iim*jjmp1*klev,ndex3d)
    338 c
    339       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, omega, zx_tmp_3d)
    340       CALL histwrite(nid_day,"vitw",itau_w,zx_tmp_3d,
    341      .                                   iim*jjmp1*klev,ndex3d)
    342 c
    343       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, pplay, zx_tmp_3d)
    344       CALL histwrite(nid_day,"pres",itau_w,zx_tmp_3d,
    345      .                                   iim*jjmp1*klev,ndex3d)
     296cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, t_seri, zx_tmp_3d)
     297      CALL histwrite_phy(nid_day,"temp",itau_w,t_seri)
     298c
     299cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, qx(1,1,ivap), zx_tmp_3d)
     300      CALL histwrite_phy(nid_day,"ovap",itau_w,qx(:,:,ivap))
     301c
     302cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zphi, zx_tmp_3d)
     303      CALL histwrite_phy(nid_day,"geop",itau_w,zphi)
     304c
     305cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, u_seri, zx_tmp_3d)
     306      CALL histwrite_phy(nid_day,"vitu",itau_w,u_seri)
     307c
     308cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, v_seri, zx_tmp_3d)
     309      CALL histwrite_phy(nid_day,"vitv",itau_w,v_seri)
     310c
     311cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, omega, zx_tmp_3d)
     312      CALL histwrite_phy(nid_day,"vitw",itau_w,omega)
     313c
     314cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, pplay, zx_tmp_3d)
     315      CALL histwrite_phy(nid_day,"pres",itau_w,pplay)
    346316c
    347317      ENDIF !lev_histday.GE.3
     
    356326c=================================================================
    357327      zx_tmp_fi2d(1 : klon) = swup( 1 : klon, klevp1 )
    358       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    359       CALL histwrite(nid_day, "SWupTOA",itau_w,zx_tmp_2d,
    360      .                               iim*jjmp1,ndex2d)
     328cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     329      CALL histwrite_phy(nid_day, "SWupTOA",itau_w,zx_tmp_fi2d)
    361330c
    362331      zx_tmp_fi2d(1 : klon) = swup( 1 : klon, 1 )
    363       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    364       CALL histwrite(nid_day, "SWupSFC",itau_w,zx_tmp_2d,
    365      .                               iim*jjmp1,ndex2d)
     332cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     333      CALL histwrite_phy(nid_day, "SWupSFC",itau_w,zx_tmp_fi2d)
    366334c
    367335      zx_tmp_fi2d(1 : klon) = swdn( 1 : klon, klevp1 )
    368       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    369       CALL histwrite(nid_day, "SWdnTOA",itau_w,zx_tmp_2d,
    370      .                               iim*jjmp1,ndex2d)
     336cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     337      CALL histwrite_phy(nid_day, "SWdnTOA",itau_w,zx_tmp_fi2d)
    371338c
    372339      zx_tmp_fi2d(1 : klon) = swup0( 1 : klon, klevp1 )
    373       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    374       CALL histwrite(nid_day, "SWupTOAclr",itau_w,zx_tmp_2d,
    375      .                               iim*jjmp1,ndex2d)
     340cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     341      CALL histwrite_phy(nid_day, "SWupTOAclr",itau_w,zx_tmp_fi2d)
    376342c
    377343      zx_tmp_fi2d(1 : klon) = swup0( 1 : klon, 1 )
    378       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    379       CALL histwrite(nid_day, "SWupSFCclr",itau_w,zx_tmp_2d,
    380      .                               iim*jjmp1,ndex2d)
     344cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     345      CALL histwrite_phy(nid_day, "SWupSFCclr",itau_w,zx_tmp_fi2d)
    381346c
    382347      zx_tmp_fi2d(1 : klon) = swdn0( 1 : klon, klevp1 )
    383       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    384       CALL histwrite(nid_day, "SWdnTOAclr",itau_w,zx_tmp_2d,
    385      .                               iim*jjmp1,ndex2d)
     348cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     349      CALL histwrite_phy(nid_day, "SWdnTOAclr",itau_w,zx_tmp_fi2d)
    386350c
    387351      zx_tmp_fi2d(1 : klon) = swdn0( 1 : klon, 1 )
    388       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    389       CALL histwrite(nid_day, "SWdnSFCclr",itau_w,zx_tmp_2d,
    390      .                               iim*jjmp1,ndex2d)
     352cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     353      CALL histwrite_phy(nid_day, "SWdnSFCclr",itau_w,zx_tmp_fi2d)
    391354c
    392355cIM AMMA-MIP
    393       CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d)
    394       CALL histwrite(nid_day,"LWdnSFC",itau_w,zx_tmp_2d,iim*jjmp1,
    395      .               ndex2d)
     356cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d)
     357      CALL histwrite_phy(nid_day,"LWdnSFC",itau_w,sollwdown)
    396358c
    397359      zx_tmp_fi2d(1:klon)=sollwdown(1:klon)-sollw(1:klon)
    398       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    399       CALL histwrite(nid_day,"LWupSFC",itau_w,zx_tmp_2d,iim*jjmp1,
    400      .               ndex2d)
     360cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     361      CALL histwrite_phy(nid_day,"LWupSFC",itau_w,zx_tmp_fi2d)
    401362c
    402363cIM   IF (iflag_con.GE.3) THEN
    403364cIM ema_pct= 0.     CALL gr_fi_ecrit(1, klon,iim,jjmp1, ema_pct,zx_tmp_2d)
    404       CALL gr_fi_ecrit(1, klon,iim,jjmp1, meanptop(:,1),zx_tmp_2d)
    405       CALL histwrite(nid_day,"ptop",itau_w,zx_tmp_2d,iim*jjmp1,
    406      .               ndex2d)
     365cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, meanptop(:,1),zx_tmp_2d)
     366      CALL histwrite_phy(nid_day,"ptop",itau_w,meanptop(:,1))
    407367cIM   ENDIF
    408368c
    409369      zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_ter)
    410       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d ,zx_tmp_2d)
    411       CALL histwrite(nid_day,"tter",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     370cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d ,zx_tmp_2d)
     371      CALL histwrite_phy(nid_day,"tter",itau_w,zx_tmp_fi2d)
    412372c
    413373      zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_lic)
    414       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    415       CALL histwrite(nid_day,"tlic",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     374cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     375      CALL histwrite_phy(nid_day,"tlic",itau_w,zx_tmp_fi2d)
    416376c
    417377      zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_oce)
    418       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    419       CALL histwrite(nid_day,"toce",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     378cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     379      CALL histwrite_phy(nid_day,"toce",itau_w,zx_tmp_fi2d)
    420380c
    421381      zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_sic)
    422       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    423       CALL histwrite(nid_day,"tsic",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     382cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     383      CALL histwrite_phy(nid_day,"tsic",itau_w,zx_tmp_fi2d)
    424384c
    425385      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_ter)
    426       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    427       CALL histwrite(nid_day,"t2mter",itau_w,zx_tmp_2d,iim*jjmp1,
    428      .               ndex2d)
     386cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     387      CALL histwrite_phy(nid_day,"t2mter",itau_w,zx_tmp_fi2d)
    429388c
    430389      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_ter)
    431       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    432       CALL histwrite(nid_day,"t2mter_min",itau_w,zx_tmp_2d,
    433      .               iim*jjmp1,ndex2d)
     390cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     391      CALL histwrite_phy(nid_day,"t2mter_min",itau_w,zx_tmp_fi2d)
    434392c
    435393      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_ter)
    436       CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
    437       CALL histwrite(nid_day,"t2mter_max",itau_w,zx_tmp_2d,
    438      .               iim*jjmp1,ndex2d)
     394cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
     395      CALL histwrite_phy(nid_day,"t2mter_max",itau_w,zx_tmp_fi2d)
    439396c
    440397      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_lic)
    441       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    442       CALL histwrite(nid_day,"t2mlic",itau_w,zx_tmp_2d,iim*jjmp1,
    443      .               ndex2d)
     398cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     399      CALL histwrite_phy(nid_day,"t2mlic",itau_w,zx_tmp_fi2d)
    444400c
    445401      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_oce)
    446       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    447       CALL histwrite(nid_day,"t2moce",itau_w,zx_tmp_2d,iim*jjmp1,
    448      .               ndex2d)
     402cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     403      CALL histwrite_phy(nid_day,"t2moce",itau_w,zx_tmp_fi2d)
    449404c
    450405      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_sic)
    451       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    452       CALL histwrite(nid_day,"t2msic",itau_w,zx_tmp_2d,iim*jjmp1,
    453      .               ndex2d)
     406cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     407      CALL histwrite_phy(nid_day,"t2msic",itau_w,zx_tmp_fi2d)
    454408c
    455409      zx_tmp_fi2d(1 : klon) = u10m(1 : klon, is_ter)
    456       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    457       CALL histwrite(nid_day,"u10mter",itau_w,zx_tmp_2d,iim*jjmp1,
    458      .               ndex2d)
     410cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     411      CALL histwrite_phy(nid_day,"u10mter",itau_w,zx_tmp_fi2d)
    459412c
    460413      zx_tmp_fi2d(1 : klon) = v10m(1 : klon, is_ter)
    461       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    462       CALL histwrite(nid_day,"v10mter",itau_w,zx_tmp_2d,iim*jjmp1,
    463      .               ndex2d)
     414cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     415      CALL histwrite_phy(nid_day,"v10mter",itau_w,zx_tmp_fi2d)
    464416c
    465417      zx_tmp_fi2d(1 : klon) = u10m(1 : klon, is_lic)
    466       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    467       CALL histwrite(nid_day,"u10mlic",itau_w,zx_tmp_2d,iim*jjmp1,
    468      .               ndex2d)
     418cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     419      CALL histwrite_phy(nid_day,"u10mlic",itau_w,zx_tmp_fi2d)
    469420c
    470421      zx_tmp_fi2d(1 : klon) = v10m(1 : klon, is_lic)
    471       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    472       CALL histwrite(nid_day,"v10mlic",itau_w,zx_tmp_2d,iim*jjmp1,
    473      .               ndex2d)
     422cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     423      CALL histwrite_phy(nid_day,"v10mlic",itau_w,zx_tmp_fi2d)
    474424c
    475425      zx_tmp_fi2d(1 : klon) = u10m(1 : klon, is_oce)
    476       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    477       CALL histwrite(nid_day,"u10moce",itau_w,zx_tmp_2d,iim*jjmp1,
    478      .               ndex2d)
     426cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     427      CALL histwrite_phy(nid_day,"u10moce",itau_w,zx_tmp_fi2d)
    479428c
    480429      zx_tmp_fi2d(1 : klon) = v10m(1 : klon, is_oce)
    481       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    482       CALL histwrite(nid_day,"v10moce",itau_w,zx_tmp_2d,iim*jjmp1,
    483      .               ndex2d)
     430cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     431      CALL histwrite_phy(nid_day,"v10moce",itau_w,zx_tmp_fi2d)
    484432c
    485433      zx_tmp_fi2d(1 : klon) = u10m(1 : klon, is_sic)
    486       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    487       CALL histwrite(nid_day,"u10msic",itau_w,zx_tmp_2d,iim*jjmp1,
    488      .               ndex2d)
     434cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     435      CALL histwrite_phy(nid_day,"u10msic",itau_w,zx_tmp_fi2d)
    489436C
    490437      zx_tmp_fi2d(1 : klon) = v10m(1 : klon, is_sic)
    491       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
    492       CALL histwrite(nid_day,"v10msic",itau_w,zx_tmp_2d,iim*jjmp1,
    493      .               ndex2d)
     438cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
     439      CALL histwrite_phy(nid_day,"v10msic",itau_w,zx_tmp_fi2d)
    494440C
    495441      DO nsrf = 1, nbsrf
    496442C
    497443        zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)*100.
    498         CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
    499         CALL histwrite(nid_day,"pourc_"//clnsurf(nsrf),itau_w,
    500      $      zx_tmp_2d,iim*jjmp1,ndex2d)
     444cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
     445        CALL histwrite_phy(nid_day,"pourc_"//clnsurf(nsrf),itau_w,
     446     &                     zx_tmp_fi2d)
    501447C
    502448        zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)
    503         CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
    504         CALL histwrite(nid_day,"fract_"//clnsurf(nsrf),itau_w,
    505      $      zx_tmp_2d,iim*jjmp1,ndex2d)
     449cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
     450        CALL histwrite_phy(nid_day,"fract_"//clnsurf(nsrf),itau_w,
     451     &                     zx_tmp_fi2d)
    506452C
    507453        zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf)
    508         CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
    509         CALL histwrite(nid_day,"tsol_"//clnsurf(nsrf),itau_w,
    510      $      zx_tmp_2d,iim*jjmp1,ndex2d)
     454cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
     455        CALL histwrite_phy(nid_day,"tsol_"//clnsurf(nsrf),itau_w,
     456     $                     zx_tmp_fi2d)
    511457C
    512458        zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf)
    513         CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
    514         CALL histwrite(nid_day,"sens_"//clnsurf(nsrf),itau_w,
    515      $      zx_tmp_2d,iim*jjmp1,ndex2d)
     459cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
     460        CALL histwrite_phy(nid_day,"sens_"//clnsurf(nsrf),itau_w,
     461     $                     zx_tmp_fi2d)
    516462
    517463        zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf)
    518         CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
    519         CALL histwrite(nid_day,"lat_"//clnsurf(nsrf),itau_w,
    520      $      zx_tmp_2d,iim*jjmp1,ndex2d)
     464cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
     465        CALL histwrite_phy(nid_day,"lat_"//clnsurf(nsrf),itau_w,
     466     $                     zx_tmp_fi2d)
    521467C
    522468        zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf)
    523         CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
    524         CALL histwrite(nid_day,"taux_"//clnsurf(nsrf),itau_w,
    525      $      zx_tmp_2d,iim*jjmp1,ndex2d)
     469cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
     470        CALL histwrite_phy(nid_day,"taux_"//clnsurf(nsrf),itau_w,
     471     $                     zx_tmp_fi2d)
    526472C     
    527473        zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf)
    528         CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
    529         CALL histwrite(nid_day,"tauy_"//clnsurf(nsrf),itau_w,
    530      $      zx_tmp_2d,iim*jjmp1,ndex2d)
     474cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
     475        CALL histwrite_phy(nid_day,"tauy_"//clnsurf(nsrf),itau_w,
     476     $                     zx_tmp_fi2d)
    531477C
    532478        zx_tmp_fi2d(1 : klon) = falbe( 1 : klon, nsrf)
    533         CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
    534         CALL histwrite(nid_day,"albe_"//clnsurf(nsrf),itau_w,
    535      $      zx_tmp_2d,iim*jjmp1,ndex2d)
     479cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
     480        CALL histwrite_phy(nid_day,"albe_"//clnsurf(nsrf),itau_w,
     481     $                     zx_tmp_fi2d)
    536482C
    537483        zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf)
    538         CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
    539         CALL histwrite(nid_day,"rugs_"//clnsurf(nsrf),itau_w,
    540      $      zx_tmp_2d,iim*jjmp1,ndex2d)
     484cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
     485        CALL histwrite_phy(nid_day,"rugs_"//clnsurf(nsrf),itau_w,
     486     $                     zx_tmp_fi2d)
    541487C
    542488      END DO 
     
    550496c rajout sorties F. Aires
    551497c
    552       CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw0,zx_tmp_2d)
    553       CALL histwrite(nid_day,"tops0",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    554 c
    555       CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw0,zx_tmp_2d)
    556       CALL histwrite(nid_day,"topl0",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    557 c
    558       CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw0,zx_tmp_2d)
    559       CALL histwrite(nid_day,"sols0",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    560 c
    561       CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw0,zx_tmp_2d)
    562       CALL histwrite(nid_day,"soll0",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    563 c
    564       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldfra, zx_tmp_3d)
    565       CALL histwrite(nid_day,"rneb",itau_w,zx_tmp_3d,
    566      .                                   iim*jjmp1*klev,ndex3d)
    567 c
    568       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, rnebcon, zx_tmp_3d)
    569       CALL histwrite(nid_day,"rnebcon",itau_w,zx_tmp_3d,
    570      .                                   iim*jjmp1*klev,ndex3d)
    571 c
    572       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, flwc,zx_tmp_3d)
    573       CALL histwrite(nid_day,"lwcon",itau_w,zx_tmp_3d,
    574      .               iim*jjmp1*klev,ndex3d)
    575 c
    576       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, fiwc,zx_tmp_3d)
    577       CALL histwrite(nid_day,"iwcon",itau_w,zx_tmp_3d,
    578      .               iim*jjmp1*klev,ndex3d)
     498cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw0,zx_tmp_2d)
     499      CALL histwrite_phy(nid_day,"tops0",itau_w,topsw0)
     500c
     501cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw0,zx_tmp_2d)
     502      CALL histwrite_phy(nid_day,"topl0",itau_w,toplw0)
     503c
     504cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw0,zx_tmp_2d)
     505      CALL histwrite_phy(nid_day,"sols0",itau_w,solsw0)
     506c
     507cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw0,zx_tmp_2d)
     508      CALL histwrite_phy(nid_day,"soll0",itau_w, sollw0)
     509c
     510cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldfra, zx_tmp_3d)
     511      CALL histwrite_phy(nid_day,"rneb",itau_w,cldfra)
     512c
     513cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, rnebcon, zx_tmp_3d)
     514      CALL histwrite_phy(nid_day,"rnebcon",itau_w,rnebcon)
     515c
     516cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, flwc,zx_tmp_3d)
     517      CALL histwrite_phy(nid_day,"lwcon",itau_w,flwc)
     518c
     519cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, fiwc,zx_tmp_3d)
     520      CALL histwrite_phy(nid_day,"iwcon",itau_w,fiwc)
    579521c
    580522      zx_tmp_fi2d(1:klon) = flwp(1:klon)
    581       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    582       CALL histwrite(nid_day,"lwp",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
     523cym     CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     524      CALL histwrite_phy(nid_day,"lwp",itau_w,zx_tmp_fi2d)
    583525c
    584526      zx_tmp_fi2d(1:klon) = fiwp(1:klon)
    585       CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    586       CALL histwrite(nid_day,"iwp",itau_w,zx_tmp_2d,iim*jjmp1,ndex2d)
    587 c
    588       CALL gr_fi_ecrit(1,klon,iim,jjmp1, meantaucld,zx_tmp_2d)
    589       CALL histwrite(nid_day,"meantaucld",itau_w,zx_tmp_2d,
    590      .               iim*jjmp1,ndex2d)
    591 c
    592       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldtau,zx_tmp_3d)
    593       CALL histwrite(nid_day,"cldtau",itau_w,zx_tmp_3d,
    594      .               iim*jjmp1*klev,ndex3d)
    595 c
    596       CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldemi,zx_tmp_3d)
    597       CALL histwrite(nid_day,"cldemi",itau_w,zx_tmp_3d,
    598      .               iim*jjmp1*klev,ndex3d)
     527cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
     528      CALL histwrite_phy(nid_day,"iwp",itau_w,zx_tmp_fi2d)
     529c
     530cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1, meantaucld,zx_tmp_2d)
     531      CALL histwrite_phy(nid_day,"meantaucld",itau_w,meantaucld)
     532c
     533cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldtau,zx_tmp_3d)
     534      CALL histwrite_phy(nid_day,"cldtau",itau_w,cldtau)
     535c
     536cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldemi,zx_tmp_3d)
     537      CALL histwrite_phy(nid_day,"cldemi",itau_w,cldemi)
    599538c
    600539c
    601540cIM: 101003 : K/30min ==> K/s
    602541      zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys
    603       CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
    604       CALL histwrite(nid_day,"dtcon",itau_w,zx_tmp_3d,
    605      .                                   iim*jjmp1*klev,ndex3d)
     542cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
     543      CALL histwrite_phy(nid_day,"dtcon",itau_w,zx_tmp_fi3d)
    606544c
    607545      zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys
    608       CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
    609       CALL histwrite(nid_day,"dqcon",itau_w,zx_tmp_3d,
    610      .                                   iim*jjmp1*klev,ndex3d)
    611 c
    612       DO i=1, klon
    613        zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.)
    614       ENDDO
    615 c
    616       CALL gr_fi_ecrit(1,klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
    617       CALL histwrite(nid_day,"rh2m",itau_w,zx_tmp_2d,
    618      .               iim*jjmp1,ndex2d)
    619 c
    620       CALL gr_fi_ecrit(1,klon,iim,jjmp1, qsat2m,zx_tmp_2d)
    621       CALL histwrite(nid_day,"qsat2m",itau_w,zx_tmp_2d,
    622      .               iim*jjmp1,ndex2d)
    623 c
    624       CALL gr_fi_ecrit(1,klon,iim,jjmp1, tpot,zx_tmp_2d)
    625       CALL histwrite(nid_day,"tpot",itau_w,zx_tmp_2d,
    626      .               iim*jjmp1,ndex2d)
    627 c
    628       CALL gr_fi_ecrit(1,klon,iim,jjmp1, tpote,zx_tmp_2d)
    629       CALL histwrite(nid_day,"tpote",itau_w,zx_tmp_2d,
    630      .               iim*jjmp1,ndex2d)
     546cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
     547      CALL histwrite_phy(nid_day,"dqcon",itau_w,zx_tmp_fi3d)
     548c
     549      DO i=1, klon
     550       zx_tmp_2d(i)=MIN(100.,rh2m(i)*100.)
     551      ENDDO
     552c
     553cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1, zx_tmp_2d,zx_tmp_2d)
     554      CALL histwrite_phy(nid_day,"rh2m",itau_w,zx_tmp_2d)
     555c
     556cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1, qsat2m,zx_tmp_2d)
     557      CALL histwrite_phy(nid_day,"qsat2m",itau_w,qsat2m)
     558c
     559cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1, tpot,zx_tmp_2d)
     560      CALL histwrite_phy(nid_day,"tpot",itau_w,tpot)
     561c
     562cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1, tpote,zx_tmp_2d)
     563      CALL histwrite_phy(nid_day,"tpote",itau_w,tpote)
    631564c
    632565      ENDIF !lev_histday.GE.5
     
    636569c
    637570      if (ok_sync) then
     571c$OMP MASTER
    638572        call histsync(nid_day)
     573c$OMP END MASTER
    639574      endif
    640575
Note: See TracChangeset for help on using the changeset viewer.