Changeset 739 for codes/icosagcm/devel
- Timestamp:
- 09/21/18 01:44:51 (6 years ago)
- Location:
- codes/icosagcm/devel/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/src/dcmip/physics_dcmip2016.f90
r732 r739 71 71 END IF 72 72 73 ! Physics-specific data 73 74 ngrid = physics_inout%ngrid 74 ! Input75 ALLOCATE(physics_inout%Ai(ngrid))76 ALLOCATE(physics_inout%lon(ngrid))77 ALLOCATE(physics_inout%lat(ngrid))78 ALLOCATE(physics_inout%phis(ngrid))79 ALLOCATE(physics_inout%p(ngrid,llm+1))80 ALLOCATE(physics_inout%pk(ngrid,llm))81 ALLOCATE(physics_inout%Temp(ngrid,llm))82 ALLOCATE(physics_inout%ulon(ngrid,llm))83 ALLOCATE(physics_inout%ulat(ngrid,llm))84 ALLOCATE(physics_inout%q(ngrid,llm,nqtot))85 ! Output (tendencies)86 ALLOCATE(physics_inout%dTemp(ngrid,llm))87 ALLOCATE(physics_inout%dulon(ngrid,llm))88 ALLOCATE(physics_inout%dulat(ngrid,llm))89 ALLOCATE(physics_inout%dq(ngrid,llm,nqtot))90 ! Physics-specific data91 75 ALLOCATE(precl_packed(ngrid)) 92 76 CALL allocate_field(f_precl, field_t,type_real) -
codes/icosagcm/devel/src/physics/physics.f90
r726 r739 7 7 PRIVATE 8 8 9 INTEGER, PARAMETER :: phys_none=0, phys_HS94=1, phys_DCMIP=2, phys_lmdz_generic=3, phys_LB2012=4, phys_external=5,& 10 phys_DCMIP2016=6 11 9 INTEGER, PARAMETER :: phys_none=0, phys_column=1, & 10 phys_HS94=3, phys_LB2012=4, & 11 phys_DCMIP=11, phys_DCMIP2016=12, & 12 phys_lmdz_generic=21, phys_external=22 12 13 INTEGER :: phys_type 13 14 TYPE(t_field),POINTER,SAVE :: f_extra_physics_2D(:), f_extra_physics_3D(:) … … 28 29 USE mpipara 29 30 USE etat0_mod 31 USE etat0_venus_mod, ONLY : init_phys_venus=>init_physics 30 32 USE physics_dcmip_mod, ONLY : init_physics_dcmip=>init_physics 31 33 USE physics_dcmip2016_mod, ONLY : init_physics_dcmip2016=>init_physics 32 USE etat0_venus_mod, ONLY : init_phys_venus=>init_physics33 34 USE physics_lmdz_generic_mod, ONLY : init_physics_lmdz_generic=>init_physics 34 35 USE physics_external_mod, ONLY : init_physics_external=>init_physics 35 36 LOGICAL :: done 36 37 physics_inout%dt_phys = dt*itau_physics 38 !$OMP PARALLEL 39 CALL allocate_field(f_du_phys,field_u,type_real,llm, name='du_phys') 40 37 41 physics_type='none' 38 42 CALL getin("physics",physics_type) 43 ! below, flag done is set to .FALSE. if the CALL to init_XXX must be done outside any OMP PARALLEL region 44 done=.TRUE. 45 phys_type=phys_column 39 46 SELECT CASE(TRIM(physics_type)) 40 47 CASE ('none') 41 42 !$OMP PARALLEL43 48 IF(is_mpi_root) PRINT*,"NO PHYSICAL PACKAGE USED" 44 49 phys_type = phys_none 45 !$OMP END PARALLEL46 47 50 CASE ('held_suarez') 48 49 !$OMP PARALLEL50 51 phys_type = phys_HS94 51 !$OMP END PARALLEL52 53 52 CASE ('Lebonnois2012') 54 55 !$OMP PARALLEL56 53 phys_type = phys_LB2012 57 CALL init_phys_venus 58 !$OMP END PARALLEL 59 54 CALL init_phys_venus 60 55 CASE ('phys_lmdz_generic') 61 62 !$OMP PARALLEL63 CALL init_physics_lmdz_generic64 56 phys_type=phys_lmdz_generic 65 !$OMP END PARALLEL 66 57 done = .FALSE. 67 58 CASE ('phys_external') 68 69 CALL init_physics_external70 !$OMP PARALLEL71 59 phys_type=phys_external 72 !$OMP END PARALLEL 73 74 CASE ('dcmip') 75 76 !$OMP PARALLEL 60 done = .FALSE. 61 END SELECT 62 63 IF(phys_type == phys_column) THEN 77 64 CALL allocate_field(f_dulon,field_t,type_real,llm, name='dulon') 78 65 CALL allocate_field(f_dulat,field_t,type_real,llm, name='dulat') … … 83 70 CALL allocate_field(f_pk,field_t,type_real,llm, name='pk') 84 71 CALL init_pack_before ! Compute physics_inout%ngrid and offsets used by pack/unpack 85 CALL init_physics_dcmip 86 CALL init_pack_after ! Defines Ai, lon, lat in physics_inout 87 phys_type = phys_DCMIP 72 CALL init_pack_after ! Defines Ai, lon, lat in physics_inout 73 74 SELECT CASE(TRIM(physics_type)) 75 CASE ('dcmip') 76 phys_type = phys_DCMIP 77 CALL init_physics_dcmip 78 CASE ('dcmip2016') 79 phys_type = phys_DCMIP2016 80 CALL init_physics_dcmip2016 81 CASE DEFAULT 82 IF(is_mpi_root) PRINT*, 'init_physics : Bad selector for variable physics <',& 83 TRIM(physics_type), '> options are <none>, <held_suarez>, <Lebonnois2012>,', & 84 '<dcmip>, <dcmip2016>, <phys_lmdz_generic>, <phys_external>' 85 STOP 86 END SELECT 87 88 END IF 88 89 !$OMP END PARALLEL 89 90 90 CASE ('dcmip2016') 91 92 !$OMP PARALLEL 93 CALL allocate_field(f_dulon,field_t,type_real,llm, name='dulon') 94 CALL allocate_field(f_dulat,field_t,type_real,llm, name='dulat') 95 CALL allocate_field(f_temp,field_t,type_real,llm, name='temp') 96 CALL allocate_field(f_ulon,field_t,type_real,llm, name='ulon') 97 CALL allocate_field(f_ulat,field_t,type_real,llm, name='ulat') 98 CALL allocate_field(f_p,field_t,type_real,llm+1, name='p') 99 CALL allocate_field(f_pk,field_t,type_real,llm, name='pk') 100 CALL init_pack_before ! Compute physics_inout%ngrid and offsets used by pack/unpack 101 CALL init_physics_dcmip2016 102 CALL init_pack_after ! Defines Ai, lon, lat in physics_inout 103 phys_type = phys_DCMIP2016 104 !$OMP END PARALLEL 105 106 CASE DEFAULT 107 IF(is_mpi_root) PRINT*, 'init_physics : Bad selector for variable physics <',& 108 TRIM(physics_type), '> options are <none>, <held_suarez>, <Lebonnois2012>, <dcmip>', & 109 '<phys_lmdz_generic>, <phys_external>' 110 STOP 111 END SELECT 112 113 !$OMP PARALLEL 114 CALL allocate_field(f_du_phys,field_u,type_real,llm, name='du_phys') 91 IF(done==.FALSE.) THEN 92 SELECT CASE(phys_type) 93 CASE(phys_external) 94 CALL init_physics_external 95 CASE(phys_lmdz_generic) 96 CALL init_physics_lmdz_generic 97 END SELECT 98 END IF 115 99 116 100 IF(is_mpi_root) PRINT *, 'phys_type = ',phys_type 117 !$OMP END PARALLEL 101 118 102 END SUBROUTINE init_physics 119 103 -
codes/icosagcm/devel/src/physics/physics_interface.f90
r533 r739 78 78 USE icosa 79 79 IMPLICIT NONE 80 INTEGER :: ind, offset 80 INTEGER :: ind, offset, ngrid 81 81 82 82 offset=0 … … 91 91 END DO 92 92 physics_inout%ngrid = offset 93 94 ngrid=offset 95 ! Input 96 ALLOCATE(physics_inout%Ai(ngrid)) 97 ALLOCATE(physics_inout%lon(ngrid)) 98 ALLOCATE(physics_inout%lat(ngrid)) 99 ALLOCATE(physics_inout%phis(ngrid)) 100 ALLOCATE(physics_inout%p(ngrid,llm+1)) 101 ALLOCATE(physics_inout%pk(ngrid,llm)) 102 ALLOCATE(physics_inout%Temp(ngrid,llm)) 103 ALLOCATE(physics_inout%ulon(ngrid,llm)) 104 ALLOCATE(physics_inout%ulat(ngrid,llm)) 105 ALLOCATE(physics_inout%q(ngrid,llm,nqtot)) 106 ! Output (tendencies) 107 ALLOCATE(physics_inout%dTemp(ngrid,llm)) 108 ALLOCATE(physics_inout%dulon(ngrid,llm)) 109 ALLOCATE(physics_inout%dulat(ngrid,llm)) 110 ALLOCATE(physics_inout%dq(ngrid,llm,nqtot)) 93 111 94 112 END SUBROUTINE init_pack_before
Note: See TracChangeset
for help on using the changeset viewer.