Skip to content

Commit

Permalink
Merge pull request #5 from Mohid-Water-Modelling-System/master
Browse files Browse the repository at this point in the history
Revert to commit 57607ad
  • Loading branch information
RBCanelas authored Aug 14, 2018
2 parents f9a1858 + a6755bc commit fc01252
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 52 deletions.
4 changes: 2 additions & 2 deletions Software/ConvertToHDF5/ModuleHDF5ToASCIIandBIN.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ subroutine OutputSwanASCII(PropName, TimeName, Aux2D, l, p)
if (len_trim(Me%OutputListFolderName) == 0) then
write(Me%UnitProps(p),'(A30)') Filename
else
aux = trim(Me%OutputListFolderName) //backslash// trim(Filename)
aux = trim(Me%OutputListFolderName) // "\" // trim(Filename)
write(Me%UnitProps(p),'(A100)') aux
endif

Expand Down Expand Up @@ -1239,7 +1239,7 @@ subroutine OutputSwanASCIIVectorial(PropName, NextTime, l, p)
if (len_trim(Me%OutputListFolderName) == 0) then
write(Me%UnitProps(p),'(A30)') Filename
else
aux = trim(Me%OutputListFolderName) //backslash// trim(Filename)
aux = trim(Me%OutputListFolderName) // "\" // trim(Filename)
write(Me%UnitProps(p),'(A100)') aux
endif

Expand Down
13 changes: 7 additions & 6 deletions Software/DomainDecompositionConsolidation/ModuleDDC.F90
Original file line number Diff line number Diff line change
Expand Up @@ -308,29 +308,30 @@ end function ModelLevel
!--------------------------------------------------------------------------

character(len=PathLength) pure function ModelPath (AuxString, Level)

!Arguments-------------------------------------------------------------
character(len=*), intent(in) :: AuxString
integer, intent(in) :: Level

!Local-----------------------------------------------------------------
integer :: position

!------------------------------------------------------------------------

position = scan(AuxString, "/", back = .true.)

if (position == 0) then
position = scan(AuxString, backslash, back = .true.)
endif
if (position == 0) then
ModelPath = "../res"
else
ModelPath = AuxString(Level+1:position)//"res"
endif
endif

!------------------------------------------------------------------------

end function ModelPath

end function ModelPath

!--------------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions Software/MOHIDBase1/ModuleEnterData.F90
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ subroutine ReadFileName(KEYWORD, FILE_NAME, Message, TIME_END, Extension, FilesI
iFN = len_trim(FILE_NAME)
ipath = 0
do i = iFN, 1, -1
if (FILE_NAME(i:i) == '/' .or. FILE_NAME(i:i) == backslash) then
if (FILE_NAME(i:i) == '/' .or. FILE_NAME(i:i) == "\") then
ipath = i
exit
endif
Expand Down Expand Up @@ -4854,7 +4854,7 @@ end module ModuleEnterData

!----------------------------------------------------------------------------------------------------------
!MOHID Water Modelling System.
!Copyright (C) 1985, 1998, 2002, 2005. Instituto Superior Técnico, Technical University of Lisbon.
!Copyright (C) 1985, 1998, 2002, 2005. Instituto Superior Técnico, Technical University of Lisbon.
!----------------------------------------------------------------------------------------------------------


2 changes: 1 addition & 1 deletion Software/MOHIDBase1/ModuleSedimentQuality.F90
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ subroutine ConstructAsciiOutPut
Number = ' '
write(Number, fmt='(i4)')Counter
open(UNIT = Me%Files%AsciiUnit, &
FILE = '..'//backslash//'res'//backslash//'SQ_Situation_'//trim(adjustl(Number))//'.log', &
FILE = '..\res\SQ_Situation_'//trim(adjustl(Number))//'.log', &
STATUS = "REPLACE", &
IOSTAT = STAT_CALL)
if (STAT_CALL == SUCCESS_) then
Expand Down
38 changes: 19 additions & 19 deletions Software/MOHIDBase2/ModuleHorizontalGrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4778,15 +4778,15 @@ end subroutine DefinesBorderPoly

!***********************************************************************
! *
! Esta subroutina calcula 2 vectores e um escalar para a conversão *
! de coordenadas geodésicas em UTM: *
! Esta subroutina calcula 2 vectores e um escalar para a convers�o *
! de coordenadas geod�sicas em UTM: *
! *
! comprimento do fuso: DLZONE(I) *
! do fuso: IZONE1(J) *
! do fuso de origem: IZONE_ORIG *
! n� do fuso: IZONE1(J) *
! n� do fuso de origem: IZONE_ORIG *
! *
! O meridiano de Greenwich está no fuso 31. Considera-se como origem *
! o ínicio do fuso da malha. Cada fuso tem 6 graus e 60 fusos. *
! O meridiano de Greenwich est� no fuso 31. Considera-se como origem *
! o �nicio do 1� fuso da malha. Cada fuso tem 6 graus e h� 60 fusos. *
! *
! *
! AIRES: 30/6/1977 *
Expand Down Expand Up @@ -8127,7 +8127,7 @@ subroutine Add_MPI_ID_2_Filename(HorizontalGridID, FileName, STAT)
iFN = len_trim(Filename)
ipath = 0
do i = iFN, 1, -1
if (Filename(i:i) == '/' .or. Filename(i:i) == backslash) then
if (Filename(i:i) == '/' .or. Filename(i:i) == "\") then
ipath = i
exit
endif
Expand Down Expand Up @@ -8315,7 +8315,7 @@ subroutine GetHorizontalGrid(HorizontalGridID, XX_IE, YY_IE, XX_Z, YY_Z,
real, dimension(: ), pointer, optional :: XX_Z, YY_Z, XX_U, YY_U, XX_V, YY_V, XX_Cross, YY_Cross
real, dimension(:, :), pointer, optional :: DXX, DYY, DZX, DZY
real, dimension(:, :), pointer, optional :: DUX, DUY, DVX, DVY
integer, dimension(:, :), pointer, optional :: IV, JV !João Sobrinho
integer, dimension(:, :), pointer, optional :: IV, JV !Jo�o Sobrinho
real, dimension(: ), pointer, optional :: XX, YY
integer, optional, intent(OUT) :: STAT

Expand Down Expand Up @@ -12742,13 +12742,13 @@ subroutine WriteHorizontalGrid (HorizontalGridID, ObjHDF5, OutputNumber, WorkSiz
STAT = STAT_CALL)
if (STAT_CALL /= SUCCESS_) stop 'WriteHorizontalGrid - HorizontalGrid - ERR04'

call HDF5WriteData (ObjHDF5, "/Grid/Longitude", "Longitude", "º", &
call HDF5WriteData (ObjHDF5, "/Grid/Longitude", "Longitude", "", &
Array2D = Me%LongitudeConn, &
OutputNumber = OutputNumber, &
STAT = STAT_CALL)
if (STAT_CALL /= SUCCESS_) stop 'WriteHorizontalGrid - HorizontalGrid - ERR05'

call HDF5WriteData (ObjHDF5, "/Grid/Latitude", "Latitude", "º", &
call HDF5WriteData (ObjHDF5, "/Grid/Latitude", "Latitude", "", &
Array2D = Me%LatitudeConn, &
OutputNumber = OutputNumber, &
STAT = STAT_CALL)
Expand Down Expand Up @@ -12777,12 +12777,12 @@ subroutine WriteHorizontalGrid (HorizontalGridID, ObjHDF5, OutputNumber, WorkSiz
STAT = STAT_CALL)
if (STAT_CALL /= SUCCESS_) stop 'WriteHorizontalGrid - HorizontalGrid - ERR04'

call HDF5WriteData (ObjHDF5, "/Grid", "Longitude", "º", &
call HDF5WriteData (ObjHDF5, "/Grid", "Longitude", "", &
Array2D = Me%LongitudeConn, &
STAT = STAT_CALL)
if (STAT_CALL /= SUCCESS_) stop 'WriteHorizontalGrid - HorizontalGrid - ERR05'

call HDF5WriteData (ObjHDF5, "/Grid", "Latitude", "º", &
call HDF5WriteData (ObjHDF5, "/Grid", "Latitude", "", &
Array2D = Me%LatitudeConn, &
STAT = STAT_CALL)
if (STAT_CALL /= SUCCESS_) stop 'WriteHorizontalGrid - HorizontalGrid - ERR06'
Expand Down Expand Up @@ -12916,7 +12916,7 @@ subroutine WriteHorizontalGrid (HorizontalGridID, ObjHDF5, OutputNumber, WorkSiz

if (STAT_CALL /= SUCCESS_) then
!linux path
AuxFile = trim(adjustl(Me%DDecomp%ModelPath))//backslash//trim(adjustl(Me%DDecomp%FilesListName))
AuxFile = trim(adjustl(Me%DDecomp%ModelPath))//"\"//trim(adjustl(Me%DDecomp%FilesListName))

open(file = AuxFile, &
unit = Me%DDecomp%FilesListID, &
Expand All @@ -12938,7 +12938,7 @@ subroutine WriteHorizontalGrid (HorizontalGridID, ObjHDF5, OutputNumber, WorkSiz
iFile = 1
ilen = len_trim(FileName)
do i = ilen,1,-1
if (FileName(i:i) == '/' .or. FileName(i:i) == backslash) then
if (FileName(i:i) == '/' .or. FileName(i:i) == "\") then
iFile = i+1
exit
endif
Expand Down Expand Up @@ -13034,7 +13034,7 @@ subroutine WriteHorizontalGrid_UV (HorizontalGridID, ObjHDF5, WorkSize, STAT)
Aux2D(WorkIUB+2 , WorkJLB:WorkJUB+1) = Me%LongitudeConn(WorkIUB+1 , WorkJLB:WorkJUB+1)
Aux2D(WorkILB:WorkIUB+2, WorkJUB+2) = Aux2D (WorkILB:WorkIUB+2, WorkJUB+1)

call HDF5WriteData (ObjHDF5, "/Grid", "Longitude", "º", &
call HDF5WriteData (ObjHDF5, "/Grid", "Longitude", "", &
Array2D = Aux2D, &
STAT = STAT_CALL)
if (STAT_CALL /= SUCCESS_) stop 'WriteHorizontalGrid_UV - HorizontalGrid - ERR40'
Expand All @@ -13043,7 +13043,7 @@ subroutine WriteHorizontalGrid_UV (HorizontalGridID, ObjHDF5, WorkSize, STAT)
Aux2D(WorkIUB+2 , WorkJLB:WorkJUB+1) = Me%LatitudeConn(WorkIUB+1 , WorkJLB:WorkJUB+1)
Aux2D(WorkILB:WorkIUB+2, WorkJUB+2) = Aux2D (WorkILB:WorkIUB+2, WorkJUB+1)

call HDF5WriteData (ObjHDF5, "/Grid", "Latitude", "º", &
call HDF5WriteData (ObjHDF5, "/Grid", "Latitude", "", &
Array2D = Aux2D, &
STAT = STAT_CALL)
if (STAT_CALL /= SUCCESS_) stop 'WriteHorizontalGrid_UV - HorizontalGrid - ERR50'
Expand Down Expand Up @@ -13140,7 +13140,7 @@ subroutine WriteHorizontalGrid_UV (HorizontalGridID, ObjHDF5, WorkSize, STAT)

if (STAT_CALL /= SUCCESS_) then
!linux path
AuxFile = trim(adjustl(Me%DDecomp%ModelPath))//backslash//trim(adjustl(Me%DDecomp%FilesListName))
AuxFile = trim(adjustl(Me%DDecomp%ModelPath))//"\"//trim(adjustl(Me%DDecomp%FilesListName))

open(file = AuxFile, &
unit = Me%DDecomp%FilesListID, &
Expand All @@ -13162,7 +13162,7 @@ subroutine WriteHorizontalGrid_UV (HorizontalGridID, ObjHDF5, WorkSize, STAT)
iFile = 1
ilen = len_trim(FileName)
do i = ilen,1,-1
if (FileName(i:i) == '/' .or. FileName(i:i) == backslash) then
if (FileName(i:i) == '/' .or. FileName(i:i) == "\") then
iFile = i+1
exit
endif
Expand Down Expand Up @@ -17565,7 +17565,7 @@ end module ModuleHorizontalGrid

!----------------------------------------------------------------------------------------------------------
!MOHID Water Modelling System.
!Copyright (C) 1985, 1998, 2002, 2005. Instituto Superior Técnico, Technical University of Lisbon.
!Copyright (C) 1985, 1998, 2002, 2005. Instituto Superior T�cnico, Technical University of Lisbon.
!----------------------------------------------------------------------------------------------------------


2 changes: 1 addition & 1 deletion Software/MOHIDLand/ModulePorousMedia.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2262,7 +2262,7 @@ subroutine ConstructAsciiOutPut
Number = ' '
write(Number, fmt='(i4)')Counter
open(UNIT = Me%Files%AsciiUnit, &
! FILE = '..'//backslash//'res'//backslash//'iter.soi_'//trim(adjustl(Number))//'.log', &
! FILE = '..\res\iter.soi_'//trim(adjustl(Number))//'.log', &
FILE = Me%Files%ASCFile, &
STATUS = "REPLACE", &
IOSTAT = STAT_CALL)
Expand Down
8 changes: 4 additions & 4 deletions Software/MOHIDLand/ModuleRunoffProperties.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3533,7 +3533,7 @@ subroutine ConstructAsciiFile
Number = ' '
write(Number, fmt='(i4)')Counter
open(UNIT = Me%Files%AsciiUnit, &
FILE = '..'//backslash//'res'//backslash//'RP_ADCoefs_'//trim(adjustl(Number))//'.log', &
FILE = '..\res\RP_ADCoefs_'//trim(adjustl(Number))//'.log', &
STATUS = "REPLACE", &
IOSTAT = STAT_CALL)
if (STAT_CALL == SUCCESS_) then
Expand Down Expand Up @@ -4487,7 +4487,7 @@ subroutine SetBasinConcRP (RunoffPropertiesID, BasinConcentration, & !BasinMas
if (STAT_ /= SUCCESS_) stop 'SetBasinConcRP - ModuleRunoffProperties - ERR020'

else
write(*,*) 'Looking for Runoff Property in Runoff Property ?', GetPropertyName(PropertyXIDNumber)
write(*,*) 'Looking for Runoff Property in Runoff Property ???', GetPropertyName(PropertyXIDNumber)
write(*,*) 'but not found. Link between WQ in modules can not be done.'
stop 'SetBasinConcRP - ModuleDrainageNetwork - ERR010'
end if
Expand Down Expand Up @@ -7535,7 +7535,7 @@ end subroutine ModifyPropertyValues
! !!BOUNDARY FLUXES IN RUNOFF (NOT YET DONE)
!
! !!FLUXES IN X AND Y DIRECTION
! if (Me%ComputeOptions%AdvDiff_SpatialMethod==AdvDif_CentralDif_) then ! diferen�as centrais
! if (Me%ComputeOptions%AdvDiff_SpatialMethod==AdvDif_CentralDif_) then ! diferen�as centrais
!
!
! AdvTermA_U = (aux * FluxU(i,j ) / 2.)
Expand Down Expand Up @@ -10228,4 +10228,4 @@ subroutine ReadUnLockExternalVar
end module ModuleRunoffProperties

!MOHID Water Modelling System.
!Copyright (C) 1985, 1998, 2002, 2006. MARETEC, Instituto Superior T�cnico, Technical University of Lisbon.
!Copyright (C) 1985, 1998, 2002, 2006. MARETEC, Instituto Superior T�cnico, Technical University of Lisbon.
4 changes: 0 additions & 4 deletions Software/MOHIDWater/GOTMVariables_in.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
!<@cond GOTMvars

!------------------------------------------------------------------------------
!
!This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -131,5 +129,3 @@
!----------------------------------------------------------------------------------------------------------
!Copyright (C) 2000 - GOTM code.
!----------------------------------------------------------------------------------------------------------

!<@endcond
4 changes: 2 additions & 2 deletions Software/MOHIDWater/Main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ character(len=PathLength) function ModelName (ModelPath)
LenName = LenName-4
ModelName = ModelName(1:LenName)
do i = LenName, 1, -1
if (ModelName(i:i) ==backslash .or. ModelName(i:i) =='/') then
if (ModelName(i:i) =='\' .or. ModelName(i:i) =='/') then
ModelName = ModelName(i+1:LenName)
exit
endif
Expand Down Expand Up @@ -2402,6 +2402,6 @@ end program MohidWater

!----------------------------------------------------------------------------------------------------------
!MOHID Water Modelling System.
!Copyright (C) 1985, 1998, 2002, 2005. Instituto Superior T�cnico, Technical University of Lisbon.
!Copyright (C) 1985, 1998, 2002, 2005. Instituto Superior Técnico, Technical University of Lisbon.
!----------------------------------------------------------------------------------------------------------

1 change: 1 addition & 0 deletions Software/MOHIDWater/ModuleGOTM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ module ModuleGOTM
! Original author(s): GOTM code
!
! $Log$
!\
! !BUGS
!
!EOP
Expand Down
8 changes: 4 additions & 4 deletions Software/MOHIDWater/ModuleSequentialAssimilation.F90
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Module ModuleSequentialAssimilation
real(8), dimension(:, :, :), pointer :: VolumeZ => null() !initialization: Carina
real(8), dimension(:, :, :), pointer :: VolumeU => null() !initialization: Carina
real(8), dimension(:, :, :), pointer :: VolumeV => null() !initialization: Carina
!real(8), dimension(:, :, :), pointer :: VolumeV => null() !initialization: Carina
real(8), dimension(:, :, :), pointer :: VolumeV => null() !initialization: Carina
end type T_FullState

private :: T_Files
Expand Down Expand Up @@ -5039,9 +5039,9 @@ subroutine SEEKAnalysis
deallocate (Aux3)
deallocate (Aux4)

!Reference: Hoteit, Ibrahim, 2001, Filtres de Kalman R�duits Efficaces pour
! l'Assimilation de Donn�es en Oceanographie, Th�se de Docteur en
! Math�matiques Appliqu�es de l'Universit� de Joseph Fourrier
!Reference: Hoteit, Ibrahim, 2001, Filtres de Kalman Réduits Efficaces pour
! l'Assimilation de Données en Oceanographie, Thèse de Docteur en
! Mathématiques Appliquées de l'Université de Joseph Fourrier

end subroutine SEEKAnalysis

Expand Down
Loading

0 comments on commit fc01252

Please sign in to comment.