Changeset 382


Ignore:
Timestamp:
2011-08-01T16:11:34+02:00 (13 years ago)
Author:
didier.solyga
Message:

Merge the revisions 373 + 376 to 389 from the trunk in the externalized version

Location:
branches/ORCHIDEE_EXT/ORCHIDEE_OL
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/FORCESOIL/COMP/stomate.card

    r263 r382  
    2828 
    2929[OutputText] 
    30 List=   (stomate.def, driver.def, used_run.def, out_forcesoil) 
     30List=   (used_stomate.def, used_driver.def, used_run.def, out_forcesoil, out_orchidee) 
    3131 
    3232[OutputFiles] 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/FORCESOIL/COMP/stomate.driver

    r263 r382  
    5858 
    5959    IGCM_debug_PopStack "SBG_Initialize" 
     60} 
     61 
     62#----------------------------------------------------------------- 
     63function SBG_PeriodStart 
     64{ 
     65    IGCM_debug_PushStack "SBG_PeriodStart" 
     66 
     67    IGCM_debug_PopStack "SBG_PeriodStart" 
    6068} 
    6169 
     
    125133    fi 
    126134 
    127     DRIVER_sed TIME_LENGTH ${PeriodLengthInDays}D 
     135    DRIVER_sed TIME_LENGTH ${PeriodLengthInYears}Y 
    128136#    DRIVER_sed TIME_SKIP ${OldSimulationLengthInDays}D 
    129137 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/FORCESOIL/PARAM/run.def

    r263 r382  
    22# 
    33INCLUDEDEF=driver.def 
    4 INCLUDEDEF=sechiba.def 
    54INCLUDEDEF=stomate.def 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC/COMP/orchidee_ol.card

    r263 r382  
    88# If you want to use the same forcing file 
    99NORESTART=n 
     10# If you want use config.card PeriodLength for TIME_LENGTH 
     11TIMELENGTH=y 
    1012 
    1113[InitialStateFiles] 
     
    2830 
    2931[OutputText] 
    30 List=   (used_driver.def, out_orchidee_ol) 
     32List=   (used_driver.def, used_run.def, out_orchidee_ol) 
    3133# avec la // : out_orchidee_* 
    3234 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC/COMP/orchidee_ol.driver

    r263 r382  
    4545    IGCM_debug_PushStack "OOL_Update" 
    4646 
    47     case ${config_UserChoices_PeriodLength} in 
    48         *Y|*y|*M|*m|*D|*d) 
    49             DRIVER_sed TIME_LENGTH ${PeriodLengthInDays}D 
    50             ;; 
    51         *s) 
    52             DRIVER_sed TIME_LENGTH ${config_UserChoices_PeriodLength} 
    53     esac 
     47    if [ X"${orchidee_ol_UserChoices_TIMELENGTH}" = Xy ] ; then 
     48        case ${config_UserChoices_PeriodLength} in 
     49            *Y|*y|*M|*m|*D|*d) 
     50                DRIVER_sed TIME_LENGTH ${PeriodLengthInDays}D 
     51                ;; 
     52            *s) 
     53                DRIVER_sed TIME_LENGTH ${config_UserChoices_PeriodLength} 
     54        esac 
     55    fi 
    5456 
    5557    if ( ${FirstInitialize} ) ; then 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC/COMP/sechiba.card

    r263 r382  
    55LAIMAP=n 
    66IMPOSE_VEG=n 
     7# if IMPOSE_VEG = n 
    78LAND_USE=n 
     9# if LAND_USE=y 
    810VEGET_UPDATE=1Y 
     11# if LAND_USE=n and we want to use carteveg5km.nc for maxvegetfrac map. 
     12# (instead of default PFTmap_1850to2005_AR5_LUHa.rc2 below) 
     13OLD_VEGET=n 
    914ROUTING=n 
    1015NEWHYDROL=n 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC/COMP/sechiba.driver

    r263 r382  
    2626    RESOL_SRF=ALL 
    2727     
     28    typeset frequency 
    2829    for frequency in ${config_SRF_WriteFrequency} ; do 
    2930        case ${frequency} in 
     
    6263    typeset SECHIBA_WRITE_STEP 
    6364 
     65    # Get WriteFrenquecies from config.card for SECHIBA 
    6466    SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' )  
    6567    case ${SRF_WriteFrequency} in 
     
    108110            IGCM_debug_Verif_Exit ;; 
    109111    esac 
     112    SECHIBA_sed WRITE_STEP ${SECHIBA_WRITE_STEP} 
     113    SECHIBA_sed SECHIBA_HISTLEVEL ${sechiba_UserChoices_sechiba_LEVEL} 
     114 
     115    # Outputs HF in HISTFILE2 if required 
     116    if [ X${SRF_ok_hf} = Xy ] ; then 
     117        SECHIBA_sed SECHIBA_HISTFILE2 y 
     118        SECHIBA_sed SECHIBA_HISTLEVEL2 1 
     119        SECHIBA_sed WRITE_STEP2 10800.0 
     120    fi 
    110121 
    111122    SECHIBA_sed STOMATE_OK_CO2 ${sechiba_UserChoices_OKCO2} 
     
    114125    SECHIBA_sed HYDROL_CWRR ${sechiba_UserChoices_NEWHYDROL} 
    115126 
    116     SECHIBA_sed WRITE_STEP ${SECHIBA_WRITE_STEP} 
    117     SECHIBA_sed SECHIBA_HISTLEVEL ${sechiba_UserChoices_sechiba_LEVEL} 
     127    if [ X${sechiba_UserChoices_IMPOSE_VEG} = Xn ] ; then 
     128        if [ X${sechiba_UserChoices_LAND_USE} = Xy ] ; then 
     129            SECHIBA_sed VEGET_UPDATE ${sechiba_UserChoices_VEGET_UPDATE} 
    118130 
    119     # Outputs HF in HISTFILE2 if required 
    120     [ X${SRF_ok_hf} = Xy ] && SECHIBA_sed SECHIBA_HISTFILE2 y 
    121     SECHIBA_sed SECHIBA_HISTLEVEL2 1 
    122     SECHIBA_sed WRITE_STEP2 10800.0 
    123  
    124     if [ X${sechiba_UserChoices_LAND_USE} = Xy ] ; then 
    125       SECHIBA_sed LAND_USE ${sechiba_UserChoices_LAND_USE} 
    126       SECHIBA_sed VEGET_UPDATE ${sechiba_UserChoices_VEGET_UPDATE} 
    127  
    128       ##MM : cutting PFTmaps of ORCHIDEE : for first year without restart, we must use this year map 
    129       ##     WARNING : the next year map must be avaible and the december month, then this device will 
    130       ##               only work with PeriodLength scrictly less than 1Y. 
    131       # If you want to come back to old BIG LAND USE file 
    132       # (to run on multipple years, just one time with LAND USE activated),  
    133       # you must  
    134       # comment all next 8 lines and check correct parameters in sechiba.def file 
    135       # for your LAND USE specific file. 
    136         SECHIBA_sed VEGET_REINIT y 
    137         if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 
    138             SECHIBA_sed VEGET_YEAR 1 
    139         else 
    140             SECHIBA_sed VEGET_YEAR 0 
    141             IGCM_sys_Mv -f PFTmap_IPCC_${year_p1}.nc PFTmap.nc 
     131            ##MM : cutting PFTmaps of ORCHIDEE : for first year without restart, we must use this year map 
     132            ##     WARNING : the next year map must be avaible and the december month, then this device will 
     133            ##               only work with PeriodLength scrictly less than 1Y. 
     134            # If you want to come back to old BIG LAND USE file 
     135            # (to run on multipple years, just one time with LAND USE activated),  
     136            # you must  
     137            # comment all next 8 lines and check correct parameters in sechiba.def file 
     138            # for your LAND USE specific file. 
     139            SECHIBA_sed VEGET_REINIT y 
     140            if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 
     141                SECHIBA_sed VEGET_YEAR 1 
     142            else 
     143                SECHIBA_sed VEGET_YEAR 0 
     144                IGCM_sys_Mv -f PFTmap_IPCC_${year_p1}.nc PFTmap.nc 
     145            fi 
     146        elif [ X${sechiba_UserChoices_OLD_VEGET} = Xy ] ; then 
     147            SECHIBA_sed LAND_USE n 
    142148        fi 
     149    else 
     150        SECHIBA_sed IMPOSE_VEG y 
    143151    fi 
    144152 
    145     SECHIBA_sed IMPOSE_VEG ${sechiba_UserChoices_IMPOSE_VEG} 
    146      
    147153    if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 
    148154        SECHIBA_sed SECHIBA_reset_time y 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC_STO/COMP/orchidee_ol.card

    r263 r382  
    3030 
    3131[OutputText] 
    32 List=   (used_driver.def, out_orchidee_ol) 
     32List=   (used_driver.def, used_run.def, out_orchidee_ol) 
    3333# avec la // : out_orchidee_* 
    3434 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC_STO/COMP/sechiba.card

    r263 r382  
    55LAIMAP=n 
    66IMPOSE_VEG=n 
     7# if IMPOSE_VEG = n 
    78LAND_USE=n 
     9# if LAND_USE=y 
    810VEGET_UPDATE=1Y 
     11# if LAND_USE=n and we want to use carteveg5km.nc for maxvegetfrac map. 
     12# (instead of default PFTmap_1850to2005_AR5_LUHa.rc2 below) 
     13OLD_VEGET=n 
    914ROUTING=n 
    1015NEWHYDROL=n 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC_STO/COMP/sechiba.driver

    r263 r382  
    6363    typeset SECHIBA_WRITE_STEP 
    6464 
     65    # Get WriteFrenquecies from config.card for SECHIBA 
    6566    SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' )  
    6667    case ${SRF_WriteFrequency} in 
     
    109110            IGCM_debug_Verif_Exit ;; 
    110111    esac 
    111  
    112     SECHIBA_sed STOMATE_OK_CO2 ${sechiba_UserChoices_OKCO2} 
    113  
    114     SECHIBA_sed RIVER_ROUTING ${sechiba_UserChoices_ROUTING} 
    115     SECHIBA_sed HYDROL_CWRR ${sechiba_UserChoices_NEWHYDROL} 
    116  
    117112    SECHIBA_sed WRITE_STEP ${SECHIBA_WRITE_STEP} 
    118113    SECHIBA_sed SECHIBA_HISTLEVEL ${sechiba_UserChoices_sechiba_LEVEL} 
     
    123118    SECHIBA_sed WRITE_STEP2 10800.0 
    124119 
    125     if [ X${sechiba_UserChoices_LAND_USE} = Xy ] ; then 
    126       SECHIBA_sed LAND_USE ${sechiba_UserChoices_LAND_USE} 
    127       SECHIBA_sed VEGET_UPDATE ${sechiba_UserChoices_VEGET_UPDATE} 
     120    SECHIBA_sed STOMATE_OK_CO2 ${sechiba_UserChoices_OKCO2} 
    128121 
    129       ##MM : cutting PFTmaps of ORCHIDEE : for first year without restart, we must use this year map 
    130       ##     WARNING : the next year map must be avaible and the december month, then this device will 
    131       ##               only work with PeriodLength scrictly less than 1Y. 
    132       # If you want to come back to old BIG LAND USE file 
    133       # (to run on multipple years, just one time with LAND USE activated),  
    134       # you must  
    135       # comment all next 8 lines and check correct parameters in sechiba.def file 
    136       # for your LAND USE specific file. 
    137         SECHIBA_sed VEGET_REINIT y 
    138         if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 
    139             SECHIBA_sed VEGET_YEAR 1 
    140         else 
    141             SECHIBA_sed VEGET_YEAR 0 
    142             IGCM_sys_Mv -f PFTmap_IPCC_${year_p1}.nc PFTmap.nc 
     122    SECHIBA_sed RIVER_ROUTING ${sechiba_UserChoices_ROUTING} 
     123    SECHIBA_sed HYDROL_CWRR ${sechiba_UserChoices_NEWHYDROL} 
     124 
     125    if [ X${sechiba_UserChoices_IMPOSE_VEG} = Xn ] ; then 
     126        if [ X${sechiba_UserChoices_LAND_USE} = Xy ] ; then 
     127            SECHIBA_sed VEGET_UPDATE ${sechiba_UserChoices_VEGET_UPDATE} 
     128 
     129            ##MM : cutting PFTmaps of ORCHIDEE : for first year without restart, we must use this year map 
     130            ##     WARNING : the next year map must be avaible and the december month, then this device will 
     131            ##               only work with PeriodLength scrictly less than 1Y. 
     132            # If you want to come back to old BIG LAND USE file 
     133            # (to run on multipple years, just one time with LAND USE activated),  
     134            # you must  
     135            # comment all next 8 lines and check correct parameters in sechiba.def file 
     136            # for your LAND USE specific file. 
     137            SECHIBA_sed VEGET_REINIT y 
     138            if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 
     139                SECHIBA_sed VEGET_YEAR 1 
     140            else 
     141                SECHIBA_sed VEGET_YEAR 0 
     142                IGCM_sys_Mv -f PFTmap_IPCC_${year_p1}.nc PFTmap.nc 
     143            fi 
     144        elif [ X${sechiba_UserChoices_OLD_VEGET} = Xy ] ; then 
     145            SECHIBA_sed LAND_USE n 
    143146        fi 
     147    else 
     148        SECHIBA_sed IMPOSE_VEG y 
    144149    fi 
    145150 
    146     SECHIBA_sed IMPOSE_VEG ${sechiba_UserChoices_IMPOSE_VEG} 
    147      
    148151    if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 
    149152        SECHIBA_sed SECHIBA_reset_time y 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC_STO/COMP/stomate.card

    r263 r382  
    3838TimeSeriesVars2D= (T2M_MONTH,CONTFRAC,RESOLUTION_X,RESOLUTION_Y,CONVFLUX,CFLUX_PROD10,CFLUX_PROD100,CO2FLUX_MONTHLY_SUM,HARVEST_ABOVE) 
    3939ChunckJob2D = NONE 
    40 TimeSeriesVars3D = (CO2FLUX,LAI,VEGET,VEGET_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,AGE,HEIGHT,TOTAL_M,TOTAL_BM_LITTER,TOTAL_SOIL_CARB) 
     40TimeSeriesVars3D= (CO2FLUX,LAI,VEGET,VEGET_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,AGE,HEIGHT,TOTAL_M,TOTAL_BM_LITTER,TOTAL_SOIL_CARB,ADAPTATION,REGENERATION) 
    4141ChunckJob3D = NONE 
    4242Seasonal=ON 
     
    4545Patches= () 
    4646GatherWithInternal= (lon, lat, PFT, time_counter, Areas) 
    47 TimeSeriesVars2D=(cVeg, cLitter, cSoil, cProduct, lai, gpp, ra, npp, rh, fFire, fHarvest, fLuc, nbp, fVegLitter, fLitterSoil, cLeaf, cWood, cRoot, cMisc, cLitterAbove, cLitterBelow, cSoilFast, cSoilMedium, cSoilSlow, landCoverFrac, treeFracPrimDec, treeFracPrimEver, c3PftFrac, c4PftFrac, rGrowth, rMaint, nppLeaf, nppWood, nppRoot, nep) 
     47TimeSeriesVars2D=(cVeg, cLitter, cSoil, cProduct, cMassVariation, lai, gpp, ra, npp, rh, fFire, fHarvest, fLuc, nbp, fVegLitter, fLitterSoil, cLeaf, cWood, cRoot, cMisc, cLitterAbove, cLitterBelow, cSoilFast, cSoilMedium, cSoilSlow, landCoverFrac, treeFracPrimDec, treeFracPrimEver, c3PftFrac, c4PftFrac, rGrowth, rMaint, nppLeaf, nppWood, nppRoot, nep) 
    4848ChunckJob2D = NONE 
    4949TimeSeriesVars3D=() 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC_STO/COMP/stomate.driver

    r263 r382  
    3232     
    3333    IGCM_debug_PopStack "SBG_Initialize" 
     34} 
     35 
     36#----------------------------------------------------------------- 
     37function SBG_PeriodStart 
     38{ 
     39    IGCM_debug_PushStack "SBG_PeriodStart" 
     40 
     41    IGCM_debug_PopStack "SBG_PeriodStart" 
    3442} 
    3543 
     
    105113function SBG_Finalize 
    106114{ 
    107 #set -vx 
    108115    IGCM_debug_PushStack "SBG_Finalize" 
    109116 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/SPINUP/COMP/spinup.card

    r263 r382  
    117117#                          Qs, Qsb, Qsm, DelSoilMoist, DelSWE, DelIntercept, AvgSurfT, RadT, Albedo, SWE, SoilMoist, SoilWet, SoilTemp, PotEvap, \ 
    118118#                          ECanop, TVeg, ESoil, RootMoist, SubSnow, ACond, SnowFrac, SAlbedo, SnowDepth, dis, GPP) 
    119 stomate_TimeSeriesVars2D=(T2M_MONTH, CONTFRAC, RESOLUTION_X, RESOLUTION_Y, CONVFLUX, CFLUX_PROD10, CFLUX_PROD100,HARVEST_ABOVE) 
    120 stomate_TimeSeriesVars3D=(CO2FLUX_MONTHLY,LAI,VEGET,VEGET_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,AGE,HEIGHT,TOTAL_M,TOTAL_BM_LITTER,TOTAL_SOIL_CARB) 
     119stomate_TimeSeriesVars2D=(T2M_MONTH, CONTFRAC, RESOLUTION_X, RESOLUTION_Y, CONVFLUX, CFLUX_PROD10, CFLUX_PROD100,CO2FLUX_MONTHLY_SUM,HARVEST_ABOVE) 
     120stomate_TimeSeriesVars3D=(CO2FLUX,LAI,VEGET,VEGET_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,AGE,HEIGHT,TOTAL_M,TOTAL_BM_LITTER,TOTAL_SOIL_CARB,ADAPTATION,REGENERATION) 
    121121 
    122122# !!! DO NOT MODIFY spinup.card AFTER THIS LINE !!!  
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/SPINUP/COMP/spinup.driver

    r263 r382  
    235235    fi 
    236236 
     237    if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then 
     238        gawk -- "{if (! match(\$0,/^# .Date.*/) ) { print \$0 } else { printf(\"BATCH_NUM_PROC_TOT=%d \\n\\n\",${config_UserChoices_JobNumProcTot}) ; print \$0 } }" \ 
     239            ${New_SUBMIT_DIR}/Job_${SubJobName} > ${New_SUBMIT_DIR}/Job_${SubJobName}_ 
     240        IGCM_sys_Mv ${New_SUBMIT_DIR}/Job_${SubJobName}_ ${New_SUBMIT_DIR}/Job_${SubJobName} 
     241        chmod u+x ${New_SUBMIT_DIR}/Job_${SubJobName} 
     242    fi 
     243 
    237244    IGCM_debug_PopStack "SPIN_Cp_Job" 
    238245} 
     
    329336    # Nb years for forcing FORCESOIL 
    330337    STOMATE_sed FORCESOIL_NB_YEAR ${PeriodLengthInYears} 
     338    STOMATE_sed FORCESOIL_STEP_PER_YEAR 365 
     339    # Force creation of stomate_forcing.nc and stomate_Cforcing files 
     340    STOMATE_sed STOMATE_FORCING_NAME stomate_forcing.nc 
     341    STOMATE_sed STOMATE_CFORCING_NAME stomate_Cforcing.nc 
    331342     
    332343    IGCM_debug_PopStack "SPIN_OptionsStomate" 
     
    576587            SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/OOL_SEC ${ExtName} 
    577588 
    578             # For some jobs : 
    579             if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then 
    580                 gawk -- "{if (! match(\$0,/^# .Date.*/) ) { print \$0 } else { printf(\"BATCH_NUM_PROC_TOT=%d \\n\\n\",${config_UserChoices_JobNumProcTot}) ; print \$0 } }" \ 
    581                     ${New_SUBMIT_DIR}/Job_${SubJobName} > ${New_SUBMIT_DIR}/Job_${SubJobName}_ 
    582                 IGCM_sys_Mv ${New_SUBMIT_DIR}/Job_${SubJobName}_ ${New_SUBMIT_DIR}/Job_${SubJobName} 
    583                 chmod u+x ${New_SUBMIT_DIR}/Job_${SubJobName} 
    584             fi 
    585              
    586589            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF Restart n 
    587590     
     
    600603            SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/OOL_SEC_STO ${ExtName} 
    601604 
    602             # For some jobs : 
    603             if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then 
    604                 gawk -- "{if (! match(\$0,/^# .Date.*/) ) { print \$0 } else { printf(\"BATCH_NUM_PROC_TOT=%d \\n\\n\",${config_UserChoices_JobNumProcTot}) ; print \$0 } }" \ 
    605                     ${New_SUBMIT_DIR}/Job_${SubJobName} > ${New_SUBMIT_DIR}/Job_${SubJobName}_ 
    606                 IGCM_sys_Mv ${New_SUBMIT_DIR}/Job_${SubJobName}_ ${New_SUBMIT_DIR}/Job_${SubJobName} 
    607                 chmod u+x ${New_SUBMIT_DIR}/Job_${SubJobName} 
    608             fi 
    609              
    610605            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF Restart n 
    611606            if [ X"${spinup_UserChoices_ok_stomate}" = "Xy" ] ; then 
     
    631626            # !!! must not have been modified !!! 
    632627            SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/TESTSTOMATE ${ExtName} 
    633             IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card UserChoices JobNumProcTot 1 
    634             gawk -- "{if (! match(\$0,/^# .Date.*/) ) { print \$0 } else { printf(\"BATCH_NUM_PROC_TOT=%d \\n\\n\",1) ; print \$0 } }" \ 
    635                 ${New_SUBMIT_DIR}/Job_${SubJobName} > ${New_SUBMIT_DIR}/Job_${SubJobName}_ 
    636             IGCM_sys_Mv ${New_SUBMIT_DIR}/Job_${SubJobName}_ ${New_SUBMIT_DIR}/Job_${SubJobName} 
    637             chmod u+x ${New_SUBMIT_DIR}/Job_${SubJobName} 
    638628 
    639629            # Always restart for teststomate 
    640630            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Restarts OverRule n 
    641631            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF Restart y 
    642             IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF RestartDate $( IGCM_date_ConvertFormatToHuman ${output_PreviousStage_LastRestartDate} ) 
     632            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF RestartDate ${output_PreviousStage_LastRestartDate} 
    643633            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG Restart y 
    644             IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG RestartDate $( IGCM_date_ConvertFormatToHuman ${output_PreviousStage_LastRestartDate} ) 
     634            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG RestartDate ${output_PreviousStage_LastRestartDate} 
    645635 
    646636            # Define restart simulation name 
     
    663653            IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card UserChoices LAND_USE ${spinup_UserChoices_land_use} 
    664654 
     655            typeset option 
     656            for option in ${config_SubJobPost[*]} ; do 
     657                eval value=\${config_SubJobPost_${option}} 
     658                eval echo ${option} ${value} 
     659                if [ X${value} != X ] ; then 
     660                    eval IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Post ${option} \${config_SubJobPost_${option}} 
     661                fi 
     662            done 
     663            eval IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Post TimeSeriesFrequency ${config_SubJob_PeriodLength} 
     664 
    665665            SPIN_OptionsStomate 
    666666 
     
    678678            else 
    679679                SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/OOL_SEC ${ExtName} 
    680             fi 
    681  
    682             # For some jobs : 
    683             if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then 
    684                 gawk -- "{if (! match(\$0,/^# .Date.*/) ) { print \$0 } else { printf(\"BATCH_NUM_PROC_TOT=%d \\n\\n\",${config_UserChoices_JobNumProcTot}) ; print \$0 } }" \ 
    685                     ${New_SUBMIT_DIR}/Job_${SubJobName} > ${New_SUBMIT_DIR}/Job_${SubJobName}_ 
    686                 IGCM_sys_Mv ${New_SUBMIT_DIR}/Job_${SubJobName}_ ${New_SUBMIT_DIR}/Job_${SubJobName} 
    687                 chmod u+x ${New_SUBMIT_DIR}/Job_${SubJobName} 
    688680            fi 
    689681 
     
    742734            fi 
    743735 
     736            SPIN_OptionsSechiba 
    744737            if [ X"${spinup_UserChoices_ok_stomate}" = "Xy" ] ; then 
    745                 SPIN_OptionsSechiba 
    746738                SPIN_OptionsStomate 
    747             else 
    748                 SPIN_OptionsSechiba 
    749739            fi 
    750740 
     
    761751            # !!! must not have been modified !!! 
    762752            SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/TESTSTOMATE ${ExtName} 
    763             IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card UserChoices JobNumProcTot 1 
    764             gawk -- "{if (! match(\$0,/^# .Date.*/) ) { print \$0 } else { printf(\"BATCH_NUM_PROC_TOT=%d \\n\\n\",1) ; print \$0 } }" \ 
    765                 ${New_SUBMIT_DIR}/Job_${SubJobName} > ${New_SUBMIT_DIR}/Job_${SubJobName}_ 
    766             IGCM_sys_Mv ${New_SUBMIT_DIR}/Job_${SubJobName}_ ${New_SUBMIT_DIR}/Job_${SubJobName} 
    767             chmod u+x ${New_SUBMIT_DIR}/Job_${SubJobName} 
    768753 
    769754            # Always restart for teststomate 
    770755            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Restarts OverRule n 
    771756            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF Restart y 
    772             IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF RestartDate $( IGCM_date_ConvertFormatToHuman ${output_PreviousStage_LastRestartDate} ) 
     757            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF RestartDate ${output_PreviousStage_LastRestartDate} 
    773758            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG Restart y 
    774             IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG RestartDate $( IGCM_date_ConvertFormatToHuman ${output_PreviousStage_LastRestartDate} ) 
     759            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG RestartDate ${output_PreviousStage_LastRestartDate} 
    775760 
    776761            # Define restart simulation name 
     
    790775            IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card UserChoices IMPOSE_VEG ${spinup_UserChoices_impose_veg} 
    791776            IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card UserChoices LAND_USE ${spinup_UserChoices_land_use} 
     777 
     778            typeset option 
     779            for option in ${config_SubJobPost[*]} ; do 
     780                eval value=\${config_SubJobPost_${option}} 
     781                eval echo ${option} ${value} 
     782                if [ X${value} != X ] ; then 
     783                    eval IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Post ${option} \${config_SubJobPost_${option}} 
     784                fi 
     785            done 
     786            eval IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Post TimeSeriesFrequency ${config_SubJob_PeriodLength} 
     787 
    792788            SPIN_OptionsStomate 
    793789 
     
    804800            SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/FORCESOIL ${ExtName} 
    805801 
    806             # For some jobs : 
    807             if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then 
    808                 gawk -- "{if (! match(\$0,/^# .Date.*/) ) { print \$0 } else { printf(\"BATCH_NUM_PROC_TOT=%d \\n\\n\",${config_UserChoices_JobNumProcTot}) ; print \$0 } }" \ 
    809                     ${New_SUBMIT_DIR}/Job_${SubJobName} > ${New_SUBMIT_DIR}/Job_${SubJobName}_ 
    810                 IGCM_sys_Mv ${New_SUBMIT_DIR}/Job_${SubJobName}_ ${New_SUBMIT_DIR}/Job_${SubJobName} 
    811                 chmod u+x ${New_SUBMIT_DIR}/Job_${SubJobName} 
    812             fi 
    813  
    814802            # Always restart for forcesoil 
    815803            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Restarts OverRule n 
    816804            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG Restart y 
    817             IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG RestartDate $( IGCM_date_ConvertFormatToHuman ${output_PreviousStage_LastRestartDate} ) 
     805            IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG RestartDate ${output_PreviousStage_LastRestartDate} 
    818806 
    819807            # Define restart simulation name 
     
    824812 
    825813            # We Get the forcing file from the previous run of ORCHIDEE 
    826             ORCHIDEE_JobName=${config_UserChoices_JobName}ORC_${iter} 
    827             IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/output.card PreviousStage LastORCRestartDate 
    828             if ( [ X${spinup_UserChoices_DEBUG_SPIN} = Xn ] && [ X${output_PreviousStage_LastExtName} != XORC_${iter} ] ) ; then   
    829                 last_Cforcing=${config_SBG_RestartPath}/${config_UserChoices_JobName}/SPIN/Output/${ORCHIDEE_JobName}/SBG/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastORCRestartDate}_stomate_Cforcing.nc 
     814            ORCHIDEE_JobName=${config_UserChoices_JobName}${output_PreviousStage_LastExtName} 
     815            IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/output.card PreviousStage LastRestartDate 
     816            if ( [ X${spinup_UserChoices_DEBUG_SPIN} = Xn ] ) ; then   
     817                last_Cforcing=${config_SBG_RestartPath}/${config_UserChoices_JobName}/SPIN/Output/${ORCHIDEE_JobName}/SBG/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_stomate_Cforcing.nc 
    830818            else 
    831                 last_Cforcing=${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SBG/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastORCRestartDate}_stomate_Cforcing.nc 
     819                last_Cforcing=${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SBG/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_stomate_Cforcing.nc 
    832820            fi 
    833821            ls -lrt ${last_Cforcing} 
     
    836824            # Nb years for forcing FORCESOIL 
    837825            STOMATE_sed FORCESOIL_NB_YEAR ${PeriodLengthInYears} 
     826            STOMATE_sed FORCESOIL_STEP_PER_YEAR 365 
    838827 
    839828            ;; 
     
    850839            else 
    851840                SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/OOL_SEC ${ExtName} 
    852             fi 
    853  
    854             # For some jobs : 
    855             if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then 
    856                 gawk -- "{if (! match(\$0,/^# .Date.*/) ) { print \$0 } else { printf(\"BATCH_NUM_PROC_TOT=%d \\n\\n\",${config_UserChoices_JobNumProcTot}) ; print \$0 } }" \ 
    857                     ${New_SUBMIT_DIR}/Job_${SubJobName} > ${New_SUBMIT_DIR}/Job_${SubJobName}_ 
    858                 IGCM_sys_Mv ${New_SUBMIT_DIR}/Job_${SubJobName}_ ${New_SUBMIT_DIR}/Job_${SubJobName} 
    859                 chmod u+x ${New_SUBMIT_DIR}/Job_${SubJobName} 
    860841            fi 
    861842 
     
    877858            fi 
    878859 
     860            SPIN_OptionsSechiba 
    879861            if [ X"${spinup_UserChoices_ok_stomate}" = "Xy" ] ; then 
    880                 SPIN_OptionsSechiba 
    881862                SPIN_OptionsStomate 
    882             else 
    883                 SPIN_OptionsSechiba 
    884863            fi 
    885864 
     
    913892            fi 
    914893 
    915             # For some jobs : 
    916             if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then 
    917                 gawk -- "{if (! match(\$0,/^# .Date.*/) ) { print \$0 } else { printf(\"BATCH_NUM_PROC_TOT=%d \\n\\n\",${config_UserChoices_JobNumProcTot}) ; print \$0 } }" \ 
    918                     ${New_SUBMIT_DIR}/Job_${SubJobName} > ${New_SUBMIT_DIR}/Job_${SubJobName}_ 
    919                 IGCM_sys_Mv ${New_SUBMIT_DIR}/Job_${SubJobName}_ ${New_SUBMIT_DIR}/Job_${SubJobName} 
    920                 chmod u+x ${New_SUBMIT_DIR}/Job_${SubJobName} 
    921             fi 
    922  
    923894            SPIN_prepare 
    924895 
     
    938909            fi 
    939910 
     911            SPIN_OptionsSechiba 
    940912            if [ X"${spinup_UserChoices_ok_stomate}" = "Xy" ] ; then 
    941                 SPIN_OptionsSechiba 
    942913                SPIN_OptionsStomate 
    943             else 
    944                 SPIN_OptionsSechiba 
    945914            fi 
    946915 
     
    1000969    echo "cd ${New_SUBMIT_DIR}" >> ${RUN_DIR}/SubJob$$.ksh 
    1001970    echo "export SUBMIT_DIR=${New_SUBMIT_DIR}" >> ${RUN_DIR}/SubJob$$.ksh 
    1002     echo "./Job_${SubJobName} > ${New_SUBMIT_DIR}/Script_${SubJobName}.000001 </dev/null 2>&1" >> ${RUN_DIR}/SubJob$$.ksh 
     971    echo "./Job_${SubJobName} > ${New_SUBMIT_DIR}/Script_Output_${SubJobName}.000001 </dev/null 2>&1" >> ${RUN_DIR}/SubJob$$.ksh 
    1003972    echo "echo 'End of Subjob : ' \$( date )" >> ${RUN_DIR}/SubJob$$.ksh 
    1004973    echo "echo 'finish.'" >> ${RUN_DIR}/SubJob$$.ksh 
     
    10491018    IGCM_card_WriteOption ${SUBMIT_DIR}/output.card PreviousStage LastExtName ${ExtName} 
    10501019    IGCM_card_WriteOption ${SUBMIT_DIR}/output.card PreviousStage LastRestartDate ${This_Job_DateEnd} 
    1051     if [ X${StageName} = X"SECSTO" ] ; then 
    1052         IGCM_card_WriteOption ${SUBMIT_DIR}/output.card PreviousStage LastORCRestartDate ${This_Job_DateEnd} 
    1053     fi 
     1020 
    10541021 
    10551022    # For forcesoil, we have to copy the sechiba restart of last Stage 
    10561023    if [ X${StageName} = X"FORC" ] ; then 
    10571024        # This must be done on the ARCHIVE HOST. 
    1058         if ( [ X${spinup_UserChoices_DEBUG_SPIN} = Xn ] && [ X${output_PreviousStage_LastExtName} != XORC_${iter} ] ) ; then   
    1059             last_restart=${config_SBG_RestartPath}/${config_UserChoices_JobName}/SPIN/Output/${ORCHIDEE_JobName}/SRF/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastORCRestartDate}_sechiba_rest.nc 
     1025        if ( [ X${spinup_UserChoices_DEBUG_SPIN} = Xn ] ) ; then   
     1026            last_restart=${config_SBG_RestartPath}/${config_UserChoices_JobName}/SPIN/Output/${ORCHIDEE_JobName}/SRF/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_sechiba_rest.nc 
    10601027        else 
    1061             last_restart=${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SRF/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastORCRestartDate}_sechiba_rest.nc 
     1028            last_restart=${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SRF/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_sechiba_rest.nc 
    10621029        fi 
    1063         IGCM_sys_Get ${last_restart} sechiba_rest.nc 
    10641030        IGCM_sys_MkdirArchive ${config_SBG_RestartPath}/${SubJobName}/SRF/Restart 
    1065         IGCM_sys_Put_Rest sechiba_rest.nc ${config_SBG_RestartPath}/${SubJobName}/SRF/Restart/${SubJobName}_${This_Job_DateEnd}_sechiba_rest.nc  
    1066 #       FileToBeDeleted[${#FileToBeDeleted[@]}]=sechiba_rest.nc 
    1067         rm -f sechiba_rest.nc 
     1031        IGCM_sys_RshArchive "cp -fp ${last_restart} ${config_SBG_RestartPath}/${SubJobName}/SRF/Restart/${SubJobName}_${This_Job_DateEnd}_sechiba_rest.nc" 
    10681032    fi 
    10691033 
     
    10721036    FileToBeDeleted[${#FileToBeDeleted[@]}]=output_out.card 
    10731037 
    1074 #set -vx 
     1038 
    10751039# If NOT DEBUG mode :  
    10761040# we can move Previous Job in SPINUP save DIR. 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/SPINUP/output.card_init

    r65 r382  
    1717LastExtName= 
    1818LastRestartDate= 
    19 LastORCRestartDate= 
    2019 
    2120[Actions] 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/TESTSTOMATE/COMP/sechiba.card

    r263 r382  
    33 
    44[UserChoices] 
     5LAIMAP=n 
    56IMPOSE_VEG=n 
     7# if IMPOSE_VEG = n 
    68LAND_USE=n 
     9# if LAND_USE=y 
     10VEGET_UPDATE=1Y 
     11# if LAND_USE=n and we want to use carteveg5km.nc for maxvegetfrac map. 
     12# (instead of default PFTmap_1850to2005_AR5_LUHa.rc2 below) 
     13OLD_VEGET=n 
    714 
    815[InitialStateFiles] 
    9 List=   (${R_BC}/SRF/${config_UserChoices_TagName}/PFTmap_1850to2005_AR5_LUHa.rc2/PFTmap_IPCC_${year}.nc, .) 
     16List=   (${R_BC}/SRF/${config_UserChoices_TagName}/PFTmap_1850to2005_AR5_LUHa.rc2/PFTmap_IPCC_${year}.nc, PFTmap.nc) 
    1017         
    1118[BoundaryFiles] 
     
    3340 
    3441[OutputText] 
    35 List=   (used_sechiba.def, used_driver.def, out_teststomate) 
     42List=   (used_sechiba.def, used_driver.def, out_teststomate, out_orchidee) 
    3643 
    3744[OutputFiles] 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/TESTSTOMATE/COMP/sechiba.driver

    r263 r382  
    3838    echo "ORCHIDEE Tag : " ${config_UserChoices_TagName} 
    3939 
     40    NUM_PROC=1 
     41#D- Number of processors used for lmdz and oasis coupler computed from PBS variable 
     42    if [ X"${BATCH_NUM_PROC_TOT}" != X ] ; then 
     43        NUM_PROC=${BATCH_NUM_PROC_TOT} 
     44    fi 
     45    echo BATCH_NUM_PROC_TOT=${BATCH_NUM_PROC_TOT} 
     46    echo NUM_PROC=${NUM_PROC} 
     47 
     48    if ( [ X${BATCH_NUM_PROC_TOT} != X ] && [ "${BATCH_NUM_PROC_TOT}" -gt 1 ] ) ; then 
     49        MPIRUN_COMMAND=${HOST_MPIRUN_COMMAND} 
     50    fi 
     51 
    4052    RESOL_SRF=ALL 
    4153     
     54    typeset frequency 
    4255    for frequency in ${config_SRF_WriteFrequency} ; do 
    4356        case ${frequency} in 
     
    7487    IGCM_debug_PushStack "SRF_Update" 
    7588 
    76     SECHIBA_sed LAND_USE ${sechiba_UserChoices_LAND_USE} 
    77     if [ X${sechiba_UserChoices_LAND_USE} = Xy ] ; then 
     89    typeset SECHIBA_WRITE_STEP 
    7890 
    79       ##MM : cutting PFTmaps of ORCHIDEE : for first year without restart, we must use this year map 
    80       ##     WARNING : the next year map must be avaible and the december month, then this device will 
    81       ##               only work with PeriodLength scrictly less than 1Y. 
    82       # If you want to come back to old BIG LAND USE file 
    83       # (to run on multipple years, just one time with LAND USE activated),  
    84       # you must  
    85       # comment all next 8 lines and check correct parameters in sechiba.def file 
    86       # for your LAND USE specific file. 
    87         SECHIBA_sed VEGET_REINIT y 
    88         if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 
    89             SECHIBA_sed VEGET_YEAR 1 
    90             IGCM_sys_Mv PFTmap_IPCC_${year}.nc PFTmap.nc 
    91         else 
    92             SECHIBA_sed VEGET_YEAR 0 
    93             IGCM_sys_Mv -f PFTmap_IPCC_${year_p1}.nc PFTmap.nc 
     91    # Get WriteFrenquecies from config.card for SECHIBA 
     92    SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' )  
     93    case ${SRF_WriteFrequency} in 
     94        *Y|*y)  
     95            WriteInYears=$( echo ${SRF_WriteFrequency} | awk -F '[yY]' '{print $1}' ) 
     96            PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
     97            (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 )) ;; 
     98        1M) 
     99            case ${config_UserChoices_PeriodLength} in 
     100            *Y|*y) 
     101                SECHIBA_WRITE_STEP=-1. 
     102                ;; 
     103            *M|*m) 
     104                SECHIBA_WRITE_STEP=-1. 
     105                ;; 
     106            *) 
     107                (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 
     108                ;; 
     109            esac 
     110            ;; 
     111        *M|*m)  
     112            WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' ) 
     113            case ${config_UserChoices_PeriodLength} in 
     114            *Y|*y) 
     115                PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
     116                (( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / PeriodLengthInYears / 12 )) 
     117                ;; 
     118            *M|*m) 
     119                PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' ) 
     120                (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInMonths  * 86400 / PeriodLengthInMonths  )) 
     121                ;; 
     122            *) 
     123                (( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 )) 
     124                ;; 
     125            esac 
     126            ;; 
     127        5D|5d)  
     128            (( SECHIBA_WRITE_STEP = 5 * 86400 )) ;; 
     129        1D|1d)  
     130            (( SECHIBA_WRITE_STEP = 86400 )) ;; 
     131        *s) 
     132            WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' ) 
     133            (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;; 
     134        *)  
     135            IGCM_debug_Exit "SRF_Update " ${SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D."  
     136            IGCM_debug_Verif_Exit ;; 
     137    esac 
     138    SECHIBA_sed WRITE_STEP ${SECHIBA_WRITE_STEP} 
     139 
     140    if [ X${sechiba_UserChoices_IMPOSE_VEG} = Xn ] ; then 
     141        if [ X${sechiba_UserChoices_LAND_USE} = Xy ] ; then 
     142            SECHIBA_sed VEGET_UPDATE ${sechiba_UserChoices_VEGET_UPDATE} 
     143 
     144            ##MM : cutting PFTmaps of ORCHIDEE : for first year without restart, we must use this year map 
     145            ##     WARNING : the next year map must be avaible and the december month, then this device will 
     146            ##               only work with PeriodLength scrictly less than 1Y. 
     147            # If you want to come back to old BIG LAND USE file 
     148            # (to run on multipple years, just one time with LAND USE activated),  
     149            # you must  
     150            # comment all next 8 lines and check correct parameters in sechiba.def file 
     151            # for your LAND USE specific file. 
     152            SECHIBA_sed VEGET_REINIT y 
     153            if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 
     154                SECHIBA_sed VEGET_YEAR 1 
     155            else 
     156                SECHIBA_sed VEGET_YEAR 0 
     157                IGCM_sys_Mv -f PFTmap_IPCC_${year_p1}.nc PFTmap.nc 
     158            fi 
     159        elif [ X${sechiba_UserChoices_OLD_VEGET} = Xy ] ; then 
     160            SECHIBA_sed LAND_USE n 
    94161        fi 
     162    else 
     163        SECHIBA_sed IMPOSE_VEG y 
    95164    fi 
    96165 
    97     SECHIBA_sed IMPOSE_VEG ${sechiba_UserChoices_IMPOSE_VEG} 
    98      
    99166    if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 
    100167        echo "Error in teststomate !" 
     
    106173        SECHIBA_sed SECHIBA_restart_in sechiba_rest_in.nc 
    107174    fi 
     175    FileToBeDeleted[${#FileToBeDeleted[@]}]=sechiba.def 
    108176 
    109177    DRIVER_sed TIME_LENGTH ${PeriodLengthInDays}D 
    110178#    DRIVER_sed TIME_SKIP ${OldSimulationLengthInDays}D 
     179    FileToBeDeleted[${#FileToBeDeleted[@]}]=driver.def 
    111180 
    112181    IGCM_debug_PopStack "SRF_Update" 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/TESTSTOMATE/COMP/stomate.card

    r263 r382  
    3636Patches= () 
    3737GatherWithInternal= (lon, lat, PFT, time_counter, Areas) 
    38 TimeSeriesVars2D= (T2M_MONTH,CONTFRAC,RESOLUTION_X,RESOLUTION_Y,CONVFLUX,CFLUX_PROD10,CFLUX_PROD100,HARVEST_ABOVE) 
     38TimeSeriesVars2D= (T2M_MONTH,CONTFRAC,RESOLUTION_X,RESOLUTION_Y,CONVFLUX,CFLUX_PROD10,CFLUX_PROD100,CO2FLUX_MONTHLY_SUM,HARVEST_ABOVE) 
    3939ChunckJob2D = NONE 
    40 TimeSeriesVars3D = (CO2FLUX_MONTHLY,LAI,VEGET,VEGET_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,AGE,HEIGHT,TOTAL_M,TOTAL_BM_LITTER,TOTAL_SOIL_CARB) 
     40TimeSeriesVars3D= (CO2FLUX,LAI,VEGET,VEGET_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,AGE,HEIGHT,TOTAL_M,TOTAL_BM_LITTER,TOTAL_SOIL_CARB,ADAPTATION,REGENERATION) 
    4141ChunckJob3D = NONE 
    4242Seasonal=ON 
     
    4545Patches= () 
    4646GatherWithInternal= (lon, lat, PFT, time_counter, Areas) 
    47 TimeSeriesVars2D=(cVeg, cLitter, cSoil, cProduct, lai, gpp, ra, npp, rh, fFire, fHarvest, fLuc, nbp, fVegLitter, fLitterSoil, cLeaf, cWood, cRoot, cMisc, cLitterAbove, cLitterBelow, cSoilFast, cSoilMedium, cSoilSlow, landCoverFrac, treeFracPrimDec, treeFracPrimEver, c3PftFrac, c4PftFrac, rGrowth, rMaint, nppLeaf, nppWood, nppRoot, nep) 
     47TimeSeriesVars2D=(cVeg, cLitter, cSoil, cProduct, cMassVariation, lai, gpp, ra, npp, rh, fFire, fHarvest, fLuc, nbp, fVegLitter, fLitterSoil, cLeaf, cWood, cRoot, cMisc, cLitterAbove, cLitterBelow, cSoilFast, cSoilMedium, cSoilSlow, landCoverFrac, treeFracPrimDec, treeFracPrimEver, c3PftFrac, c4PftFrac, rGrowth, rMaint, nppLeaf, nppWood, nppRoot, nep) 
    4848ChunckJob2D = NONE 
    4949TimeSeriesVars3D=() 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/TESTSTOMATE/COMP/stomate.driver

    r263 r382  
    2424    RESOL_SBG=ALL 
    2525     
     26    typeset frequency 
     27    for frequency in ${config_SBG_WriteFrequency} ; do 
     28        case ${frequency} in 
     29            HF|hf) SBG_ok_hf=y ;; 
     30        esac 
     31    done 
     32     
    2633    IGCM_debug_PopStack "SBG_Initialize" 
     34} 
     35 
     36#----------------------------------------------------------------- 
     37function SBG_PeriodStart 
     38{ 
     39    IGCM_debug_PushStack "SBG_PeriodStart" 
     40 
     41    IGCM_debug_PopStack "SBG_PeriodStart" 
    2742} 
    2843 
     
    7792 
    7893    STOMATE_sed STOMATE_OK_STOMATE y 
    79     STOMATE_sed STOMATE_OK_CO2 y 
    8094 
    8195    STOMATE_sed STOMATE_HIST_DT ${STOMATE_WRITE_STEP} 
     
    87101    fi 
    88102 
     103    if [ X${SBG_ok_hf} = Xy ] ; then  
     104        STOMATE_sed STOMATE_IPCC_HIST_DT 1D 
     105    else 
     106        STOMATE_sed STOMATE_IPCC_HIST_DT ${STOMATE_WRITE_STEP} 
     107    fi 
     108 
    89109    IGCM_debug_PopStack "SBG_Update" 
    90110} 
     
    93113function SBG_Finalize 
    94114{ 
    95 #set -vx 
    96115    IGCM_debug_PushStack "SBG_Finalize" 
    97116 
     
    101120#     NbYearsDone=$(( NbDaysDone / 360 )) 
    102121     
    103 # #     echo $NbDaysDone, $NbYearsDone, $(( NbYearsDone % 10 )) 
    104 # #    if [ $(( NbYearsDone % 10 )) = 0 ] ; then 
    105 #     if [ $( IGCM_date_DaysBetweenGregorianDate ${PeriodDateEnd} ${DateEnd} ) -ge 0 ] ; then 
    106 #       IGCM_sys_Put_Out stomate_Cforcing.nc ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_Cforcing.nc 
    107 #       IGCM_sys_Put_Out stomate_forcing.nc  ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_forcing.nc 
    108 #       rm -f stomate_Cforcing.nc 
    109 #       rm -f stomate_forcing.nc 
    110 #     fi 
     122#     echo $NbDaysDone, $NbYearsDone, $(( NbYearsDone % 10 )) 
     123#    if [ $(( NbYearsDone % 10 )) = 0 ] ; then 
     124    if [ $( IGCM_date_DaysBetweenGregorianDate ${PeriodDateEnd} ${DateEnd} ) -ge 0 ] ; then 
     125        IGCM_sys_Put_Out stomate_Cforcing.nc ${R_OUT_SBG_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_stomate_Cforcing.nc 
     126        rm -f stomate_Cforcing.nc 
     127    fi 
    111128 
    112129    IGCM_debug_PopStack "SBG_Finalize" 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/TESTSTOMATE/POST/monitoring01_stomate.cfg

    r263 r382  
    4646BIOMASS_lands       | "TOTAL_M VEGET_MAX CONTFRAC"         | "" | "(TOTAL_M[d=1]*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"             | "Total Biomass (LANDS)"                                       | "PgC"    | "2" 
    4747LITTER_lands        | "TOTAL_BM_LITTER VEGET_MAX CONTFRAC" | "" | "(TOTAL_BM_LITTER[d=1]*365*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)" | "Total Litter (LANDS)"                                        | "PgC/yr" | "2" 
    48 CO2FLUX_lands       | "CO2FLUX_MONTHLY VEGET_MAX CONTFRAC" | "" | "(CO2FLUX_MONTHLY[d=1]*12*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"  | "NEE (LANDS)"                                                 | "PgC/yr" | "2" 
     48CO2FLUX_lands       | "CO2FLUX VEGET_MAX CONTFRAC"         | "" | "(CO2FLUX[d=1]*12*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"          | "NEE (LANDS)"                                                 | "PgC/yr" | "2" 
     49CO2FLUX_MONTHLY_SUM_lands | "CO2FLUX_MONTHLY_SUM VEGET_MAX CONTFRAC" | "" | "(CO2FLUX_MONTHLY_SUM[d=1]*12)"                                 | "NEE Sum (LANDS)"                                             | "PgC/yr" | "Areas[d=1]" 
    4950NPP_lands           | "NPP VEGET_MAX CONTFRAC"             | "" | "(NPP[d=1]*365*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"             | "Net Primary Produc (LANDS)"                                  | "PgC/yr" | "2" 
    5051GPP_lands           | "GPP VEGET_MAX CONTFRAC"             | "" | "(GPP[d=1]*365*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"             | "Gross Primary Produc (LANDS)"                                | "PgC/yr" | "2" 
     
    5253MAINT_RESP_lands    | "MAINT_RESP VEGET_MAX CONTFRAC"      | "" | "(MAINT_RESP[d=1]*365*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"      | "Maintenance Resp. (LANDS)"                                   | "PgC/yr" | "2" 
    5354GROWTH_RESP_lands   | "GROWTH_RESP VEGET_MAX CONTFRAC"     | "" | "(GROWTH_RESP[d=1]*365*VEGET_MAX[d=2]*AREAS[d=1]*CONTFRAC[d=3]/1e15)"     | "Growth Resp. (LANDS)"                                        | "PgC/yr" | "2" 
     55cVeg_lands             | "cVeg"             | "" | "(cVeg[d=1])"            | "Carbon in Vegetation"                        | "kg C m-2" | "Areas[d=1]" 
     56cLitter_lands          | "cLitter"          | "" | "(cLitter[d=1])"         | "Carbon in Litter Pool"                       | "kg C m-2" | "Areas[d=1]" 
     57cSoil_lands            | "cSoil"            | "" | "(cSoil[d=1])"           | "Carbon in Soil Pool"                         | "kg C m-2" | "Areas[d=1]" 
     58cProduct_lands         | "cProduct"         | "" | "(cProduct[d=1])"        | "Carbon in Products of Land Use Change"       | "kg C m-2" | "Areas[d=1]" 
     59lai_lands              | "lai"              | "" | "(lai[d=1])"             | "Leaf Area Fraction"                          | "1"        | "Areas[d=1]" 
     60gpp_lands              | "gpp"              | "" | "(gpp[d=1])"             | "Gross Primary Production"                    | "kg C m-2 s-1" | "Areas[d=1]" 
     61ra_lands               | "ra"               | "" | "(ra[d=1])"              | "Autotrophic Respiration"                     | "kg C m-2 s-1" | "Areas[d=1]" 
     62npp_lands              | "npp"              | "" | "(npp[d=1])"             | "Net Primary Production"                      | "kg C m-2 s-1" | "Areas[d=1]" 
     63rh_lands               | "rh"               | "" | "(rh[d=1])"              | "Heterotrophic Respiration"                   | "kg C m-2 s-1" | "Areas[d=1]" 
     64fFire_lands            | "fFire"            | "" | "(fFire[d=1])"           | "CO2 Emission from Fire"                      | "kg C m-2 s-1" | "Areas[d=1]" 
     65fHarvest_lands         | "fHarvest"         | "" | "(fHarvest[d=1])"        | "CO2 Flux to Atmosphere from Crop Harvesting" | "kg C m-2 s-1" | "Areas[d=1]" 
     66fLuc_lands             | "fLuc"             | "" | "(fLuc[d=1])"            | "CO2 Flux to Atmosphere from Land Use Change" | "kg C m-2 s-1" | "Areas[d=1]" 
     67nbp_lands              | "nbp"              | "" | "(nbp[d=1])"             | "Net Biospheric Production"                   | "kg C m-2 s-1" | "Areas[d=1]" 
     68fVegLitter_lands       | "fVegLitter"       | "" | "(fVegLitter[d=1])"      | "Total Carbon Flux from Vegetation to Litter" | "kg C m-2 s-1" | "Areas[d=1]" 
     69fLitterSoil_lands      | "fLitterSoil"      | "" | "(fLitterSoil[d=1])"     | "Total Carbon Flux from Litter to Soil"       | "kg C m-2 s-1" | "Areas[d=1]" 
     70cLeaf_lands            | "cLeaf"            | "" | "(cLeaf[d=1])"           | "Carbon in Leaves"                            | "kg C m-2" | "Areas[d=1]" 
     71cWood_lands            | "cWood"            | "" | "(cWood[d=1])"           | "Carbon in Wood"                              | "kg C m-2" | "Areas[d=1]" 
     72cRoot_lands            | "cRoot"            | "" | "(cRoot[d=1])"           | "Carbon in Roots"                             | "kg C m-2" | "Areas[d=1]" 
     73cMisc_lands            | "cMisc"            | "" | "(cMisc[d=1])"           | "Carbon in Other Living Compartments"         | "kg C m-2" | "Areas[d=1]" 
     74cLitterAbove_lands     | "cLitterAbove"     | "" | "(cLitterAbove[d=1])"    | "Carbon in Above-Ground Litter"               | "kg C m-2" | "Areas[d=1]" 
     75cLitterBelow_lands     | "cLitterBelow"     | "" | "(cLitterBelow[d=1])"    | "Carbon in Below-Ground Litter"               | "kg C m-2" | "Areas[d=1]" 
     76cSoilFast_lands        | "cSoilFast"        | "" | "(cSoilFast[d=1])"       | "Carbon in Fast Soil Pool"                    | "kg C m-2" | "Areas[d=1]" 
     77cSoilMedium_lands      | "cSoilMedium"      | "" | "(cSoilMedium[d=1])"     | "Carbon in Medium Soil Pool"                  | "kg C m-2" | "Areas[d=1]" 
     78cSoilSlow_lands        | "cSoilSlow"        | "" | "(cSoilSlow[d=1])"       | "Carbon in Slow Soil Pool"                    | "kg C m-2" | "Areas[d=1]" 
     79treeFracPrimDec_lands  | "treeFracPrimDec"  | "" | "(treeFracPrimDec[d=1])" | "Total Primary Deciduous Tree Cover Fraction" | "%"       | "Areas[d=1]" 
     80treeFracPrimEver_lands | "treeFracPrimEver" | "" | "(treeFracPrimEver[d=1])"| "Total Primary Evergreen Tree Cover Fraction" | "%"       | "Areas[d=1]" 
     81c3PftFrac_lands        | "c3PftFrac"        | "" | "(c3PftFrac[d=1])"       | "Total C3 PFT Cover Fraction"                 | "%"       | "Areas[d=1]" 
     82c4PftFrac_lands        | "c4PftFrac"        | "" | "(c4PftFrac[d=1])"       | "Total C4 PFT Cover Fraction"                 | "%"       | "Areas[d=1]" 
     83rGrowth_lands          | "rGrowth"          | "" | "(rGrowth[d=1])"         | "Growth Autotrophic Respiration"              | "kg C m-2 s-1" | "Areas[d=1]" 
     84rMaint_lands           | "rMaint"           | "" | "(rMaint[d=1])"          | "Maintenance Autotrophic Respiration"         | "kg C m-2 s-1" | "Areas[d=1]" 
     85nppLeaf_lands          | "nppLeaf"          | "" | "(nppLeaf[d=1])"         | "CO2 Flux from Atmosphere due to NPP Allocation to Leaf" | "kg C m-2 s-1" | "Areas[d=1]" 
     86nppWood_lands          | "nppWood"          | "" | "(nppWood[d=1])"         | "CO2 Flux from Atmosphere due to NPP Allocation to Wood" | "kg C m-2 s-1" | "Areas[d=1]" 
     87nppRoot_lands          | "nppRoot"          | "" | "(nppRoot[d=1])"         | "CO2 Flux from Atmosphere due to NPP Allocation to Root" | "kg C m-2 s-1" | "Areas[d=1]" 
     88nep_lands              | "nep"              | "" | "(nep[d=1])"             | "Net Carbon Mass Flux out of Atmophere due to Net Ecosystem Productivity." | "kg C m-2 s-1" | "Areas[d=1]" 
     89cMassVariation_lands     | "cMassVariation"     | "" | "(cMassVariation[d=1])"    | "Carbon Mass Variation"                         | "kg C m-2 s-1" | "Areas[d=1]" 
     90cBal_lands             | "cMassVariation nbp" | "" | "(cMassVariation[d=1,L=2:1000]-nbp[d=2,L=2:1000])" | "Total Carbon Balance"                    | "kg C m-2 s-1" | "Areas[d=1]" 
    5491#------------------------------------------------------------------------------------------------------------------------------------------------------ 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/forcesoil.f90

    r367 r382  
    3131  REAL(r_std)                                :: date0 
    3232  INTEGER(i_std)                             :: rest_id_sto 
    33  
     33  CHARACTER(LEN=20), SAVE                    :: thecalendar = 'noleap' 
    3434  !- 
    3535  CHARACTER(LEN=100) :: Cforcing_name 
     
    4646 
    4747 
    48   INTEGER                                   :: i,m,iatt,iv 
     48  INTEGER                                   :: i,m,iatt,iv,iyear 
    4949 
    5050  CHARACTER(LEN=80)                         :: var_name 
     
    212212     iret = NF90_INQUIRE_DIMENSION (rest_id_sto,1,len=iim_g) 
    213213     iret = NF90_INQUIRE_DIMENSION (rest_id_sto,2,len=jjm_g) 
     214     iret = NF90_INQ_VARID (rest_id_sto, "time", iv) 
     215     iret = NF90_GET_ATT (rest_id_sto, iv, 'calendar',thecalendar) 
    214216     iret = NF90_CLOSE (rest_id_sto) 
     217     i=INDEX(thecalendar,ACHAR(0)) 
     218     IF ( i > 0 ) THEN 
     219        thecalendar(i:20)=' ' 
     220     ENDIF 
    215221     !- 
    216222     ! Allocate longitudes and latitudes 
     
    226232          &  sto_restname_out, itau_dep, date0, dt_files, rest_id_sto) 
    227233  ENDIF 
     234  CALL bcast(date0) 
     235  CALL bcast(thecalendar) 
     236  WRITE(numout,*) "calendar = ",thecalendar 
    228237  !- 
    229238  ! calendar 
    230239  !- 
    231   CALL bcast(date0) 
    232 !!! MM : à revoir : choix du calendrier dans forcesoil ?? Il est dans le restart de stomate ! 
    233   CALL ioconf_calendar ('noleap') 
     240  CALL ioconf_calendar (thecalendar) 
    234241  CALL ioget_calendar  (one_year,one_day) 
    235  
    236242  CALL ioconf_startdate(date0) 
    237  
     243  ! 
    238244  IF (is_root_prc) THEN 
    239245     !- 
     
    348354        !-- do not write this variable: it will be modified. 
    349355     ENDDO 
     356     WRITE(numout,*) "date0 : ",date0, itau_dep 
    350357     !- 
    351358     ! Length of run 
     
    355362     write(numout,*) 'Number of years for carbon spinup : ',time_str 
    356363     ! transform into itau 
    357      CALL tlen2itau(time_str, dt_forcesoil*one_year, date0, itau_len) 
     364     CALL tlen2itau(time_str, dt_forcesoil*one_day, date0, itau_len) 
    358365     write(numout,*) 'Number of time steps to do: ',itau_len 
    359366     !- 
     
    379386  CALL bcast(iim_g) 
    380387  CALL bcast(jjm_g) 
    381   call bcast(nbp_glo) 
     388  CALL bcast(nbp_glo) 
     389  CALL bcast(itau_dep) 
    382390  CALL bcast(itau_len) 
    383391  ! 
     
    400408  CALL scatter(indices_g,indices) 
    401409  indices(1:kjpindex)=indices(1:kjpindex)-(jj_begin-1)*iim_g 
    402   WRITE(numout,*) mpi_rank,"indices locaux = ",indices(1:kjpindex) 
     410  IF (debug) WRITE(numout,*) mpi_rank,"indices locaux = ",indices(1:kjpindex) 
    403411  !- 
    404412  !- 
     
    525533  CALL getin_p('FLUX_TOT_COEFF',flux_tot_coeff) 
    526534 
     535  iyear=1 
    527536  DO i=1,itau_len 
    528537     iatt = iatt+1 
    529      IF (iatt > nparan) iatt = 1 
     538     IF (iatt > nparan) THEN 
     539        IF (debug) WRITE(numout,*) iyear 
     540        iatt = 1 
     541        iyear=iyear+1 
     542     ENDIF 
    530543     CALL soilcarbon & 
    531544          &    (kjpindex, dt_forcesoil, clay, & 
     
    534547          &     carbon, resp_hetero_soil) 
    535548  ENDDO 
    536  
     549  WRITE(numout,*) "End of soilcarbon LOOP." 
    537550  CALL Gather(carbon,carbon_g) 
    538551  !- 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/readdim2.f90

    r258 r382  
    131131    !- 
    132132    CALL ioget_calendar(calendar_str) 
     133    i=INDEX(calendar_str,ACHAR(0)) 
     134    IF ( i > 0 ) THEN 
     135       calendar_str(i:20)=' ' 
     136    ENDIF 
    133137    !  WRITE(numout,*) "forcing_info : Calendar used : ",calendar_str 
    134138    IF ( calendar_str == 'XXXX' ) THEN 
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/teststomate.f90

    r367 r382  
    5858  REAL(r_std),DIMENSION(:,:),ALLOCATABLE :: x_neighbours_g 
    5959 
    60 !!$ >>  DS for the externalized version 
    61   REAL(r_std),DIMENSION(:),ALLOCATABLE      :: hist_PFTaxis 
    62 !!$ >>  DS 
    63  
    6460  INTEGER    :: ier,iret 
    6561  INTEGER    :: ncfid 
     62  CHARACTER(LEN=20),SAVE                      :: thecalendar='noleap' 
     63 
    6664  LOGICAL    :: a_er 
    6765  CHARACTER(LEN=80) :: & 
     
    8381  REAL(r_std)                       :: dt_slow_ 
    8482  REAL                             :: hist_days_stom,hist_days_stom_ipcc,hist_dt_stom,hist_dt_stom_ipcc 
     83!!$ >>  DS for the externalized version 
     84  REAL(r_std),ALLOCATABLE,DIMENSION(:) :: hist_PFTaxis 
     85!!$ >>  DS 
    8586  REAL(r_std),DIMENSION(10)         :: hist_pool_10axis      
    8687  REAL(r_std),DIMENSION(100)        :: hist_pool_100axis      
     
    127128  CALL init_para(.FALSE.) 
    128129  CALL init_timer 
    129 !- 
    130 ! calendar 
    131 !- 
    132   CALL ioconf_calendar ('noleap') 
    133   CALL ioget_calendar  (one_year,one_day) 
    134130 
    135131  IF (is_root_prc) THEN 
     
    300296     iret = NF90_INQUIRE_DIMENSION (ncfid,1,len=iim_g) 
    301297     iret = NF90_INQUIRE_DIMENSION (ncfid,2,len=jjm_g) 
     298     iret = NF90_INQ_VARID (ncfid, "time", iv) 
     299     iret = NF90_GET_ATT (ncfid, iv, 'calendar',thecalendar) 
    302300     iret = NF90_CLOSE (ncfid) 
    303  
     301     i=INDEX(thecalendar,ACHAR(0)) 
     302     IF ( i > 0 ) THEN 
     303        thecalendar(i:20)=' ' 
     304     ENDIF 
    304305  ENDIF 
    305306  CALL bcast(iim_g) 
    306307  CALL bcast(jjm_g) 
     308  CALL bcast(thecalendar) 
     309  !- 
     310  ! calendar 
     311  !- 
     312  CALL ioconf_calendar (thecalendar) 
     313  CALL ioget_calendar  (one_year,one_day) 
    307314  ! 
    308315  ! Parallelization : 
Note: See TracChangeset for help on using the changeset viewer.