- Timestamp:
- 2011-08-01T16:11:34+02:00 (13 years ago)
- Location:
- branches/ORCHIDEE_EXT/ORCHIDEE_OL
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ORCHIDEE_EXT/ORCHIDEE_OL/FORCESOIL/COMP/stomate.card
r263 r382 28 28 29 29 [OutputText] 30 List= ( stomate.def, driver.def, used_run.def, out_forcesoil)30 List= (used_stomate.def, used_driver.def, used_run.def, out_forcesoil, out_orchidee) 31 31 32 32 [OutputFiles] -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/FORCESOIL/COMP/stomate.driver
r263 r382 58 58 59 59 IGCM_debug_PopStack "SBG_Initialize" 60 } 61 62 #----------------------------------------------------------------- 63 function SBG_PeriodStart 64 { 65 IGCM_debug_PushStack "SBG_PeriodStart" 66 67 IGCM_debug_PopStack "SBG_PeriodStart" 60 68 } 61 69 … … 125 133 fi 126 134 127 DRIVER_sed TIME_LENGTH ${PeriodLengthIn Days}D135 DRIVER_sed TIME_LENGTH ${PeriodLengthInYears}Y 128 136 # DRIVER_sed TIME_SKIP ${OldSimulationLengthInDays}D 129 137 -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/FORCESOIL/PARAM/run.def
r263 r382 2 2 # 3 3 INCLUDEDEF=driver.def 4 INCLUDEDEF=sechiba.def5 4 INCLUDEDEF=stomate.def -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC/COMP/orchidee_ol.card
r263 r382 8 8 # If you want to use the same forcing file 9 9 NORESTART=n 10 # If you want use config.card PeriodLength for TIME_LENGTH 11 TIMELENGTH=y 10 12 11 13 [InitialStateFiles] … … 28 30 29 31 [OutputText] 30 List= (used_driver.def, out_orchidee_ol)32 List= (used_driver.def, used_run.def, out_orchidee_ol) 31 33 # avec la // : out_orchidee_* 32 34 -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC/COMP/orchidee_ol.driver
r263 r382 45 45 IGCM_debug_PushStack "OOL_Update" 46 46 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 54 56 55 57 if ( ${FirstInitialize} ) ; then -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC/COMP/sechiba.card
r263 r382 5 5 LAIMAP=n 6 6 IMPOSE_VEG=n 7 # if IMPOSE_VEG = n 7 8 LAND_USE=n 9 # if LAND_USE=y 8 10 VEGET_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) 13 OLD_VEGET=n 9 14 ROUTING=n 10 15 NEWHYDROL=n -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC/COMP/sechiba.driver
r263 r382 26 26 RESOL_SRF=ALL 27 27 28 typeset frequency 28 29 for frequency in ${config_SRF_WriteFrequency} ; do 29 30 case ${frequency} in … … 62 63 typeset SECHIBA_WRITE_STEP 63 64 65 # Get WriteFrenquecies from config.card for SECHIBA 64 66 SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' ) 65 67 case ${SRF_WriteFrequency} in … … 108 110 IGCM_debug_Verif_Exit ;; 109 111 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 110 121 111 122 SECHIBA_sed STOMATE_OK_CO2 ${sechiba_UserChoices_OKCO2} … … 114 125 SECHIBA_sed HYDROL_CWRR ${sechiba_UserChoices_NEWHYDROL} 115 126 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} 118 130 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 142 148 fi 149 else 150 SECHIBA_sed IMPOSE_VEG y 143 151 fi 144 152 145 SECHIBA_sed IMPOSE_VEG ${sechiba_UserChoices_IMPOSE_VEG}146 147 153 if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 148 154 SECHIBA_sed SECHIBA_reset_time y -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC_STO/COMP/orchidee_ol.card
r263 r382 30 30 31 31 [OutputText] 32 List= (used_driver.def, out_orchidee_ol)32 List= (used_driver.def, used_run.def, out_orchidee_ol) 33 33 # avec la // : out_orchidee_* 34 34 -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC_STO/COMP/sechiba.card
r263 r382 5 5 LAIMAP=n 6 6 IMPOSE_VEG=n 7 # if IMPOSE_VEG = n 7 8 LAND_USE=n 9 # if LAND_USE=y 8 10 VEGET_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) 13 OLD_VEGET=n 9 14 ROUTING=n 10 15 NEWHYDROL=n -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC_STO/COMP/sechiba.driver
r263 r382 63 63 typeset SECHIBA_WRITE_STEP 64 64 65 # Get WriteFrenquecies from config.card for SECHIBA 65 66 SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' ) 66 67 case ${SRF_WriteFrequency} in … … 109 110 IGCM_debug_Verif_Exit ;; 110 111 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 117 112 SECHIBA_sed WRITE_STEP ${SECHIBA_WRITE_STEP} 118 113 SECHIBA_sed SECHIBA_HISTLEVEL ${sechiba_UserChoices_sechiba_LEVEL} … … 123 118 SECHIBA_sed WRITE_STEP2 10800.0 124 119 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} 128 121 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 143 146 fi 147 else 148 SECHIBA_sed IMPOSE_VEG y 144 149 fi 145 150 146 SECHIBA_sed IMPOSE_VEG ${sechiba_UserChoices_IMPOSE_VEG}147 148 151 if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 149 152 SECHIBA_sed SECHIBA_reset_time y -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC_STO/COMP/stomate.card
r263 r382 38 38 TimeSeriesVars2D= (T2M_MONTH,CONTFRAC,RESOLUTION_X,RESOLUTION_Y,CONVFLUX,CFLUX_PROD10,CFLUX_PROD100,CO2FLUX_MONTHLY_SUM,HARVEST_ABOVE) 39 39 ChunckJob2D = 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)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,ADAPTATION,REGENERATION) 41 41 ChunckJob3D = NONE 42 42 Seasonal=ON … … 45 45 Patches= () 46 46 GatherWithInternal= (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)47 TimeSeriesVars2D=(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) 48 48 ChunckJob2D = NONE 49 49 TimeSeriesVars3D=() -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/OOL_SEC_STO/COMP/stomate.driver
r263 r382 32 32 33 33 IGCM_debug_PopStack "SBG_Initialize" 34 } 35 36 #----------------------------------------------------------------- 37 function SBG_PeriodStart 38 { 39 IGCM_debug_PushStack "SBG_PeriodStart" 40 41 IGCM_debug_PopStack "SBG_PeriodStart" 34 42 } 35 43 … … 105 113 function SBG_Finalize 106 114 { 107 #set -vx108 115 IGCM_debug_PushStack "SBG_Finalize" 109 116 -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/SPINUP/COMP/spinup.card
r263 r382 117 117 # Qs, Qsb, Qsm, DelSoilMoist, DelSWE, DelIntercept, AvgSurfT, RadT, Albedo, SWE, SoilMoist, SoilWet, SoilTemp, PotEvap, \ 118 118 # 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)119 stomate_TimeSeriesVars2D=(T2M_MONTH, CONTFRAC, RESOLUTION_X, RESOLUTION_Y, CONVFLUX, CFLUX_PROD10, CFLUX_PROD100,CO2FLUX_MONTHLY_SUM,HARVEST_ABOVE) 120 stomate_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) 121 121 122 122 # !!! DO NOT MODIFY spinup.card AFTER THIS LINE !!! -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/SPINUP/COMP/spinup.driver
r263 r382 235 235 fi 236 236 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 237 244 IGCM_debug_PopStack "SPIN_Cp_Job" 238 245 } … … 329 336 # Nb years for forcing FORCESOIL 330 337 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 331 342 332 343 IGCM_debug_PopStack "SPIN_OptionsStomate" … … 576 587 SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/OOL_SEC ${ExtName} 577 588 578 # For some jobs :579 if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then580 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 fi585 586 589 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF Restart n 587 590 … … 600 603 SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/OOL_SEC_STO ${ExtName} 601 604 602 # For some jobs :603 if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then604 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 fi609 610 605 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF Restart n 611 606 if [ X"${spinup_UserChoices_ok_stomate}" = "Xy" ] ; then … … 631 626 # !!! must not have been modified !!! 632 627 SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/TESTSTOMATE ${ExtName} 633 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card UserChoices JobNumProcTot 1634 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}638 628 639 629 # Always restart for teststomate 640 630 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Restarts OverRule n 641 631 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} 643 633 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} 645 635 646 636 # Define restart simulation name … … 663 653 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card UserChoices LAND_USE ${spinup_UserChoices_land_use} 664 654 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 665 665 SPIN_OptionsStomate 666 666 … … 678 678 else 679 679 SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/OOL_SEC ${ExtName} 680 fi681 682 # For some jobs :683 if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then684 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}688 680 fi 689 681 … … 742 734 fi 743 735 736 SPIN_OptionsSechiba 744 737 if [ X"${spinup_UserChoices_ok_stomate}" = "Xy" ] ; then 745 SPIN_OptionsSechiba746 738 SPIN_OptionsStomate 747 else748 SPIN_OptionsSechiba749 739 fi 750 740 … … 761 751 # !!! must not have been modified !!! 762 752 SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/TESTSTOMATE ${ExtName} 763 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card UserChoices JobNumProcTot 1764 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}768 753 769 754 # Always restart for teststomate 770 755 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Restarts OverRule n 771 756 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} 773 758 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} 775 760 776 761 # Define restart simulation name … … 790 775 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card UserChoices IMPOSE_VEG ${spinup_UserChoices_impose_veg} 791 776 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 792 788 SPIN_OptionsStomate 793 789 … … 804 800 SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/FORCESOIL ${ExtName} 805 801 806 # For some jobs :807 if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then808 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 fi813 814 802 # Always restart for forcesoil 815 803 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Restarts OverRule n 816 804 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} 818 806 819 807 # Define restart simulation name … … 824 812 825 813 # 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 Last ORCRestartDate828 if ( [ X${spinup_UserChoices_DEBUG_SPIN} = Xn ] && [ X${output_PreviousStage_LastExtName} != XORC_${iter} ]) ; then829 last_Cforcing=${config_SBG_RestartPath}/${config_UserChoices_JobName}/SPIN/Output/${ORCHIDEE_JobName}/SBG/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_Last ORCRestartDate}_stomate_Cforcing.nc814 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 830 818 else 831 last_Cforcing=${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SBG/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_Last ORCRestartDate}_stomate_Cforcing.nc819 last_Cforcing=${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SBG/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_stomate_Cforcing.nc 832 820 fi 833 821 ls -lrt ${last_Cforcing} … … 836 824 # Nb years for forcing FORCESOIL 837 825 STOMATE_sed FORCESOIL_NB_YEAR ${PeriodLengthInYears} 826 STOMATE_sed FORCESOIL_STEP_PER_YEAR 365 838 827 839 828 ;; … … 850 839 else 851 840 SPIN_Cp_Job ${spinup_UserChoices_SubJobPath}/OOL_SEC ${ExtName} 852 fi853 854 # For some jobs :855 if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then856 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}860 841 fi 861 842 … … 877 858 fi 878 859 860 SPIN_OptionsSechiba 879 861 if [ X"${spinup_UserChoices_ok_stomate}" = "Xy" ] ; then 880 SPIN_OptionsSechiba881 862 SPIN_OptionsStomate 882 else883 SPIN_OptionsSechiba884 863 fi 885 864 … … 913 892 fi 914 893 915 # For some jobs :916 if ( [ X${config_UserChoices_JobNumProcTot} != X ] && [ "${config_UserChoices_JobNumProcTot}" -gt 1 ] ) ; then917 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 fi922 923 894 SPIN_prepare 924 895 … … 938 909 fi 939 910 911 SPIN_OptionsSechiba 940 912 if [ X"${spinup_UserChoices_ok_stomate}" = "Xy" ] ; then 941 SPIN_OptionsSechiba942 913 SPIN_OptionsStomate 943 else944 SPIN_OptionsSechiba945 914 fi 946 915 … … 1000 969 echo "cd ${New_SUBMIT_DIR}" >> ${RUN_DIR}/SubJob$$.ksh 1001 970 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$$.ksh971 echo "./Job_${SubJobName} > ${New_SUBMIT_DIR}/Script_Output_${SubJobName}.000001 </dev/null 2>&1" >> ${RUN_DIR}/SubJob$$.ksh 1003 972 echo "echo 'End of Subjob : ' \$( date )" >> ${RUN_DIR}/SubJob$$.ksh 1004 973 echo "echo 'finish.'" >> ${RUN_DIR}/SubJob$$.ksh … … 1049 1018 IGCM_card_WriteOption ${SUBMIT_DIR}/output.card PreviousStage LastExtName ${ExtName} 1050 1019 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 1054 1021 1055 1022 # For forcesoil, we have to copy the sechiba restart of last Stage 1056 1023 if [ X${StageName} = X"FORC" ] ; then 1057 1024 # This must be done on the ARCHIVE HOST. 1058 if ( [ X${spinup_UserChoices_DEBUG_SPIN} = Xn ] && [ X${output_PreviousStage_LastExtName} != XORC_${iter} ]) ; then1059 last_restart=${config_SBG_RestartPath}/${config_UserChoices_JobName}/SPIN/Output/${ORCHIDEE_JobName}/SRF/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_Last ORCRestartDate}_sechiba_rest.nc1025 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 1060 1027 else 1061 last_restart=${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SRF/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_Last ORCRestartDate}_sechiba_rest.nc1028 last_restart=${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SRF/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_sechiba_rest.nc 1062 1029 fi 1063 IGCM_sys_Get ${last_restart} sechiba_rest.nc1064 1030 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" 1068 1032 fi 1069 1033 … … 1072 1036 FileToBeDeleted[${#FileToBeDeleted[@]}]=output_out.card 1073 1037 1074 #set -vx 1038 1075 1039 # If NOT DEBUG mode : 1076 1040 # we can move Previous Job in SPINUP save DIR. -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/SPINUP/output.card_init
r65 r382 17 17 LastExtName= 18 18 LastRestartDate= 19 LastORCRestartDate=20 19 21 20 [Actions] -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/TESTSTOMATE/COMP/sechiba.card
r263 r382 3 3 4 4 [UserChoices] 5 LAIMAP=n 5 6 IMPOSE_VEG=n 7 # if IMPOSE_VEG = n 6 8 LAND_USE=n 9 # if LAND_USE=y 10 VEGET_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) 13 OLD_VEGET=n 7 14 8 15 [InitialStateFiles] 9 List= (${R_BC}/SRF/${config_UserChoices_TagName}/PFTmap_1850to2005_AR5_LUHa.rc2/PFTmap_IPCC_${year}.nc, .)16 List= (${R_BC}/SRF/${config_UserChoices_TagName}/PFTmap_1850to2005_AR5_LUHa.rc2/PFTmap_IPCC_${year}.nc, PFTmap.nc) 10 17 11 18 [BoundaryFiles] … … 33 40 34 41 [OutputText] 35 List= (used_sechiba.def, used_driver.def, out_teststomate )42 List= (used_sechiba.def, used_driver.def, out_teststomate, out_orchidee) 36 43 37 44 [OutputFiles] -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/TESTSTOMATE/COMP/sechiba.driver
r263 r382 38 38 echo "ORCHIDEE Tag : " ${config_UserChoices_TagName} 39 39 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 40 52 RESOL_SRF=ALL 41 53 54 typeset frequency 42 55 for frequency in ${config_SRF_WriteFrequency} ; do 43 56 case ${frequency} in … … 74 87 IGCM_debug_PushStack "SRF_Update" 75 88 76 SECHIBA_sed LAND_USE ${sechiba_UserChoices_LAND_USE} 77 if [ X${sechiba_UserChoices_LAND_USE} = Xy ] ; then 89 typeset SECHIBA_WRITE_STEP 78 90 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 94 161 fi 162 else 163 SECHIBA_sed IMPOSE_VEG y 95 164 fi 96 165 97 SECHIBA_sed IMPOSE_VEG ${sechiba_UserChoices_IMPOSE_VEG}98 99 166 if ( [ ${CumulPeriod} -eq 1 ] && [ "${config_SRF_Restart}" = "n" ] ) ; then 100 167 echo "Error in teststomate !" … … 106 173 SECHIBA_sed SECHIBA_restart_in sechiba_rest_in.nc 107 174 fi 175 FileToBeDeleted[${#FileToBeDeleted[@]}]=sechiba.def 108 176 109 177 DRIVER_sed TIME_LENGTH ${PeriodLengthInDays}D 110 178 # DRIVER_sed TIME_SKIP ${OldSimulationLengthInDays}D 179 FileToBeDeleted[${#FileToBeDeleted[@]}]=driver.def 111 180 112 181 IGCM_debug_PopStack "SRF_Update" -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/TESTSTOMATE/COMP/stomate.card
r263 r382 36 36 Patches= () 37 37 GatherWithInternal= (lon, lat, PFT, time_counter, Areas) 38 TimeSeriesVars2D= (T2M_MONTH,CONTFRAC,RESOLUTION_X,RESOLUTION_Y,CONVFLUX,CFLUX_PROD10,CFLUX_PROD100, HARVEST_ABOVE)38 TimeSeriesVars2D= (T2M_MONTH,CONTFRAC,RESOLUTION_X,RESOLUTION_Y,CONVFLUX,CFLUX_PROD10,CFLUX_PROD100,CO2FLUX_MONTHLY_SUM,HARVEST_ABOVE) 39 39 ChunckJob2D = 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)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,ADAPTATION,REGENERATION) 41 41 ChunckJob3D = NONE 42 42 Seasonal=ON … … 45 45 Patches= () 46 46 GatherWithInternal= (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)47 TimeSeriesVars2D=(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) 48 48 ChunckJob2D = NONE 49 49 TimeSeriesVars3D=() -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/TESTSTOMATE/COMP/stomate.driver
r263 r382 24 24 RESOL_SBG=ALL 25 25 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 26 33 IGCM_debug_PopStack "SBG_Initialize" 34 } 35 36 #----------------------------------------------------------------- 37 function SBG_PeriodStart 38 { 39 IGCM_debug_PushStack "SBG_PeriodStart" 40 41 IGCM_debug_PopStack "SBG_PeriodStart" 27 42 } 28 43 … … 77 92 78 93 STOMATE_sed STOMATE_OK_STOMATE y 79 STOMATE_sed STOMATE_OK_CO2 y80 94 81 95 STOMATE_sed STOMATE_HIST_DT ${STOMATE_WRITE_STEP} … … 87 101 fi 88 102 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 89 109 IGCM_debug_PopStack "SBG_Update" 90 110 } … … 93 113 function SBG_Finalize 94 114 { 95 #set -vx96 115 IGCM_debug_PushStack "SBG_Finalize" 97 116 … … 101 120 # NbYearsDone=$(( NbDaysDone / 360 )) 102 121 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 111 128 112 129 IGCM_debug_PopStack "SBG_Finalize" -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/TESTSTOMATE/POST/monitoring01_stomate.cfg
r263 r382 46 46 BIOMASS_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" 47 47 LITTER_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" 48 CO2FLUX_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" 49 CO2FLUX_MONTHLY_SUM_lands | "CO2FLUX_MONTHLY_SUM VEGET_MAX CONTFRAC" | "" | "(CO2FLUX_MONTHLY_SUM[d=1]*12)" | "NEE Sum (LANDS)" | "PgC/yr" | "Areas[d=1]" 49 50 NPP_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" 50 51 GPP_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" … … 52 53 MAINT_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" 53 54 GROWTH_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" 55 cVeg_lands | "cVeg" | "" | "(cVeg[d=1])" | "Carbon in Vegetation" | "kg C m-2" | "Areas[d=1]" 56 cLitter_lands | "cLitter" | "" | "(cLitter[d=1])" | "Carbon in Litter Pool" | "kg C m-2" | "Areas[d=1]" 57 cSoil_lands | "cSoil" | "" | "(cSoil[d=1])" | "Carbon in Soil Pool" | "kg C m-2" | "Areas[d=1]" 58 cProduct_lands | "cProduct" | "" | "(cProduct[d=1])" | "Carbon in Products of Land Use Change" | "kg C m-2" | "Areas[d=1]" 59 lai_lands | "lai" | "" | "(lai[d=1])" | "Leaf Area Fraction" | "1" | "Areas[d=1]" 60 gpp_lands | "gpp" | "" | "(gpp[d=1])" | "Gross Primary Production" | "kg C m-2 s-1" | "Areas[d=1]" 61 ra_lands | "ra" | "" | "(ra[d=1])" | "Autotrophic Respiration" | "kg C m-2 s-1" | "Areas[d=1]" 62 npp_lands | "npp" | "" | "(npp[d=1])" | "Net Primary Production" | "kg C m-2 s-1" | "Areas[d=1]" 63 rh_lands | "rh" | "" | "(rh[d=1])" | "Heterotrophic Respiration" | "kg C m-2 s-1" | "Areas[d=1]" 64 fFire_lands | "fFire" | "" | "(fFire[d=1])" | "CO2 Emission from Fire" | "kg C m-2 s-1" | "Areas[d=1]" 65 fHarvest_lands | "fHarvest" | "" | "(fHarvest[d=1])" | "CO2 Flux to Atmosphere from Crop Harvesting" | "kg C m-2 s-1" | "Areas[d=1]" 66 fLuc_lands | "fLuc" | "" | "(fLuc[d=1])" | "CO2 Flux to Atmosphere from Land Use Change" | "kg C m-2 s-1" | "Areas[d=1]" 67 nbp_lands | "nbp" | "" | "(nbp[d=1])" | "Net Biospheric Production" | "kg C m-2 s-1" | "Areas[d=1]" 68 fVegLitter_lands | "fVegLitter" | "" | "(fVegLitter[d=1])" | "Total Carbon Flux from Vegetation to Litter" | "kg C m-2 s-1" | "Areas[d=1]" 69 fLitterSoil_lands | "fLitterSoil" | "" | "(fLitterSoil[d=1])" | "Total Carbon Flux from Litter to Soil" | "kg C m-2 s-1" | "Areas[d=1]" 70 cLeaf_lands | "cLeaf" | "" | "(cLeaf[d=1])" | "Carbon in Leaves" | "kg C m-2" | "Areas[d=1]" 71 cWood_lands | "cWood" | "" | "(cWood[d=1])" | "Carbon in Wood" | "kg C m-2" | "Areas[d=1]" 72 cRoot_lands | "cRoot" | "" | "(cRoot[d=1])" | "Carbon in Roots" | "kg C m-2" | "Areas[d=1]" 73 cMisc_lands | "cMisc" | "" | "(cMisc[d=1])" | "Carbon in Other Living Compartments" | "kg C m-2" | "Areas[d=1]" 74 cLitterAbove_lands | "cLitterAbove" | "" | "(cLitterAbove[d=1])" | "Carbon in Above-Ground Litter" | "kg C m-2" | "Areas[d=1]" 75 cLitterBelow_lands | "cLitterBelow" | "" | "(cLitterBelow[d=1])" | "Carbon in Below-Ground Litter" | "kg C m-2" | "Areas[d=1]" 76 cSoilFast_lands | "cSoilFast" | "" | "(cSoilFast[d=1])" | "Carbon in Fast Soil Pool" | "kg C m-2" | "Areas[d=1]" 77 cSoilMedium_lands | "cSoilMedium" | "" | "(cSoilMedium[d=1])" | "Carbon in Medium Soil Pool" | "kg C m-2" | "Areas[d=1]" 78 cSoilSlow_lands | "cSoilSlow" | "" | "(cSoilSlow[d=1])" | "Carbon in Slow Soil Pool" | "kg C m-2" | "Areas[d=1]" 79 treeFracPrimDec_lands | "treeFracPrimDec" | "" | "(treeFracPrimDec[d=1])" | "Total Primary Deciduous Tree Cover Fraction" | "%" | "Areas[d=1]" 80 treeFracPrimEver_lands | "treeFracPrimEver" | "" | "(treeFracPrimEver[d=1])"| "Total Primary Evergreen Tree Cover Fraction" | "%" | "Areas[d=1]" 81 c3PftFrac_lands | "c3PftFrac" | "" | "(c3PftFrac[d=1])" | "Total C3 PFT Cover Fraction" | "%" | "Areas[d=1]" 82 c4PftFrac_lands | "c4PftFrac" | "" | "(c4PftFrac[d=1])" | "Total C4 PFT Cover Fraction" | "%" | "Areas[d=1]" 83 rGrowth_lands | "rGrowth" | "" | "(rGrowth[d=1])" | "Growth Autotrophic Respiration" | "kg C m-2 s-1" | "Areas[d=1]" 84 rMaint_lands | "rMaint" | "" | "(rMaint[d=1])" | "Maintenance Autotrophic Respiration" | "kg C m-2 s-1" | "Areas[d=1]" 85 nppLeaf_lands | "nppLeaf" | "" | "(nppLeaf[d=1])" | "CO2 Flux from Atmosphere due to NPP Allocation to Leaf" | "kg C m-2 s-1" | "Areas[d=1]" 86 nppWood_lands | "nppWood" | "" | "(nppWood[d=1])" | "CO2 Flux from Atmosphere due to NPP Allocation to Wood" | "kg C m-2 s-1" | "Areas[d=1]" 87 nppRoot_lands | "nppRoot" | "" | "(nppRoot[d=1])" | "CO2 Flux from Atmosphere due to NPP Allocation to Root" | "kg C m-2 s-1" | "Areas[d=1]" 88 nep_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]" 89 cMassVariation_lands | "cMassVariation" | "" | "(cMassVariation[d=1])" | "Carbon Mass Variation" | "kg C m-2 s-1" | "Areas[d=1]" 90 cBal_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]" 54 91 #------------------------------------------------------------------------------------------------------------------------------------------------------ -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/forcesoil.f90
r367 r382 31 31 REAL(r_std) :: date0 32 32 INTEGER(i_std) :: rest_id_sto 33 33 CHARACTER(LEN=20), SAVE :: thecalendar = 'noleap' 34 34 !- 35 35 CHARACTER(LEN=100) :: Cforcing_name … … 46 46 47 47 48 INTEGER :: i,m,iatt,iv 48 INTEGER :: i,m,iatt,iv,iyear 49 49 50 50 CHARACTER(LEN=80) :: var_name … … 212 212 iret = NF90_INQUIRE_DIMENSION (rest_id_sto,1,len=iim_g) 213 213 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) 214 216 iret = NF90_CLOSE (rest_id_sto) 217 i=INDEX(thecalendar,ACHAR(0)) 218 IF ( i > 0 ) THEN 219 thecalendar(i:20)=' ' 220 ENDIF 215 221 !- 216 222 ! Allocate longitudes and latitudes … … 226 232 & sto_restname_out, itau_dep, date0, dt_files, rest_id_sto) 227 233 ENDIF 234 CALL bcast(date0) 235 CALL bcast(thecalendar) 236 WRITE(numout,*) "calendar = ",thecalendar 228 237 !- 229 238 ! calendar 230 239 !- 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) 234 241 CALL ioget_calendar (one_year,one_day) 235 236 242 CALL ioconf_startdate(date0) 237 243 ! 238 244 IF (is_root_prc) THEN 239 245 !- … … 348 354 !-- do not write this variable: it will be modified. 349 355 ENDDO 356 WRITE(numout,*) "date0 : ",date0, itau_dep 350 357 !- 351 358 ! Length of run … … 355 362 write(numout,*) 'Number of years for carbon spinup : ',time_str 356 363 ! 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) 358 365 write(numout,*) 'Number of time steps to do: ',itau_len 359 366 !- … … 379 386 CALL bcast(iim_g) 380 387 CALL bcast(jjm_g) 381 call bcast(nbp_glo) 388 CALL bcast(nbp_glo) 389 CALL bcast(itau_dep) 382 390 CALL bcast(itau_len) 383 391 ! … … 400 408 CALL scatter(indices_g,indices) 401 409 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) 403 411 !- 404 412 !- … … 525 533 CALL getin_p('FLUX_TOT_COEFF',flux_tot_coeff) 526 534 535 iyear=1 527 536 DO i=1,itau_len 528 537 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 530 543 CALL soilcarbon & 531 544 & (kjpindex, dt_forcesoil, clay, & … … 534 547 & carbon, resp_hetero_soil) 535 548 ENDDO 536 549 WRITE(numout,*) "End of soilcarbon LOOP." 537 550 CALL Gather(carbon,carbon_g) 538 551 !- -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/readdim2.f90
r258 r382 131 131 !- 132 132 CALL ioget_calendar(calendar_str) 133 i=INDEX(calendar_str,ACHAR(0)) 134 IF ( i > 0 ) THEN 135 calendar_str(i:20)=' ' 136 ENDIF 133 137 ! WRITE(numout,*) "forcing_info : Calendar used : ",calendar_str 134 138 IF ( calendar_str == 'XXXX' ) THEN -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/teststomate.f90
r367 r382 58 58 REAL(r_std),DIMENSION(:,:),ALLOCATABLE :: x_neighbours_g 59 59 60 !!$ >> DS for the externalized version61 REAL(r_std),DIMENSION(:),ALLOCATABLE :: hist_PFTaxis62 !!$ >> DS63 64 60 INTEGER :: ier,iret 65 61 INTEGER :: ncfid 62 CHARACTER(LEN=20),SAVE :: thecalendar='noleap' 63 66 64 LOGICAL :: a_er 67 65 CHARACTER(LEN=80) :: & … … 83 81 REAL(r_std) :: dt_slow_ 84 82 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 85 86 REAL(r_std),DIMENSION(10) :: hist_pool_10axis 86 87 REAL(r_std),DIMENSION(100) :: hist_pool_100axis … … 127 128 CALL init_para(.FALSE.) 128 129 CALL init_timer 129 !-130 ! calendar131 !-132 CALL ioconf_calendar ('noleap')133 CALL ioget_calendar (one_year,one_day)134 130 135 131 IF (is_root_prc) THEN … … 300 296 iret = NF90_INQUIRE_DIMENSION (ncfid,1,len=iim_g) 301 297 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) 302 300 iret = NF90_CLOSE (ncfid) 303 301 i=INDEX(thecalendar,ACHAR(0)) 302 IF ( i > 0 ) THEN 303 thecalendar(i:20)=' ' 304 ENDIF 304 305 ENDIF 305 306 CALL bcast(iim_g) 306 307 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) 307 314 ! 308 315 ! Parallelization :
Note: See TracChangeset
for help on using the changeset viewer.