Changeset 2529 in lmdz_wrf


Ignore:
Timestamp:
May 11, 2019, 8:59:53 PM (6 years ago)
Author:
lfita
Message:

Adding new slicing/variables combination in 'compute_slices_stats_areaweighted' and 'usefile_compute_slices_stats_areaweighted'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r2525 r2529  
    3042030420
    3042130421           varvt = varv.transpose()
    30422            if Nvdims == 3 and len(sN.shape) == 4:
     30422           if Nvdims == 4 and len(sN.shape) == 3:
     30423               voutt=fsci.module_scientific.multi_spaceweightstats_in4drk3_4_slc3v3( \
     30424                 varin=varvt, ngridsin=sNt, gridsin=sint, percentages=spt,           \
     30425                 di1=d3, di2=d2, di3=d1, di4=d0, ds1=ssh[2], ds2=ssh[1], ds3=ssh[0], \
     30426                 maxngridsin=sin.shape[1])
     30427           elif Nvdims == 3 and len(sN.shape) == 4:
    3042330428               voutt=fsci.module_scientific.multi_spaceweightstats_in3drk3_slc3v4(   \
    3042430429                 varin=varvt, ngridsin=sNt, gridsin=sint, percentages=spt,           \
     
    3117131176
    3117231177           varvt = varv.transpose()
    31173            if Nvdims == 3 and len(sN.shape) == 4:
     31178           if Nvdims == 4 and len(sN.shape) == 3:
     31179               voutt=fsci.module_scientific.multi_spaceweightstats_in4drk3_4_slc3v3( \
     31180                 varin=varvt, ngridsin=sNt, gridsin=sint, percentages=spt,           \
     31181                 di1=d3, di2=d2, di3=d1, di4=d0, ds1=ssh[2], ds2=ssh[1], ds3=ssh[0], \
     31182                 maxngridsin=sin.shape[1])
     31183           elif Nvdims == 3 and len(sN.shape) == 4:
    3117431184               voutt=fsci.module_scientific.multi_spaceweightstats_in3drk3_slc3v4(   \
    3117531185                 varin=varvt, ngridsin=sNt, gridsin=sint, percentages=spt,           \
    3117631186                 di1=d2, di2=d1, di3=d0, ds1=ssh[3], ds2=ssh[2], ds3=ssh[1],         \
    3117731187                 ds4=ssh[0], maxngridsin=sin.shape[1])
    31178            elif Nvdims == 4 and len(sN.shape) == 3:
    31179                voutt=fsci.module_scientific.multi_spaceweightstats_in4drk3_4_slc3v3( \
    31180                  varin=varvt, ngridsin=sNt, gridsin=sint, percentages=spt,           \
    31181                  di1=d3, di2=d2, di3=d1, di4=d0, ds1=ssh[2], ds2=ssh[1], ds3=ssh[0], \
    31182                  maxngridsin=sin.shape[1])
    3118331188           elif Nvdims == 3 and len(sN.shape) == 3:
    3118431189               voutt=fsci.module_scientific.multi_spaceweightstats_in3drk3_slc3v3(   \
     
    3118631191                 di1=d2, di2=d1, di3=d0, ds1=ssh[2], ds2=ssh[1], ds3=ssh[0],         \
    3118731192                 maxngridsin=sin.shape[1])
     31193           elif Nvdims == 3 and len(sN.shape) == 2:
     31194               voutt=fsci.module_scientific.multi_spaceweightstats_in3drk3_slc2v2(   \
     31195                 varin=varvt, ngridsin=sNt, gridsin=sint, percentages=spt,           \
     31196                 di1=d2, di2=d1, di3=d0, ds1=ssh[1], ds2=ssh[0],                     \
     31197                 maxngridsin=sin.shape[1])
    3118831198           elif Nvdims == 2 and len(sN.shape) == 3:
    3118931199               voutt=fsci.module_scientific.multi_spaceweightstats_in2drkno_slc3v3(  \
    3119031200                 varin=varvt, ngridsin=sNt, gridsin=sint, percentages=spt,           \
    3119131201                 di1=d1, di2=d0, ds1=ssh[2], ds2=ssh[1], ds3=ssh[0],                 \
     31202                 maxngridsin=sin.shape[1])
     31203           elif Nvdims == 2 and len(sN.shape) == 2:
     31204               voutt=fsci.module_scientific.multi_spaceweightstats_in2drkno_slc2v2(  \
     31205                 varin=varvt, ngridsin=sNt, gridsin=sint, percentages=spt,           \
     31206                 di1=d1, di2=d0, ds1=ssh[1], ds2=ssh[0],                             \
    3119231207                 maxngridsin=sin.shape[1])
    3119331208           elif Nvdims == 1 and len(sN.shape) == 3:
     
    3120031215                 ' slice rank:', len(sN.shape), 'not ready!!'
    3120131216               print '    available ones _______'
     31217               print ' var_rank: 4   slice_rank: 3'
    3120231218               print ' var_rank: 3   slice_rank: 4'
    31203                print ' var_rank: 4   slice_rank: 3'
    3120431219               print ' var_rank: 3   slice_rank: 3'
     31220               print ' var_rank: 3   slice_rank: 2'
    3120531221               print ' var_rank: 2   slice_rank: 3'
     31222               print ' var_rank: 2   slice_rank: 2'
    3120631223               print ' var_rank: 1   slice_rank: 3'
    3120731224               quit(-1)
Note: See TracChangeset for help on using the changeset viewer.