File indexing completed on 2025-09-13 12:07:55 UTC
view on githubraw file Latest commit 13ce79fe on 2025-08-04 21:05:34 UTC
1ff0163ead Gael*0001 #include "PROFILES_OPTIONS.h"
0002
13ce79fe94 Ivan*0003
1ff0163ead Gael*0004
13ce79fe94 Ivan*0005
0006
0007
1ff0163ead Gael*0008 SUBROUTINE PROFILES_INI_IO( myThid )
0009
13ce79fe94 Ivan*0010
0011
1ff0163ead Gael*0012
13ce79fe94 Ivan*0013
1ff0163ead Gael*0014 IMPLICIT NONE
13ce79fe94 Ivan*0015
1ff0163ead Gael*0016 #include "SIZE.h"
0017 #include "EEPARAMS.h"
0018 #include "EESUPPORT.h"
0019 #include "PARAMS.h"
6328b73337 Gael*0020 #include "PROFILES_SIZE.h"
1ff0163ead Gael*0021 #include "profiles.h"
0022
0023
13ce79fe94 Ivan*0024
1ff0163ead Gael*0025 INTEGER myThid
13ce79fe94 Ivan*0026
1ff0163ead Gael*0027
13ce79fe94 Ivan*0028
1ff0163ead Gael*0029 INTEGER ILNBLNK
0030 EXTERNAL ILNBLNK
0031
0032
cbf501ab81 Jean*0033 #ifndef HAVE_SYSTEM
b00d6c1700 Gael*0034 CHARACTER*(MAX_LEN_MBUF) msgBuf
cbf501ab81 Jean*0035 #endif
1ff0163ead Gael*0036 CHARACTER*(MAX_LEN_FNAM) namBuf
0037 INTEGER iL, pIL
0038
b00d6c1700 Gael*0039 _BEGIN_MASTER( myThid )
0040
13ce79fe94 Ivan*0041 IF (profilesDir .NE. ' ') THEN
0042 iL = ILNBLNK( profilesDir )
0043
0044 IF (iL.LT.MAX_LEN_FNAM .AND. profilesDir(iL:iL).NE.'/') THEN
0045 namBuf(1:iL) = profilesDir(1:iL)
0046 WRITE(profilesDir(1:iL+1),'(2A)') namBuf(1:iL),'/'
0047 ENDIF
70dd91cc56 Gael*0048 #ifdef HAVE_SYSTEM
13ce79fe94 Ivan*0049
0050 iL = ILNBLNK( profilesDir ) -1
0051 WRITE(namBuf,'(2A)') ' mkdir -p ', profilesDir(1:iL)
0052 pIL = 1 + ILNBLNK( namBuf )
0053 WRITE(standardMessageUnit,'(3A)')
0054 & '==> SYSTEM CALL (from PROFILES_INI_IO): >',namBuf(1:pIL),'<'
0055 CALL SYSTEM( namBuf(1:pIL) )
70dd91cc56 Gael*0056 #else
13ce79fe94 Ivan*0057 WRITE(msgBuf,'(2A)') '** WARNING ** PROFILES_INI_IO: cannot ',
0058 & 'call mkdir -> please create profilesDir manually'
0059 CALL PRINT_MESSAGE( msgBuf,
0060 & errorMessageUnit, SQUEEZE_RIGHT, myThid )
70dd91cc56 Gael*0061 #endif
1ff0163ead Gael*0062 ENDIF
0063
b00d6c1700 Gael*0064 _END_MASTER( myThid )
0065
1ff0163ead Gael*0066 RETURN
0067 END