Changeset 4918


Ignore:
Timestamp:
02/07/20 16:06:07 (4 years ago)
Author:
jgipsl
Message:
  • As done in v7: Do not use WriteFrequancy? for lmdz from config.card anymore. Use settings for each file in lmdz.card.
  • Removed option CARBON_CYCLE not used since v5 configurations.
Location:
CONFIG/UNIFORM/v6
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/IPSLCM/pdControl_MR025/COMP/lmdz.card

    r4696 r4918  
    3333ByPass_hgardfou_mats=n 
    3434 
    35 # Set OutLevel to choose the level of output for LMDZ 
    36 # OutLevel=low/medium/high 
    37 OutLevel=low 
    38  
    39 # Set COSP activation and output frequency (monthly, daily, HF) = y/n 
     35# Specify which output file to activate and at which output_level 
     36# Use an integer to specify the output level or NONE if to deactivate the file 
     37# output_level_filename=1     : activate the corresponding file with low output level 
     38# output_level_filename=10    : activate the corresponding file with high output level 
     39# output_level_filename=NONE  : the file will not be written 
     40output_level_histmth = 5 
     41output_level_histday = NONE 
     42output_level_histhf  = NONE 
     43output_level_histmthNMC = NONE 
     44output_level_histdayNMC = NONE 
     45output_level_histhfNMC  = NONE 
     46output_level_histstrataer = NONE 
     47output_level_histdaystrataer = NONE 
     48output_level_histstn      = NONE 
     49 
     50# Activate COSP in config.def and set corresponding output files 
    4051LMDZ_COSP_OK=y 
    41 LMDZ_COSP_monthly=n 
    42 LMDZ_COSP_daily=n 
    43 LMDZ_COSP_hf=n 
    44  
    45 # Set NMC output frequency (monthly, daily, HF) = y/n 
    46 LMDZ_NMC_monthly=n 
    47 LMDZ_NMC_daily=n 
    48 LMDZ_NMC_hf=n 
     52output_level_histmthCOSP = NONE 
     53output_level_histdayCOSP = NONE 
     54output_level_histhfCOSP  = NONE 
    4955 
    5056[InitialStateFiles] 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/IPSLCM/pdControl_MR025/config.card

    r4795 r4918  
    6868#D-- ATM - 
    6969[ATM] 
    70 WriteFrequency="1M" 
    7170# If config_Restarts_OverRule == 'n' next 4 params are read 
    7271Restart= n 
     
    107106#D-- SRF - 
    108107[SRF] 
    109 # WriteFrequency is not used for ORCHIDEE, see orchidee.card/stomate.card  
    110 WriteFrequency="" 
    111108# If config_Restarts_OverRule == 'n' next 4 params are read 
    112109Restart= n 
     
    121118#D-- SBG - STOMATE 
    122119[SBG] 
    123 # WriteFrequency is not used for ORCHIDEE, see orchidee.card/stomate.card  
    124 WriteFrequency="" 
    125120# If config_Restarts_OverRule == 'n' next 4 params are read 
    126121Restart= n 
     
    148143#D-- IOS - 
    149144[IOS] 
    150 WriteFrequency="" 
    151145# If config_Restarts_OverRule == 'n' next 4 params are read 
    152146Restart= n 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/IPSLCM/pdControl_TEST/COMP/lmdz.card

    r4696 r4918  
    3333ByPass_hgardfou_mats=n 
    3434 
    35 # Set OutLevel to choose the level of output for LMDZ 
    36 # OutLevel=low/medium/high 
    37 OutLevel=low 
    38  
    39 # Set COSP activation and output frequency (monthly, daily, HF) = y/n 
     35# Specify which output file to activate and at which output_level 
     36# Use an integer to specify the output level or NONE if to deactivate the file 
     37# output_level_filename=1     : activate the corresponding file with low output level 
     38# output_level_filename=10    : activate the corresponding file with high output level 
     39# output_level_filename=NONE  : the file will not be written 
     40output_level_histmth = 5 
     41output_level_histday = NONE 
     42output_level_histhf  = NONE 
     43output_level_histmthNMC = NONE 
     44output_level_histdayNMC = NONE 
     45output_level_histhfNMC  = NONE 
     46output_level_histstrataer = NONE 
     47output_level_histdaystrataer = NONE 
     48output_level_histstn      = NONE 
     49 
     50# Activate COSP in config.def and set corresponding output files 
    4051LMDZ_COSP_OK=y 
    41 LMDZ_COSP_monthly=n 
    42 LMDZ_COSP_daily=n 
    43 LMDZ_COSP_hf=n 
    44  
    45 # Set NMC output frequency (monthly, daily, HF) = y/n 
    46 LMDZ_NMC_monthly=n 
    47 LMDZ_NMC_daily=n 
    48 LMDZ_NMC_hf=n 
     52output_level_histmthCOSP = NONE 
     53output_level_histdayCOSP = NONE 
     54output_level_histhfCOSP  = NONE 
    4955 
    5056[InitialStateFiles] 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/IPSLCM/pdControl_TEST/config.card

    r4645 r4918  
    6565#D-- ATM - 
    6666[ATM] 
    67 WriteFrequency="1M HF" 
    6867# If config_Restarts_OverRule == 'n' next 4 params are read 
    6968Restart= y 
     
    116115#D-- SRF - 
    117116[SRF] 
    118 # WriteFrequency is not used for ORCHIDEE, see orchidee.card/stomate.card  
    119 WriteFrequency="" 
    120117# If config_Restarts_OverRule == 'n' next 4 params are read 
    121118Restart= y 
     
    130127#D-- SBG - STOMATE 
    131128[SBG] 
    132 # WriteFrequency is not used for ORCHIDEE, see orchidee.card/stomate.card  
    133 WriteFrequency="" 
    134129# If config_Restarts_OverRule == 'n' next 4 params are read 
    135130Restart= y 
     
    157152#D-- IOS - 
    158153[IOS] 
    159 WriteFrequency="" 
    160154# If config_Restarts_OverRule == 'n' next 4 params are read 
    161155Restart= n 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/IPSLCM/piControl_TEST/COMP/lmdz.card

    r4696 r4918  
    3333ByPass_hgardfou_mats=n 
    3434 
    35 # Set OutLevel to choose the level of output for LMDZ 
    36 # OutLevel=low/medium/high 
    37 OutLevel=low 
    38  
    39 # Set COSP activation and output frequency (monthly, daily, HF) = y/n 
     35# Specify which output file to activate and at which output_level 
     36# Use an integer to specify the output level or NONE if to deactivate the file 
     37# output_level_filename=1     : activate the corresponding file with low output level 
     38# output_level_filename=10    : activate the corresponding file with high output level 
     39# output_level_filename=NONE  : the file will not be written 
     40output_level_histmth = 5 
     41output_level_histday = NONE 
     42output_level_histhf  = NONE 
     43output_level_histmthNMC = NONE 
     44output_level_histdayNMC = NONE 
     45output_level_histhfNMC  = NONE 
     46output_level_histstrataer = NONE 
     47output_level_histdaystrataer = NONE 
     48output_level_histstn      = NONE 
     49 
     50# Activate COSP in config.def and set corresponding output files 
    4051LMDZ_COSP_OK=y 
    41 LMDZ_COSP_monthly=n 
    42 LMDZ_COSP_daily=n 
    43 LMDZ_COSP_hf=n 
    44  
    45 # Set NMC output frequency (monthly, daily, HF) = y/n 
    46 LMDZ_NMC_monthly=n 
    47 LMDZ_NMC_daily=n 
    48 LMDZ_NMC_hf=n 
     52output_level_histmthCOSP = NONE 
     53output_level_histdayCOSP = NONE 
     54output_level_histhfCOSP  = NONE 
    4955 
    5056[InitialStateFiles] 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/IPSLCM/piControl_TEST/config.card

    r4645 r4918  
    6565#D-- ATM - 
    6666[ATM] 
    67 WriteFrequency="1M HF" 
    6867# If config_Restarts_OverRule == 'n' next 4 params are read 
    6968Restart= y 
     
    116115#D-- SRF - 
    117116[SRF] 
    118 # WriteFrequency is not used for ORCHIDEE, see orchidee.card/stomate.card  
    119 WriteFrequency="" 
    120117# If config_Restarts_OverRule == 'n' next 4 params are read 
    121118Restart= y 
     
    130127#D-- SBG - STOMATE 
    131128[SBG] 
    132 # WriteFrequency is not used for ORCHIDEE, see orchidee.card/stomate.card  
    133 WriteFrequency="" 
    134129# If config_Restarts_OverRule == 'n' next 4 params are read 
    135130Restart= y 
     
    157152#D-- IOS - 
    158153[IOS] 
    159 WriteFrequency="" 
    160154# If config_Restarts_OverRule == 'n' next 4 params are read 
    161155Restart= n 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/IPSLESM/AER/piControl_AER_TEST/COMP/lmdz.card

    r4915 r4918  
    2929ByPass_hgardfou_mats=n 
    3030 
    31 # Set OutLevel to choose the level of output for LMDZ 
    32 # OutLevel=low/medium/high 
    33 OutLevel=low 
    34  
    35 # Set COSP activation and output frequency (monthly, daily, HF) = y/n 
     31# Specify which output file to activate and at which output_level 
     32# Use an integer to specify the output level or NONE if to deactivate the file 
     33# output_level_filename=1     : activate the corresponding file with low output level 
     34# output_level_filename=10    : activate the corresponding file with high output level 
     35# output_level_filename=NONE  : the file will not be written 
     36output_level_histmth = 5 
     37output_level_histday = NONE 
     38output_level_histhf  = NONE 
     39output_level_histmthNMC = NONE 
     40output_level_histdayNMC = NONE 
     41output_level_histhfNMC  = NONE 
     42output_level_histstrataer = NONE 
     43output_level_histdaystrataer = NONE 
     44output_level_histstn      = NONE 
     45 
     46# Activate COSP in config.def and set corresponding output files 
    3647LMDZ_COSP_OK=y 
    37 LMDZ_COSP_monthly=n 
    38 LMDZ_COSP_daily=n 
    39 LMDZ_COSP_hf=n 
    40  
    41 # Set NMC output frequency (monthly, daily, HF) = y/n 
    42 LMDZ_NMC_monthly=n 
    43 LMDZ_NMC_daily=n 
    44 LMDZ_NMC_hf=n 
     48output_level_histmthCOSP = NONE 
     49output_level_histdayCOSP = NONE 
     50output_level_histhfCOSP  = NONE 
    4551 
    4652[InitialStateFiles] 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/IPSLESM/AER/piControl_AER_TEST/config.card

    r4707 r4918  
    6565#D-- ATM - 
    6666[ATM] 
    67 WriteFrequency="1M HF" 
    6867# If config_Restarts_OverRule == 'n' next 4 params are read 
    6968Restart= n 
     
    116115#D-- SRF - 
    117116[SRF] 
    118 # WriteFrequency is not used for ORCHIDEE, see orchidee.card/stomate.card  
    119 WriteFrequency="" 
    120117# If config_Restarts_OverRule == 'n' next 4 params are read 
    121118Restart= y 
     
    130127#D-- SBG - STOMATE 
    131128[SBG] 
    132 # WriteFrequency is not used for ORCHIDEE, see orchidee.card/stomate.card  
    133 WriteFrequency="" 
    134129# If config_Restarts_OverRule == 'n' next 4 params are read 
    135130Restart= y 
     
    157152#D-- IOS - 
    158153[IOS] 
    159 WriteFrequency="" 
    160154# If config_Restarts_OverRule == 'n' next 4 params are read 
    161155Restart= n 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/IPSLESM/CO2/piControl_TEST/COMP/lmdz.card

    r4696 r4918  
    3333ByPass_hgardfou_mats=n 
    3434 
    35 # Set OutLevel to choose the level of output for LMDZ 
    36 # OutLevel=low/medium/high 
    37 OutLevel=low 
    38  
    39 # Set COSP activation and output frequency (monthly, daily, HF) = y/n 
    40 LMDZ_COSP_OK=n 
    41 LMDZ_COSP_monthly=n 
    42 LMDZ_COSP_daily=n 
    43 LMDZ_COSP_hf=n 
    44  
    45 # Set NMC output frequency (monthly, daily, HF) = y/n 
    46 LMDZ_NMC_monthly=n 
    47 LMDZ_NMC_daily=n 
    48 LMDZ_NMC_hf=n 
    49  
    5035### ESM-CO2 configuration 
    5136# carbon_cycle_cpl: coupling of carbon fluxes between ATM/OCE, ATM/SRF 
     
    5641carbon_cycle_rad=n 
    5742 
     43# Specify which output file to activate and at which output_level 
     44# Use an integer to specify the output level or NONE if to deactivate the file 
     45# output_level_filename=1     : activate the corresponding file with low output level 
     46# output_level_filename=10    : activate the corresponding file with high output level 
     47# output_level_filename=NONE  : the file will not be written 
     48output_level_histmth = 5 
     49output_level_histday = NONE 
     50output_level_histhf  = NONE 
     51output_level_histmthNMC = NONE 
     52output_level_histdayNMC = NONE 
     53output_level_histhfNMC  = NONE 
     54output_level_histstrataer = NONE 
     55output_level_histdaystrataer = NONE 
     56output_level_histstn      = NONE 
     57 
     58# Activate COSP in config.def and set corresponding output files 
     59LMDZ_COSP_OK=y 
     60output_level_histmthCOSP = NONE 
     61output_level_histdayCOSP = NONE 
     62output_level_histhfCOSP  = NONE 
    5863 
    5964[InitialStateFiles] 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/IPSLESM/CO2/piControl_TEST/config.card

    r4645 r4918  
    6767#D-- ATM - 
    6868[ATM] 
    69 WriteFrequency="1D HF" 
    7069# If config_Restarts_OverRule == 'n' next 4 params are read 
    7170Restart= y 
     
    118117#D-- SRF - 
    119118[SRF] 
    120 # WriteFrequency is not used for ORCHIDEE, see orchidee.card/stomate.card  
    121 WriteFrequency="" 
    122119# If config_Restarts_OverRule == 'n' next 4 params are read 
    123120Restart= y 
     
    132129#D-- SBG - STOMATE 
    133130[SBG] 
    134 # WriteFrequency is not used for ORCHIDEE, see orchidee.card/stomate.card  
    135 WriteFrequency="" 
    136131# If config_Restarts_OverRule == 'n' next 4 params are read 
    137132Restart= y 
     
    159154#D-- IOS - 
    160155[IOS] 
    161 WriteFrequency="" 
    162156# If config_Restarts_OverRule == 'n' next 4 params are read 
    163157Restart= n 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/LMDZ/CREATE_amip/config.card

    r4722 r4918  
    6969#D-- ATM - 
    7070[ATM] 
    71 # 
    72 WriteFrequency="1Y" 
    7371# If config_Restarts_OverRule == 'n' all params are read 
    7472Restart= n 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/LMDZ/CREATE_clim_360d/config.card

    r4722 r4918  
    6969#D-- ATM - 
    7070[ATM] 
    71 # 
    72 WriteFrequency="1Y" 
    7371# If config_Restarts_OverRule == 'n' all params are read 
    7472Restart= n 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/LMDZOR/amip/COMP/lmdz.card

    r4696 r4918  
    3737ByPass_hgardfou_mats=n 
    3838 
    39 # Set OutLevel to choose the level of output for LMDZ 
    40 # OutLevel=low/medium/high 
    41 OutLevel=low 
    42  
    43 # Set COSP activation and output frequency (monthly, daily, HF) = y/n 
    44 LMDZ_COSP_OK=y 
    45 LMDZ_COSP_monthly=n 
    46 LMDZ_COSP_daily=n 
    47 LMDZ_COSP_hf=n 
    48  
    49 # Set NMC output frequency (monthly, daily, HF) = y/n 
    50 LMDZ_NMC_monthly=n 
    51 LMDZ_NMC_daily=n 
    52 LMDZ_NMC_hf=n 
    53  
    5439# Nugding : ok_guide=y/n 
    5540# If ok_guide=y, add nudging files(u.nc, v.nc, hur.nc,...) in BoundaryFiles section below. 
    5641ok_guide=n 
     42 
     43# Specify which output file to activate and at which output_level 
     44# Use an integer to specify the output level or NONE if to deactivate the file 
     45# output_level_filename=1     : activate the corresponding file with low output level 
     46# output_level_filename=10    : activate the corresponding file with high output level 
     47# output_level_filename=NONE  : the file will not be written 
     48output_level_histmth = 5 
     49output_level_histday = NONE 
     50output_level_histhf  = NONE 
     51output_level_histmthNMC = NONE 
     52output_level_histdayNMC = NONE 
     53output_level_histhfNMC  = NONE 
     54output_level_histstrataer = NONE 
     55output_level_histdaystrataer = NONE 
     56output_level_histstn      = NONE 
     57 
     58# Activate COSP in config.def and set corresponding output files 
     59LMDZ_COSP_OK=y 
     60output_level_histmthCOSP = NONE 
     61output_level_histdayCOSP = NONE 
     62output_level_histhfCOSP  = NONE 
    5763 
    5864[InitialStateFiles] 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/LMDZOR/amip/config.card

    r4722 r4918  
    8080#D-- ATM - 
    8181[ATM] 
    82 WriteFrequency="1M" 
    8382# If config_Restarts_OverRule == 'n' next 4 params are read 
    8483Restart= n 
     
    9392#D-- SRF - 
    9493[SRF] 
    95 # WriteFrequency is not used any more for ORCHIDEE  
    96 # Output files are now managed in orchidee.card  
    97 WriteFrequency="" 
    9894# If config_Restarts_OverRule == 'n' next 4 params are read 
    9995Restart= n 
     
    108104#D-- SBG - STOMATE 
    109105[SBG] 
    110 # WriteFrequency is not used any more for ORCHIDEE  
    111 # Output files are now managed in stomate.card  
    112 WriteFrequency="" 
    113106# If config_Restarts_OverRule == 'n' next 4 params are read 
    114107Restart= n 
     
    123116#D-- IOS - 
    124117[IOS] 
    125 WriteFrequency="" 
    126118# If config_Restarts_OverRule == 'n' next 4 params are read 
    127119Restart= n 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/LMDZOR/clim_pdControl/COMP/lmdz.card

    r4696 r4918  
    3737ByPass_hgardfou_mats=n 
    3838 
    39 # Set OutLevel to choose the level of output for LMDZ 
    40 # OutLevel=low/medium/high 
    41 OutLevel=low 
    42  
    43 # Set COSP activation and output frequency (monthly, daily, HF) = y/n 
    44 LMDZ_COSP_OK=y 
    45 LMDZ_COSP_monthly=n 
    46 LMDZ_COSP_daily=n 
    47 LMDZ_COSP_hf=n 
    48  
    49 # Set NMC output frequency (monthly, daily, HF) = y/n 
    50 LMDZ_NMC_monthly=n 
    51 LMDZ_NMC_daily=n 
    52 LMDZ_NMC_hf=n 
    53  
    5439# Nugding : ok_guide=y/n 
    5540# If ok_guide=y, add nudging files(u.nc, v.nc, hur.nc,...) in BoundaryFiles section below. 
    5641ok_guide=n 
     42 
     43# Specify which output file to activate and at which output_level 
     44# Use an integer to specify the output level or NONE if to deactivate the file 
     45# output_level_filename=1     : activate the corresponding file with low output level 
     46# output_level_filename=10    : activate the corresponding file with high output level 
     47# output_level_filename=NONE  : the file will not be written 
     48output_level_histmth = 5 
     49output_level_histday = NONE 
     50output_level_histhf  = NONE 
     51output_level_histmthNMC = NONE 
     52output_level_histdayNMC = NONE 
     53output_level_histhfNMC  = NONE 
     54output_level_histstrataer = NONE 
     55output_level_histdaystrataer = NONE 
     56output_level_histstn      = NONE 
     57 
     58# Activate COSP in config.def and set corresponding output files 
     59LMDZ_COSP_OK=y 
     60output_level_histmthCOSP = NONE 
     61output_level_histdayCOSP = NONE 
     62output_level_histhfCOSP  = NONE 
    5763 
    5864[InitialStateFiles] 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/EXPERIMENTS/LMDZOR/clim_pdControl/config.card

    r4722 r4918  
    8080#D-- ATM - 
    8181[ATM] 
    82 WriteFrequency="1M" 
    8382# If config_Restarts_OverRule == 'n' next 4 params are read 
    8483Restart= n 
     
    9392#D-- SRF - 
    9493[SRF] 
    95 # WriteFrequency is not used any more for ORCHIDEE  
    96 # Output files are now managed in orchidee.card  
    97 WriteFrequency="" 
    9894# If config_Restarts_OverRule == 'n' next 4 params are read 
    9995Restart= n 
     
    108104#D-- SBG - STOMATE 
    109105[SBG] 
    110 # WriteFrequency is not used any more for ORCHIDEE  
    111 # Output files are now managed in stomate.card  
    112 WriteFrequency="" 
    113106# If config_Restarts_OverRule == 'n' next 4 params are read 
    114107Restart= n 
     
    123116#D-- IOS - 
    124117[IOS] 
    125 WriteFrequency="" 
    126118# If config_Restarts_OverRule == 'n' next 4 params are read 
    127119Restart= n 
  • CONFIG/UNIFORM/v6/IPSLCM6.2/GENERAL/DRIVER/lmdz.driver

    r4915 r4918  
    4848    ConfType=${lmdz_UserChoices_ConfType} 
    4949 
    50     ##- LMDZ output level, to be set in lmdz.card 
    51     if [ X${lmdz_UserChoices_OutLevel} = X ] ; then 
    52         # OutLevel is not set. Take default value low. 
    53         OutLevel=low 
    54     else 
    55         OutLevel=${lmdz_UserChoices_OutLevel} 
    56     fi 
    57  
    58     ##-- Output frequency purpose .... 
    59     ##--  Initialisation  .... 
    60     ok_mensuel=.FALSE. 
    61     ok_journe=.FALSE. 
    62     ok_hf=.FALSE. 
    63     ok_hf3h=.FALSE. 
    64     ok_hf3hm=.FALSE. 
    65     ok_stn=.FALSE. 
    66  
    67  
    68     case ${config_UserChoices_PeriodLength} in 
    69         1Y|1y|1M|1m) ok_mensuel=.TRUE. ;; 
    70         5D|5d|1D|1d) ok_journe=.TRUE. ;; 
    71     esac 
    72  
    73     for frequency in ${config_ATM_WriteFrequency} ; do 
    74         case ${frequency} in 
    75             1M|1m) ok_mensuel=.TRUE. ;; 
    76         esac 
    77         case ${frequency} in 
    78             5D|5d|1D|1d) ok_journe=.TRUE. ;; 
    79         esac 
    80         case ${frequency} in 
    81             HF|hf) ok_hf=.TRUE. ;; 
    82         esac 
    83         case ${frequency} in  
    84             HF3h|hf3h) ok_hf3h=.TRUE. ;; 
    85         esac 
    86         case ${frequency} in  
    87             HF3hm|hf3hm) ok_hf3hm=.TRUE. ;; 
    88         esac 
    89         case ${frequency} in 
    90             STN|stn) ok_stn=.TRUE. ;; 
    91         esac 
    92     done 
    93  
    94  
    95 ##  Read LMDZ_COSP_OK in lmdz.card 
    96     if [ X${lmdz_UserChoices_LMDZ_COSP_OK} = Xy ] ; then 
    97         ##  LMDZ_COSP_OK=y, now read all other COSP variables 
    98         ##  Read LMDZ_COSP_monthly in lmdz.card 
    99         if [ X${lmdz_UserChoices_LMDZ_COSP_monthly} = Xy ] ; then 
    100             LMDZ_COSP_monthly=.TRUE. 
    101         else 
    102             LMDZ_COSP_monthly=.FALSE. 
    103         fi 
    104         ##  Read LMDZ_COSP_daily in lmdz.card 
    105         if [ X${lmdz_UserChoices_LMDZ_COSP_daily} = Xy ] ; then 
    106             LMDZ_COSP_daily=.TRUE. 
    107         else 
    108             LMDZ_COSP_daily=.FALSE. 
    109         fi 
    110         ##  Read LMDZ_COSP_hf in lmdz.card 
    111         if [ X${lmdz_UserChoices_LMDZ_COSP_hf} = Xy ] ; then 
    112             LMDZ_COSP_hf=.TRUE. 
    113         else 
    114             LMDZ_COSP_hf=.FALSE. 
    115         fi 
    116     else 
    117         # LMDZ_COSP_OK=n : All cosp output are deactivated 
    118         LMDZ_COSP_monthly=.FALSE. 
    119         LMDZ_COSP_daily=.FALSE. 
    120         LMDZ_COSP_hf=.FALSE. 
    121     fi   
    122  
    123     ##  Read LMDZ_NMC_monthly in lmdz.card 
    124     if [ X${lmdz_UserChoices_LMDZ_NMC_monthly} = Xy ] ; then 
    125         LMDZ_NMC_monthly=.TRUE. 
    126     else 
    127         LMDZ_NMC_monthly=.FALSE. 
    128     fi 
    129      
    130     ## Read LMDZ_NMC_daily in lmdz.card 
    131     if [ X${lmdz_UserChoices_LMDZ_NMC_daily} = Xy ] ; then 
    132         LMDZ_NMC_daily=.TRUE. 
    133     else 
    134         LMDZ_NMC_daily=.FALSE. 
    135     fi 
    136      
    137     ## Read LMDZ_NMC_hf in lmdz.card 
    138     if [ X${lmdz_UserChoices_LMDZ_NMC_hf} = Xy ] ; then 
    139         LMDZ_NMC_hf=.TRUE. 
    140     else 
    141         LMDZ_NMC_hf=.FALSE. 
    142     fi 
    143  
    14450    IGCM_debug_PopStack "ATM_Initialize" 
    14551} 
     
    286192    IGCM_comp_modifyDefFile nonblocker config.def t_coupl   ${LMDZ_t_coupl}  
    287193 
    288     ##-- Add special treatement for CARBON CYCLE 
    289     if [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"control" ] || [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"historical" ] ; then 
    290         ATM_Carbon_Update 
    291     fi 
    292  
    293  
    294     ##-- Set LMDZ_COSP_daily1979=y in section UserChoices in lmdz.card to activate  
    295     ##   COSP daily output for years 1979 and later (mandatory for historical CMIP5 run). 
    296     if ([ X"${lmdz_UserChoices_LMDZ_COSP_daily1979}" = X"y" ] &&  [ ${year} -ge 1979 ]) ; then 
    297         LMDZ_COSP_daily=.TRUE. 
    298     fi 
    299  
    300     ## Modifiy  
    301     IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled ${ok_mensuel} 
    302     if [ X${OutLevel} = Xlow ] ; then 
    303         IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth output_level 5 
    304     elif [ X${OutLevel} = Xmedium ] ; then 
    305         IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth output_level 6 
    306     elif [ X${OutLevel} = Xhigh ] ; then 
    307         IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth output_level 7 
    308     fi 
    309      
    310     IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled ${ok_journe} 
    311      
    312     if [ X${OutLevel} = Xlow ] || [ X${OutLevel} = Xmedium ] ; then 
    313         IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 2 
    314     else 
    315         IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 5 
    316     fi 
    317      
    318     IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled ${ok_hf} 
    319      
    320     if [ X${OutLevel} = Xlow ] ; then 
    321         IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 5 
    322     elif [ X${OutLevel} = Xmedium ] ; then 
    323         IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 6 
    324     elif [ X${OutLevel} = Xhigh ] ; then 
    325         IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 7 
    326     fi 
    327          
    328     IGCM_comp_modifyXmlFile nonblocker file_def_histhf3h_lmdz.xml histhf3h enabled ${ok_hf3h} 
    329     IGCM_comp_modifyXmlFile nonblocker file_def_histhf3hm_lmdz.xml histhf3hm enabled ${ok_hf3hm} 
    330  
    331     IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled ${ok_stn} 
    332  
    333     IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled ${LMDZ_NMC_monthly} 
    334     IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled ${LMDZ_NMC_daily} 
    335     IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled ${LMDZ_NMC_hf} 
    336      
    337     IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP enabled ${LMDZ_COSP_monthly} 
    338     IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP enabled ${LMDZ_COSP_daily} 
    339     IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP enabled ${LMDZ_COSP_hf} 
    340  
    341     # Activate the histstrataer output file only for configuration with interactive stratospheric aersols  
    342     # done by setting the key word LMDZ_strataero=y in lmdz.card 
    343     if [ X${lmdz_UserChoices_LMDZ_strataero} = Xy ] ; then 
    344         IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled .TRUE. 
    345         IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer enabled .TRUE. 
    346     else 
    347         IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled .FALSE. 
    348         IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer enabled .FALSE. 
     194 
     195 
     196    ## Activate diagnostic output files and set output_level for each file 
     197 
     198    # histmth 
     199    if [ X${lmdz_UserChoices_output_level_histmth} = X ] || [ X${lmdz_UserChoices_output_level_histmth} = XNONE ] ; then 
     200        IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled FALSE 
     201        IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth output_level 0 
     202    else 
     203        IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled TRUE 
     204        IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth output_level ${lmdz_UserChoices_output_level_histmth}  
     205    fi 
     206 
     207    # histday 
     208    if [ X${lmdz_UserChoices_output_level_histday} = X ] || [ X${lmdz_UserChoices_output_level_histday} = XNONE ] ; then 
     209        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled FALSE 
     210        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 0 
     211    else 
     212        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled TRUE 
     213        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level ${lmdz_UserChoices_output_level_histday}  
     214    fi 
     215 
     216    # histhf 
     217    if [ X${lmdz_UserChoices_output_level_histhf} = X ] || [ X${lmdz_UserChoices_output_level_histhf} = XNONE ] ; then 
     218        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled FALSE 
     219        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 0 
     220    else 
     221        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled TRUE 
     222        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level ${lmdz_UserChoices_output_level_histhf}  
     223    fi 
     224 
     225    # histmthNMC 
     226    if [ X${lmdz_UserChoices_output_level_histmthNMC} = X ] || [ X${lmdz_UserChoices_output_level_histmthNMC} = XNONE ] ; then 
     227        IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled FALSE 
     228        IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC output_level 0 
     229    else 
     230        IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled TRUE 
     231        IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC output_level ${lmdz_UserChoices_output_level_histmthNMC}  
     232    fi 
     233 
     234    # histdayNMC 
     235    if [ X${lmdz_UserChoices_output_level_histdayNMC} = X ] || [ X${lmdz_UserChoices_output_level_histdayNMC} = XNONE ] ; then 
     236        IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled FALSE 
     237        IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC output_level 0 
     238    else 
     239        IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled TRUE 
     240        IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC output_level ${lmdz_UserChoices_output_level_histdayNMC}  
     241    fi 
     242 
     243    # histhfNMC 
     244    if [ X${lmdz_UserChoices_output_level_histhfNMC} = X ] || [ X${lmdz_UserChoices_output_level_histhfNMC} = XNONE ] ; then 
     245        IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled FALSE 
     246        IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC output_level 0 
     247    else 
     248        IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled TRUE 
     249        IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC output_level ${lmdz_UserChoices_output_level_histhfNMC}  
     250    fi 
     251 
     252    # histstrataer 
     253    if [ X${lmdz_UserChoices_output_level_histstrataer} = X ] || [ X${lmdz_UserChoices_output_level_histstrataer} = XNONE ] ; then 
     254        IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled FALSE 
     255        IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer output_level 0 
     256    else 
     257        IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled TRUE 
     258        IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer output_level ${lmdz_UserChoices_output_level_histstrataer}  
     259    fi 
     260 
     261    # histdaystrataer 
     262    if [ X${lmdz_UserChoices_output_level_histdaystrataer} = X ] || [ X${lmdz_UserChoices_output_level_histdaystrataer} = XNONE ] ; then 
     263        IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer enabled FALSE 
     264        IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer output_level 0 
     265    else 
     266        IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer enabled TRUE 
     267        IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer output_level ${lmdz_UserChoices_output_level_histstrataer} 
     268    fi 
     269 
     270    # histstn 
     271    if [ X${lmdz_UserChoices_output_level_histstn} = X ] || [ X${lmdz_UserChoices_output_level_histstn} = XNONE ] ; then 
     272        IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled FALSE 
     273        IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn output_level 0 
     274    else 
     275        IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled TRUE 
     276        IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn output_level ${lmdz_UserChoices_output_level_histstn}  
     277    fi 
     278 
     279 
     280    # histmthCOSP 
     281    if [ X${lmdz_UserChoices_output_level_histmthCOSP} = X ] || [ X${lmdz_UserChoices_output_level_histmthCOSP} = XNONE ] ; then 
     282        IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP enabled FALSE 
     283        IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP output_level 0 
     284    else 
     285        IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP enabled TRUE 
     286        IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP output_level ${lmdz_UserChoices_output_level_histmthCOSP}  
     287    fi 
     288 
     289 
     290    # histdayCOSP 
     291    if [ X${lmdz_UserChoices_output_level_histdayCOSP} = X ] || [ X${lmdz_UserChoices_output_level_histdayCOSP} = XNONE ] ; then 
     292        IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP enabled FALSE 
     293        IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP output_level 0 
     294    else 
     295        IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP enabled TRUE 
     296        IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP output_level ${lmdz_UserChoices_output_level_histdayCOSP}  
     297    fi 
     298 
     299 
     300    # histhfCOSP 
     301    if [ X${lmdz_UserChoices_output_level_histhfCOSP} = X ] || [ X${lmdz_UserChoices_output_level_histhfCOSP} = XNONE ] ; then 
     302        IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP enabled FALSE 
     303        IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP output_level 0 
     304    else 
     305        IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP enabled TRUE 
     306        IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP output_level ${lmdz_UserChoices_output_level_histhfCOSP}  
    349307    fi 
    350308 
     
    637595    IGCM_debug_PushStack "ATM_Finalize" 
    638596 
    639     # Add special treatement for CARBON CYCLE 
    640     if [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"control" ] || [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"historical" ] ; then 
    641         ATM_Carbon_Finalize 
    642     fi 
    643  
    644597    echo FINALIZE ATM ! 
    645598 
     
    647600} 
    648601 
    649  
    650  
    651 function ATM_Carbon_Update 
    652 { 
    653     # This fuction will be called only if CARBON_CYCLE is set to control or historical in lmdz.card 
    654  
    655     IGCM_debug_PushStack "ATM_Carbon_Update" 
    656  
    657     typeset InitPeriodCo2 InitDateBeginCo2 InitDateEndCo2 
    658     typeset CO2SBG CO2MBG CO2LU CO2_ppm CO2_ppm_prec fCO2_ff 
    659     typeset PathCO2log  
    660     typeset PreviousLinelog LastPeriodDateBegin LastPeriodDateEnd LastDatesPeriod LastPREFIX 
    661      
    662     if ( ${FirstInitialize} && [ X"${config_ATM_Restart}" = X"n" ] ) ; then 
    663         ##--Initialization of fluxes to an undefined value at the first run 
    664         UndefinedValueCo2=-9999 
    665         InitPeriodCo2=0 
    666         InitDateBeginCo2=${UndefinedValueCo2} 
    667         InitYearCo2=$(( ${year} - 1 ))  
    668         InitDateEndCo2=${InitYearCo2}1231 
    669         fCO2_ff=${UndefinedValueCo2}  
    670         CO2SBG=${UndefinedValueCo2} 
    671         CO2LU=${UndefinedValueCo2} 
    672         CO2MBG=${UndefinedValueCo2} 
    673         CO2_ppm_prec=${UndefinedValueCo2} 
    674         # Get the initial value of atmosp. pco2  
    675         CO2_ppm=${lmdz_UserChoices_co2_init} 
    676          
    677         IGCM_sys_Cp ${SUBMIT_DIR}/co2.log.init ${SUBMIT_DIR}/co2.log 
    678         IGCM_sys_Chmod u+w ${SUBMIT_DIR}/co2.log 
    679          
    680         # Save CO2 values in ExeCpuLog variable contents 5 fields 
    681         echo "${InitPeriodCo2} ${InitDateBeginCo2} ${InitDateEndCo2} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \ 
    682             gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \ 
    683                               $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log 
    684          
    685         # Get the path where the log file co2.log is 
    686         PathCO2log=${SUBMIT_DIR}  
    687         # Get Previous line in co2.log 
    688         PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log ) 
    689          
    690     else 
    691          
    692         # NEW parameter in config.card (even for Overule all restarts, you must modify the line after this comment ): 
    693         # !! NEW for Carbone cycle !! Path where to find old co2.log file for restart CO2. 
    694         #SubmitRestartPath= 
    695         if ( ${FirstInitialize} && [ X"${config_ATM_Restart}" = X"y" ] ) ; then 
    696             IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card ATM SubmitRestartPath 
    697             PathCO2log=${config_ATM_SubmitRestartPath} 
    698             Date_r=$( IGCM_date_ConvertFormatToGregorian ${config_ATM_RestartDate} ) 
    699             PreviousLinelog=$( grep ${Date_r} ${PathCO2log}/co2.log ) 
    700              
    701             IGCM_sys_Cp ${SUBMIT_DIR}/co2.log.init ${SUBMIT_DIR}/co2.log 
    702             IGCM_sys_Chmod u+w ${SUBMIT_DIR}/co2.log 
    703              
    704             # Save Last Line of control in new co2.log file 
    705             InitPeriodCo2=0    
    706             InitDateBeginCo2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $2}' ) 
    707             InitDateEndCo2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $3}' ) 
    708             fCO2_ff=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $6}' ) 
    709             CO2SBG=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $8}' ) 
    710             CO2LU=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $9}' ) 
    711             CO2MBG=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $7}' ) 
    712             CO2_ppm_prec=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $5}' ) 
    713             CO2_ppm=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' ) 
    714              
    715             echo "${InitPeriodCo2} ${InitDateBeginCo2} ${InitDateEndCo2} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \ 
    716                 gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \ 
    717                               $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log 
    718         else 
    719            # Get restart line in co2.log 
    720             PathCO2log=${SUBMIT_DIR} 
    721             PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log ) 
    722            # Get the value of atmosp. pco2 in co2.log 
    723             CO2_ppm=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' ) 
    724         fi 
    725          
    726     fi 
    727      
    728     if [ ${lmdz_UserChoices_CARBON_CYCLE} = historical ] ; then 
    729         # Modify co2_ppm in config.def only for historical run 
    730         # If not historical run, keep co2_ppm value set earlier by IGCM_comp_modifyDefFile 
    731         IGCM_comp_modifyDefFile force config.def co2_ppm     ${CO2_ppm} 
    732     fi 
    733     IGCM_debug_PopStack "ATM_Carbon_Update" 
    734 } 
    735  
    736  
    737 function ATM_Carbon_Finalize 
    738 { 
    739     # This fuction will be called only if CARBON_CYCLE is set to control or historical in lmdz.card 
    740  
    741     IGCM_debug_PushStack "ATM_Carbon_Finalize" 
    742  
    743     typeset CO2SBG_3V CO2SBG CO2MBG CO2SRF CO2LU CO2_ppm CO2_ppm_prec fCO2_ff 
    744      
    745         # Fossil fuel emission 
    746     if [ ${lmdz_UserChoices_CARBON_CYCLE} = control ] ; then 
    747             # For Control, no fossil fuel emission : 
    748         fCO2_ff=0 
    749         echo "Fossil Fuel for control run  :" ${fCO2_ff} 
    750     else 
    751             # For historical, get the fossile fuel file : 
    752         fCO2_ff=$( gawk "{if (match(\$0,\"${year}\ *${month}\")) {print \$3}}" ${SUBMIT_DIR}/PARAM/CMIP5_gridcar_CO2_emissions_fossil_fuel_Andres_1751-2007_monthly_SC.txt ) 
    753         echo "Fossil Fuel for historical run  :" ${fCO2_ff} 
    754     fi 
    755      
    756         # Get the value of ocean carbon flux 
    757     CO2MBG=$( ${SUBMIT_DIR}/COMP/lmdz_analyse_pisces_out.awk ocean.output ) 
    758     CO2MBG=$( echo ${CO2MBG} | sed -e "s/ *//" ) 
    759     echo "Ocean carbon flux  :" ${CO2MBG} 
    760      
    761         # Get the value of land fluxes 
    762     set +A CO2SBG_3V -- $( ${SUBMIT_DIR}/COMP/lmdz_analyse_stomate_out.awk out_orchidee_0000 ) 
    763     CO2SRF=$( echo ${CO2SBG_3V[0]} | sed -e "s/ *//" ) 
    764     CO2LU=$( echo ${CO2SBG_3V[1]} | sed -e "s/ *//" ) 
    765     CO2SBG=$( echo ${CO2SBG_3V[2]} | sed -e "s/ *//" ) 
    766     echo "Land carbon flux (NEP)         :" ${CO2SRF} 
    767     echo "LU flux          (FLUC)        :" ${CO2LU} 
    768     echo "Total Land carbon flux (NBP)   :" ${CO2SBG} 
    769      
    770         # Previous CO2 
    771     CO2_ppm_prec=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' ) 
    772     echo "Previous CO2  :" ${CO2_ppm_prec} 
    773      
    774         # Formula 
    775     CO2_ppm=$( echo "${CO2_ppm_prec} + (${fCO2_ff} + ${CO2MBG} + ${CO2SBG}) / 2.12" | bc -l ) 
    776     echo "New CO2  :" ${CO2_ppm} 
    777      
    778         # Save CO2 values in ExeCpuLog variable contents 5 fields 
    779     echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \ 
    780         gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \ 
    781                            $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log 
    782      
    783     IGCM_debug_PopStack "ATM_Carbon_Finalize" 
    784 } 
  • CONFIG/UNIFORM/v6/LMDZOR_v6.2/EXPERIMENTS/LMDZ/CREATE_amip/config.card

    r4465 r4918  
    6969#D-- ATM - 
    7070[ATM] 
    71 # 
    72 WriteFrequency="1Y" 
    7371# If config_Restarts_OverRule == 'n' all params are read 
    7472Restart= n 
  • CONFIG/UNIFORM/v6/LMDZOR_v6.2/EXPERIMENTS/LMDZ/CREATE_clim_360d/config.card

    r4465 r4918  
    6969#D-- ATM - 
    7070[ATM] 
    71 # 
    72 WriteFrequency="1Y" 
    7371# If config_Restarts_OverRule == 'n' all params are read 
    7472Restart= n 
  • CONFIG/UNIFORM/v6/LMDZOR_v6.2/EXPERIMENTS/LMDZOR/amip/COMP/lmdz.card

    r4722 r4918  
    3737ByPass_hgardfou_mats=n 
    3838 
    39 # Set OutLevel to choose the level of output for LMDZ 
    40 # OutLevel=low/medium/high 
    41 OutLevel=low 
    42  
    43 # Set COSP activation and output frequency (monthly, daily, HF) = y/n 
    44 LMDZ_COSP_OK=y 
    45 LMDZ_COSP_monthly=n 
    46 LMDZ_COSP_daily=n 
    47 LMDZ_COSP_hf=n 
    48  
    49 # Set NMC output frequency (monthly, daily, HF) = y/n 
    50 LMDZ_NMC_monthly=n 
    51 LMDZ_NMC_daily=n 
    52 LMDZ_NMC_hf=n 
    53  
    5439# Nugding : ok_guide=y/n 
    5540# If ok_guide=y, add nudging files(u.nc, v.nc, hur.nc,...) in BoundaryFiles section below. 
    5641ok_guide=n 
     42 
     43# Specify which output file to activate and at which output_level 
     44# Use an integer to specify the output level or NONE if to deactivate the file 
     45# output_level_filename=1     : activate the corresponding file with low output level 
     46# output_level_filename=10    : activate the corresponding file with high output level 
     47# output_level_filename=NONE  : the file will not be written 
     48output_level_histmth = 5 
     49output_level_histday = NONE 
     50output_level_histhf  = NONE 
     51output_level_histmthNMC = NONE 
     52output_level_histdayNMC = NONE 
     53output_level_histhfNMC  = NONE 
     54output_level_histstrataer = NONE 
     55output_level_histdaystrataer = NONE 
     56output_level_histstn      = NONE 
     57 
     58# Activate COSP in config.def and set corresponding output files 
     59LMDZ_COSP_OK=y 
     60output_level_histmthCOSP = NONE 
     61output_level_histdayCOSP = NONE 
     62output_level_histhfCOSP  = NONE 
    5763 
    5864[InitialStateFiles] 
  • CONFIG/UNIFORM/v6/LMDZOR_v6.2/EXPERIMENTS/LMDZOR/amip/config.card

    r4463 r4918  
    8080#D-- ATM - 
    8181[ATM] 
    82 WriteFrequency="1M" 
    8382# If config_Restarts_OverRule == 'n' next 4 params are read 
    8483Restart= n 
     
    9392#D-- SRF - 
    9493[SRF] 
    95 # WriteFrequency is not used any more for ORCHIDEE  
    96 # Output files are now managed in orchidee.card  
    97 WriteFrequency="" 
    9894# If config_Restarts_OverRule == 'n' next 4 params are read 
    9995Restart= n 
     
    108104#D-- SBG - STOMATE 
    109105[SBG] 
    110 # WriteFrequency is not used any more for ORCHIDEE  
    111 # Output files are now managed in stomate.card  
    112 WriteFrequency="" 
    113106# If config_Restarts_OverRule == 'n' next 4 params are read 
    114107Restart= n 
     
    123116#D-- IOS - 
    124117[IOS] 
    125 WriteFrequency="" 
    126118# If config_Restarts_OverRule == 'n' next 4 params are read 
    127119Restart= n 
  • CONFIG/UNIFORM/v6/LMDZOR_v6.2/EXPERIMENTS/LMDZOR/clim_pdControl/COMP/lmdz.card

    r4722 r4918  
    3737ByPass_hgardfou_mats=n 
    3838 
    39 # Set OutLevel to choose the level of output for LMDZ 
    40 # OutLevel=low/medium/high 
    41 OutLevel=low 
    42  
    43 # Set COSP activation and output frequency (monthly, daily, HF) = y/n 
    44 LMDZ_COSP_OK=y 
    45 LMDZ_COSP_monthly=n 
    46 LMDZ_COSP_daily=n 
    47 LMDZ_COSP_hf=n 
    48  
    49 # Set NMC output frequency (monthly, daily, HF) = y/n 
    50 LMDZ_NMC_monthly=n 
    51 LMDZ_NMC_daily=n 
    52 LMDZ_NMC_hf=n 
    53  
    5439# Nugding : ok_guide=y/n 
    5540# If ok_guide=y, add nudging files(u.nc, v.nc, hur.nc,...) in BoundaryFiles section below. 
    5641ok_guide=n 
     42 
     43# Specify which output file to activate and at which output_level 
     44# Use an integer to specify the output level or NONE if to deactivate the file 
     45# output_level_filename=1     : activate the corresponding file with low output level 
     46# output_level_filename=10    : activate the corresponding file with high output level 
     47# output_level_filename=NONE  : the file will not be written 
     48output_level_histmth = 5 
     49output_level_histday = NONE 
     50output_level_histhf  = NONE 
     51output_level_histmthNMC = NONE 
     52output_level_histdayNMC = NONE 
     53output_level_histhfNMC  = NONE 
     54output_level_histstrataer = NONE 
     55output_level_histdaystrataer = NONE 
     56output_level_histstn      = NONE 
     57 
     58# Activate COSP in config.def and set corresponding output files 
     59LMDZ_COSP_OK=y 
     60output_level_histmthCOSP = NONE 
     61output_level_histdayCOSP = NONE 
     62output_level_histhfCOSP  = NONE 
    5763 
    5864[InitialStateFiles] 
  • CONFIG/UNIFORM/v6/LMDZOR_v6.2/EXPERIMENTS/LMDZOR/clim_pdControl/config.card

    r4463 r4918  
    8080#D-- ATM - 
    8181[ATM] 
    82 WriteFrequency="1M" 
    8382# If config_Restarts_OverRule == 'n' next 4 params are read 
    8483Restart= n 
     
    9392#D-- SRF - 
    9493[SRF] 
    95 # WriteFrequency is not used any more for ORCHIDEE  
    96 # Output files are now managed in orchidee.card  
    97 WriteFrequency="" 
    9894# If config_Restarts_OverRule == 'n' next 4 params are read 
    9995Restart= n 
     
    108104#D-- SBG - STOMATE 
    109105[SBG] 
    110 # WriteFrequency is not used any more for ORCHIDEE  
    111 # Output files are now managed in stomate.card  
    112 WriteFrequency="" 
    113106# If config_Restarts_OverRule == 'n' next 4 params are read 
    114107Restart= n 
     
    123116#D-- IOS - 
    124117[IOS] 
    125 WriteFrequency="" 
    126118# If config_Restarts_OverRule == 'n' next 4 params are read 
    127119Restart= n 
  • CONFIG/UNIFORM/v6/LMDZOR_v6.2/GENERAL/DRIVER/lmdz.driver

    r4915 r4918  
    4848    ConfType=${lmdz_UserChoices_ConfType} 
    4949 
    50     ##- LMDZ output level, to be set in lmdz.card 
    51     if [ X${lmdz_UserChoices_OutLevel} = X ] ; then 
    52         # OutLevel is not set. Take default value low. 
    53         OutLevel=low 
    54     else 
    55         OutLevel=${lmdz_UserChoices_OutLevel} 
    56     fi 
    57  
    58     ##-- Output frequency purpose .... 
    59     ##--  Initialisation  .... 
    60     ok_mensuel=.FALSE. 
    61     ok_journe=.FALSE. 
    62     ok_hf=.FALSE. 
    63     ok_hf3h=.FALSE. 
    64     ok_hf3hm=.FALSE. 
    65     ok_stn=.FALSE. 
    66  
    67  
    68     case ${config_UserChoices_PeriodLength} in 
    69         1Y|1y|1M|1m) ok_mensuel=.TRUE. ;; 
    70         5D|5d|1D|1d) ok_journe=.TRUE. ;; 
    71     esac 
    72  
    73     for frequency in ${config_ATM_WriteFrequency} ; do 
    74         case ${frequency} in 
    75             1M|1m) ok_mensuel=.TRUE. ;; 
    76         esac 
    77         case ${frequency} in 
    78             5D|5d|1D|1d) ok_journe=.TRUE. ;; 
    79         esac 
    80         case ${frequency} in 
    81             HF|hf) ok_hf=.TRUE. ;; 
    82         esac 
    83         case ${frequency} in  
    84             HF3h|hf3h) ok_hf3h=.TRUE. ;; 
    85         esac 
    86         case ${frequency} in  
    87             HF3hm|hf3hm) ok_hf3hm=.TRUE. ;; 
    88         esac 
    89         case ${frequency} in 
    90             STN|stn) ok_stn=.TRUE. ;; 
    91         esac 
    92     done 
    93  
    94  
    95 ##  Read LMDZ_COSP_OK in lmdz.card 
    96     if [ X${lmdz_UserChoices_LMDZ_COSP_OK} = Xy ] ; then 
    97         ##  LMDZ_COSP_OK=y, now read all other COSP variables 
    98         ##  Read LMDZ_COSP_monthly in lmdz.card 
    99         if [ X${lmdz_UserChoices_LMDZ_COSP_monthly} = Xy ] ; then 
    100             LMDZ_COSP_monthly=.TRUE. 
    101         else 
    102             LMDZ_COSP_monthly=.FALSE. 
    103         fi 
    104         ##  Read LMDZ_COSP_daily in lmdz.card 
    105         if [ X${lmdz_UserChoices_LMDZ_COSP_daily} = Xy ] ; then 
    106             LMDZ_COSP_daily=.TRUE. 
    107         else 
    108             LMDZ_COSP_daily=.FALSE. 
    109         fi 
    110         ##  Read LMDZ_COSP_hf in lmdz.card 
    111         if [ X${lmdz_UserChoices_LMDZ_COSP_hf} = Xy ] ; then 
    112             LMDZ_COSP_hf=.TRUE. 
    113         else 
    114             LMDZ_COSP_hf=.FALSE. 
    115         fi 
    116     else 
    117         # LMDZ_COSP_OK=n : All cosp output are deactivated 
    118         LMDZ_COSP_monthly=.FALSE. 
    119         LMDZ_COSP_daily=.FALSE. 
    120         LMDZ_COSP_hf=.FALSE. 
    121     fi   
    122  
    123     ##  Read LMDZ_NMC_monthly in lmdz.card 
    124     if [ X${lmdz_UserChoices_LMDZ_NMC_monthly} = Xy ] ; then 
    125         LMDZ_NMC_monthly=.TRUE. 
    126     else 
    127         LMDZ_NMC_monthly=.FALSE. 
    128     fi 
    129      
    130     ## Read LMDZ_NMC_daily in lmdz.card 
    131     if [ X${lmdz_UserChoices_LMDZ_NMC_daily} = Xy ] ; then 
    132         LMDZ_NMC_daily=.TRUE. 
    133     else 
    134         LMDZ_NMC_daily=.FALSE. 
    135     fi 
    136      
    137     ## Read LMDZ_NMC_hf in lmdz.card 
    138     if [ X${lmdz_UserChoices_LMDZ_NMC_hf} = Xy ] ; then 
    139         LMDZ_NMC_hf=.TRUE. 
    140     else 
    141         LMDZ_NMC_hf=.FALSE. 
    142     fi 
    143  
    14450    IGCM_debug_PopStack "ATM_Initialize" 
    14551} 
     
    286192    IGCM_comp_modifyDefFile nonblocker config.def t_coupl   ${LMDZ_t_coupl}  
    287193 
    288     ##-- Add special treatement for CARBON CYCLE 
    289     if [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"control" ] || [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"historical" ] ; then 
    290         ATM_Carbon_Update 
    291     fi 
    292  
    293  
    294     ##-- Set LMDZ_COSP_daily1979=y in section UserChoices in lmdz.card to activate  
    295     ##   COSP daily output for years 1979 and later (mandatory for historical CMIP5 run). 
    296     if ([ X"${lmdz_UserChoices_LMDZ_COSP_daily1979}" = X"y" ] &&  [ ${year} -ge 1979 ]) ; then 
    297         LMDZ_COSP_daily=.TRUE. 
    298     fi 
    299  
    300     ## Modifiy  
    301     IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled ${ok_mensuel} 
    302     if [ X${OutLevel} = Xlow ] ; then 
    303         IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth output_level 5 
    304     elif [ X${OutLevel} = Xmedium ] ; then 
    305         IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth output_level 6 
    306     elif [ X${OutLevel} = Xhigh ] ; then 
    307         IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth output_level 7 
    308     fi 
    309      
    310     IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled ${ok_journe} 
    311      
    312     if [ X${OutLevel} = Xlow ] || [ X${OutLevel} = Xmedium ] ; then 
    313         IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 2 
    314     else 
    315         IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 5 
    316     fi 
    317      
    318     IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled ${ok_hf} 
    319      
    320     if [ X${OutLevel} = Xlow ] ; then 
    321         IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 5 
    322     elif [ X${OutLevel} = Xmedium ] ; then 
    323         IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 6 
    324     elif [ X${OutLevel} = Xhigh ] ; then 
    325         IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 7 
    326     fi 
    327          
    328     IGCM_comp_modifyXmlFile nonblocker file_def_histhf3h_lmdz.xml histhf3h enabled ${ok_hf3h} 
    329     IGCM_comp_modifyXmlFile nonblocker file_def_histhf3hm_lmdz.xml histhf3hm enabled ${ok_hf3hm} 
    330  
    331     IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled ${ok_stn} 
    332  
    333     IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled ${LMDZ_NMC_monthly} 
    334     IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled ${LMDZ_NMC_daily} 
    335     IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled ${LMDZ_NMC_hf} 
    336      
    337     IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP enabled ${LMDZ_COSP_monthly} 
    338     IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP enabled ${LMDZ_COSP_daily} 
    339     IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP enabled ${LMDZ_COSP_hf} 
    340  
    341     # Activate the histstrataer output file only for configuration with interactive stratospheric aersols  
    342     # done by setting the key word LMDZ_strataero=y in lmdz.card 
    343     if [ X${lmdz_UserChoices_LMDZ_strataero} = Xy ] ; then 
    344         IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled .TRUE. 
    345         IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer enabled .TRUE. 
    346     else 
    347         IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled .FALSE. 
    348         IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer enabled .FALSE. 
     194 
     195 
     196    ## Activate diagnostic output files and set output_level for each file 
     197 
     198    # histmth 
     199    if [ X${lmdz_UserChoices_output_level_histmth} = X ] || [ X${lmdz_UserChoices_output_level_histmth} = XNONE ] ; then 
     200        IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled FALSE 
     201        IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth output_level 0 
     202    else 
     203        IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth enabled TRUE 
     204        IGCM_comp_modifyXmlFile nonblocker file_def_histmth_lmdz.xml histmth output_level ${lmdz_UserChoices_output_level_histmth}  
     205    fi 
     206 
     207    # histday 
     208    if [ X${lmdz_UserChoices_output_level_histday} = X ] || [ X${lmdz_UserChoices_output_level_histday} = XNONE ] ; then 
     209        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled FALSE 
     210        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level 0 
     211    else 
     212        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday enabled TRUE 
     213        IGCM_comp_modifyXmlFile nonblocker file_def_histday_lmdz.xml histday output_level ${lmdz_UserChoices_output_level_histday}  
     214    fi 
     215 
     216    # histhf 
     217    if [ X${lmdz_UserChoices_output_level_histhf} = X ] || [ X${lmdz_UserChoices_output_level_histhf} = XNONE ] ; then 
     218        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled FALSE 
     219        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level 0 
     220    else 
     221        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf enabled TRUE 
     222        IGCM_comp_modifyXmlFile nonblocker file_def_histhf_lmdz.xml histhf output_level ${lmdz_UserChoices_output_level_histhf}  
     223    fi 
     224 
     225    # histmthNMC 
     226    if [ X${lmdz_UserChoices_output_level_histmthNMC} = X ] || [ X${lmdz_UserChoices_output_level_histmthNMC} = XNONE ] ; then 
     227        IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled FALSE 
     228        IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC output_level 0 
     229    else 
     230        IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC enabled TRUE 
     231        IGCM_comp_modifyXmlFile nonblocker file_def_histmthNMC_lmdz.xml histmthNMC output_level ${lmdz_UserChoices_output_level_histmthNMC}  
     232    fi 
     233 
     234    # histdayNMC 
     235    if [ X${lmdz_UserChoices_output_level_histdayNMC} = X ] || [ X${lmdz_UserChoices_output_level_histdayNMC} = XNONE ] ; then 
     236        IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled FALSE 
     237        IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC output_level 0 
     238    else 
     239        IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC enabled TRUE 
     240        IGCM_comp_modifyXmlFile nonblocker file_def_histdayNMC_lmdz.xml histdayNMC output_level ${lmdz_UserChoices_output_level_histdayNMC}  
     241    fi 
     242 
     243    # histhfNMC 
     244    if [ X${lmdz_UserChoices_output_level_histhfNMC} = X ] || [ X${lmdz_UserChoices_output_level_histhfNMC} = XNONE ] ; then 
     245        IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled FALSE 
     246        IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC output_level 0 
     247    else 
     248        IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC enabled TRUE 
     249        IGCM_comp_modifyXmlFile nonblocker file_def_histhfNMC_lmdz.xml histhfNMC output_level ${lmdz_UserChoices_output_level_histhfNMC}  
     250    fi 
     251 
     252    # histstrataer 
     253    if [ X${lmdz_UserChoices_output_level_histstrataer} = X ] || [ X${lmdz_UserChoices_output_level_histstrataer} = XNONE ] ; then 
     254        IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled FALSE 
     255        IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer output_level 0 
     256    else 
     257        IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer enabled TRUE 
     258        IGCM_comp_modifyXmlFile nonblocker file_def_histstrataer_lmdz.xml histstrataer output_level ${lmdz_UserChoices_output_level_histstrataer}  
     259    fi 
     260 
     261    # histdaystrataer 
     262    if [ X${lmdz_UserChoices_output_level_histdaystrataer} = X ] || [ X${lmdz_UserChoices_output_level_histdaystrataer} = XNONE ] ; then 
     263        IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer enabled FALSE 
     264        IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer output_level 0 
     265    else 
     266        IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer enabled TRUE 
     267        IGCM_comp_modifyXmlFile nonblocker file_def_histdaystrataer_lmdz.xml histdaystrataer output_level ${lmdz_UserChoices_output_level_histstrataer} 
     268    fi 
     269 
     270    # histstn 
     271    if [ X${lmdz_UserChoices_output_level_histstn} = X ] || [ X${lmdz_UserChoices_output_level_histstn} = XNONE ] ; then 
     272        IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled FALSE 
     273        IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn output_level 0 
     274    else 
     275        IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn enabled TRUE 
     276        IGCM_comp_modifyXmlFile nonblocker file_def_histstn_lmdz.xml histstn output_level ${lmdz_UserChoices_output_level_histstn}  
     277    fi 
     278 
     279 
     280    # histmthCOSP 
     281    if [ X${lmdz_UserChoices_output_level_histmthCOSP} = X ] || [ X${lmdz_UserChoices_output_level_histmthCOSP} = XNONE ] ; then 
     282        IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP enabled FALSE 
     283        IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP output_level 0 
     284    else 
     285        IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP enabled TRUE 
     286        IGCM_comp_modifyXmlFile nonblocker file_def_histmthCOSP_lmdz.xml histmthCOSP output_level ${lmdz_UserChoices_output_level_histmthCOSP}  
     287    fi 
     288 
     289 
     290    # histdayCOSP 
     291    if [ X${lmdz_UserChoices_output_level_histdayCOSP} = X ] || [ X${lmdz_UserChoices_output_level_histdayCOSP} = XNONE ] ; then 
     292        IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP enabled FALSE 
     293        IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP output_level 0 
     294    else 
     295        IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP enabled TRUE 
     296        IGCM_comp_modifyXmlFile nonblocker file_def_histdayCOSP_lmdz.xml histdayCOSP output_level ${lmdz_UserChoices_output_level_histdayCOSP}  
     297    fi 
     298 
     299 
     300    # histhfCOSP 
     301    if [ X${lmdz_UserChoices_output_level_histhfCOSP} = X ] || [ X${lmdz_UserChoices_output_level_histhfCOSP} = XNONE ] ; then 
     302        IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP enabled FALSE 
     303        IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP output_level 0 
     304    else 
     305        IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP enabled TRUE 
     306        IGCM_comp_modifyXmlFile nonblocker file_def_histhfCOSP_lmdz.xml histhfCOSP output_level ${lmdz_UserChoices_output_level_histhfCOSP}  
    349307    fi 
    350308 
     
    637595    IGCM_debug_PushStack "ATM_Finalize" 
    638596 
    639     # Add special treatement for CARBON CYCLE 
    640     if [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"control" ] || [ X"${lmdz_UserChoices_CARBON_CYCLE}" = X"historical" ] ; then 
    641         ATM_Carbon_Finalize 
    642     fi 
    643  
    644597    echo FINALIZE ATM ! 
    645598 
     
    647600} 
    648601 
    649  
    650  
    651 function ATM_Carbon_Update 
    652 { 
    653     # This fuction will be called only if CARBON_CYCLE is set to control or historical in lmdz.card 
    654  
    655     IGCM_debug_PushStack "ATM_Carbon_Update" 
    656  
    657     typeset InitPeriodCo2 InitDateBeginCo2 InitDateEndCo2 
    658     typeset CO2SBG CO2MBG CO2LU CO2_ppm CO2_ppm_prec fCO2_ff 
    659     typeset PathCO2log  
    660     typeset PreviousLinelog LastPeriodDateBegin LastPeriodDateEnd LastDatesPeriod LastPREFIX 
    661      
    662     if ( ${FirstInitialize} && [ X"${config_ATM_Restart}" = X"n" ] ) ; then 
    663         ##--Initialization of fluxes to an undefined value at the first run 
    664         UndefinedValueCo2=-9999 
    665         InitPeriodCo2=0 
    666         InitDateBeginCo2=${UndefinedValueCo2} 
    667         InitYearCo2=$(( ${year} - 1 ))  
    668         InitDateEndCo2=${InitYearCo2}1231 
    669         fCO2_ff=${UndefinedValueCo2}  
    670         CO2SBG=${UndefinedValueCo2} 
    671         CO2LU=${UndefinedValueCo2} 
    672         CO2MBG=${UndefinedValueCo2} 
    673         CO2_ppm_prec=${UndefinedValueCo2} 
    674         # Get the initial value of atmosp. pco2  
    675         CO2_ppm=${lmdz_UserChoices_co2_init} 
    676          
    677         IGCM_sys_Cp ${SUBMIT_DIR}/co2.log.init ${SUBMIT_DIR}/co2.log 
    678         IGCM_sys_Chmod u+w ${SUBMIT_DIR}/co2.log 
    679          
    680         # Save CO2 values in ExeCpuLog variable contents 5 fields 
    681         echo "${InitPeriodCo2} ${InitDateBeginCo2} ${InitDateEndCo2} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \ 
    682             gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \ 
    683                               $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log 
    684          
    685         # Get the path where the log file co2.log is 
    686         PathCO2log=${SUBMIT_DIR}  
    687         # Get Previous line in co2.log 
    688         PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log ) 
    689          
    690     else 
    691          
    692         # NEW parameter in config.card (even for Overule all restarts, you must modify the line after this comment ): 
    693         # !! NEW for Carbone cycle !! Path where to find old co2.log file for restart CO2. 
    694         #SubmitRestartPath= 
    695         if ( ${FirstInitialize} && [ X"${config_ATM_Restart}" = X"y" ] ) ; then 
    696             IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card ATM SubmitRestartPath 
    697             PathCO2log=${config_ATM_SubmitRestartPath} 
    698             Date_r=$( IGCM_date_ConvertFormatToGregorian ${config_ATM_RestartDate} ) 
    699             PreviousLinelog=$( grep ${Date_r} ${PathCO2log}/co2.log ) 
    700              
    701             IGCM_sys_Cp ${SUBMIT_DIR}/co2.log.init ${SUBMIT_DIR}/co2.log 
    702             IGCM_sys_Chmod u+w ${SUBMIT_DIR}/co2.log 
    703              
    704             # Save Last Line of control in new co2.log file 
    705             InitPeriodCo2=0    
    706             InitDateBeginCo2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $2}' ) 
    707             InitDateEndCo2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $3}' ) 
    708             fCO2_ff=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $6}' ) 
    709             CO2SBG=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $8}' ) 
    710             CO2LU=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $9}' ) 
    711             CO2MBG=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $7}' ) 
    712             CO2_ppm_prec=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $5}' ) 
    713             CO2_ppm=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' ) 
    714              
    715             echo "${InitPeriodCo2} ${InitDateBeginCo2} ${InitDateEndCo2} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \ 
    716                 gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \ 
    717                               $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log 
    718         else 
    719            # Get restart line in co2.log 
    720             PathCO2log=${SUBMIT_DIR} 
    721             PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log ) 
    722            # Get the value of atmosp. pco2 in co2.log 
    723             CO2_ppm=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' ) 
    724         fi 
    725          
    726     fi 
    727      
    728     if [ ${lmdz_UserChoices_CARBON_CYCLE} = historical ] ; then 
    729         # Modify co2_ppm in config.def only for historical run 
    730         # If not historical run, keep co2_ppm value set earlier by IGCM_comp_modifyDefFile 
    731         IGCM_comp_modifyDefFile force config.def co2_ppm     ${CO2_ppm} 
    732     fi 
    733     IGCM_debug_PopStack "ATM_Carbon_Update" 
    734 } 
    735  
    736  
    737 function ATM_Carbon_Finalize 
    738 { 
    739     # This fuction will be called only if CARBON_CYCLE is set to control or historical in lmdz.card 
    740  
    741     IGCM_debug_PushStack "ATM_Carbon_Finalize" 
    742  
    743     typeset CO2SBG_3V CO2SBG CO2MBG CO2SRF CO2LU CO2_ppm CO2_ppm_prec fCO2_ff 
    744      
    745         # Fossil fuel emission 
    746     if [ ${lmdz_UserChoices_CARBON_CYCLE} = control ] ; then 
    747             # For Control, no fossil fuel emission : 
    748         fCO2_ff=0 
    749         echo "Fossil Fuel for control run  :" ${fCO2_ff} 
    750     else 
    751             # For historical, get the fossile fuel file : 
    752         fCO2_ff=$( gawk "{if (match(\$0,\"${year}\ *${month}\")) {print \$3}}" ${SUBMIT_DIR}/PARAM/CMIP5_gridcar_CO2_emissions_fossil_fuel_Andres_1751-2007_monthly_SC.txt ) 
    753         echo "Fossil Fuel for historical run  :" ${fCO2_ff} 
    754     fi 
    755      
    756         # Get the value of ocean carbon flux 
    757     CO2MBG=$( ${SUBMIT_DIR}/COMP/lmdz_analyse_pisces_out.awk ocean.output ) 
    758     CO2MBG=$( echo ${CO2MBG} | sed -e "s/ *//" ) 
    759     echo "Ocean carbon flux  :" ${CO2MBG} 
    760      
    761         # Get the value of land fluxes 
    762     set +A CO2SBG_3V -- $( ${SUBMIT_DIR}/COMP/lmdz_analyse_stomate_out.awk out_orchidee_0000 ) 
    763     CO2SRF=$( echo ${CO2SBG_3V[0]} | sed -e "s/ *//" ) 
    764     CO2LU=$( echo ${CO2SBG_3V[1]} | sed -e "s/ *//" ) 
    765     CO2SBG=$( echo ${CO2SBG_3V[2]} | sed -e "s/ *//" ) 
    766     echo "Land carbon flux (NEP)         :" ${CO2SRF} 
    767     echo "LU flux          (FLUC)        :" ${CO2LU} 
    768     echo "Total Land carbon flux (NBP)   :" ${CO2SBG} 
    769      
    770         # Previous CO2 
    771     CO2_ppm_prec=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' ) 
    772     echo "Previous CO2  :" ${CO2_ppm_prec} 
    773      
    774         # Formula 
    775     CO2_ppm=$( echo "${CO2_ppm_prec} + (${fCO2_ff} + ${CO2MBG} + ${CO2SBG}) / 2.12" | bc -l ) 
    776     echo "New CO2  :" ${CO2_ppm} 
    777      
    778         # Save CO2 values in ExeCpuLog variable contents 5 fields 
    779     echo "${CumulPeriod} ${PeriodDateBegin} ${PeriodDateEnd} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \ 
    780         gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \ 
    781                            $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log 
    782      
    783     IGCM_debug_PopStack "ATM_Carbon_Finalize" 
    784 } 
Note: See TracChangeset for help on using the changeset viewer.