wrf-model / WRF

The official repository for the Weather Research and Forecasting (WRF) model
Other
1.24k stars 677 forks source link

radar_rhv_opt==2 array allocation error #2077

Closed apsims2001 closed 2 months ago

apsims2001 commented 2 months ago

In the file: WRF/var/da/da_radar/da_get_innov_vector_radar.inc

line 277 & line 278 are the same (duplicate allocation) allocate (avg_qws(tot_h_index,tot_z_index)) allocate (avg_qws(tot_h_index,tot_z_index))

When using radar_rhv_opt == 2 this is causes a runtime crash

Steps to reproduce the behavior: USE_RADAR_RHV = T, RADAR_RHV_OPT = 2, Tested with intel classic compiler [ifort (IFORT) 2021.10.0 20230609]

  1. Output is '....'
    forrtl: severe (151): allocatable array is already allocated
    Image              PC                Routine            Line        Source
    da_wrfvar.exe      0000000000F7A164  Unknown               Unknown  Unknown
    da_wrfvar.exe      0000000000B59CA2  Unknown               Unknown  Unknown
    da_wrfvar.exe      0000000000429C4C  Unknown               Unknown  Unknown
    da_wrfvar.exe      0000000000421532  Unknown               Unknown  Unknown
    da_wrfvar.exe      0000000000418877  Unknown               Unknown  Unknown
    da_wrfvar.exe      000000000040C72D  Unknown               Unknown  Unknown
    libc.so.6          00000F195B629D90  Unknown               Unknown  Unknown
    libc.so.6          00000F195B629E40  __libc_start_main     Unknown  Unknown
    da_wrfvar.exe      000000000040C645  Unknown               Unknown  Unknown

Commenting out the duplicate line and recompiling fixes the problem for me

weiwangncar commented 2 months ago

@mos3r3n I wonder if you have an interest to take a look?

weiwangncar commented 2 months ago

@apsims2001 The problem like this should be posted to the Support Forum: https://forum.mmm.ucar.edu/. Thanks.