@@ -3401,33 +3401,45 @@ subroutine search_many(num_field,bundle_target,field_data_2d,mask, tile, &
3401
3401
call error_handler(" IN FieldGather" , rc)
3402
3402
if (localpet == 0 ) then
3403
3403
if (present (latitude) .and. search_nums(k).eq. SST_FIELD_NUM) then
3404
+ ! Sea surface temperatures; pass latitude field to search
3404
3405
print * , " search1"
3405
3406
call search(field_data_2d, mask, i_target, j_target, tile,search_nums(k),latitude= latitude)
3406
3407
elseif (present (terrain_land) .and. search_nums(k) .eq. TERRAIN_FIELD_NUM) then
3408
+ ! Terrain height; pass optional climo terrain array to search
3407
3409
print * , " search2"
3408
3410
call search(field_data_2d, mask, i_target, j_target, tile,search_nums(k),terrain_land= terrain_land)
3409
- elseif (search_nums(k) .eq. SOTYP_LAND_FIELD_NUM) then
3411
+ elseif (search_nums(k) .eq. SOTYP_LAND_FIELD_NUM) then
3412
+ ! Soil type over land
3410
3413
if (fname .eq. " soil_type_target_grid" ) then
3414
+ ! Soil type over land when interpolating input data to target grid
3415
+ ! *with* the intention of retaining interpolated data in output
3411
3416
print * , " search3"
3412
3417
call search(field_data_2d, mask, i_target, j_target, tile,search_nums(k),soilt_climo= soilt_climo)
3413
3418
elseif (present (soilt_climo)) then
3414
3419
if (maxval (field_data_2d) > 0 .and. (trim (external_model) .ne. " GFS" .or. trim (input_type) .ne. " grib2" )) then
3420
+ ! Soil type over land when interpolating input data to target grid
3421
+ ! *without* the intention of retaining data in output file
3415
3422
print * , " search4"
3416
- ! If soil type from the input grid has any non-zero points then soil type must exist for use
3417
3423
call search(field_data_2d, mask, i_target, j_target, tile, search_nums(k))
3418
- else ! Otherwise, just set the data on the "target" grid to the soil climatology
3424
+ else
3425
+ ! If no soil type field exists in input data (e.g., GFS grib2) then don't search
3426
+ ! but simply set data to the climo field. This may result in
3427
+ ! somewhat inaccurate soil moistures as no scaling will occur
3419
3428
print * , " search5"
3420
3429
field_data_2d = soilt_climo
3421
3430
endif ! check field value
3422
3431
endif ! sotype from target grid
3423
3432
else
3433
+ ! Any field that doesn't require any of the special treatments or
3434
+ ! passing of additional variables as in those above
3424
3435
call search(field_data_2d, mask, i_target, j_target, tile,search_nums(k))
3425
3436
endif ! if present
3426
3437
endif ! localpet
3427
3438
call ESMF_FieldScatter(temp_field, field_data_2d, rootPet= 0 , tile= tile,rc= rc)
3428
3439
if (ESMF_logFoundError(rcToCheck= rc,msg= ESMF_LOGERR_PASSTHRU,line= __LINE__,file= __FILE__))&
3429
3440
call error_handler(" IN FieldScatter" , rc)
3430
3441
else
3442
+ ! Process 3d fields soil temperature, moisture, and liquid
3431
3443
print * , " FieldGather"
3432
3444
call ESMF_FieldGather(temp_field,field_data_3d,rootPet= 0 ,tile= tile,rc= rc)
3433
3445
if (ESMF_logFoundError(rcToCheck= rc,msg= ESMF_LOGERR_PASSTHRU,line= __LINE__,file= __FILE__))&
0 commit comments