subr magcurvesave_cb
 if check_magflux() then {
 ;get the file name
 name = xmtextfieldgetstring($magcurvesavetext)
 fzwrite, [[$magnetfluxcurves], [$magtotalfluxcurves]],name,'net and total magnetic flux curves'
 }
 endsubr
 ;===============================================================================
