Ignore:
Timestamp:
Oct 22, 2023, 1:42:30 PM (14 months ago)
Author:
emillour
Message:

Mars PCM:
Fix issues with dates when in parallel with OpenMP (missing copyin
statement when opening parallel section in iniphysiq). Added some threadprivate
clauses in saved module variables in comcstfi_h.F90 and planete_h.F90.
Prettyfied solarlong.F and made it a module. Likewise for conf_phys.F
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/iniphysiq_mod.F90

    r2511 r3094  
    1010                     prad,pg,pr,pcpp,iflag_phys)
    1111
     12! Modules from the dynamics:
    1213use infotrac, only : nqtot, & ! number of advected tracers
    1314                     tname, & ! tracer names
    1415                     nqperes,nqfils! MVals: variables isotopes
     16use temps_mod, only: day_ini, day_end, hour_ini
     17
     18! Modules from the dynamics-physics interface:
     19use inigeomphy_mod, only: inigeomphy
     20
     21! Modules from the physics:
    1522use comgeomfi_h, only: ini_fillgeom
    16 use temps_mod, only: day_ini, day_end, hour_ini
    17 use phys_state_var_init_mod, only: phys_state_var_init
    18 use inigeomphy_mod, only: inigeomphy
    1923use geometry_mod, only: cell_area, & ! physics grid area (m2)
    2024                        longitude, & ! longitudes (rad)
    2125                        latitude ! latitudes (rad)
    22 ! necessary to get klon_omp
    23 USE mod_phys_lmdz_para, ONLY: klon_omp ! number of columns (on local omp grid)
    24 USE dimphy, ONLY: init_dimphy
     26use phys_state_var_init_mod, only: phys_state_var_init
     27use mod_phys_lmdz_para, only: klon_omp ! number of columns (on local omp grid)
     28use conf_phys_mod, only: conf_phys
    2529
    2630implicit none
     
    6266  !------------------------------------------
    6367
    64 !$OMP PARALLEL
    65  
    6668! copy some fundamental parameters to physics
    6769! and do some initializations
    68 
    69 ! Initialize dimphy module => Now done in physics_distribution_mod
    70 !call init_dimphy(klon_omp,nlayer)
     70! Note that for OpenMP threadprivate variables a COPYIN clause is required
     71!$OMP PARALLEL COPYIN(day_ini,day_end,hour_ini)
    7172
    7273call phys_state_var_init(klon_omp,nlayer,nqtot,tname, &
     
    8081call conf_phys(klon_omp,nlayer,nqtot)
    8182
    82 ! Initialize some "temporal and calendar" related variables
    83 !CALL init_time(day_ini,hour_ini,punjours,ptimestep)
    84 
    8583!$OMP END PARALLEL
    8684
Note: See TracChangeset for help on using the changeset viewer.