- Timestamp:
- 2011-08-29T10:08:49+02:00 (13 years ago)
- Location:
- branches/ORCHIDEE_EXT/ORCHIDEE_OL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ORCHIDEE_EXT/ORCHIDEE_OL/SPINUP/COMP/spinup.driver
r382 r408 299 299 300 300 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card UserChoices sechiba_LEVEL ${spinup_UserChoices_sechiba_LEVEL} 301 spinup_SubJobPost_sechiba_TimeSeriesVars0=${spinup_SubJobPost_sechiba_TimeSeriesVars2D[0]} > /dev/null 2>&1301 spinup_SubJobPost_sechiba_TimeSeriesVars0=${spinup_SubJobPost_sechiba_TimeSeriesVars2D[0]} 302 302 if [ X${spinup_SubJobPost_sechiba_TimeSeriesVars0} != X${NULL_STR} ] ; then 303 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card Post_1M_sechiba_history TimeSeriesVars2D "("$( echo ${spinup_SubJobPost_sechiba_TimeSeriesVars [@]} | sed -e "s/ /,/g" )")"303 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card Post_1M_sechiba_history TimeSeriesVars2D "("$( echo ${spinup_SubJobPost_sechiba_TimeSeriesVars2D[@]} | sed -e "s/ /,/g" )")" 304 304 else 305 305 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card Post_1M_sechiba_history TimeSeriesVars2D "()" 306 306 fi 307 spinup_SubJobPost_sechiba_TimeSeriesVars0=${spinup_SubJobPost_sechiba_TimeSeriesVars3D[0]} > /dev/null 2>&1307 spinup_SubJobPost_sechiba_TimeSeriesVars0=${spinup_SubJobPost_sechiba_TimeSeriesVars3D[0]} 308 308 if [ X${spinup_SubJobPost_sechiba_TimeSeriesVars0} != X${NULL_STR} ] ; then 309 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card Post_1M_sechiba_history TimeSeriesVars3D "("$( echo ${spinup_SubJobPost_sechiba_TimeSeriesVars [@]} | sed -e "s/ /,/g" )")"309 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card Post_1M_sechiba_history TimeSeriesVars3D "("$( echo ${spinup_SubJobPost_sechiba_TimeSeriesVars3D[@]} | sed -e "s/ /,/g" )")" 310 310 else 311 311 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/sechiba.card Post_1M_sechiba_history TimeSeriesVars3D "()" … … 646 646 647 647 # We Get the forcing file from the previous run of ORCHIDEE 648 ORCHIDEE_JobName=${LastJobName} 649 sed -e "s&(\${config_SBG_RestartPath}/\${config_SBG_RestartJobName}/SBG/Restart/\${config_SBG_RestartJobName}_\${Date_Restarts}_stomate_forcing.nc, stomate_forcing.nc)&(${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SBG/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_stomate_forcing.nc, stomate_forcing.nc)&" ${New_SUBMIT_DIR}/COMP/sechiba.card > sechiba.card.tmp 648 sed -e "s&(\${config_SBG_RestartPath}/\${config_SBG_RestartJobName}/SBG/Restart/\${config_SBG_RestartJobName}_\${Date_Restarts}_stomate_forcing.nc, stomate_forcing.nc)&(${config_SBG_RestartPath}/${LastJobName}/SBG/Restart/${LastJobName}_${output_PreviousStage_LastRestartDate}_stomate_forcing.nc, stomate_forcing.nc)&" ${New_SUBMIT_DIR}/COMP/sechiba.card > sechiba.card.tmp 650 649 IGCM_sys_Mv sechiba.card.tmp ${New_SUBMIT_DIR}/COMP/sechiba.card 651 650 … … 661 660 fi 662 661 done 662 eval IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Post RebuildFrequency ${config_SubJob_PeriodLength} 663 663 eval IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Post TimeSeriesFrequency ${config_SubJob_PeriodLength} 664 664 … … 769 769 770 770 # We Get the forcing file from the previous run of ORCHIDEE 771 ORCHIDEE_JobName=${config_UserChoices_JobName}ORC_${iter} 772 sed -e "s&(\${config_SBG_RestartPath}/\${config_SBG_RestartJobName}/SBG/Restart/\${config_SBG_RestartJobName}_\${Date_Restarts}_stomate_forcing.nc, stomate_forcing.nc)&(${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SBG/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_stomate_forcing.nc, stomate_forcing.nc)&" ${New_SUBMIT_DIR}/COMP/sechiba.card > sechiba.card.tmp 771 sed -e "s&(\${config_SBG_RestartPath}/\${config_SBG_RestartJobName}/SBG/Restart/\${config_SBG_RestartJobName}_\${Date_Restarts}_stomate_forcing.nc, stomate_forcing.nc)&(${config_SBG_RestartPath}/${LastJobName}/SBG/Restart/${LastJobName}_${output_PreviousStage_LastRestartDate}_stomate_forcing.nc, stomate_forcing.nc)&" ${New_SUBMIT_DIR}/COMP/sechiba.card > sechiba.card.tmp 773 772 IGCM_sys_Mv sechiba.card.tmp ${New_SUBMIT_DIR}/COMP/sechiba.card 774 773 … … 784 783 fi 785 784 done 785 eval IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Post RebuildFrequency ${config_SubJob_PeriodLength} 786 786 eval IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card Post TimeSeriesFrequency ${config_SubJob_PeriodLength} 787 787 … … 812 812 813 813 # We Get the forcing file from the previous run of ORCHIDEE 814 ORCHIDEE_JobName=${config_UserChoices_JobName}${output_PreviousStage_LastExtName}815 814 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 818 else 819 last_Cforcing=${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SBG/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_stomate_Cforcing.nc 820 fi 821 ls -lrt ${last_Cforcing} 822 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/stomate.card BoundaryFiles ListNonDel "(${last_Cforcing}, stomate_Cforcing.nc), \\" 815 816 IGCM_card_WriteOption ${New_SUBMIT_DIR}/COMP/stomate.card BoundaryFiles ListNonDel \ 817 "(${config_SBG_RestartPath}/${LastJobName}/SBG/Restart/${LastJobName}_${output_PreviousStage_LastRestartDate}_stomate_Cforcing.nc, stomate_Cforcing.nc), \\" 823 818 824 819 # Nb years for forcing FORCESOIL … … 959 954 echo "SECHIBA WriteFrequency : " ${config_SRF_WriteFrequency} 960 955 if ( [ X${StageName} != X"TSTOINI" ] && [ X${StageName} != X"TSTO" ] && [ X${StageName} != X"FORC" ] ) ; then 961 956 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SRF WriteFrequency "${config_SRF_WriteFrequency}" 962 957 fi 963 958 if [ X"${spinup_UserChoices_ok_stomate}" = "Xy" ] ; then 964 959 echo "STOMATE WriteFrequency : " ${config_SBG_WriteFrequency} 965 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG WriteFrequency "${config_SBG_WriteFrequency}" 960 case $StageName in 961 "TSTOINI"|"TSTO") 962 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG WriteFrequency "1Y" 963 ;; 964 *) 965 IGCM_card_WriteOption ${New_SUBMIT_DIR}/config.card SBG WriteFrequency "${config_SBG_WriteFrequency}" 966 esac 966 967 fi 967 968 … … 1005 1006 # Did it finish ? 1006 1007 if [ X${run_Configuration_PeriodState} != X"Completed" ] ; then 1007 IGCM_debug_Exit "SPIN_update Error Run SubJob : " ${SubJobName} 1008 IGCM_debug_Exit "SPIN_update Error Run SubJob : " ${SubJobName} ${run_Configuration_PeriodState} 1008 1009 fi 1009 1010 IGCM_debug_Verif_Exit … … 1023 1024 if [ X${StageName} = X"FORC" ] ; then 1024 1025 # This must be done on the ARCHIVE HOST. 1025 if ( [ X${spinup_UserChoices_DEBUG_SPIN} = Xn ] ) ; then1026 last_restart=${config_SBG_RestartPath}/${config_UserChoices_JobName}/SPIN/Output/${ORCHIDEE_JobName}/SRF/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_sechiba_rest.nc1027 else1028 last_restart=${config_SBG_RestartPath}/${ORCHIDEE_JobName}/SRF/Restart/${ORCHIDEE_JobName}_${output_PreviousStage_LastRestartDate}_sechiba_rest.nc1029 fi1030 1026 IGCM_sys_MkdirArchive ${config_SBG_RestartPath}/${SubJobName}/SRF/Restart 1031 IGCM_sys_RshArchive "cp -fp ${last_restart} ${config_SBG_RestartPath}/${SubJobName}/SRF/Restart/${SubJobName}_${This_Job_DateEnd}_sechiba_rest.nc" 1027 IGCM_sys_RshArchive \ 1028 "cp -fp ${config_SBG_RestartPath}/${LastJobName}/SRF/Restart/${LastJobName}_${output_PreviousStage_LastRestartDate}_sechiba_rest.nc"\ 1029 " ${config_SBG_RestartPath}/${SubJobName}/SRF/Restart/${SubJobName}_${This_Job_DateEnd}_sechiba_rest.nc" 1032 1030 fi 1033 1031 … … 1047 1045 fi 1048 1046 1049 IGCM_sys_RshArchive "mv -f ${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}${output_PreviousStage_LastExtName} ${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}/SPIN/Output/" 1047 IGCM_sys_RshArchive "mv -f ${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}${output_PreviousStage_LastExtName}"\ 1048 " ${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName}/SPIN/Output/" 1050 1049 fi 1051 1050 -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/forcesoil.f90
r382 r408 187 187 debug = .FALSE. 188 188 CALL getin_p('DEBUG_INFO',debug) 189 !190 !Config Key = LONGPRINT191 !Config Desc = ORCHIDEE will print more messages192 !Config Def = n193 !Config Help = This flag permits to print more debug messages in the run.194 !195 long_print = .FALSE.196 CALL getin_p('LONGPRINT',long_print)197 189 !- 198 190 ! Stomate's restart files … … 312 304 & (rest_id_sto, varnames(iv), varnbdim_max, varnbdim, vardims) 313 305 l1d = ALL(vardims(1:varnbdim) == 1) 314 !----315 ALLOCATE( var_3d(nbp_glo,vardims(3)), stat=ier)316 IF (ier /= 0) STOP 'ALLOCATION PROBLEM'317 306 !---- read it 318 307 IF (l1d) THEN … … 321 310 & 1, itau_dep, .TRUE., xtmp) 322 311 ELSE 312 ALLOCATE( var_3d(nbp_glo,vardims(3)), stat=ier) 313 IF (ier /= 0) STOP 'ALLOCATION PROBLEM' 314 !---- 323 315 CALL restget & 324 316 & (rest_id_sto, TRIM(varnames(iv)), nbp_glo, vardims(3), & … … 334 326 & (rest_id_sto, TRIM(varnames(iv)), nbp_glo, vardims(3), & 335 327 & 1, itau_dep, var_3d, 'scatter', nbp_glo, indices_g) 328 !---- 329 DEALLOCATE(var_3d) 336 330 ENDIF 337 !----338 DEALLOCATE(var_3d)339 331 ENDIF 340 332 ENDDO -
branches/ORCHIDEE_EXT/ORCHIDEE_OL/teststomate.f90
r382 r408 74 74 REAL, ALLOCATABLE, DIMENSION(:) :: lon_rect, lat_rect 75 75 REAL(r_std) :: dt 76 INTEGER(i_std) :: itau_dep,itau ,itau_len,itau_step76 INTEGER(i_std) :: itau_dep,itau_fin,itau,itau_len,itau_step 77 77 REAL(r_std) :: date0 78 78 INTEGER(i_std) :: rest_id_sec,rest_id_sto … … 113 113 114 114 REAL(r_std),DIMENSION(:,:),ALLOCATABLE :: var_3d 115 REAL(r_std) :: var_1d(1) 115 116 116 117 !- … … 375 376 CALL bcast(rest_id_sec) 376 377 CALL bcast(rest_id_sto) 378 CALL bcast(itau_dep) 377 379 CALL bcast(date0) 378 380 CALL bcast(dt) … … 404 406 ALLOCATE(lon(iim,jjm)) 405 407 ALLOCATE(lat(iim,jjm)) 408 lon=zero 409 lat=zero 406 410 CALL scatter2D(lon_g,lon) 407 411 CALL scatter2D(lat_g,lat) 408 IF (debug) THEN409 IF (is_root_prc) THEN410 WRITE(numout,*) mpi_rank, lat_g411 WRITE(numout,*) mpi_rank, lon_g412 ENDIF413 WRITE(numout,*) mpi_rank, lat414 WRITE(numout,*) mpi_rank, lon415 ENDIF416 412 417 413 DO ji=1,kjpindex … … 587 583 !- 588 584 WRITE(time_str,'(a)') '1Y' 589 CALL getin ('TIME_LENGTH', time_str)585 CALL getin_p ('TIME_LENGTH', time_str) 590 586 ! transform into itau 591 587 CALL tlen2itau(time_str, dt, date0, itau_len) … … 593 589 itau_len = NINT( MAX(1.,FLOAT(NINT(itau_len*dtradia/dt_force))) & 594 590 & *dt_force/dtradia) 591 !- 592 itau_fin = itau_dep+itau_len 595 593 !- 596 594 ! set up STOMATE history file … … 851 849 l_first_intersurf=.FALSE. 852 850 ! 853 DO itau = itau_dep+itau_step,itau_dep+itau_len,itau_step 851 DO itau = itau_dep+itau_step,itau_fin,itau_step 852 ! 853 CALL intsurf_time( itau, date0, dtradia ) 854 854 ! 855 855 !-- next forcing state 856 856 iisf = iisf+1 857 IF (debug) WRITE(numout,*) "itau,iisf : ",itau,iisf 857 858 !--- 858 859 IF (iisf .GT. nsfm) THEN … … 927 928 & rest_id_sec, hist_id_sec, hist_id_sec2, rest_id_sto, hist_id_stom, hist_id_stom_IPCC, co2_flux, fco2_lu) 928 929 day_counter = one_day - dt_force 929 !930 CALL intsurf_time( itau+itau_step, date0, dtradia )931 930 ENDDO ! end of the time loop 932 !-933 itau = itau -itau_step934 931 !- 935 932 ! write restart files … … 948 945 !-- check if the variable is to be written here 949 946 IF (INDEX( taboo_vars,'$'//TRIM(varnames(iv))//'$') .EQ. 0 ) THEN 947 IF (debug) WRITE(numout,*) "restart var : ",TRIM(varnames(iv)),itau_dep,itau_fin 948 950 949 !---- get variable dimensions, especially 3rd dimension 951 950 CALL ioget_vdim & 952 951 & (rest_id_sec, varnames(iv), varnbdim_max, varnbdim, vardims) 953 952 l1d = ALL(vardims(1:varnbdim) .EQ. 1) 954 ALLOCATE(var_3d(nbp_glo,vardims(3)),stat=ier)955 IF (ier .NE. 0) STOP 'ALLOCATION PROBLEM'956 953 !---- read it 957 954 IF (l1d) THEN 958 955 CALL restget (rest_id_sec,TRIM(varnames(iv)), & 959 1,vardims(3),1,itau_dep,.TRUE.,var_3d)956 1,1,1,itau_dep,.TRUE.,var_1d) 960 957 ELSE 958 ALLOCATE(var_3d(nbp_glo,vardims(3)),stat=ier) 959 IF (ier .NE. 0) STOP 'ALLOCATION PROBLEM' 961 960 CALL restget (rest_id_sec,TRIM(varnames(iv)), & 962 961 nbp_glo,vardims(3),1,itau_dep,.TRUE.,var_3d, & … … 966 965 IF (l1d) THEN 967 966 CALL restput (rest_id_sec,TRIM(varnames(iv)), & 968 1, vardims(3),1,itau,var_3d)967 1,1,1,itau_fin,var_1d) 969 968 ELSE 970 969 CALL restput (rest_id_sec,TRIM(varnames(iv)), & 971 nbp_glo,vardims(3),1,itau ,var_3d, &970 nbp_glo,vardims(3),1,itau_fin,var_3d, & 972 971 'scatter',nbp_glo,indices_g) 972 DEALLOCATE (var_3d) 973 973 ENDIF 974 DEALLOCATE (var_3d)975 974 ENDIF 976 975 ENDDO … … 982 981 ldrestart_write = .TRUE. 983 982 !- 983 IF (debug) WRITE(numout,*) "Call slowproc for restart." 984 984 CALL slowproc_main & 985 & (itau , kjpij, kjpindex, dt_force, date0, &985 & (itau_fin, kjpij, kjpindex, dt_force, date0, & 986 986 & ldrestart_read, ldrestart_write, .FALSE., .TRUE., & 987 987 & indices, indexveg, lalo, neighbours, resolution, contfrac, soiltype, & … … 994 994 ! close files 995 995 !- 996 IF (is_root_prc) & 997 CALL restclo 996 IF (is_root_prc) THEN 997 CALL restclo 998 IF ( debug ) WRITE(numout,*) 'REST CLOSED' 999 ENDIF 998 1000 CALL histclo 999 1001 … … 1003 1005 IF (is_root_prc) THEN 1004 1006 CALL getin_dump() 1005 IF ( debug ) WRITE(numout,*) 'REST CLOSED'1006 1007 ENDIF 1007 1008 #ifdef CPP_PARA
Note: See TracChangeset
for help on using the changeset viewer.