Ignore:
Timestamp:
Dec 14, 2015, 11:43:09 AM (9 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes r2298:2396 into testing branch

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/phylmd/cosp/cosp_output_write_mod.F90

    r2298 r2408  
    2121
    2222    USE ioipsl
    23     USE control_mod
     23    USE time_phylmdz_mod, ONLY: itau_phy, start_time, day_step_phy
     24    USE print_control_mod, ONLY: lunout,prt_level
    2425
    2526#ifdef CPP_XIOS
     
    4445  real, dimension(Npoints,PARASOL_NREFL) :: parasolcrefl, Ncref
    4546
    46   include "temps.h"
    47   include "iniprint.h"
    48 
    4947  Nlevout = vgrid%Nlvgrid
    5048  Ncolout = Ncolumns
    5149
    5250! A refaire
    53        itau_wcosp = itau_phy + itap + start_time * day_step / iphysiq
     51       itau_wcosp = itau_phy + itap + start_time * day_step_phy
    5452        if (prt_level >= 10) then
    55              WRITE(lunout,*)'itau_wcosp, itap, start_time, day_step, iphysiq =', &
    56                              itau_wcosp, itap, start_time, day_step, iphysiq
     53             WRITE(lunout,*)'itau_wcosp, itap, start_time, day_step_phy =', &
     54                             itau_wcosp, itap, start_time, day_step_phy
    5755        endif
    5856
     
    9290     do ip = 1,Npoints
    9391     if(stlidar%lidarcld(ip,k).eq.R_UNDEF)then
    94       stlidar%lidarcld(ip,k)=0.
     92      stlidar%lidarcld(ip,k)=Cosp_fill_value
    9593     endif
    9694     enddo
     
    9997      do ip = 1,Npoints
    10098       if(stlidar%cfad_sr(ip,ii,k).eq.R_UNDEF)then
    101         stlidar%cfad_sr(ip,ii,k)=0.
     99        stlidar%cfad_sr(ip,ii,k)=Cosp_fill_value
    102100       endif
    103101      enddo
     
    108106   do k = 1,Nlevlmdz
    109107     if(sglidar%beta_mol(ip,k).eq.R_UNDEF)then
    110       sglidar%beta_mol(ip,k)=0.
     108      sglidar%beta_mol(ip,k)=Cosp_fill_value
    111109     endif
    112110
    113111     do ii= 1,Ncolumns
    114112       if(sglidar%beta_tot(ip,ii,k).eq.R_UNDEF)then
    115         sglidar%beta_tot(ip,ii,k)=0.
     113        sglidar%beta_tot(ip,ii,k)=Cosp_fill_value
    116114       endif
    117115     enddo
     
    123121    do ip = 1,Npoints
    124122     if(stlidar%cldlayer(ip,k).eq.R_UNDEF)then
    125       stlidar%cldlayer(ip,k)=0.
     123      stlidar%cldlayer(ip,k)=Cosp_fill_value
    126124     endif
    127125    enddo
     
    167165   do ip = 1,Npoints
    168166    if(isccp%totalcldarea(ip).eq.-1.E+30)then
    169       isccp%totalcldarea(ip)=0.
     167      isccp%totalcldarea(ip)=Cosp_fill_value
    170168    endif
    171169    if(isccp%meanptop(ip).eq.-1.E+30)then
    172       isccp%meanptop(ip)=0.
     170      isccp%meanptop(ip)=Cosp_fill_value
    173171    endif
    174172    if(isccp%meantaucld(ip).eq.-1.E+30)then
    175       isccp%meantaucld(ip)=0.
     173      isccp%meantaucld(ip)=Cosp_fill_value
    176174    endif
    177175    if(isccp%meanalbedocld(ip).eq.-1.E+30)then
    178       isccp%meanalbedocld(ip)=0.
     176      isccp%meanalbedocld(ip)=Cosp_fill_value
    179177    endif
    180178    if(isccp%meantb(ip).eq.-1.E+30)then
    181       isccp%meantb(ip)=0.
     179      isccp%meantb(ip)=Cosp_fill_value
    182180    endif
    183181    if(isccp%meantbclr(ip).eq.-1.E+30)then
    184       isccp%meantbclr(ip)=0.
     182      isccp%meantbclr(ip)=Cosp_fill_value
    185183    endif
    186184
     
    188186     do ii=1,7
    189187     if(isccp%fq_isccp(ip,ii,k).eq.-1.E+30)then
    190       isccp%fq_isccp(ip,ii,k)=0.
     188      isccp%fq_isccp(ip,ii,k)=Cosp_fill_value
    191189     endif
    192190     enddo
     
    195193    do ii=1,Ncolumns
    196194     if(isccp%boxtau(ip,ii).eq.-1.E+30)then
    197        isccp%boxtau(ip,ii)=0.
     195       isccp%boxtau(ip,ii)=Cosp_fill_value
    198196     endif
    199197    enddo
     
    201199    do ii=1,Ncolumns
    202200     if(isccp%boxptop(ip,ii).eq.-1.E+30)then
    203        isccp%boxptop(ip,ii)=0.
     201       isccp%boxptop(ip,ii)=Cosp_fill_value
    204202     endif
    205203    enddo
     
    268266    use iophy
    269267    USE mod_phys_lmdz_para
     268    USE mod_grid_phy_lmdz, ONLY: nbp_lon
     269    USE print_control_mod, ONLY: lunout,prt_level
    270270#ifdef CPP_XIOS
    271271  USE wxios
     
    274274    IMPLICIT NONE
    275275
    276     INCLUDE "dimensions.h"
    277     INCLUDE "temps.h"
    278276    INCLUDE "clesphys.h"
    279     include "iniprint.h"
    280277
    281278    INTEGER                          :: iff
     
    320317       IF ( var%cles(iff) ) THEN
    321318          CALL histdef (cosp_nidfiles(iff), var%name, var%description, var%unit, &
    322                iim,jj_nb,nhoricosp(iff), 1,1,1, -99, 32, &
     319               nbp_lon,jj_nb,nhoricosp(iff), 1,1,1, -99, 32, &
    323320               typeecrit, zstophym,zoutm_cosp(iff))
    324321       ENDIF
     
    332329    use iophy
    333330    USE mod_phys_lmdz_para
     331    USE mod_grid_phy_lmdz, ONLY: nbp_lon
     332    USE print_control_mod, ONLY: lunout,prt_level
    334333
    335334#ifdef CPP_XIOS
     
    340339    IMPLICIT NONE
    341340
    342     INCLUDE "dimensions.h"
    343     INCLUDE "temps.h"
    344341    INCLUDE "clesphys.h"
    345     include "iniprint.h"
    346342
    347343    INTEGER                        :: iff, klevs
     
    415411       IF ( var%cles(iff) ) THEN
    416412          CALL histdef (cosp_nidfiles(iff), nom, var%description, var%unit, &
    417                iim, jj_nb, nhoricosp(iff), klevs, 1, &
     413               nbp_lon, jj_nb, nhoricosp(iff), klevs, 1, &
    418414               klevs, nvertsave, 32, typeecrit, &
    419415               zstophym, zoutm_cosp(iff))
     
    428424  USE ioipsl
    429425  use iophy
     426  USE mod_grid_phy_lmdz, ONLY: nbp_lon
     427  USE print_control_mod, ONLY: lunout,prt_level
    430428
    431429#ifdef CPP_XIOS
     
    434432
    435433  IMPLICIT NONE
    436   INCLUDE 'dimensions.h'
    437   INCLUDE 'iniprint.h'
    438434  INCLUDE 'clesphys.h'
    439435
     
    445441    REAL,DIMENSION(klon_mpi) :: buffer_omp
    446442    INTEGER, allocatable, DIMENSION(:) :: index2d
    447     REAL :: Field2d(iim,jj_nb)
     443    REAL :: Field2d(nbp_lon,jj_nb)
    448444    CHARACTER(LEN=20) ::  nomi, nom
    449445    character(len=2) :: str2
     
    467463    !Et sinon on.... écrit
    468464    IF (SIZE(field)/=klon) &
    469   CALL abort_gcm('iophy::histwrite2d_cosp','Field first DIMENSION not equal to klon',1)
     465  CALL abort_physic('iophy::histwrite2d_cosp','Field first DIMENSION not equal to klon',1)
    470466
    471467    CALL Gather_omp(field,buffer_omp)
     
    477473      DO iff=1, 3
    478474           IF (var%cles(iff) .AND. cosp_outfilekeys(iff)) THEN
    479                 ALLOCATE(index2d(iim*jj_nb))
     475                ALLOCATE(index2d(nbp_lon*jj_nb))
    480476#ifndef CPP_IOIPSL_NO_OUTPUT
    481         CALL histwrite(cosp_nidfiles(iff),var%name,itau_iocosp,Field2d,iim*jj_nb,index2d)
     477        CALL histwrite(cosp_nidfiles(iff),var%name,itau_iocosp,Field2d,nbp_lon*jj_nb,index2d)
    482478#endif
    483479                deallocate(index2d)
     
    517513  USE ioipsl
    518514  use iophy
     515  USE mod_grid_phy_lmdz, ONLY: nbp_lon
     516  USE print_control_mod, ONLY: lunout,prt_level
    519517
    520518#ifdef CPP_XIOS
     
    524522
    525523  IMPLICIT NONE
    526   INCLUDE 'dimensions.h'
    527   INCLUDE 'iniprint.h'
    528524  INCLUDE 'clesphys.h'
    529525
     
    536532
    537533    REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp
    538     REAL :: Field3d(iim,jj_nb,SIZE(field,2))
     534    REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2))
    539535    INTEGER :: ip, n, nlev
    540536    INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d
     
    568564    !Et sinon on.... écrit
    569565    IF (SIZE(field,1)/=klon) &
    570    CALL abort_gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)                                 
     566   CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)                                 
    571567    nlev=SIZE(field,2)
    572568
     
    580576     DO iff=1, 3
    581577        IF (var%cles(iff) .AND. cosp_outfilekeys(iff)) THEN
    582            ALLOCATE(index3d(iim*jj_nb*nlev))
     578           ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
    583579#ifndef CPP_IOIPSL_NO_OUTPUT
    584     CALL histwrite(cosp_nidfiles(iff),nom,itau_iocosp,Field3d,iim*jj_nb*nlev,index3d)
     580    CALL histwrite(cosp_nidfiles(iff),nom,itau_iocosp,Field3d,nbp_lon*jj_nb*nlev,index3d)
    585581#endif
    586582
     
    613609    !   en utilisant les routines getin de IOIPSL 
    614610    use ioipsl
     611    USE print_control_mod, ONLY: lunout,prt_level
    615612
    616613    IMPLICIT NONE
    617     include 'iniprint.h'
    618614
    619615   CHARACTER(LEN=20)               :: nam_var, nnam_var
Note: See TracChangeset for help on using the changeset viewer.