""" import os from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs,cdef from climaf.site_settings import atCNRM, onCiclad, atCEDA p=cproject("CMIP5" ,"model","experiment", ("frequency","monthly"), ("table","*"),("realm","*"),("version","last"), ensemble=["model","simulation"]) cdef("simulation","r1i1p1",project="CMIP5") # Frequency alias cfreqs('CMIP5', {'monthly':'mon' , 'daily':'day' }) urls_CMIP5=None if atCNRM : # Declare the directory for CNRM-CM CMIP5 data on CNRM's Lustre file system. urls_CMIP5=["/cnrm/cmip/cnrm/ESG"] if onCiclad : # Declare a list of root directories for CMIP5 data on IPLS's Ciclad file system urls_CMIP5=["/prodigfs/project/"] if atCEDA: urls_CMIP5=["/badc/cmip5/data"] if urls_CMIP5 : # Next command will lead to explore all directories in 'url' # for searching data for a CliMAF dataset (by function ds) except if
cdef('frequency', 'monthly', project='IGCM_OUT') cdef('experiment', '*', project='IGCM_OUT') cdef('OUT', 'Analyse', project='IGCM_OUT') # --> Output, Analyse cdef('DIR', '*', project='IGCM_OUT') # --> ATM, OCE, SRF... cdef('login', '*', project='IGCM_OUT') cdef('period', 'fx', project='IGCM_OUT') # cdef('file_syntax', '${simulation}_${start_year}MMDD_${end_year}MMDD_${frequency}_${variable}.nc', # project='IGCM_OUT') # cdef('file_separator' , '_', project='IGCM_OUT') # cdef('period_separator' , '_', project='IGCM_OUT') # Frequency alias cfreqs( 'IGCM_OUT', { 'monthly': '1M', 'daily': '1D', 'seasonal': 'SE', 'annual_cycle': 'SE', 'yearly': '1Y' }) if onCiclad: urls_IGCM_OUT = [ "${root}/${login}/${model}/${status}/${experiment}/${simulation}/${DIR}/${OUT}/${ave_length}/" "${simulation}_${PERIOD}_${frequency}_${variable}.nc", "${root}/${login}/${model}/${status}/${experiment}/${simulation}/${DIR}/${OUT}/" "${frequency}${clim_period_length}/${simulation}_${frequency}_${clim_period}_1M_${variable}.nc", ] if atTGCC: urls_IGCM_OUT = [ "${root}/${login}/IGCM_OUT/${model}/${status}/${experiment}/${simulation}/${DIR}/${OUT}/${ave_length}/" "${simulation}_${PERIOD}_${frequency}_${variable}.nc",
""" This module declares project example and its data location for the standard CliMAF distro Only one additionnal attribute : frequency (but data sample actually includes only frequency= 'monthly') Example of an 'example' dataset definition :: >>> dg=ds(project='example', simulation='AMIPV6ALB2G', variable='tas', period='1980-1981', frequency='monthly') """ import os from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs from climaf import __path__ as cpath cpath=os.path.abspath(cpath[0]) cproject("example" , ("frequency","monthly") ) cfreqs('example',{'monthly':'mon' }) data_pattern_L=cpath+"/../examples/data/${simulation}/L/${simulation}SFXYYYY.nc" data_pattern_A=cpath+"/../examples/data/${simulation}/A/${simulation}PLYYYY.nc" dataloc(project="example",organization="generic",url=[data_pattern_A,data_pattern_L])
>>> cdef('model','IPSL-CM4') >>> cdef('frequency','monthly') >>> cactl=ds(project='OCMIP5_Ciclad', simulation='CTL', variable='CACO3', period='1860-1861') """ import os from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs from climaf.site_settings import onCiclad if onCiclad: cproject("OCMIP5", "model", "simulation", ("frequency", "monthly"), ensemble=["model"]) # # Declare which facets can be used for defining an ensemble # dataloc( project="OCMIP5", organization="generic", url=[ '/prodigfs/project/OCMIP5/OUTPUT/*/${model}/${simulation}/${frequency}/' '${variable}/${variable}_*_${model}_${simulation}_${PERIOD}.nc' ]) # cfreqs('OCMIP5', {'monthly': 'mon'})
'root', 'model', 'realm', 'experiment', 'realization', 'frequency', ensemble=['model', 'realization'], separator='%') ## -- Define the pattern for CMIP3 data pattern1 = '${root}/${experiment}/${realm}/${frequency}/${variable}/${model}/${realization}/' pattern1 += '${variable}_*.nc' ## -- call the dataloc CliMAF function dataloc(project='CMIP3', organization='generic', url=pattern1) # -- Make the alias and default values for both projects for project in ['CMIP3']: #calias(project, 'tos', offset=273.15) cdef('root', root, project=project) cdef('realm', '*', project=project) cdef('realization', '*', project=project) cdef('experiment', 'sresa1b', project=project) cdef('frequency', 'mo', project=project) cdef('period', '*', project=project) cfreqs(project, { 'monthly': 'mo', })
""" This module declares locations for searching data for project OBS4MIP at CNRM (VDR), for all frequencies; see file:///cnrm/amacs/DATA/Obs4MIPs/doc/ Additional attribute for OBS4MIPS datasets : 'frequency' Example for an OBS4MIPS CMIP5 dataset declaration :: >>> pr_obs=ds(project='OBS4MIPS', variable='pr', simulation='GPCP-SG', frequency='monthly', period='1979-1980') """ import os.path if os.path.exists('/cnrm'): from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs cproject("OBS4MIPS", "experiment", ("frequency", "monthly")) # Frequency alias cfreqs('OBS4MIPS', {'monthly': 'monthly_mean'}) # pattern = "/cnrm/amacs/DATA/Obs4MIPs/netcdf/${frequency}/${variable}_${simulation}_*_YYYYMM-YYYYMM.nc" dataloc(project="OBS4MIPS", organization="generic", url=[pattern])
""" This module declares project example and its data location for the standard CliMAF distro Only one additionnal attribute : frequency (but data sample actually includes only frequency= 'monthly') Example of an 'example' dataset definition :: >>> dg=ds(project='example', simulation='AMIPV6ALB2G', variable='tas', period='1980-1981', frequency='monthly') """ import os from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs from climaf import __path__ as cpath cpath = os.path.abspath(cpath[0]) cproject("example", ("frequency", "monthly"), separator='|') cfreqs('example', {'monthly': 'mon'}) data_pattern_L = cpath + "/../examples/data/${simulation}/L/${simulation}SFXYYYY.nc" data_pattern_A = cpath + "/../examples/data/${simulation}/A/${simulation}PLYYYY.nc" data_pattern_histmth = cpath + "/../examples/data/${simulation}_SE_1982_1991_1M_ua_pres.nc" dataloc(project="example", organization="generic", url=[data_pattern_A, data_pattern_L, data_pattern_histmth]) # calias("example",'tas','tas_${frequency}')
configuration files Simulation names (or 'EXPIDs') are assumed to be unique in the namespace defined by the user's configuration file, which may include shared simulation Example for defining an EM dataset:: >>> tas=ds(project='EM', simulation='GSAGNS1', variable='tas', period='1975', frequency='monthly', realm='L') A number of Seaice fields are duly described with 1.e+20 as missing value (which is ill described in data files); see code for details """ from climaf.site_settings import atCNRM if atCNRM : from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs cproject('EM' , ('frequency','monthly'), ('realm','*') ) cfreqs('EM',{'monthly':'mon' , 'daily':'day1' }) dataloc(project='EM', organization='EM', url=['dummy']) # Ideally, one should be able to write : #cmissing('EM',1.e+20, realm='I') calias('EM',[ 'sic', 'sit', 'sim', 'snd', 'ialb', 'tsice', 'mpalb', 'snomlet', 'tmelt', 'bmelt', 'snc','sic1','sic2', 'sic3', 'sic4', 'ssi', 'ageice'], missing=1.e+20)
dataloc(project="emn36", organization="generic", url=[pathI, pathO]) # Shared simulations pathg = "/cnrm/cmip/cnrm/simulations/${group}/" pathgI = pathg + "O/Origin/Monthly/${simulation}/${simulation}_1${frequency}_YYYYMMDD_YYYYMMDD_icemod.nc" pathgO = pathg + "O/Origin/Monthly/${simulation}/${simulation}_1${frequency}_YYYYMMDD_YYYYMMDD_grid_${variable}.nc" dataloc(project="emn36", organization="generic", url=[pathgI, pathgO]) # Define default values ############################################ # You do not need to use a GROUPs experiment cdef("group", "", project="emn36") cdef("frequency", "monthly", project="emn36") cfreqs("emn36", {"daily": "d", "monthly": "m"}) # More details about data organization ############################################ # Describe how to locate some ocean variables in multi-variable data files calias("emn36", 'e-p', filenameVar='S') calias("emn36", 'fcalva', filenameVar='S') calias("emn36", 'fcalvg', filenameVar='S') calias("emn36", 'friver', filenameVar='S') calias("emn36", 'flake', filenameVar='S') calias("emn36", 'omlmax', filenameVar='S') calias("emn36", 'so', filenameVar='S') calias("emn36", 'sos', filenameVar='S') calias("emn36", 'wfo', filenameVar='S')
cdef('experiment', 'historical', project=project) cdef('version', '*', project=project) cdef('frequency', '*', project=project) cdef('extent_experiment', 'rcp85', project='CMIP5_extent') # -- Declare a CMIP5-Adjust CliMAF project: bias corrected CMIP5 simulations # ------------------------------------ > pattern = '${root}/CMIP5-Adjust/bias-adjusted-output/*/${model}/${experiment}/${frequency}/${realm}/${table}/' \ '${realization}/${gr}/${bias_correction}/${version}/${variable}/' \ '${variable}_${table}_${model}_${experiment}_${realization}_${gr}_${bias_correction}_${PERIOD}.nc' cproject('CMIP5-Adjust', 'root', 'model', 'experiment', 'bias_correction', 'frequency', 'table', 'gr', 'realm', 'realization', 'experiment', 'version', ensemble=['model', 'realization'], separator='%') dataloc(project='CMIP5-Adjust', url=pattern) for var in ['tas', 'tasmax', 'tasmin', 'pr', 'rsds', 'sfcWind']: calias('CMIP5-Adjust', var, var + 'Adjust') cdef('root', '/prodigfs/project' , project='CMIP5-Adjust') # cdef('institute' , '*' , project='CMIP5-Adjust') cdef('table', '*', project='CMIP5-Adjust') # impossible, because of ambiguities cdef('realm', '*', project='CMIP5-Adjust') # impossible, because of ambiguities cdef('realization', 'r1i1p1', project='CMIP5-Adjust') cdef('experiment', 'rcp85', project='CMIP5-Adjust') cdef('version', 'latest', project='CMIP5-Adjust') cdef('gr', '*', project='CMIP5-Adjust') cdef('bias_correction', '*', project='CMIP5-Adjust') cdef('frequency', '*', project='CMIP5-Adjust') for project in ['CMIP5', 'CMIP5_extent', 'CMIP5-Adjust']: cfreqs(project, {'daily': 'day', 'monthly': 'mon', 'yearly': 'yr'})
cdef('root', root, project='IGCM_OUT') cdef('clim_period', '????_????', project='IGCM_OUT') cdef('model', '*', project='IGCM_OUT') cdef('simulation', '*', project='IGCM_OUT') cdef('variable', '*', project='IGCM_OUT') cdef('frequency', 'monthly', project='IGCM_OUT') cdef('experiment', '*', project='IGCM_OUT') cdef('OUT', '*', project='IGCM_OUT') cdef('DIR', '*', project='IGCM_OUT') cdef('login', '*', project='IGCM_OUT') cdef('period', '0001-3000', project='IGCM_OUT') # Frequency alias cfreqs('IGCM_OUT', {'monthly':'1M' , 'daily':'1D' , 'seasonal':'SE', 'annual_cycle':'SE'}) urls_IGCM_OUT=[ "/${root}/${login}/IGCM_OUT/${model}/*/${experiment}/${simulation}/${DIR}/${OUT}/*/${simulation}_YYYYMMDD_YYYYMMDD_${frequency}_${variable}.nc", "/${root}/${login}/IGCM_OUT/${model}/*/${experiment}/${simulation}/${DIR}/${OUT}/${frequency}/${simulation}_${frequency}_${clim_period}_1M_${variable}.nc" ] # Next command will lead to explore all directories in 'urls_IGCM_OUT' # for searching data for a CliMAF dataset (by function ds) except if # a more specific dataloc entry matches the arguments to 'ds' dataloc(project="IGCM_OUT", organization="generic", url=urls_IGCM_OUT) # OCE calias("IGCM_OUT", 'tos' ,'tos' ,filenameVar='grid_T') calias("IGCM_OUT", 'sos' ,'sos' ,filenameVar='grid_T')
Use attributes 'model' and 'frequency' Example of a path : /prodigfs/OCMIP5/OUTPUT/IPSL/IPSL-CM4/CTL/mon/CACO3/CACO3_IPSL_IPSL-CM4_CTL_1860-1869.nc Example :: >>> cdef('model','IPSL-CM4') >>> cdef('frequency','monthly') >>> cactl=ds(project='OCMIP5_Ciclad', experiment='CTL', variable='CACO3', period='1860-1861') """ import os from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs from climaf.site_settings import onCiclad if onCiclad : cproject("OCMIP5","model","simulation",("frequency","monthly"),ensemble=["model"]) # # Declare which facets can be used for defining an ensemble # dataloc(project="OCMIP5", organization="generic", url=['/prodigfs/OCMIP5/OUTPUT/*/${model}/${simulation}/${frequency}/' '${variable}/${variable}_*_${model}_${simulation}_YYYY-YYYY.nc']) # cfreqs('OCMIP5',{'monthly':'mon' })
""" This module declares PCMDI reference products on ciclad data organization and specifics, as managed by J. Servonnat at IPSL; """ from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs, cdef from climaf.site_settings import onCiclad cfreqs('ref_pcmdi', {'monthly':'mo' , 'daily':'day' , 'seasonal':'mo', 'annual_cycle':'mo'}) if onCiclad: cproject('ref_pcmdi', ('frequency','annual_cycle'), 'product', 'clim_period') cdef('variable', '*', project='ref_pcmdi') cdef('product', '*', project='ref_pcmdi') cdef('clim_period', '*', project='ref_pcmdi') cdef('period', '1950-2015', project='ref_pcmdi') root="/data/jservon/Evaluation/ReferenceDatasets/PCMDI-MP/obs/*/${frequency}/${variable}/${product}/ac/" pattern2=root+"${variable}_*mon_${product}_${clim_period}-clim.nc" dataloc(project='ref_pcmdi', organization='generic', url=pattern2)
""" This module declares the project E-OBS : This archive is available on Ciclad (IPSL) The specific attributes are: - grid : '*' """ from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs, cdef from climaf.site_settings import onCiclad, atTGCC, atIDRIS, atCerfacs, atCNRM if onCiclad: # -- Create E-OBS CliMAF project EOBS_pattern = '/bdd/E-OBS/Grid_${grid}/${variable}_${grid}_${PERIOD}_v15.0.nc4' cproject('E-OBS', 'grid', 'frequency', separator='%') dataloc(project='E-OBS', organization='generic', url=EOBS_pattern) # -- Make a cdef('frequency', 'daily', project='E-OBS') cdef('grid', '*deg_*', project='E-OBS') cdef('period', '*', project='E-OBS') cdef('variable', '*', project='E-OBS') cfreqs('E-OBS', {'daily': 'day'}) calias('E-OBS', 'tasmin', 'tn') calias('E-OBS', 'tasmax', 'tx')
""" import os from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs,cdef from climaf.site_settings import atCNRM, onCiclad p=cproject("CMIP5" ,"model","experiment", ("frequency","monthly"), ("table","*"),("realm","*"),("version","last"), ensemble=["model","simulation"]) cdef("simulation","r1i1p1",project="CMIP5") # Frequency alias cfreqs('CMIP5', {'monthly':'mon' , 'daily':'day' }) urls_CMIP5=None if atCNRM : # Declare a list of root directories for CNRM-CM CMIP5 data on CNRM's Lustre file system. urls_CMIP5=["/cnrm/aster/data2/ESG/data1", "/cnrm/aster/data2/ESG/data2", "/cnrm/aster/data2/ESG/data5", "/cnrm/aster/data4/ESG/data6", "/cnrm/aster/data4/ESG/data7", "/cnrm/aster/data4/ESG/data8", "/cnrm/aster/data2/ESG/vdr"] if onCiclad : # Declare a list of root directories for CMIP5 data on IPLS's Ciclad file system urls_CMIP5=["/prodigfs/esg","/prodigfs/project/"] if urls_CMIP5 : # Next command will lead to explore all directories in 'url'
'root', 'login', 'IPSL_MODEL', 'status', 'experiment', 'realm', 'frequency', 'table', 'model', 'realization', 'grid', ensemble=['model', 'simulation', 'realization'], separator='%') # --> systematic arguments = simulation, frequency, variable # -- Set the aliases for the frequency cfreqs('IGCM_CMIP6', {'monthly': 'mon', 'yearly': 'yr', 'daily': 'day'}) crealms('IGCM_CMIP6', { 'atmos': 'ATM', 'ocean': 'OCE', 'land': 'SRF', 'seaice': 'ICE' }) # -- Set default values cdef('IPSL_MODEL', 'IPSLCM6', project='IGCM_CMIP6') cdef('realization', 'r1i1p1f1', project='IGCM_CMIP6') cdef('status', '*', project='IGCM_CMIP6') cdef('experiment', 'historical', project='IGCM_CMIP6') cdef('realm', '*', project='IGCM_CMIP6') cdef('table', '_', project='IGCM_CMIP6') cdef('frequency', 'monthly', project='IGCM_CMIP6') cdef('grid', 'gr', project='IGCM_CMIP6')
root = "/data/jservon/Evaluation/ReferenceDatasets/" if atTGCC: root = "/ccc/work/cont003/igcmg/igcmg/IGCM/ReferenceDatasets/" if atIDRIS: root = "/workgpfs/rech/psl/rpsl035/IGCM/ReferenceDatasets/" if atCerfacs: root = "/data/scratch/globc/dcom/globc_obs/OBS4MIPS_ANA4MIPS_CMOR/Tier1/ERA5/" if atCNRM: root = "/cnrm/est/COMMON/climaf/reference_datasets_from_IPSL/" cproject('ref_era5cerfacs', ('frequency', 'monthly'), 'product', ('period', '1979-2018'), 'obs_type', 'table', separator='%') cfreqs('ref_era5cerfacs', {'monthly': 'mon', 'daily': 'day'}) cdef('variable', '*', project='ref_era5cerfacs') cdef('product', 'ERA5', project='ref_era5cerfacs') cdef('period', '1979-2018', project='ref_era5cerfacs') cdef('obs_type', 'reanalysis', project='ref_era5cerfacs') cdef('table', '*', project='ref_era5cerfacs') # Obs de MOC RAPID (Il a fallu bricoler les donnees d'origine pour la dimension time au debut et unlim) # dataloc(project="ref_climatos",organization="generic", # url='/home/esanchez/data_climaf/${variable}_vertical_unlim.nc') calias(project='ref_era5cerfacs', variable='moc', fileVariable='stream_function_mar', filenameVar='moc')
""" This module declares reference products on ipsl data organization and specifics, as managed by J. Servonnat at IPSL; Attributes are : ... Example of an 'ref_ipsl' project dataset declaration :: >>> cdef('project','ref_ipsl') >>> d=ds(variable='tas',period='198001'....) >>> d2=ds(variable='tas',period='198001', frequency='daily', ....) """ from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs from climaf.site_settings import onCiclad cfreqs('ref_ipsl', {'monthly':'mo' , 'daily':'day' }) if onCiclad: cproject('ref_ipsl', ('frequency','monthly'), ('product','*'), ('period','1900-2050')) root="/data/jservon/Evaluation/ReferenceDatasets/*/${frequency}/${variable}/" pattern1=root+"${variable}_*mon_${product}*_YYYYMM-YYYYMM.nc" dataloc(project='ref_ipsl', organization='generic', url=[pattern1])
from climaf.classes import cproject, calias, cfreqs, cdef p = cproject( "CMIP5", "model", "experiment", ("frequency", "monthly"), ("table", "*"), ("realm", "*"), ("version", "last"), ensemble=["model", "simulation"], ) cdef("simulation", "r1i1p1", project="CMIP5") # Frequency alias cfreqs("CMIP5", {"monthly": "mon", "daily": "day"}) urls_CMIP5 = None if os.path.exists("/cnrm"): # Declare a list of root directories for CNRM-CM CMIP5 data on CNRM's Lustre file system. urls_CMIP5 = [ "/cnrm/aster/data2/ESG/data1", "/cnrm/aster/data2/ESG/data2", "/cnrm/aster/data2/ESG/data5", "/cnrm/aster/data4/ESG/data6", "/cnrm/aster/data4/ESG/data7", "/cnrm/aster/data4/ESG/data8", "/cnrm/aster/data2/ESG/vdr", ] else:
root = "/ccc/work/cont003/igcmg/igcmg/IGCM/ReferenceDatasets/" if atIDRIS: root = "/workgpfs/rech/psl/rpsl035/IGCM/ReferenceDatasets/" if atCerfacs: root = "/data8/datamg/Ciclad/ReferenceDatasets/" if atCNRM: root = "/cnrm/est/COMMON/climaf/reference_datasets_from_IPSL/" cproject('ref_climatos', ('frequency', 'annual_cycle'), 'product', 'clim_period', ensemble=['product'], separator='%') cfreqs('ref_climatos', { 'monthly': 'mo', 'daily': 'day', 'seasonal': 'mo', 'annual_cycle': 'mo' }) cdef('variable', '*', project='ref_climatos') cdef('product', '*', project='ref_climatos') cdef('clim_period', '*', project='ref_climatos') cdef('simulation', 'refproduct', project='ref_climatos') cdef('period', 'fx', project='ref_climatos') if (root): pattern2 = root + "climatos/*/${frequency}/${variable}/${product}/ac/${variable}_*mon_${product}_${clim_period}-clim.nc" dataloc(project='ref_climatos', organization='generic', url=pattern2) ##########################################################################################
cdef('experiment', 'historical', project='CORDEX_extent') cdef('model_version', '*', project='CORDEX_extent') # -- CORDEX Adjust pattern = '${root}/CORDEX-Adjust/bias-adjusted-output/${CORDEX_domain}/${institute}/${driving_model}/' \ '${experiment}/${realization}/${model}/${bias_correction}/${frequency}/${variable}/${version}/' \ '${variable}_${CORDEX_domain}_${driving_model}_${experiment}_${realization}_${model}_' \ '${bias_correction}_${frequency}_${PERIOD}.nc' cproject('CORDEX-Adjust', 'root', 'model', 'CORDEX_domain', 'bias_correction', 'frequency', 'driving_model', 'realization', 'experiment', 'version', 'institute', ensemble=['model', 'driving_model', 'realization'], separator='%') dataloc(project='CORDEX-Adjust', url=pattern) cdef('bias_correction', '*', project='CORDEX-Adjust') cdef('experiment', 'rcp85', project='CORDEX-Adjust') for project in ['CORDEX', 'CORDEX_extent', 'CORDEX-Adjust']: cfreqs(project, {'daily': 'day'}) cdef('version', 'latest', project=project) cdef('root', root, project=project) cdef('institute', '*', project=project) cdef('realization', 'r1i1p1', project=project) cdef('frequency', '*', project=project) cdef('driving_model', '*', project=project) cdef('CORDEX_domain', '*', project=project) cdef('model', '*', project=project) # -- Overwrite root only for CORDEX-Adjust cdef('root', '/prodigfs/project', project='CORDEX-Adjust') for var in ['tas', 'tasmax', 'tasmin', 'pr', 'rsds', 'sfcWind']: calias('CORDEX-Adjust', var, var + 'Adjust')
project='IGCM_OUT_old') # --> Takes the following values: MO, DA... cdef('model', '*', project='IGCM_OUT_old') cdef('status', '*', project='IGCM_OUT_old') # --> PROD, DEVT, TEST cdef('simulation', '*', project='IGCM_OUT_old') cdef('variable', '*', project='IGCM_OUT_old') cdef('frequency', 'monthly', project='IGCM_OUT_old') cdef('experiment', '*', project='IGCM_OUT_old') cdef('OUT', 'Analyse', project='IGCM_OUT_old') # --> Output, Analyse cdef('DIR', '*', project='IGCM_OUT_old') # --> ATM, OCE, SRF... cdef('login', '*', project='IGCM_OUT_old') cdef('period', 'fx', project='IGCM_OUT_old') # Frequency alias cfreqs('IGCM_OUT_old', { 'monthly': '1M', 'daily': '1D', 'seasonal': 'SE', 'annual_cycle': 'SE' }) urls_IGCM_OUT_old = [ "${root}/${login}/IGCM_OUT/${model}/${status}/${experiment}/${simulation}/${DIR}/${OUT}/${ave_length}/${simulation}_YYYYMMDD_YYYYMMDD_${frequency}_${variable}.nc", "${root}/${login}/IGCM_OUT/${model}/${status}/${experiment}/${simulation}/${DIR}/${OUT}/${frequency}${clim_period_length}/${simulation}_${frequency}_${clim_period}_1M_${variable}.nc" ] # Next command will lead to explore all directories in 'urls_IGCM_OUT_old' # for searching data for a CliMAF dataset (by function ds) except if # a more specific dataloc entry matches the arguments to 'ds' dataloc(project="IGCM_OUT_old", organization="generic", url=urls_IGCM_OUT_old)
""" This module declares locations for searching data for project OBS4MIP at CNRM (VDR), for all frequencies; see file:///cnrm/vdr/DATA/Obs4MIPs/doc/ Additional attribute for OBS4MIPS datasets : 'frequency' Example for an OBS4MIPS CMIP5 dataset declaration :: >>> pr_obs=ds(project='OBS4MIPS', variable='pr', simulation='GPCP-SG', frequency='monthly', period='1979-1980') """ import os.path if os.path.exists('/cnrm'): from climaf.dataloc import dataloc from climaf.classes import cproject, calias, cfreqs cproject("OBS4MIPS","experiment",("frequency","monthly")) # Frequency alias cfreqs('OBS4MIPS', {'monthly':'monthly_mean' }) # pattern="/cnrm/vdr/DATA/Obs4MIPs/netcdf/${frequency}/${variable}_${simulation}_*_YYYYMM-YYYYMM.nc" dataloc(project="OBS4MIPS", organization="generic", url=[pattern])