Changeset 4240
- Timestamp:
- May 21, 2020, 2:22:24 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dynamico_lmdz/simple_physics/phyparam/DYNAMICO/icosa_phyparam_mod.F90
r4237 r4240 4 4 ! FCM gets confused when external modules are USEd at module level 5 5 ! => USE statements to DYNAMICO modules go into subroutines 6 7 USE icosa, ONLY : t_field 6 8 7 9 IMPLICIT NONE … … 14 16 REAL, PARAMETER :: oneday = 86400. ! hard-coded 15 17 INTEGER, PARAMETER :: log_unit = 15 18 19 TYPE(t_field),POINTER :: f_write2d(:), f_write_llm(:), f_write_llmp1(:) 16 20 17 21 PUBLIC :: init_physics, physics … … 40 44 flush_plugin => flush_log_ 41 45 46 CALL init_plugin_writefield 47 42 48 physics_log_level='INF' 43 49 CALL getin('physics_log_level', physics_log_level) … … 94 100 END DO 95 101 96 IF(is_mpi_master) PRINT *, 'phyparam phi :', pphi(inout%ngrid/2+1, :)102 ! IF(is_mpi_master) PRINT *, 'phyparam phi :', pphi(inout%ngrid/2+1, :) 97 103 98 104 CALL check_NaN('physics', 'ulon', inout%ulon) … … 108 114 & inout%dulon, inout%dulat, inout%dtemp, dps) 109 115 110 IF(is_mpi_master) PRINT *, 'phyparam dT :', inout%dtemp(inout%ngrid/2+1, :)116 ! IF(is_mpi_master) PRINT *, 'phyparam dT :', inout%dtemp(inout%ngrid/2+1, :) 111 117 112 118 CALL check_NaN('physics', 'dulon', inout%dulon) … … 140 146 INTEGER(c_int), INTENT(IN), VALUE :: lev, taglen, buflen, bufsize 141 147 CHARACTER(KIND=c_char), INTENT(IN) :: tag(taglen), buf(buflen, bufsize) 148 142 149 CHARACTER(buflen+1) :: line 143 ! SUBROUTINE flush_log_(lev, tag, buf)144 ! INTEGER, INTENT(IN) :: lev145 ! CHARACTER(*), INTENT(IN) :: tag, buf(:)146 150 CHARACTER(100) :: prefix 147 151 INTEGER :: i … … 151 155 DO i=1, bufsize 152 156 WRITE(line,*) buf(:,i) 153 WRITE(log_unit,*) TRIM(prefix) ,TRIM(line)157 WRITE(log_unit,*) TRIM(prefix) // TRIM(line) 154 158 END DO 155 159 WRITE(log_unit, *) '' … … 186 190 END SUBROUTINE read_paramb 187 191 192 !--------------------------------------- writefield ------------------------------------ 193 194 SUBROUTINE init_plugin_writefield 195 USE icosa, ONLY : t_field, field_t, type_real, allocate_field, llm 196 USE writefield_mod, ONLY : writefield1_plugin, writefield2_plugin 197 CALL allocate_field(f_write2d, field_t, type_real, name='phyparam_write2d') 198 CALL allocate_field(f_write_llm, field_t, type_real, llm, name='phyparam_write_llm') 199 CALL allocate_field(f_write_llmp1, field_t, type_real, llm+1, name='phyparam_write_llmp1') 200 writefield1_plugin => plugin_writefield1 201 END SUBROUTINE init_plugin_writefield 202 203 SUBROUTINE plugin_writefield1(name,longname,unit, var) 204 USE physics_interface_mod, ONLY : unpack_field, inout => physics_inout 205 USE output_field_mod, ONLY : output_field 206 CHARACTER(*), INTENT(IN) :: name, longname, unit 207 REAL, INTENT(IN) :: var(:) 208 WRITELOG(*,*) TRIM(name), ' : ', TRIM(longname), MINVAL(var), MAXVAL(var), inout%it 209 LOG_INFO('writefield1') 210 CALL unpack_field(f_write2d, var) 211 CALL output_field('phyparam_'//TRIM(name), f_write2d) 212 END SUBROUTINE plugin_writefield1 213 214 SUBROUTINE plugin_writefield2(name,longname,unit, var) 215 CHARACTER(*), INTENT(IN) :: name, longname, unit 216 REAL, INTENT(IN) :: var(:,:) 217 END SUBROUTINE plugin_writefield2 218 188 219 END MODULE icosa_phyparam_mod
Note: See TracChangeset
for help on using the changeset viewer.