<commit_before>!
!-*-*-*-*-*-*-*-*
!
  PROGRAM PPROC 
!
!-*-*-*-*-*-*-*-*
!
! REVISION 22 - Mar 18, 2022
!
! Postprocessing the SLE 
! Author: <NAME> 2016 
! Revised GS Aug 2018... 
! Revised GS April 2019, for version 10 
! Revised DM May 2, 2019, to skip the PM analysis if IROT=0
! Revised DM May 3, 2019, to read the configuration from the CMD-line
! Revised DM Jun 19, 2019:   Removed the reference to the S Green Function
! Revised DM Jun 27, 2019:   Changed the TIME_STAMP subroutine to handle
!                            time steps different from 1.0kyr
!                            Increased format width for 'l' & 'm' in stokes.dat
! Revised DM Jul 11, 2019:   Added the load function output
! Revised DM Jul 26, 2019:   Revised the topography and OF section to avoid 
!                            re-reading data files
!                            Compute T and OF also at the NN+1 time step
!                            Added the L-dot fingerprint output
! Revised GS Apr 19, 2020:   Implementation of "horizontals"
! Revised DM Mar  7, 2021:   Wide timestamp labels and future GIA
! Revised DM Mar 18, 2022:   Checks if the cfg file exists
!
!/////////////////////////////////////////////////////////////////
!/////////////////////////////////////////////////////////////////
!
!
 IMPLICIT NONE 
!
!<<<<<<<<<<<<<<<<<<<  CONFIGURATION PARAMETERS  >>>>>>>>>>>>>>>>>>>
!<<<<<<<<<<<<<<<<<<< (originally in 'data.sle') >>>>>>>>>>>>>>>>>>>
!
 CHARACTER*100 :: CFG_F
 CHARACTER*200 :: BUFFER
!
!
! >>>>>>> Basic parameters --------------------------------
!
 INTEGER :: RES
 INTEGER :: LMAX
 INTEGER :: NN
 INTEGER :: NN0
 INTEGER :: NV
 REAL*8  :: DELTA
 INTEGER :: IROT
 INTEGER :: IEXT_MAX
 INTEGER :: IINT_MAX
 INTEGER :: KREF
!
! >>>>>>> Input Files required for the execution ------------
!
 CHARACTER*100 :: PT
!
 CHARACTER*100 :: PIX_F
 CHARACTER*100 :: SHA_F
!CHARACTER*100 :: SGF_F
 CHARACTER*100 :: UGF_F
 CHARACTER*100 :: VGF_F
 CHARACTER*100 :: GGF_F
 CHARACTER*100 :: ROT_F
 CHARACTER*100 :: ICE_F
 CHARACTER*100 :: TOP_F
 CHARACTER*100 :: OFP_F
 CHARACTER*100 :: TGS_F
 CHARACTER*100 :: GEO_F
 CHARACTER*100 :: RSL_F
 CHARACTER*100 :: PMT_F
!
! >>>>>>> Output files --------------------------------------
!
 CHARACTER*100 :: F_OUT_TOP
 CHARACTER*100 :: F_OUT_OFU
 CHARACTER*100 :: F_OUT_SHS
 CHARACTER*100 :: F_OUT_SHU
 CHARACTER*100 :: F_OUT_SHG
 CHARACTER*100 :: F_OUT_SHN
 CHARACTER*100 :: F_OUT_SHV
 CHARACTER*100 :: F_OUT_TPW
 CHARACTER*100 :: F_OUT_SAV
!
!
!<<<<<<<<<<<<<<<<  END OF CONFIGURATION PARAMETERS  >>>>>>>>>>>>>>>>
!
!
!
 INTEGER :: NP
 INTEGER :: JMAX
 INTEGER :: NMODES
!
 REAL*8,  PARAMETER :: ERAD=6.371D6
 REAL*8,  PARAMETER :: RHOW=1000D0    
 REAL*8,  PARAMETER :: RHOI=931D0    
 REAL*8,  PARAMETER :: RHOR=900D0   
 REAL*8,  PARAMETER :: RHOE=5514D0
 REAL*8,  PARAMETER :: CCC=8.0394d37 
 REAL*8,  PARAMETER :: AAA=8.0131d37 
 REAL*8,  PARAMETER :: CMA=CCC-AAA
 REAL*8,  PARAMETER :: PI=3.14159265358979323840D0 
 REAL*8,  PARAMETER :: C0=(4D0*PI/3D0)*SQRT(6D0/5D0)
 INTEGER, PARAMETER :: NLAT=180, NLON=360  
 REAL*8,  PARAMETER :: ERADIUS=6.371D6   
!
 REAL*8 ALFA
 INTEGER :: ST_LMIN, ST_LMAX 
! 
 CHARACTER*32 FILE_TOPO, FILE_ICE, FILE_IFL, FILE_IGB 
 CHARACTER*32 FILE_IGA, FILE_OCE, FILE_CON, FILE_LOAD
 CHARACTER*4 CJUNK 
 CHARACTER*5 LABEL
 CHARACTER*5, ALLOCATABLE :: TBP(:)
 REAL*8 DDELTA, XJ, PSI_X, PSI_Y, C_STOK, S_STOK 
 REAL*8 AVERAGE_N, AVERAGE_U, AVERAGE_S, AVERAGE_G, AVERAGE_L
 INTEGER I, N, J, K, L, M, P, IT, NA, NBP
 INTEGER J_INDEX, NPU, ILAT, ILON, NIN, MJ, LJ, DOM  
 COMPLEX*16 , ALLOCATABLE :: PSI(:) 
 COMPLEX*16 :: RATE_G
!
 REAL*8, ALLOCATABLE :: SDOT_PIX(:), UDOT_PIX(:), NDOT_PIX(:), GDOT_PIX(:)
 REAL*8, ALLOCATABLE :: SDOT(:,:),   UDOT(:,:),  NDOT(:,:), GDOT(:,:)
 REAL*8, ALLOCATABLE :: IN_TOPO(:,:), TOPO(:,:,:), T(:,:)
 REAL*8, ALLOCATABLE :: LONP(:), LATP(:),  PLM(:,:) 
 REAL*8, ALLOCATABLE :: LONG(:), LATG(:),  PLMG(:,:)
 REAL*8, ALLOCATABLE :: LOAD(:,:)
 REAL*8, ALLOCATABLE :: LDOT_PIX(:)
 REAL*8, ALLOCATABLE :: VDOT_SOUT_PIX(:),  VDOT_EAST_PIX(:) 
!
 REAL*8, ALLOCATABLE :: E_TT(:), E_LL(:), E_TL(:)
 COMPLEX*16, ALLOCATABLE :: YARMO (:),    YARMO_T(:),  YARMO_L(:)
 COMPLEX*16, ALLOCATABLE :: YARMO_TT(:), YARMO_LL(:), YARMO_TL(:)
 COMPLEX*16, ALLOCATABLE :: YARMO_CT(:),  YARMO_CL(:)
!
 COMPLEX*16, ALLOCATABLE :: SH_S(:,:,:)
 COMPLEX*16, ALLOCATABLE :: SH_U(:,:), SH_G(:,:), SH_N(:,:), SH_V(:,:)
 COMPLEX*16, ALLOCATABLE :: SIN_COS_G(:,:), SIN_COS(:,:)
!
 INTEGER, ALLOCATABLE :: ANC(:), MM(:), LL(:), DM(:), OF(:,:), H(:,:)
!
!/////////////////////////////////////////////////////////////////
!/////////////////////////////////////////////////////////////////
!
! ~~~~~~~ Input files and data ~~~~~~~
!
! =====================================
!  Input files and data for TIDE GAUGES
! ===================================== 
 INTEGER, PARAMETER :: NH_TG = 10, LARGE_N=10**5
 INTEGER, PARAMETER :: NH_TG_GEO = 3
 INTEGER NTG, psmsl(large_n), code(large_n)
 CHARACTER*36 tg_name(large_n)
 REAL*8 LAT_TG(large_n), LON_TG(large_n)
 REAL*8 X
 REAL*8 TG_SDOT, TG_UDOT, TG_NDOT, TG_GDOT
 REAL*8 TG_V_SOUT_DOT, TG_V_EAST_DOT
 COMPLEX*16, ALLOCATABLE :: YTG(:) 
 COMPLEX*16, ALLOCATABLE :: YTG_THETA(:)<commit_msg>Changed the definition of the ice height to REAL in the pproc<commit_after>!
!-*-*-*-*-*-*-*-*
!
  PROGRAM PPROC 
!
!-*-*-*-*-*-*-*-*
!
! REVISION 22 - Mar 18, 2022
!
! Postprocessing the SLE 
! Author: GS July 2016 
! Revised GS Aug 2018... 
! Revised GS April 2019, for version 10 
! Revised DM May 2, 2019, to skip the PM analysis if IROT=0
! Revised DM May 3, 2019, to read the configuration from the CMD-line
! Revised DM Jun 19, 2019:   Removed the reference to the S Green Function
! Revised DM Jun 27, 2019:   Changed the TIME_STAMP subroutine to handle
!                            time steps different from 1.0kyr
!                            Increased format width for 'l' & 'm' in stokes.dat
! Revised DM Jul 11, 2019:   Added the load function output
! Revised DM Jul 26, 2019:   Revised the topography and OF section to avoid 
!                            re-reading data files
!                            Compute T and OF also at the NN+1 time step
!                            Added the L-dot fingerprint output
! Revised GS Apr 19, 2020:   Implementation of "horizontals"
! Revised DM Mar  7, 2021:   Wide timestamp labels and future GIA
! Revised DM Mar 18, 2022:   Checks if the cfg file exists
! Revised DM Mar 22, 2022:   Changed the H(:,:) array to REAL*8
!
!/////////////////////////////////////////////////////////////////
!/////////////////////////////////////////////////////////////////
!
!
 IMPLICIT NONE 
!
!<<<<<<<<<<<<<<<<<<<  CONFIGURATION PARAMETERS  >>>>>>>>>>>>>>>>>>>
!<<<<<<<<<<<<<<<<<<< (originally in 'data.sle') >>>>>>>>>>>>>>>>>>>
!
 CHARACTER*100 :: CFG_F
 CHARACTER*200 :: BUFFER
!
!
! >>>>>>> Basic parameters --------------------------------
!
 INTEGER :: RES
 INTEGER :: LMAX
 INTEGER :: NN
 INTEGER :: NN0
 INTEGER :: NV
 REAL*8  :: DELTA
 INTEGER :: IROT
 INTEGER :: IEXT_MAX
 INTEGER :: IINT_MAX
 INTEGER :: KREF
!
! >>>>>>> Input Files required for the execution ------------
!
 CHARACTER*100 :: PT
!
 CHARACTER*100 :: PIX_F
 CHARACTER*100 :: SHA_F
!CHARACTER*100 :: SGF_F
 CHARACTER*100 :: UGF_F
 CHARACTER*100 :: VGF_F
 CHARACTER*100 :: GGF_F
 CHARACTER*100 :: ROT_F
 CHARACTER*100 :: ICE_F
 CHARACTER*100 :: TOP_F
 CHARACTER*100 :: OFP_F
 CHARACTER*100 :: TGS_F
 CHARACTER*100 :: GEO_F
 CHARACTER*100 :: RSL_F
 CHARACTER*100 :: PMT_F
!
! >>>>>>> Output files --------------------------------------
!
 CHARACTER*100 :: F_OUT_TOP
 CHARACTER*100 :: F_OUT_OFU
 CHARACTER*100 :: F_OUT_SHS
 CHARACTER*100 :: F_OUT_SHU
 CHARACTER*100 :: F_OUT_SHG
 CHARACTER*100 :: F_OUT_SHN
 CHARACTER*100 :: F_OUT_SHV
 CHARACTER*100 :: F_OUT_TPW
 CHARACTER*100 :: F_OUT_SAV
!
!
!<<<<<<<<<<<<<<<<  END OF CONFIGURATION PARAMETERS  >>>>>>>>>>>>>>>>
!
!
!
 INTEGER :: NP
 INTEGER :: JMAX
 INTEGER :: NMODES
!
 REAL*8,  PARAMETER :: ERAD=6.371D6
 REAL*8,  PARAMETER :: RHOW=1000D0    
 REAL*8,  PARAMETER :: RHOI=931D0    
 REAL*8,  PARAMETER :: RHOR=900D0   
 REAL*8,  PARAMETER :: RHOE=5514D0
 REAL*8,  PARAMETER :: CCC=8.0394d37 
 REAL*8,  PARAMETER :: AAA=8.0131d37 
 REAL*8,  PARAMETER :: CMA=CCC-AAA
 REAL*8,  PARAMETER :: PI=3.14159265358979323840D0 
 REAL*8,  PARAMETER :: C0=(4D0*PI/3D0)*SQRT(6D0/5D0)
 INTEGER, PARAMETER :: NLAT=180, NLON=360  
 REAL*8,  PARAMETER :: ERADIUS=6.371D6   
!
 REAL*8 ALFA
 INTEGER :: ST_LMIN, ST_LMAX 
! 
 CHARACTER*32 FILE_TOPO, FILE_ICE, FILE_IFL, FILE_IGB 
 CHARACTER*32 FILE_IGA, FILE_OCE, FILE_CON, FILE_LOAD
 CHARACTER*4 CJUNK 
 CHARACTER*5 LABEL
 CHARACTER*5, ALLOCATABLE :: TBP(:)
 REAL*8 DDELTA, XJ, PSI_X, PSI_Y, C_STOK, S_STOK 
 REAL*8 AVERAGE_N, AVERAGE_U, AVERAGE_S, AVERAGE_G, AVERAGE_L
 INTEGER I, N, J, K, L, M, P, IT, NA, NBP
 INTEGER J_INDEX, NPU, ILAT, ILON, NIN, MJ, LJ, DOM  
 COMPLEX*16 , ALLOCATABLE :: PSI(:) 
 COMPLEX*16 :: RATE_G
!
 REAL*8, ALLOCATABLE :: SDOT_PIX(:), UDOT_PIX(:), NDOT_PIX(:), GDOT_PIX(:)
 REAL*8, ALLOCATABLE :: SDOT(:,:),   UDOT(:,:),  NDOT(:,:), GDOT(:,:)
 REAL*8, ALLOCATABLE :: IN_TOPO(:,:), TOPO(:,:,:), T(:,:)
 REAL*8, ALLOCATABLE :: LONP(:), LATP(:),  PLM(:,:) 
 REAL*8, ALLOCATABLE :: LONG(:), LATG(:),  PLMG(:,:)
 REAL*8, ALLOCATABLE :: LOAD(:,:)
 REAL*8, ALLOCATABLE :: LDOT_PIX(:)
 REAL*8, ALLOCATABLE :: VDOT_SOUT_PIX(:),  VDOT_EAST_PIX(:) 
!
 REAL*8, ALLOCATABLE :: E_TT(:), E_LL(:), E_TL(:)
 COMPLEX*16, ALLOCATABLE :: YARMO (:),    YARMO_T(:),  YARMO_L(:)
 COMPLEX*16, ALLOCATABLE :: YARMO_TT(:), YARMO_LL(:), YARMO_TL(:)
 COMPLEX*16, ALLOCATABLE :: YARMO_CT(:),  YARMO_CL(:)
!
 COMPLEX*16, ALLOCATABLE :: SH_S(:,:,:)
 COMPLEX*16, ALLOCATABLE :: SH_U(:,:), SH_G(:,:), SH_N(:,:), SH_V(:,:)
 COMPLEX*16, ALLOCATABLE :: SIN_COS_G(:,:), SIN_COS(:,:)
!
 INTEGER, ALLOCATABLE :: ANC(:), MM(:), LL(:), DM(:), OF(:,:)
 REAL*8, ALLOCATABLE :: H(:,:)
!
!/////////////////////////////////////////////////////////////////
!/////////////////////////////////////////////////////////////////
!
! ~~~~~~~ Input files and data ~~~~~~~
!
! =====================================
!  Input files and data for TIDE GAUGES
! ===================================== 
 INTEGER, PARAMETER :: NH_TG = 10, LARGE_N=10**5
 INTEGER, PARAMETER :: NH_TG_GEO = 3
 INTEGER NTG, psmsl(large_n), code(large_n)
 CHARACTER*36 tg_name(large_n)
 REAL*8 LAT_TG(large_n), LON_TG(large_n)
 REAL*8 X
 REAL*8 TG_SDOT, TG_UDOT, TG_NDOT, TG_GDOT
 REAL*8 TG_V_SOUT_DOT, TG_V_EAST_DOT
 COMPLEX*16, ALLOCATABLE :: YTG(:) 
 COMPLEX*16, ALLOCATABLE :: YTG_THETA(:)
{'fraction_non_alphanumeric': 0.2408426646422471, 'fraction_numerical': 0.05731637881951034, 'mean_word_length': 2.9486699138254027, 'pattern_counts': {'":': 0, '<': 112, '<?xml version=': 0, '>': 154, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1425300', 'n_tokens_mistral': 4768, 'n_tokens_neox': 4075, 'n_words': 974}