Changeset 2080 for LMDZ5/trunk/libf


Ignore:
Timestamp:
Jul 7, 2014, 4:48:37 PM (10 years ago)
Author:
idelkadi
Message:
  • Rajout des derictives OPENMP pour lire les fichiers namelists
  • Corrections dans la re-ecriture des sorties (traitement des valeurs indefinies)
  • Suppression des parametres non utilises des namelists
Location:
LMDZ5/trunk/libf/cosp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/cosp/cosp_constants.F90

    r1907 r2080  
    3131!
    3232MODULE MOD_COSP_CONSTANTS
    33 !    use netcdf, only: nf90_fill_rea
     33    use netcdf, only: nf90_fill_real
    3434    IMPLICIT NONE
    3535   
     
    4747    ! Missing value
    4848!!    real,parameter :: R_UNDEF = -1.0E30
    49      real,parameter :: R_UNDEF = 9.96921e+36
    50 !      real,parameter :: R_UNDEF = nf90_fill_rea
     49!     real,parameter :: R_UNDEF = 9.96921e+36
     50      real,parameter :: R_UNDEF = nf90_fill_real
     51
    5152    ! Number of possible output variables
    5253    integer,parameter :: N_OUT_LIST = 27
  • LMDZ5/trunk/libf/cosp/cosp_output_mod.F90

    r1986 r2080  
    8080!   LOGICAL, SAVE :: cosp_varsdefined = .FALSE. ! ug PAS THREADPRIVATE ET C'EST NORMAL
    8181  LOGICAL, SAVE        :: cosp_varsdefined
    82   INTEGER, save        :: Nlevout,Ncolout
    83 !$OMP THREADPRIVATE(Nlevout)
    8482
    8583CONTAINS
     
    130128    WRITE(lunout,*) 'Debut cosp_output_mod.F90'
    131129    ! Initialisations (Valeurs par defaut)
    132     Nlevout = vgrid%Nlvgrid
    133     Ncolout = Ncolumns
    134130
    135131    do ii=1,Ncolumns
     
    188184       if (use_vgrid) then
    189185! Axe vertical Cosp 40 niveaux (en m)
    190       CALL histvert(cosp_nidfiles(iff),"height","height","m",Nlevout,vgrid%z,nvert(iff))
     186      CALL histvert(cosp_nidfiles(iff),"height","height","m",vgrid%Nlvgrid,vgrid%z,nvert(iff))
    191187       else
    192188! Axe vertical modele LMDZ presnivs
    193       CALL histvert(cosp_nidfiles(iff),"presnivs","Vertical levels","Pa",Nlevout,presnivs,nvert(iff),"down")
     189      CALL histvert(cosp_nidfiles(iff),"presnivs","Vertical levels","Pa",vgrid%Nlvgrid,presnivs,nvert(iff),"down")
    194190       endif
    195191! Axe vertical niveaux modele (en m)
     
    205201    ! ug déclaration des axes verticaux de chaque fichier:
    206202    if (use_vgrid) then
    207       CALL wxios_add_vaxis("height", cosp_outfilenames(iff), Nlevout, vgrid%z)
     203      CALL wxios_add_vaxis("height", cosp_outfilenames(iff), vgrid%Nlvgrid, vgrid%z)
    208204    else
    209       CALL wxios_add_vaxis("presnivs", cosp_outfilenames(iff), Nlevout, presnivs)
     205      CALL wxios_add_vaxis("presnivs", cosp_outfilenames(iff), vgrid%Nlvgrid, presnivs)
    210206    endif
    211207    CALL wxios_add_vaxis("height_mlev", cosp_outfilenames(iff), Nlevlmdz, vgrid%mz)
  • LMDZ5/trunk/libf/cosp/cosp_output_write_mod.F90

    r1986 r2080  
    88   INTEGER, SAVE  :: itau_iocosp
    99!$OMP THREADPRIVATE(itau_iocosp)
     10   INTEGER, save        :: Nlevout, Ncolout
     11!$OMP THREADPRIVATE(Nlevout, Ncolout)
    1012
    1113!  INTERFACE histwrite_cosp
     
    1517   CONTAINS
    1618
    17   SUBROUTINE cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, cfg, gbx, sglidar, stlidar, isccp)
     19  SUBROUTINE cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, cfg, gbx, vgrid, sglidar, stlidar, isccp)
    1820
    1921    USE ioipsl
     
    3335  type(cosp_isccp)      :: isccp   ! Output from ISCCP simulator
    3436  type(cosp_lidarstats) :: stlidar ! Summary statistics from lidar simulator
     37  type(cosp_vgrid)      :: vgrid   ! Information on vertical grid of stats
    3538
    3639!!! Variables locales
     
    4144
    4245  include "temps.h"
     46
     47  Nlevout = vgrid%Nlvgrid
     48  Ncolout = Ncolumns
    4349
    4450  IF (MOD(itap,NINT(freq_COSP/dtime)).EQ.0) THEN
     
    6773
    6874 if (cfg%Llidar_sim) then
    69 
     75! print*,'cfg%Llidar_sim dans output_write',cfg%Llidar_sim
     76! print*,'Nlevout Npoints dans output_write, R_UNDEF =',Nlevout,Npoints,R_UNDEF
    7077! Pb des valeurs indefinies, on les met a 0
    7178! A refaire proprement
  • LMDZ5/trunk/libf/cosp/phys_cosp.F90

    r1925 r2080  
    8484  character(len=64),PARAMETER  :: cosp_input_nl='cosp_input_nl.txt'
    8585  character(len=64),PARAMETER  :: cosp_output_nl='cosp_output_nl.txt'
    86   character(len=512), save :: finput ! Input file name
    87   character(len=512), save :: cmor_nl
    8886  integer, save :: isccp_topheight,isccp_topheight_direction,overlap
    8987  integer,save  :: Ncolumns     ! Number of subcolumns in SCOPS
     
    140138 
    141139!
    142    namelist/COSP_INPUT/cmor_nl,overlap,isccp_topheight,isccp_topheight_direction, &
    143               npoints_it,ncolumns,nlevels,use_vgrid,nlr,csat_vgrid,finput, &
     140   namelist/COSP_INPUT/overlap,isccp_topheight,isccp_topheight_direction, &
     141              npoints_it,ncolumns,use_vgrid,nlr,csat_vgrid, &
    144142              radar_freq,surface_radar,use_mie_tables, &
    145143              use_gas_abs,do_ray,melt_lay,k2,Nprmts_max_hydro,Naero,Nprmts_max_aero, &
     
    297295     if (debut_cosp) then
    298296
     297      !$OMP MASTER
    299298        print *, ' Open outpts files and define axis'
    300299        call cosp_output_open(Nlevlmdz, Ncolumns, presnivs, dtime, freq_cosp, &
    301300                              ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, &
    302301                              ecrit_mth, ecrit_day, ecrit_hf, use_vgrid, vgrid)
    303 
     302      !$OMP END MASTER
     303      !$OMP BARRIER
    304304        debut_cosp=.false.
    305305      endif ! debut_cosp
     
    313313!!!!!!!!!!!!!!!!!! Ecreture des sorties Cosp !!!!!!!!!!!!!!r!!!!!!:!!!!!
    314314       print *, 'Calling write output'
    315         call cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, cfg, gbx, sglidar, stlidar, isccp)
     315        call cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, cfg, gbx, vgrid, sglidar, stlidar, isccp)
    316316
    317317!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     
    343343      CLOSE(10)
    344344    ENDIF
    345     CALL bcast(cmor_nl)
    346345    CALL bcast(overlap)
    347346    CALL bcast(isccp_topheight)
     
    349348    CALL bcast(npoints_it)
    350349    CALL bcast(ncolumns)
    351     CALL bcast(nlevels)
    352350    CALL bcast(use_vgrid)
    353351    CALL bcast(nlr)
    354352    CALL bcast(csat_vgrid)
    355     CALL bcast(finput)
    356353    CALL bcast(radar_freq)
    357354    CALL bcast(surface_radar)
Note: See TracChangeset for help on using the changeset viewer.