rrfsx / rrfs-workflow_beta

GNU Lesser General Public License v3.0
0 stars 5 forks source link

init_atmosphere crashed when cycling using the hrrrv5 setting, config_extrap_airtemp='lapse-rate' #45

Open guoqing-noaa opened 1 month ago

guoqing-noaa commented 1 month ago

This is to repeat David's hrrrv5 runs in a cycling (restart hourly) mode. I copied David's executables and added his name lists to the workflow. ungrib_ic and ungrib_lbc work correctly but the init_atmosphere for ic and lbc crashed. The error message is as follows:

----------------------------------------------------------------------                                                                                                 
Beginning MPAS-init_atmosphere Error Log File for task     592 of     800          
    Opened at 2024/07/22 10:02:05        
----------------------------------------------------------------------             

ERROR: extrap_type == 2 not implemented for target_z >= zf(1,nz)                   
ERROR: *****************************************************************           
ERROR: Error in interpolation of t(k,iCell) for k=  59, iCell=        13           
CRITICAL ERROR: *****************************************************************  
Logging complete.  Closing file at 2024/07/22 10:02:05

I checked my run directory /lfs5/BMC/nrtrr/NCO_dirs/stmp/hrrrv5/1.0.1/rrfs.20240722/00/ic_extrap_airtemp_2 and compared with David's run directory: /lfs5/BMC/wrfruc/HRRRv5/2024072200/init/ctl/ and found that the executables and namelist are the same when diff'ed.

I further checked the GSL version of the MPAS code and found that in MPAS-Model/src/core_init_atmosphere/mpas_init_atm_cases.F line 2883

      if (trim(config_extrap_airtemp) == 'constant') then
         extrap_airtemp = 0
      else if (trim(config_extrap_airtemp) == 'linear') then
         extrap_airtemp = 1
      else if (trim(config_extrap_airtemp) == 'lapse-rate') then
         extrap_airtemp = 2

and MPAS-Model/src/core_init_atmosphere/mpas_init_atm_cases.F line 7594 says:

      if (target_z >= zf(1,nz)) then
         if (extrap_type == 0) then
            vertical_interp = zf(2,nz)
         else if (extrap_type == 1) then
            slope = (zf(2,nz) - zf(2,nz-1)) / (zf(1,nz) - zf(1,nz-1))
            vertical_interp = zf(2,nz) + slope * (target_z - zf(1,nz))
         else if (extrap_type == 2) then
             call mpas_log_write('extrap_type == 2 not implemented for target_z >= zf(1,nz)', messageType=MPAS_LOG_ERR)
             if (present(ierr)) ierr = 1
             return

And the vertical level setting in namelist.init_atmosphere is as follows:

&dimensions
    config_nvertlevels = 59
    config_nsoillevels = 9
    config_nfglevels = 51
    config_nfgsoillevels = 9
    config_nsoilcat      = 16
/
chunhuazhou commented 1 month ago

@guoqing-noaa I am guessing this is related to the static.nc, which is generated from the MPAS init_atmosphere and differs between the GSL and NCAR MPAS. That is why I created GSL static and NCAR static respectively for my tests, as seen at /lfs4/BMC/wrfruc/Chunhua.Zhou/MPAS-DATA/meshes/12km: conus_mpas.GSL conus_mpas.NCAR

guoqing-noaa commented 1 month ago

@chunhuazhou I copied David's static.nc and if you compare the two run directories, they are the same.

guoqing-noaa commented 1 month ago

I want to update that if I set config_extrap_airtemp=linear, everything works well

hu5970 commented 1 month ago

Is this the 2nd cycle or the the first cycle, which is cold start?

guoqing-noaa commented 1 month ago

@hu5970 It is the ic/lbc task. So it is a cold start. I mimic current rrfsv1, starting from the external ICs at the 03 and 15z cycles