source: trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/iniphysiq_mod.F90 @ 1711

Last change on this file since 1711 was 1682, checked in by emillour, 8 years ago

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 size: 3.4 KB
Line 
1MODULE iniphysiq_mod
2
3CONTAINS
4
5subroutine iniphysiq(ii,jj,nlayer, &
6                     nbp, communicator, &
7                     punjours, pdayref,ptimestep, &
8                     rlatudyn,rlatvdyn,rlonudyn,rlonvdyn, &
9                     airedyn,cudyn,cvdyn, &
10                     prad,pg,pr,pcpp,iflag_phys)
11
12use infotrac, only : nqtot, & ! number of advected tracers
13                     tname ! tracer names
14use comgeomfi_h, only: ini_fillgeom
15use temps_mod, only: day_ini, hour_ini
16use phys_state_var_init_mod, only: phys_state_var_init
17use inigeomphy_mod, only: inigeomphy
18use geometry_mod, only: cell_area, & ! physics grid area (m2)
19                        longitude, & ! longitudes (rad)
20                        latitude ! latitudes (rad)
21! necessary to get klon_omp
22USE mod_phys_lmdz_para, ONLY: klon_omp ! number of columns (on local omp grid)
23USE dimphy, ONLY: init_dimphy
24
25implicit none
26
27include "iniprint.h"
28
29real,intent(in) :: prad ! radius of the planet (m)
30real,intent(in) :: pg ! gravitational acceleration (m/s2)
31real,intent(in) :: pr ! ! reduced gas constant R/mu
32real,intent(in) :: pcpp ! specific heat Cp
33real,intent(in) :: punjours ! length (in s) of a standard day
34integer,intent(in) :: nlayer ! number of atmospheric layers
35integer,intent(in) :: ii ! number of atmospheric coulumns along longitudes
36integer,intent(in) :: jj  ! number of atompsheric columns along latitudes
37integer,intent(in) :: nbp ! number of physics columns for this MPI process
38integer,intent(in) :: communicator ! MPI communicator
39real,intent(in) :: rlatudyn(jj+1) ! latitudes of the physics grid
40real,intent(in) :: rlatvdyn(jj) ! latitude boundaries of the physics grid
41real,intent(in) :: rlonvdyn(ii+1) ! longitudes of the physics grid
42real,intent(in) :: rlonudyn(ii+1) ! longitude boundaries of the physics grid
43real,intent(in) :: airedyn(ii+1,jj+1) ! area of the dynamics grid (m2)
44real,intent(in) :: cudyn((ii+1)*(jj+1)) ! cu coeff. (u_covariant = cu * u)
45real,intent(in) :: cvdyn((ii+1)*jj) ! cv coeff. (v_covariant = cv * v)
46integer,intent(in) :: pdayref ! reference day of for the simulation
47real,intent(in) :: ptimestep !physics time step (s)
48integer,intent(in) :: iflag_phys ! type of physics to be called
49
50  ! the common part for all planetary physics
51  !------------------------------------------
52  ! --> initialize physics distribution, global fields and geometry
53  ! (i.e. things in phy_common or dynphy_lonlat)
54  CALL inigeomphy(ii,jj,nlayer, &
55               nbp, communicator, &
56               rlatudyn,rlatvdyn, &
57               rlonudyn,rlonvdyn, &
58               airedyn,cudyn,cvdyn)
59
60  ! the distinct part for all planetary physics (ie. things in phymars)
61  !------------------------------------------
62
63!$OMP PARALLEL
64 
65! copy some fundamental parameters to physics
66! and do some initializations
67
68! Initialize dimphy module => Now done in physics_distribution_mod
69!call init_dimphy(klon_omp,nlayer)
70
71call phys_state_var_init(klon_omp,nlayer,nqtot,tname, &
72                         day_ini,hour_ini,punjours,ptimestep, &
73                         prad,pg,pr,pcpp)
74call ini_fillgeom(klon_omp,latitude,longitude,cell_area)
75! work is needed to put what is in comgeomfi_h in geometry_mod?
76
77call conf_phys(klon_omp,nlayer,nqtot)
78
79! Initialize some "temporal and calendar" related variables
80!CALL init_time(day_ini,hour_ini,punjours,ptimestep)
81
82!$OMP END PARALLEL
83
84end subroutine iniphysiq
85
86
87END MODULE iniphysiq_mod
Note: See TracBrowser for help on using the repository browser.