Changeset 2223


Ignore:
Timestamp:
Jan 23, 2020, 10:46:58 AM (5 years ago)
Author:
emillour
Message:

Mars GCM:
First implementation of XIOS in the physics
EM

Location:
trunk/LMDZ.MARS
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2221 r2223  
    28332833Update the nonorographic gravity waves drag parametrization (from the r3599 of Earth s model LMDZ6): 1) add east_ and west_gwdstress variables, 2) delete aleas function: random waves are producted by the MOD function, 3) reproductibility concerning the number of procs is now validated, 4) changing name of some variables like RUW, RVW, ZOP, ZOM,..., 5) tendency of winds due to GW drag are now module variables and written in restart files.
    28342834
     2835== 23/01/2020 == EM
     2836First implementation of XIOS in the physics
  • trunk/LMDZ.MARS/deftank/README

    r2216 r2223  
    2020- *.MCD5 files correspond to what was used to generate MCDv5.x simulations
    2121
     22>> XML FILES
     23These are required when running with the XIOS library
     24- iodef.xml : general settings
     25- context_lmdz_physics.xml : definition of variables, grids, output files, etc.
     26
    2227>> SCRIPTS
    2328- "run0" is a script to run (once or nummax times) chained simulations
  • trunk/LMDZ.MARS/libf/phymars/phys_state_var_init_mod.F90

    r2220 r2223  
    3434!=======================================================================
    3535
     36      use init_print_control_mod, only: init_print_control
    3637      use slope_mod, only: ini_slope_mod,end_slope_mod
    3738      use comsaison_h, only: ini_comsaison_h,end_comsaison_h
     
    6970      call ini_tracer_mod(nq,tname)
    7071
     72
     73      ! initialize "print_control" constants/flags ("prt_level","lunout", etc.)
     74      call init_print_control
     75     
    7176      ! set parameters in comcstfi_h
    7277      pi=2.*asin(1.)
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2220 r2223  
    7171      use comm_wrf
    7272#else
    73       use planetwide_mod
     73      USE planetwide_mod, ONLY: planetwide_maxval, planetwide_minval,
     74     &                          planetwide_sumval
    7475      use phyredem, only: physdem0, physdem1
    7576      use phyetat0_mod, only: phyetat0
    7677      use eofdump_mod, only: eofdump
    77       USE vertical_layers_mod, ONLY: ap,bp,aps,bps
    78      
     78      USE vertical_layers_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt
     79      USE mod_phys_lmdz_omp_data, ONLY: is_omp_master
    7980#endif
    8081
    81 
     82#ifdef CPP_XIOS     
     83      use xios_output_mod, only: initialize_xios_output,
     84     &                           update_xios_timestep,
     85     &                           send_xios_field
     86      use wxios, only: wxios_context_init, xios_context_finalize
     87#endif
    8288
    8389      IMPLICIT NONE
     
    491497#endif
    492498
     499#ifdef CPP_XIOS
     500         ! Initialize XIOS context
     501         write(*,*) "physiq: call wxios_context_init"
     502         CALL wxios_context_init
     503#endif
     504
    493505c        read startfi
    494506c        ~~~~~~~~~~~~
     
    630642#endif
    631643                 
     644#ifdef CPP_XIOS
     645        ! XIOS outputs
     646        write(*,*) "physiq firstcall: call initialize_xios_output"
     647        call initialize_xios_output(pday,ptime,ptimestep,daysec,
     648     &                              presnivs,pseudoalt)
     649#endif
    632650      ENDIF        !  (end of "if firstcall")
    633651
     
    637655c ---------------------------------------------------
    638656c
     657
     658#ifdef CPP_XIOS     
     659      ! update XIOS time/calendar
     660      call update_xios_timestep
     661#endif     
    639662
    640663c     Initialize various variables
     
    34443467      END IF       ! if(ngrid.ne.1)
    34453468
     3469! XIOS outputs
     3470#ifdef CPP_XIOS     
     3471      ! Send fields to XIOS: (NB these fields must also be defined as
     3472      ! <field id="..." /> in context_lmdz_physics.xml to be correctly used)
     3473      CALL send_xios_field("ls",zls*180./pi)
     3474     
     3475      CALL send_xios_field("ps",ps)
     3476      CALL send_xios_field("area",cell_area)
     3477     
     3478      CALL send_xios_field("temperature",zt)
     3479      CALL send_xios_field("u",zu)
     3480      CALL send_xios_field("v",zv)
     3481
     3482      if (lastcall.and.is_omp_master) then
     3483        write(*,*) "physiq lastcall: call xios_context_finalize"
     3484        call xios_context_finalize
     3485      endif
     3486#endif
     3487
     3488
    34463489      icount=icount+1
    34473490       
Note: See TracChangeset for help on using the changeset viewer.