Changeset 2864 for CONFIG/UNIFORM/v6/NEMO_v6/GENERAL/DRIVER
- Timestamp:
- 05/23/16 15:47:13 (8 years ago)
- Location:
- CONFIG/UNIFORM/v6/NEMO_v6/GENERAL/DRIVER
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/NEMO_v6/GENERAL/DRIVER/opa9.driver
r2848 r2864 32 32 { 33 33 IGCM_debug_PushStack "OCE_Update" 34 35 # Interannual run36 # In this case job need to calculate previous and following year and give, and if every run needs to add "_y" before every year37 if [ X${opa9_UserChoices_Interannual_Run} = Xy ] ; then38 39 typeset file40 41 (( PeriodCumulPeriod = ${CumulPeriod} - 1 ))42 (( PeriodInitYear =${InitYear} + ${PeriodCumulPeriod} * ${PeriodLengthInYears} ))43 (( PeriodFinalYear =${InitYear} + ${PeriodLengthInYears}*${CumulPeriod} - 1 ))44 45 NbFileInter=${#opa9_Interannual_List_jobsbc[*]}46 (( NbFileInter_tot=${#opa9_Interannual_List_jobsbc[*]} * ${PeriodLengthInYears} ))47 (( i = 0 ))48 49 while [ ${year} -le ${PeriodFinalYear} ] ; do #copy in ONCE of ALL necessary files for all PeriodLength50 51 while [ $i -lt ${NbFileInter} ] ; do52 53 eval file=${opa9_Interannual_List_jobsbc[$i]}54 if [ X${year} = X${PeriodInitYear} ] ; then55 if [ ${month} -eq 01 ] ; then56 # if year-1 does not exist we create a file _noym1.nc copy of year57 eval jobsbc_file_ym1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year_m1}.nc58 if [ ! -f ${jobsbc_file_ym1} ] ; then59 eval jobsbc_file_ym1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year}.nc60 eval runsbc_file_ym1=${file}_noym1.nc61 else62 eval jobsbc_file_ym1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year_m1}.nc63 eval runsbc_file_ym1=${file}_y${year_m1}.nc64 fi65 66 IGCM_sys_Get ${jobsbc_file_ym1} ${runsbc_file_ym1}67 fi68 fi69 70 # download year71 eval jobsbc_file_y=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year}.nc72 eval runsbc_file_y=${file}_y${year}.nc73 74 if [ ! -f ${runsbc_file_y} ] ; then75 IGCM_sys_Get ${jobsbc_file_y} ${runsbc_file_y}76 fi77 78 # download (year+1) if it is last year of run79 if [ X${year} = X${PeriodFinalYear} ] ; then80 81 eval jobsbc_file_yp1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year_p1}.nc82 eval runsbc_file_yp1=${file}_y${year_p1}.nc83 84 if [ ! -f ${runsbc_file_yp1} ] ; then85 86 # if year+1 does not exist we create a file _noyp1.nc copy of year87 eval jobsbc_file_yp1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year_p1}.nc88 if [ ! -f ${jobsbc_file_yp1} ] ; then89 eval jobsbc_file_yp1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year}.nc90 eval runsbc_file_yp1=${file}_noyp1.nc91 else92 eval jobsbc_file_yp1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year_p1}.nc93 eval runsbc_file_yp1=${file}_y${year_p1}.nc94 fi95 IGCM_sys_Get ${jobsbc_file_yp1} ${runsbc_file_yp1}96 fi97 98 fi99 (( i = i + 1 ))100 101 done102 103 (( year = year + 1 ))104 105 (( i = 0 ))106 done107 108 # End interannual109 elif [ X${opa9_UserChoices_Interannual_Run} = Xn ] ; then110 # Climatological run111 typeset file112 113 eval NbFileInter=${#opa9_Interannual_List_jobsbc[*]}114 115 (( i = 0 ))116 while [ $i -lt ${NbFileInter} ] ; do117 eval file=${opa9_Interannual_List_jobsbc[$i]}118 eval jobsbc_file=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}.nc119 eval runsbc_file=${file}.nc120 121 IGCM_sys_Get ${jobsbc_file} ${runsbc_file}122 (( i = i + 1 ))123 done124 fi125 # End climatological126 127 # TEST year for EMPave_old.dat file128 # Needed if in namelist fwb=2 after firts year, because in EMPave_old.dat file first year is 0129 # eval year_EMPave_old=`awk '{ print $1 }' ${RUN_DIR}/EMPave_old.dat`130 # (( PeriodCumulPeriod = ${CumulPeriod} - 1 ))131 # (( PeriodInitYear =${InitYear} + ${PeriodCumulPeriod} * ${PeriodLengthInYears} ))132 # echo "value year: X${year}"133 # echo "value PeriodInitYear: X${PeriodInitYear}"134 # if [ "${CumulPeriod}" -ne 1 ] ; then135 # if [ ${year_m1} = ${year_EMPave_old} ] ; then136 # echo "OK. Date in EMPave_old.dat ${year_EMPave_old} is equal to date in EMPave.dat minus 1 : ${year_m1}"137 # else138 # echo "NOT CORRECT. Date in EMPave_old.dat ${year_EMPave_old} is not equal to date in EMPave.dat minus 1: ${year_m1} exit."139 # exit140 # fi141 # fi142 # END OF TEST143 34 144 35 NbFreq=$( echo ${config_OCE_WriteFrequency} | wc -w )
Note: See TracChangeset
for help on using the changeset viewer.