File indexing completed on 2018-03-02 18:43:00 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
d217ad1db8 Oliv*0001 #include "PTRACERS_OPTIONS.h"
0002 #ifdef PTRACERS_ALLOW_DYN_STATE
0003
0004 MODULE PTRACERS_DYN_STATE_MOD
0005
8dac14766b Oliv*0006
2942457bb8 Jean*0007 TYPE PTRACERS_ISTATE
d217ad1db8 Oliv*0008 _RL, POINTER :: som_P(:,:,:,:,:,:)
0009 END TYPE
0010
0011 CONTAINS
0012 SUBROUTINE PTRACERS_INIT_FIXED_DYNAMIC(
0013 & PTR_ISTATE_ARR,
0014 & PTRACERS_numInUse,
0015 & PTRACERS_SOM_Advection,
0016 & sNx, sNy, Nr, OLx, OLy,
0017 & nSx, nSy, nSOM,
0018 & myThid )
0019
0020 IMPLICIT NONE
0021
0022 TYPE(PTRACERS_ISTATE), POINTER :: PTR_ISTATE_ARR(:)
0023 INTEGER PTRACERS_numInUse
0024 LOGICAL PTRACERS_SOM_Advection(PTRACERS_numInUse)
0025 INTEGER sNx, sNy, Nr, OLx, OLy, nSx, nSy, nSOM
0026 INTEGER myThid
0027
0028 INTEGER iPtr
0029
0030 ALLOCATE( PTR_ISTATE_ARR(PTRACERS_numInUse) )
0031
0032 DO iPtr = 1, PTRACERS_numInUse
0033 IF ( PTRACERS_SOM_Advection(iPtr) ) THEN
0034 ALLOCATE( PTR_ISTATE_ARR(iPtr)%som_P(1-OLx:sNx+OLx,
0035 & 1-OLy:sNy+OLy,
0036 & Nr,
0037 & nSx,
0038 & nSy,
0039 & nSOM) )
0040 ENDIF
0041 ENDDO
0042
0043 RETURN
0044 END SUBROUTINE
0045
0046 END MODULE
0047 #else
8dac14766b Oliv*0048
91e59b53f1 Oliv*0049 SUBROUTINE PTRACERS_DYN_STATE_MOD_DUMMY
0050 RETURN
2942457bb8 Jean*0051 END
d217ad1db8 Oliv*0052 #endif
0053