@@ -15,6 +15,7 @@ subroutine interp(localpet, method, input_file)
15
15
use esmf
16
16
use netcdf
17
17
use model_grid
18
+ use program_setup, only : fract_vegsoil_type
18
19
use source_grid
19
20
use utils
20
21
use mpi
@@ -187,14 +188,16 @@ subroutine interp(localpet, method, input_file)
187
188
188
189
! These fields are adjusted at landice.
189
190
190
- select case (trim (field_names(n)))
191
- case (' substrate_temperature' ,' vegetation_greenness' ,' leaf_area_index' ,' slope_type' ,' soil_type' )
192
- if (localpet == 0 ) then
193
- allocate (vegt_mdl_one_tile(i_mdl,j_mdl))
194
- else
195
- allocate (vegt_mdl_one_tile(0 ,0 ))
196
- endif
197
- end select
191
+ if (.not. fract_vegsoil_type) then
192
+ select case (trim (field_names(n)))
193
+ case (' substrate_temperature' ,' vegetation_greenness' ,' leaf_area_index' ,' slope_type' ,' soil_type' )
194
+ if (localpet == 0 ) then
195
+ allocate (vegt_mdl_one_tile(i_mdl,j_mdl))
196
+ else
197
+ allocate (vegt_mdl_one_tile(0 ,0 ))
198
+ endif
199
+ end select
200
+ endif
198
201
199
202
OUTPUT_LOOP : do tile = 1 , num_tiles
200
203
@@ -218,30 +221,37 @@ subroutine interp(localpet, method, input_file)
218
221
if (ESMF_logFoundError(rcToCheck= rc,msg= ESMF_LOGERR_PASSTHRU,line= __LINE__,file= __FILE__)) &
219
222
call error_handler(" IN FieldGather." , rc)
220
223
221
- select case (trim (field_names(n)))
222
- case (' substrate_temperature' ,' vegetation_greenness' ,' leaf_area_index' ,' slope_type' ,' soil_type' )
223
- print * ," - CALL FieldGather FOR MODEL GRID VEG TYPE."
224
- call ESMF_FieldGather(vegt_field_mdl, vegt_mdl_one_tile, rootPet= 0 , tile= tile, rc= rc)
225
- if (ESMF_logFoundError(rcToCheck= rc,msg= ESMF_LOGERR_PASSTHRU,line= __LINE__,file= __FILE__)) &
224
+ if (.not. fract_vegsoil_type) then
225
+ select case (trim (field_names(n)))
226
+ case (' substrate_temperature' ,' vegetation_greenness' ,' leaf_area_index' ,' slope_type' ,' soil_type' )
227
+ print * ," - CALL FieldGather FOR MODEL GRID VEG TYPE."
228
+ call ESMF_FieldGather(vegt_field_mdl, vegt_mdl_one_tile, rootPet= 0 , tile= tile, rc= rc)
229
+ if (ESMF_logFoundError(rcToCheck= rc,msg= ESMF_LOGERR_PASSTHRU,line= __LINE__,file= __FILE__)) &
226
230
call error_handler(" IN FieldGather." , rc)
227
- end select
231
+ end select
232
+ endif
228
233
229
234
if (localpet == 0 ) then
230
235
print * ,' - CALL SEARCH FOR TILE ' ,tile
231
236
call search (data_mdl_one_tile, mask_mdl_one_tile, i_mdl, j_mdl, tile, field_names(n))
232
- select case (field_names(n))
233
- case (' substrate_temperature' ,' vegetation_greenness' ,' leaf_area_index' ,' slope_type' ,' soil_type' )
234
- call adjust_for_landice (data_mdl_one_tile, vegt_mdl_one_tile, i_mdl, j_mdl, field_names(n))
235
- end select
237
+ if (.not. fract_vegsoil_type) then
238
+ select case (field_names(n))
239
+ case (' substrate_temperature' ,' vegetation_greenness' ,' leaf_area_index' ,' slope_type' ,' soil_type' )
240
+ print * ,' before adjust ice ' ,maxval (vegt_mdl_one_tile),minval (vegt_mdl_one_tile)
241
+ call adjust_for_landice (data_mdl_one_tile, vegt_mdl_one_tile, i_mdl, j_mdl, field_names(n))
242
+ end select
243
+ endif
236
244
where (mask_mdl_one_tile == 0 ) data_mdl_one_tile = missing
237
245
call output (data_mdl_one_tile, lat_mdl_one_tile, lon_mdl_one_tile, i_mdl, j_mdl, tile, record, t, n)
238
246
endif
239
247
240
- if (field_names(n) == ' vegetation_type' ) then
241
- print * ," - CALL FieldScatter FOR MODEL GRID VEGETATION TYPE."
242
- call ESMF_FieldScatter(vegt_field_mdl, data_mdl_one_tile, rootPet= 0 , tile= tile, rc= rc)
243
- if (ESMF_logFoundError(rcToCheck= rc,msg= ESMF_LOGERR_PASSTHRU,line= __LINE__,file= __FILE__)) &
248
+ if (.not. fract_vegsoil_type) then
249
+ if (field_names(n) == ' vegetation_type' ) then
250
+ print * ," - CALL FieldScatter FOR MODEL GRID VEGETATION TYPE."
251
+ call ESMF_FieldScatter(vegt_field_mdl, data_mdl_one_tile, rootPet= 0 , tile= tile, rc= rc)
252
+ if (ESMF_logFoundError(rcToCheck= rc,msg= ESMF_LOGERR_PASSTHRU,line= __LINE__,file= __FILE__)) &
244
253
call error_handler(" IN FieldScatter." , rc)
254
+ endif
245
255
endif
246
256
247
257
enddo OUTPUT_LOOP
0 commit comments