#PACE_HARP2.20220321T230053.L2.TRUTH.OCEAN_COLOR_FASTMAPOL.nc
for file in *.nc
do
    file1=${file%%.L2*}
    file2=$file1.L2.OCEAN_COLOR_FASTMAPOL.nc
    echo $file2
    mv $file $file2
done
