Changeset 2766 in lmdz_wrf


Ignore:
Timestamp:
Nov 16, 2019, 10:54:07 PM (5 years ago)
Author:
lfita
Message:

Fixing 2Dhgradient

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diag_tools.py

    r2765 r2766  
    10571057        dy = var.shape[0]
    10581058        gradt=fdin.module_fordiagnostics.compute_gradient2dh1rk(                     \
    1059           var=var[:].transpose(), x=x[:].transpose(), y=y[:].transpose(), d1=dx,     \
     1059          v=var[:].transpose(), x=x[:].transpose(), y=y[:].transpose(), d1=dx,       \
    10601060          d2=dy)
    10611061    elif len(var.shape) == 3:
     
    10641064        dt = var.shape[0]
    10651065        gradt=fdin.module_fordiagnostics.compute_gradient2dh3rk(                     \
    1066           var=var[:].transpose(), x=x[:].transpose(), y=y[:].transpose(), d1=dx,     \
     1066          v=var[:].transpose(), x=x[:].transpose(), y=y[:].transpose(), d1=dx,       \
    10671067          d2=dy, d3=dt)
    10681068    elif len(var.shape) == 4:
     
    10721072        dt = var.shape[0]
    10731073        gradt=fdin.module_fordiagnostics.compute_gradient2dh4rk( \
    1074           var=var[:].transpose(), x=x[:].transpose(), y=y[:].transpose(), d1=dx,      \
    1075           d2=dy, d3=dt)
     1074          v=var[:].transpose(), x=x[:].transpose(), y=y[:].transpose(), d1=dx,        \
     1075          d2=dy, d3=dz, d4=dt)
    10761076    else:
    10771077        print errormsg
  • trunk/tools/diagnostics.py

    r2765 r2766  
    11861186
    11871187        var0 = ncobj.variables[depvars[0]]
    1188         var1 = ncobj.variables[depvars[1]]
    1189         var2 = ncobj.variables[depvars[2]]
     1188        var1 = ncobj.variables[depvars[1]][0,:,:]
     1189        var2 = ncobj.variables[depvars[2]][0,:,:]
    11901190
    11911191        dnamesvar = var0.dimensions
Note: See TracChangeset for help on using the changeset viewer.