Changeset 2675 in lmdz_wrf for trunk/tools/module_scientific.f90


Ignore:
Timestamp:
Jul 12, 2019, 10:31:58 PM (5 years ago)
Author:
lfita
Message:

Adding:

  • 'frontogenesis': Calculation of the frontogenesis diagnostics
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/module_scientific.f90

    r2674 r2675  
    79237923  END FUNCTION vecmodule3D
    79247924
    7925   SUBROUTINE FUNCTION matmodule3D(d1, d2, d3, mat, matmodule)
     7925  SUBROUTINE matmodule3D(d1, d2, d3, mat, matmodule)
    79267926  ! Subroutine to compute the module of a 3D matrix with 3 components
    79277927
    79287928    IMPLICIT NONE
    79297929
     7930    INTEGER, INTENT(in)                                  :: d1,d2,d3
    79307931    REAL(r_k), DIMENSION(d1,d2,d3,3), INTENT(in)         :: mat
    79317932    REAL(r_k), DIMENSION(d1,d2,d3), INTENT(out)          :: matmodule
     
    79337934    fname = 'matmodule3D'
    79347935
    7935     matmodule3D = SQRT(vec(:,:,:,1)*vec(:,:,:,1) + vec(:,:,:,2)*vec(:,:,:,2) +                        &
    7936       vec(:,:,:,3)*vec(:,:,:,3))
     7936    matmodule = SQRT(mat(:,:,:,1)*mat(:,:,:,1) + mat(:,:,:,2)*mat(:,:,:,2) + mat(:,:,:,3)*mat(:,:,:,3))
    79377937
    79387938  END SUBROUTINE matmodule3D
     
    79607960    def = fillval64
    79617961
    7962     def(:,:,:,1) = - uagrad(:,:,:,1)*vargrad(:,:,:1) - vagrad(:,:,:,1)*vargrad(:,:,:2)
    7963     def(:,:,:,2) = - uagrad(:,:,:,2)*vargrad(:,:,:1) - vagrad(:,:,:,2)*vargrad(:,:,:2)
    7964     def(:,:,:,3) = - uagrad(:,:,:,3)*vargrad(:,:,:1) - vagrad(:,:,:,3)*vargrad(:,:,:2)
     7962    def(:,:,:,1) = -uagrad(:,:,:,1)*vargrad(:,:,:,1) -vagrad(:,:,:,1)*vargrad(:,:,:,2)
     7963    def(:,:,:,2) = -uagrad(:,:,:,2)*vargrad(:,:,:,1) -vagrad(:,:,:,2)*vargrad(:,:,:,2)
     7964    def(:,:,:,3) = -uagrad(:,:,:,3)*vargrad(:,:,:,1) -vagrad(:,:,:,3)*vargrad(:,:,:,2)
    79657965
    79667966  END SUBROUTINE deformation3D
     
    79887988    tilt = fillval64
    79897989
    7990     tilt(:,:,:,1) = - uagrad(:,:,:,1)*vargrad(:,:,:3)
    7991     tilt(:,:,:,2) = - vagrad(:,:,:,2)*vargrad(:,:,:3)
    7992     tilt(:,:,:,3) = - wagrad(:,:,:,3)*vargrad(:,:,:3)
     7990    tilt(:,:,:,1) = -wagrad(:,:,:,1)*vargrad(:,:,:,3)
     7991    tilt(:,:,:,2) = -wagrad(:,:,:,2)*vargrad(:,:,:,3)
     7992    tilt(:,:,:,3) = -wagrad(:,:,:,3)*vargrad(:,:,:,3)
    79937993
    79947994  END SUBROUTINE tilting3D
     
    80008000
    80018001    INTEGER, INTENT(in)                                  :: dx, dy, dz, dt
    8002     REAL(r_k), DIMENSION(dx,dy,dz,dt), INTENT(in)        :: vargrad
     8002    REAL(r_k), INTENT(in)                                :: ddt
     8003    REAL(r_k), DIMENSION(dx,dy,dz,dt), INTENT(in)        :: var
    80038004    CHARACTER(LEN=*), INTENT(in)                         :: dtkind
    80048005    REAL(r_k), DIMENSION(dx,dy,dz,dt), INTENT(out)       :: vardt
     
    80398040    END IF   
    80408041
    8041   END SUBROUTINE tilting3D
     8042  END SUBROUTINE deltat3D
    80428043
    80438044END MODULE module_scientific
Note: See TracChangeset for help on using the changeset viewer.