Hi Celio,
Sure, it is possible to do that. Please take a look at the following snippet of code; it is part of the notebook I shared during the training:
figInstance, axisInstance = ce.view_probabilistic(pr_fcst.where(pr_fcst > prob_missing_value_flag).rename({'C':'M'}).isel(T=-1) / 100)
axisInstance.add_feature(countryShape)
axisInstance.add_feature(regionShape)
#apply the mask here
axisInstance.contourf(lons,lats, np.where(mask,0,np.nan), cmap='Greys')
figName = MOS + '_ensemble_probabilisticForecast.png'
plt.savefig(Path.home() / "Desktop" / caseDir / domainFolder / "figures" / figName, bbox_inches='tight')
The first line gets the figure and axis instance from the 'cpt extra' module 'view' function; thus, you can apply your country and county shapefiles on this axis (i.e., axisInstance). You can also apply the 'mask' on this axis and hide other regions outside your country's boundary (or any region defined by your custom shapefile). Finally, you can save the figure using the matplotlib (which is imported as 'plt' here) 'savefig' function as indicated in the above code. I hope this helps.
Happy forecasting!
best,