Ignore:
Timestamp:
Mar 31, 2017, 11:31:38 AM (8 years ago)
Author:
emillour
Message:

All GCMs: set things up to enable pluging physics with dynamico

  • dyn3d
  • gcm.F90 : move I/O initialization (dates) to be done before physics

initialization

  • dyn3dpar
  • gcm.F : move I/O initialization (dates) to be done before physics

initialization

  • dynphy_lonlat:
  • inigeomphy_mod.F90 : add ind_cell_glo computation and transfer

to init_geometry

  • phy_common:
  • geometry_mod.F90 : add ind_cell_glo module variable to store global

column index

  • print_control_mod.F90 : make initialization occur via init_print_control_mod

to avoid circular module dependencies

  • init_print_control_mod.F90 : added to initialize print_control_mod module

variables

  • mod_phys_lmdz_mpi_data.F90 : use print_control_mod (rather than iniprint.h)
  • mod_phys_lmdz_para.F90 : use print_control_mod (rather than iniprint.h)
  • mod_phys_lmdz_omp_data.F90 : add is_omp_master (alias of is_omp_root) module

variable and use print_control_mod (rather than
iniprint.h)

  • physics_distribution_mod.F90 : add call to init_dimphy in

init_physics_distribution

  • xios_writefield.F90 : generic routine to output field with XIOS (for debug)
  • misc:
  • handle_err_m.F90 : call abort_physic, rather than abort_gcm
  • wxios.F90 : updates to enable unstructured grids

set module variable g_ctx_name to "LMDZ"
wxios_init(): remove call to wxios_context_init
wxios_context_init(): call xios_context_initialize with COMM_LMDZ_PHY
add routine wxios_set_context() to get handle and set context to XIOS
wxios_domain_param(): change arguments and generate the domain in-place
add wxios_domain_param_unstructured(): generate domain for unstructured case

NB: access is via "domain group" (whereas it is via "domain" in

wxios_domain_param)

  • dynphy_lonlat/phy[std|mars|venus|titan]:
  • iniphysiq_mod.F90 : Remove call to init_dimphy (which is now done in

phy_common/physics_distribution_mod.F90)

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phy_common/mod_phys_lmdz_omp_data.F90

    r1543 r1682  
    11!
    2 !$Id: mod_phys_lmdz_omp_data.F90 2326 2015-07-10 12:24:29Z emillour $
     2!$Id: mod_phys_lmdz_omp_data.F90 2429 2016-01-27 12:43:09Z fairhead $
    33!
    44MODULE mod_phys_lmdz_omp_data
     
    77  INTEGER,SAVE :: omp_rank
    88  LOGICAL,SAVE :: is_omp_root
     9  LOGICAL,SAVE :: is_omp_master  ! alias of is_omp_root
    910  LOGICAL,SAVE :: is_using_omp
     11  LOGICAL,SAVE :: is_north_pole_phy, is_south_pole_phy
    1012 
    1113  INTEGER,SAVE,DIMENSION(:),ALLOCATABLE :: klon_omp_para_nb
     
    1618  INTEGER,SAVE :: klon_omp_begin
    1719  INTEGER,SAVE :: klon_omp_end
    18 !$OMP  THREADPRIVATE(omp_rank,klon_omp,is_omp_root,klon_omp_begin,klon_omp_end)
     20!$OMP  THREADPRIVATE(omp_rank,klon_omp,is_omp_root,is_omp_master,klon_omp_begin,klon_omp_end)
     21!$OMP  THREADPRIVATE(is_north_pole_phy, is_south_pole_phy)
    1922
    2023CONTAINS
    2124 
    2225  SUBROUTINE Init_phys_lmdz_omp_data(klon_mpi)
    23     USE dimphy
     26    USE dimphy
     27    USE mod_phys_lmdz_mpi_data, ONLY : is_north_pole_dyn, is_south_pole_dyn
    2428    IMPLICIT NONE
    2529    INTEGER, INTENT(in) :: klon_mpi
     
    4347        omp_size=OMP_GET_NUM_THREADS()
    4448!$OMP END MASTER
     49!$OMP BARRIER
    4550        omp_rank=OMP_GET_THREAD_NUM()   
    4651#else   
     
    5661   ELSE
    5762     abort_message = 'ANORMAL : OMP_MASTER /= 0'
    58      CALL abort_gcm (modname,abort_message,1)
     63     CALL abort_physic (modname,abort_message,1)
    5964   ENDIF
    6065!$OMP END MASTER
    61 
     66   is_omp_master=is_omp_root
    6267
    6368!$OMP MASTER
     69
    6470    ALLOCATE(klon_omp_para_nb(0:omp_size-1))
    6571    ALLOCATE(klon_omp_para_begin(0:omp_size-1))
     
    8086!$OMP END MASTER
    8187!$OMP BARRIER
     88
     89   if ((is_north_pole_dyn) .AND. (omp_rank == 0 )) then
     90      is_north_pole_phy = .TRUE.
     91    else
     92      is_north_pole_phy = .FALSE.
     93    endif
     94    if ((is_south_pole_dyn) .AND. (omp_rank == omp_size-1)) then
     95      is_south_pole_phy = .TRUE.
     96    else
     97      is_south_pole_phy = .FALSE.
     98    endif
    8299   
    83100    klon_omp=klon_omp_para_nb(omp_rank)
     
    90107
    91108  SUBROUTINE Print_module_data
     109  USE print_control_mod, ONLY: lunout
    92110  IMPLICIT NONE
    93   INCLUDE "iniprint.h"
    94111
    95112!$OMP CRITICAL 
Note: See TracChangeset for help on using the changeset viewer.