Changeset 1622 for trunk/LMDZ.GENERIC


Ignore:
Timestamp:
Oct 31, 2016, 4:09:55 PM (8 years ago)
Author:
emillour
Message:

Generic GCM:
Introducing a first prototype of XIOS outputs: requires compiling with
"-io xios" flag and having an XIOS library at hand. Corresponding
companion xml files iodef.xml and context_lmdz_physics.xml in the "deftank"
subdirectory. Still some work to do concerning the XIOS calendar (definition
of an initial date and month number and lenght).
EM

Location:
trunk/LMDZ.GENERIC
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/README

    r1621 r1622  
    12751275- added scalheight (atmospheric scale height) in comvert_mod.
    12761276
     1277== 31/10/2016 == EM
     1278Introducing a first prototype of XIOS outputs: requires compiling with
     1279"-io xios" flag and having an XIOS library at hand. Corresponding
     1280companion xml files iodef.xml and context_lmdz_physics.xml in the "deftank"
     1281subdirectory. Still some work to do concerning the XIOS calendar (definition
     1282of an initial date and month number and lenght).
     1283
  • trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90

    r1576 r1622  
    4646      use time_phylmdz_mod, only: daysec
    4747      use callkeys_mod
     48      use vertical_layers_mod, only: presnivs, pseudoalt
     49      use xios_output_mod, only: initialize_xios_output, &
     50                                 update_xios_timestep, &
     51                                 send_xios_field
    4852      implicit none
    4953
     
    198202! ----------------------
    199203
    200       integer day_ini                                              ! Initial date of the run (sol since Ls=0).
    201       integer icount                                               ! Counter of calls to physiq during the run.
     204      integer,save :: day_ini                                      ! Initial date of the run (sol since Ls=0).
     205      integer,save :: icount                                       ! Counter of calls to physiq during the run.
     206!$OMP THREADPRIVATE(day_ini,icount)
     207
    202208      real, dimension(:),allocatable,save ::  tsurf                ! Surface temperature (K).
    203209      real, dimension(:,:),allocatable,save ::  tsoil              ! Sub-surface temperatures (K).
     
    225231!$OMP THREADPRIVATE(emis,dtrad,fluxrad_sky,fluxrad,capcal,fluxgrd,qsurf,q2)
    226232
    227       save day_ini, icount
    228      
    229 !$OMP THREADPRIVATE(day_ini,icount)
    230233
    231234! Local variables :
     
    706709         endif
    707710         
    708                
     711         ! XIOS outputs
     712#ifdef CPP_XIOS
     713
     714         write(*,*) "physiq: call initialize_xios_output"
     715         call initialize_xios_output(pday,ptime,ptimestep,daysec, &
     716                                     presnivs,pseudoalt)
     717#endif
    709718      endif ! end of 'firstcall'
    710719
     
    712721! I.2   Initializations done at every physical timestep:
    713722! ------------------------------------------------------
     723
     724#ifdef CPP_XIOS     
     725      ! update XIOS time/calendar
     726      call update_xios_timestep
     727#endif     
    714728
    715729      ! Initialize various variables
     
    21322146      endif
    21332147
     2148! XIOS outputs
     2149#ifdef CPP_XIOS     
     2150      ! Send fields to XIOS: (NB these fields must also be defined as
     2151      ! <field id="..." /> in context_lmdz_physics.xml to be correctly used)
     2152      CALL send_xios_field("ps",ps)
     2153      CALL send_xios_field("area",cell_area)
     2154
     2155      CALL send_xios_field("temperature",zt)
     2156      CALL send_xios_field("u",zu)
     2157      CALL send_xios_field("v",zv)
     2158     
     2159#endif
     2160
    21342161      icount=icount+1
    21352162
Note: See TracChangeset for help on using the changeset viewer.