Changeset 2417 in lmdz_wrf
- Timestamp:
- Mar 25, 2019, 4:05:16 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r2416 r2417 30682 30682 30683 30683 # removing monotones. Fortran only accepts rank <= 7 arrays !! 30684 Nmaxgridsinone = False 30685 if sin.shape[1] == 1: Nmaxgridsinone = True 30686 30684 30687 sN, Ndims = gen.remove_monotones(sN, osN.dimensions) 30685 30688 sin, indims = gen.remove_monotones(sin, osin.dimensions) … … 30689 30692 dimsslice = list(Ndims) 30690 30693 shapeslice = list(sN.shape) 30694 30695 # Due to the removal of monotones we are losing the cases when Nmaxgrisin == 1 30696 if Nmaxgridsinone: 30697 print warnmsg 30698 print ' ' + fname + ": maximum number of grid points per slice == 1 !!" 30699 print ' adjusting accordingly certain matrices ...' 30700 shapein = list(sin.shape) 30701 Lshape = len(shapein) 30702 reshapein = [shapein[0]] + [1] + shapein[1:Lshape+1] 30703 30704 sin0 = sin + 0 30705 30706 newsin = np.zeros(tuple(reshapein), dtype=int) 30707 for i in range(shapein[0]): 30708 newsin[i,0,...] = sin[i,...] 30709 30710 sin = None 30711 sin = newsin+ 0 30691 30712 30692 30713 sNt = sN.transpose()
Note: See TracChangeset
for help on using the changeset viewer.