Changeset 3978


Ignore:
Timestamp:
Aug 30, 2021, 8:37:06 PM (3 years ago)
Author:
fhourdin
Message:

Nouvelle option des programme iotd*
Possibilite de controler les variables de sorties via
iotd.def

Location:
LMDZ6/trunk/libf/phylmd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/iotd.h

    r3977 r3978  
    1313      INTEGER dim_coord(4)
    1414      real iotd_ts,iotd_t0
     15      integer :: n_names_iotd_def
     16      character*20, dimension(200) :: names_iotd_def
     17      character*20 :: un_nom
    1518
    16       common/ecritd_c/imax,jmax,lmax,nid,dim_coord,iotd_t0,iotd_ts
    17 !$OMP THREADPRIVATE(/ecritd_c/)
     19      common/iotd_ca/imax,jmax,lmax,nid,dim_coord,iotd_t0,iotd_ts
     20      common/iotd_cb/n_names_iotd_def,names_iotd_def
     21!$OMP THREADPRIVATE(/iotd_ca/)
     22!$OMP THREADPRIVATE(/iotd_cb/)
  • LMDZ6/trunk/libf/phylmd/iotd_ecrit.F90

    r3977 r3978  
    6363     
    6464
     65
     66       if (n_names_iotd_def>0 .and..not.any(names_iotd_def==nom)) return
    6567!***************************************************************
    6668! Initialisation of 'firstnom' and create/open the "diagfi.nc" NetCDF file
     
    9496!!          print*,'ntime ',ntime
    9597           date=iotd_t0+ntime*iotd_ts
    96            print*,'iotd_ecrit ',iotd_ts,ntime, date
     98           !print*,'iotd_ecrit ',iotd_ts,ntime, date
    9799!          date= float (zitau +1)/float (day_step)
    98100
     
    160162          ierr = NF_REDEF (nid)
    161163          ierr = NF_DEF_VAR(nid,nom,NF_FLOAT,ndim,dim_cc,varid)
    162           print*,'DEF ',nom,nid,varid
     164          !print*,'DEF ',nom,nid,varid
    163165          ierr = NF_ENDDEF(nid)
    164166      else
    165167         ierr= NF_INQ_VARID(nid,nom,varid)
    166           print*,'INQ ',nom,nid,varid
     168          !print*,'INQ ',nom,nid,varid
    167169! Commandes pour recuperer automatiquement les coordonnees
    168170!             ierr= NF_INQ_DIMID(nid,"longitude",id(1))
  • LMDZ6/trunk/libf/phylmd/iotd_ini.F90

    r3977 r3978  
    3939      CHARACTER*11 date0b
    4040
    41       INTEGER ierr
     41      INTEGER :: ierr
    4242
    4343      integer :: nvarid
     
    6060
    6161
    62 !-----------------------------------------------------------------------
     62      !-----------------------------------------------------------------------
     63      ! Possibilité de spécifier une liste de variables à sortir
     64      ! dans iotd.def
     65      ! Si iotd.def existe et est non vide,
     66      ! seules les variables faisant à la fois l'objet d'un call iotd_ecrit
     67      ! et étant spécifiées dans iotd.def sont sorties.
     68      ! Sinon, toutes les variables faisant l'objet d'un call iotd_ecrit
     69      ! sont sorties
     70      !-----------------------------------------------------------------------
     71      n_names_iotd_def=0
     72      open(99,file='iotd.def',form='formatted',status='old',iostat=ierr)
     73         if ( ierr.eq.0 ) then
     74            ierr=0
     75            do while (ierr==0)
     76               read(99,*,iostat=ierr) un_nom
     77               if (ierr==0) then
     78                  n_names_iotd_def=n_names_iotd_def+1
     79                  names_iotd_def(n_names_iotd_def)=un_nom
     80               endif
     81            enddo
     82         endif
     83         print*,n_names_iotd_def,names_iotd_def(1:n_names_iotd_def)
     84      close(99)
    6385
    6486
Note: See TracChangeset for help on using the changeset viewer.