Commit 8fa4dd74 authored by TROUSSELLIER Laurent's avatar TROUSSELLIER Laurent
Browse files

mainchange : 1 catalog1 worker

parent a7b6caa8
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 24 09:29:29 2022
@author: ltroussellier
"""
import os
class temp():
CMIP6PathsPath = "/bdd/CMIP6/C4MIP/MOHC/.paths.txt"
CMIP6PathOutput = "FakePath.txt"
if os.path.exists(CMIP6PathOutput):
os.remove(CMIP6PathOutput)
i=0
with open(CMIP6PathsPath) as fi:
for path in fi:
i=i+1
if i>20000:
break
with open(CMIP6PathOutput,"a+") as fr:
fr.write(path)
def createFilePaths():
CMIP6PathsPath = "/bdd/CMIP6/C4MIP/MOHC/.paths.txt"
i=0
crtexp="lig127k"
crtlistpath=[]
nbfile = 1
with open(CMIP6PathsPath) as fi:
for path in fi:
i=i+1
if i>200000:
break
#print(path)
exp=path.split("/")[4]
#print(exp)
if crtexp!=exp:
#print(crtlistpath)
with open("InputFakeFile/fPath"+str(nbfile)+".txt","w") as fo:
for ele in crtlistpath:
fo.write(ele)
nbfile=nbfile+1
crtexp=exp
crtlistpath=[path]
else:
crtlistpath.append(path)
#print(crtexp)
createFilePaths()
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment