Error in make_ERA5 (line 263)

I am using the last version of CROCO (v1.3).
After excuting ./ERA5_request.py, ./ERA5_convert.py, I executed “make_ERA5” to generate the blk forcing, however I get the following error indicating that the ‘lon1wave’ is not defined, even in crocotools_param add_waves==0

======================================================
Perform interpolations for the previous month

No data for the previous month: using current month
Undefined function or variable ‘lon1wave’.

Error in make_ERA5 (line 263)
interp_ERA5(ERA5_dir,Ym,Mm,Roa,interp_method,lon1,lat1,lon1wave,lat1wave,

Could you please have a look to message in matlab, thank you in advance.

product_id_reana =

'cmems_mod_glo_phy_my_0.083_P1M-m'

Read the grid in /CROCO_FILES/croco_grd.nc
Use this land file :/LSM_Y2010M1.nc

INTERPOLATION STEP

Loop on the years and the months

Processing year 2010 - month 1

dt=0.041667
tlen0=744
tlen=748

Overlap is 2 records before and after

Compute time for croco file

=====================
Create the frc/blk netcdf file

Create a new bulk file: /CROCO_FILES/croco_blk_ERA5_Y2010M01.nc
Time Step Bulk: 20 of 748
Time Step Bulk: 40 of 748
Time Step Bulk: 60 of 748
Time Step Bulk: 80 of 748
Time Step Bulk: 100 of 748
Time Step Bulk: 120 of 748
Time Step Bulk: 140 of 748
Time Step Bulk: 160 of 748
Time Step Bulk: 180 of 748
Time Step Bulk: 200 of 748
Time Step Bulk: 220 of 748
Time Step Bulk: 240 of 748
Time Step Bulk: 260 of 748
Time Step Bulk: 280 of 748
Time Step Bulk: 300 of 748
Time Step Bulk: 320 of 748
Time Step Bulk: 340 of 748
Time Step Bulk: 360 of 748
Time Step Bulk: 380 of 748
Time Step Bulk: 400 of 748
Time Step Bulk: 420 of 748
Time Step Bulk: 440 of 748
Time Step Bulk: 460 of 748
Time Step Bulk: 480 of 748
Time Step Bulk: 500 of 748
Time Step Bulk: 520 of 748
Time Step Bulk: 540 of 748
Time Step Bulk: 560 of 748
Time Step Bulk: 580 of 748
Time Step Bulk: 600 of 748
Time Step Bulk: 620 of 748
Time Step Bulk: 640 of 748
Time Step Bulk: 660 of 748
Time Step Bulk: 680 of 748
Time Step Bulk: 700 of 748
Time Step Bulk: 720 of 748
Time Step Bulk: 740 of 748

======================================================
Perform interpolations for the previous month

No data for the previous month: using current month
Undefined function or variable ‘lon1wave’.

Error in make_ERA5 (line 263)
interp_ERA5(ERA5_dir,Ym,Mm,Roa,interp_method,lon1,lat1,lon1wave,lat1wave,

Hi!
Thank you for your post ,
Can you add in make_ERA5.m (L 84 - 100) this else statement:

if add_waves == 1

.... 

else

lon1wave = NaN ;
lat1wave = NaN ;
maskwave= NaN ; 

end

Let me know.
Guillaume

Hi Guillaume,
Thank you for your reply ! It is running using your suggestion.
Many thanks !
Bechir