(file) Return to sw_functions.c CVS log (file) (dir) Up to [Development] / JSOC / proj / sharp / apps

Diff for /JSOC/proj/sharp/apps/sw_functions.c between version 1.40 and 1.42

version 1.40, 2021/05/24 22:17:06 version 1.42, 2021/05/26 04:44:14
Line 1272  int computeAbsFlux_los(float *los, int *
Line 1272  int computeAbsFlux_los(float *los, int *
     int i = 0;     int i = 0;
     int j = 0;     int j = 0;
     int count_mask_los = 0;     int count_mask_los = 0;
       int countabit = 0;
     double sum = 0.0;     double sum = 0.0;
     *absFlux_los = 0.0;     *absFlux_los = 0.0;
     *mean_vf_los_ptr = 0.0;     *mean_vf_los_ptr = 0.0;
Line 1284  int computeAbsFlux_los(float *los, int *
Line 1285  int computeAbsFlux_los(float *los, int *
            for (j = 0; j < ny; j++)            for (j = 0; j < ny; j++)
            {            {
             if ( bitmask[j * nx + i] < 30 ) continue;             if ( bitmask[j * nx + i] < 30 ) continue;
             if isnan(los[j * nx + i]) continue;              if isnan(los[j * nx + i])
                 {countabit++; continue;}
             sum += (fabs(los[j * nx + i]));             sum += (fabs(los[j * nx + i]));
             count_mask_los++;             count_mask_los++;
            }            }
Line 1293  int computeAbsFlux_los(float *los, int *
Line 1295  int computeAbsFlux_los(float *los, int *
     *mean_vf_los_ptr     = sum*cdelt1*cdelt1*(rsun_ref/rsun_obs)*(rsun_ref/rsun_obs)*100.0*100.0;     *mean_vf_los_ptr     = sum*cdelt1*cdelt1*(rsun_ref/rsun_obs)*(rsun_ref/rsun_obs)*100.0*100.0;
     *count_mask_los_ptr  = count_mask_los;     *count_mask_los_ptr  = count_mask_los;
  
     printf("USFLUXL=%f\n",*mean_vf_los_ptr);      //printf("USFLUXL=%f\n",*mean_vf_los_ptr);
     printf("CMASKL=%f\n",*count_mask_los_ptr);      //printf("CMASKL=%f\n",*count_mask_los_ptr);
  
     return 0;     return 0;
 } }
Line 1366  int computeLOSderivative(float *los, int
Line 1368  int computeLOSderivative(float *los, int
         for (j = 0; j <= ny-1; j++)         for (j = 0; j <= ny-1; j++)
         {         {
             if ( bitmask[j * nx + i] < 30 ) continue;             if ( bitmask[j * nx + i] < 30 ) continue;
             if ( (derx_los[j * nx + i] + dery_los[j * nx + i]) == 0) continue;  
             if isnan(los[j * nx + i])      continue;             if isnan(los[j * nx + i])      continue;
             if isnan(los[(j+1) * nx + i])  continue;             if isnan(los[(j+1) * nx + i])  continue;
             if isnan(los[(j-1) * nx + i])  continue;             if isnan(los[(j-1) * nx + i])  continue;
Line 1381  int computeLOSderivative(float *los, int
Line 1382  int computeLOSderivative(float *los, int
  
     *mean_derivative_los_ptr = (sum)/(count_mask); // would be divided by ((nx-2)*(ny-2)) if shape of count_mask = shape of magnetogram     *mean_derivative_los_ptr = (sum)/(count_mask); // would be divided by ((nx-2)*(ny-2)) if shape of count_mask = shape of magnetogram
  
     printf("MEANGBL=%f\n",*mean_derivative_los_ptr);      //printf("MEANGBL=%f\n",*mean_derivative_los_ptr);
  
         return 0;         return 0;
 } }


Legend:
Removed from v.1.40  
changed lines
  Added in v.1.42

Karen Tian
Powered by
ViewCVS 0.9.4