Changeset 2540
- Timestamp:
- 06/01/15 15:03:21 (9 years ago)
- Location:
- CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/oasis.driver
r2534 r2540 67 67 (( LagAtm = 86400 / day_step * iphysiq / nsplit_phys )) 68 68 69 (( LagOce = 86400 / O RCA_NPDT_JOUR ))69 (( LagOce = 86400 / OPA_NPDT_JOUR )) 70 70 71 IGCM_debug_Print 1 "O RCA_NPDT_JOUR : ${ORCA_NPDT_JOUR}"72 IGCM_debug_Print 1 "LagAtm 73 IGCM_debug_Print 1 "LagOce 71 IGCM_debug_Print 1 "OPA_NPDT_JOUR : ${OPA_NPDT_JOUR}" 72 IGCM_debug_Print 1 "LagAtm : ${LagAtm}" 73 IGCM_debug_Print 1 "LagOce : ${LagOce}" 74 74 75 75 ## Use of Lucia ## -
CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/opa9.driver
r2492 r2540 9 9 RESOL_OCE_ICE=$( echo ${RESOL} | awk "-Fx" '{print $1}' ) 10 10 case ${RESOL_OCE_ICE} in 11 ( *LIM2* ) 12 SEAICE_MODEL=LIM2 13 LIM_VERSION=2 14 ;; 15 16 ( *LIM3* ) 17 SEAICE_MODEL=LIM3 18 LIM_VERSION=3 19 ;; 20 ( *CICE*) SEAICE_MODEL=CICE ;; 21 ( * ) SEAICE_MODEL=UNKNOWN ;; 11 ( *LIM2* ) SEAICE_MODEL=LIM2 ; LIM_VERSION=2 ;; 12 ( *LIM3* ) SEAICE_MODEL=LIM3 ; LIM_VERSION=3 ;; 13 ( *CICE* ) SEAICE_MODEL=CICE ;; 14 ( * ) SEAICE_MODEL=UNKNOWN ;; 22 15 esac 23 16 RESOL_OCE=$( echo ${RESOL_OCE_ICE} | sed "s/${SEAICE_MODEL}//" ) … … 30 23 31 24 # Local function to find namelists parameters 32 supergrep () { 33 grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" 34 } 35 25 #supergrep () { grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" ; } 26 supergrep () { grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" -e "s%^ *$1 *=%%" ; } 36 27 ##--Variables used by OPA -- 37 38 # cn_exp experience name39 # nn_it000 number of the first time step40 # nn_itend number of the last time step41 # nn_date0 initial calendar date yymmdd (used if nn_rstctl=1)42 # nn_leapy Leap year calendar (1) or not (0), or 360 days calendar (30)43 # nn_stock frequency of creation of a restart file (modulo referenced to 1)44 # nn_write frequency of write in the output file (modulo referenced to nn_it000)45 # ln_rstart start from rest (F) or from a restart file (T)46 # nn_rstctl restart control = 0 nn_it000 is not compared to the restart file value47 # = 1 use nn_date0 in namelist_cfg (not the value in the restart file)48 # = 2 calendar parameters read in the restart file49 # nn_msh =1 create a mesh file (coordinates, scale factors, masks)50 # rn_rdt time step in seconds for the dynamics (and tracer if nacc=0) ==> 5760 (coming from namelist)51 # nn_prg time-step frequency of gap print in model output52 # nn_fwri frequency of zonal means and transport output53 54 28 NAMELIST_OPA_CFG=${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_cfg 55 NAMELIST_OPA_REF=${SUBMIT_DIR}/PARAM/namelist_ref56 IGCM_debug_Print 1 "namelist_ref : ${NAMELIST_OPA_REF}"57 if [ ! -r ${NAMELIST_OPA_REF} ] ; then58 echo "${NAMELIST_OPA_REF} non trouve"59 fi60 29 IGCM_debug_Print 1 "namelist_cfg : ${NAMELIST_OPA_CFG}" 61 30 if [ ! -r ${NAMELIST_OPA_CFG} ] ; then 62 echo "${NAMELIST_OPA_CFG} non trouve" 31 IGCM_debug_Exit "${NAMELIST_OPA_CFG} not found" 32 IGCM_debug_Verif_Exit 63 33 fi 64 65 PAT_CEXPER=$( supergrep cn_exp ${NAMELIST_OPA_CFG} ) 66 PAT_NIT000=$( supergrep nn_it000 ${NAMELIST_OPA_CFG} ) 67 PAT_NITEND=$( supergrep nn_itend ${NAMELIST_OPA_CFG} ) 68 PAT_NDATE0=$( supergrep nn_date0 ${NAMELIST_OPA_CFG} ) 69 PAT_NLEAPY=$( supergrep nn_leapy ${NAMELIST_OPA_CFG} ) 70 PAT_NSTOCK=$( supergrep nn_stock ${NAMELIST_OPA_CFG} ) 71 PAT_NWRITE=$( supergrep nn_write ${NAMELIST_OPA_CFG} ) 72 PAT_RESTAR=$( supergrep ln_rstart ${NAMELIST_OPA_CFG} ) 73 PAT_NRSTAR=$( supergrep nn_rstctl ${NAMELIST_OPA_CFG} ) 74 PAT_NMSH=$( supergrep nn_msh ${NAMELIST_OPA_CFG} ) 75 PAT_NN_WRITE=$( supergrep nn_write ${NAMELIST_OPA_CFG} ) 76 PAT_NN_FWRI=$( supergrep nn_fwri ${NAMELIST_OPA_CFG} ) 77 PAT_ICE_EMBD=$( supergrep nn_ice_embd ${NAMELIST_OPA_CFG} ) 78 PAT_ICEFLX=$( supergrep cn_iceflx ${NAMELIST_OPA_CFG} ) 79 PAT_JPNI=$( supergrep jpni ${NAMELIST_OPA_CFG} ) 80 PAT_JPNJ=$( supergrep jpnj ${NAMELIST_OPA_CFG} ) 81 PAT_JPNIJ=$( supergrep jpnij ${NAMELIST_OPA_CFG} ) 82 PAT_NN_FSBC=$( supergrep nn_fsbc ${NAMELIST_OPA_CFG} ) 83 84 ORCA_RDT=$( supergrep rn_rdt ${NAMELIST_OPA_CFG} | sed 's/ *rn_rdt *=//' | sed 's/\. *//' ) 85 ORCA_NN_FSBC=$( supergrep nn_fsbc ${NAMELIST_OPA_CFG} | sed 's/ *nn_fsbc *=//' | sed 's/\. *//' ) 86 (( ORCA_NPDT_JOUR = 86400 / ORCA_RDT )) 87 #(( ORCA_NPDT_SBC = ORCA_NPDT_JOUR / ORCA_NN_FSBC )) 88 (( ORCA_RDT_SBC = ORCA_RDT * ORCA_NN_FSBC )) 34 OPA_RDT=$( supergrep rn_rdt ${NAMELIST_OPA_CFG} ) 35 OPA_NN_FSBC=$( supergrep nn_fsbc ${NAMELIST_OPA_CFG} ) 36 # 37 # OPA_RDT=$( supergrep rn_rdt namelist_cfg ) 38 # OPA_NN_FSBC=$( supergrep nn_fsbc namelist_cfg ) 39 (( OPA_NPDT_JOUR = 86400 / OPA_RDT )) 40 (( OPA_RDT_SBC = OPA_RDT * OPA_NN_FSBC )) 89 41 90 91 42 # Period Length In Days between DateBegin and first day of calendar 0001 01 01 92 43 # /!\ Needed by OPA namelist to compute file names /!\ 93 44 (( DaysSinceJC = $( IGCM_date_DaysSinceJC ${DateBegin} ) + 1 )) 94 45 95 IGCM_debug_Print 1 "PAT_CEXPER $PAT_CEXPER "96 IGCM_debug_Print 1 "PAT_NIT000 $PAT_NIT000"97 IGCM_debug_Print 1 "PAT_NITEND $PAT_NITEND"98 IGCM_debug_Print 1 "PAT_NDATE0 $PAT_NDATE0"99 IGCM_debug_Print 1 "PAT_NLEAPY $PAT_NLEAPY"100 IGCM_debug_Print 1 "PAT_NSTOCK $PAT_NSTOCK"101 IGCM_debug_Print 1 "PAT_NWRITE $PAT_NWRITE"102 IGCM_debug_Print 1 "PAT_RESTAR $PAT_RESTAR"103 IGCM_debug_Print 1 "PAT_NRSTAR $PAT_NRSTAR"104 IGCM_debug_Print 1 "PAT_NMSH $PAT_NMSH"105 IGCM_debug_Print 1 "PAT_NN_WRITE $PAT_NN_WRITE"106 IGCM_debug_Print 1 "PAT_NN_FWRI $PAT_NN_FWRI"107 IGCM_debug_Print 1 "PAT_ICE_EMBD $PAT_ICE_EMBD"108 IGCM_debug_Print 1 "PAT_ICEFLX $PAT_ICEFLX"109 IGCM_debug_Print 1 "PAT_JPNI $PAT_JPNI"110 IGCM_debug_Print 1 "PAT_JPNJ $PAT_JPNJ"111 IGCM_debug_Print 1 "PAT_JPNIJ $PAT_JPNIJ"112 IGCM_debug_Print 1 "PAT_NN_FSBC $PAT_NN_FSBC"113 46 IGCM_debug_Print 1 " " 114 IGCM_debug_Print 1 "ORCA_RDT $ORCA_RDT" 115 IGCM_debug_Print 1 "ORCA_NN_FSBC $ORCA_NN_FSBC" 116 IGCM_debug_Print 1 "ORCA_RDT_SBC $ORCA_RDT_SBC" 117 IGCM_debug_Print 1 "ORCA_NPDT_JOUR $ORCA_NPDT_JOUR" 118 IGCM_debug_Print 1 "DaysSinceJC $DaysSinceJC" 47 IGCM_debug_Print 1 "OPA_RDT ${OPA_RDT}" 48 IGCM_debug_Print 1 "OPA_NN_FSBC ${OPA_NN_FSBC}" 49 IGCM_debug_Print 1 "OPA_RDT_SBC ${OPA_RDT_SBC}" 50 IGCM_debug_Print 1 "OPA_NPDT_JOUR ${OPA_NPDT_JOUR}" 51 IGCM_debug_Print 1 "DaysSinceJC ${DaysSinceJC}" 52 53 ## Check that nn_fsbc is correct compare to coupling frequency 54 FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400} 55 56 ## This informations are used for diaptr, trends and diagap files 57 ## only the first frequency is used for this files 58 59 IGCM_debug_Print 1 "FreqCoupling ${FreqCoupling}" 60 IGCM_debug_Print 1 "OPA_NN_FSBC ${OPA_NN_FSBC}" 61 IGCM_debug_Print 1 "OPA_RDT ${OPA_RDT}" 62 IGCM_debug_Print 1 "OPA_RDT_SBC ${OPA_RDT_SBC}" 63 64 if [[ ${OPA_RDT_SBC} -gt ${FreqCoupling} ]] ; then 65 IGCM_debug_Exit "OPA_RDT_SBC=${OPA_RDT_SBC} is greater than FreqCoupling=${FreqCoupling}" 66 IGCM_debug_Verif_Exit 67 fi 119 68 120 69 IGCM_debug_PopStack "OCE_Initialize" … … 126 75 { 127 76 IGCM_debug_PushStack "OCE_Update" 128 129 ## Check that nn_fsbc is correct compare to coupling frequency 130 131 FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400} 132 133 ## This informations are used for diaptr, trends and diagap files 134 ## only the first frequency is used for this files 135 136 IGCM_debug_Print 1 "FreqCoupling $FreqCoupling" 137 IGCM_debug_Print 1 "ORCA_NN_FSBC $ORCA_NN_FSBC" 138 IGCM_debug_Print 1 "ORCA_RDT $ORCA_RDT" 139 IGCM_debug_Print 1 "ORCA_RDT_SBC $ORCA_RDT_SBC" 140 141 if [[ ${ORCA_RDT_SBC} -gt ${FreqCoupling} ]] ; then 142 IGCM_debug_Exit "ORCA_RDT_SBC=${ORCA_RDT_SBC} is greater than FreqCoupling=${FreqCoupling}" 143 IGCM_debug_Verif_Exit 144 fi 145 77 146 78 ##--Write Frequency for iomput 147 79 ## Differents frequencies are allowed for grid_[TUVW] and icemod files … … 153 85 for frequency in ${config_OCE_WriteFrequency} ; do 154 86 case ${frequency} in 155 1D|1d) V1D_ENABLE=".TRUE." ;; 156 esac 157 case ${frequency} in 158 1M|1m) V1M_ENABLE=".TRUE." ;; 159 esac 160 case ${frequency} in 161 *[yY]) V1Y_ENABLE=".TRUE." ;; 87 ( 1D|1d ) V1D_ENABLE=".TRUE." ;; 88 ( 1M|1m ) V1M_ENABLE=".TRUE." ;; 89 ( *[yY] ) V1Y_ENABLE=".TRUE." ;; 162 90 esac 163 91 done 164 165 92 166 93 ##-- Output level : 3 for more 1D variables 167 94 eval opa9_OUTPUT_LEVEL=\${opa9_UserChoices_OUTPUT_LEVEL} > /dev/null 2>&1 168 95 OUTPUT_LEVEL=${opa9_OUTPUT_LEVEL} 169 170 96 171 97 # Period Length In Days between DateBegin and first day of calendar 0001 01 01 … … 174 100 175 101 ##-- Number of time steps updated : the first, the last and the number of time steps 176 (( O RCA_NIT000 = ( PeriodDaysSinceJC - DaysSinceJC ) * ORCA_NPDT_JOUR + 1 ))177 (( O RCA_NPDT = PeriodLengthInDays * ORCA_NPDT_JOUR ))178 (( O RCA_NITEND = ORCA_NIT000 + ORCA_NPDT - 1))102 (( OPA_NIT000 = ( PeriodDaysSinceJC - DaysSinceJC ) * OPA_NPDT_JOUR + 1 )) 103 (( OPA_NPDT = PeriodLengthInDays * OPA_NPDT_JOUR )) 104 (( OPA_NITEND = OPA_NIT000 + OPA_NPDT - 1)) 179 105 180 106 ##-- We force one restart file at the end of the trunk 181 O RCA_NSTOCK="${ORCA_NITEND}"107 OPA_NSTOCK="${OPA_NITEND}" 182 108 183 109 ##-- Restart configuration 184 110 if ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "n" ] ) ; then 185 O RCA_LRSTAR=.FALSE.186 O RCA_NRSTDT=0187 # Put O RCA_NMSH=0 when OPA running in parallel mode188 O RCA_NMSH=1111 OPA_LRSTAR=.FALSE. 112 OPA_NRSTDT=0 113 # Put OPA_NMSH=0 when OPA running in parallel mode 114 OPA_NMSH=1 189 115 #echo "NO OPA RESTART" 190 116 elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "y" ] ) ; then 191 O RCA_LRSTAR=.TRUE.192 O RCA_NRSTDT=0193 O RCA_NMSH=1117 OPA_LRSTAR=.TRUE. 118 OPA_NRSTDT=0 119 OPA_NMSH=1 194 120 #echo "OPA RESTART" 195 121 else 196 O RCA_LRSTAR=.TRUE.197 O RCA_NRSTDT=2198 O RCA_NMSH=0122 OPA_LRSTAR=.TRUE. 123 OPA_NRSTDT=2 124 OPA_NMSH=0 199 125 #echo "OPA RESTART" 200 126 fi … … 204 130 205 131 if [ "${opa9_UserChoices_mesh_mask}" = "y" ]; then 206 O RCA_NMSH=1132 OPA_NMSH=1 207 133 IGCM_card_WriteOption ${SUBMIT_DIR}/COMP/opa9.card UserChoices mesh_mask "n" 208 134 fi … … 210 136 # nleapy configuration 211 137 case ${config_UserChoices_CalendarType} in 212 leap|gregorian) 213 ORCA_NLEAPY=1;; 214 noleap) 215 ORCA_NLEAPY=0;; 216 360d) 217 ORCA_NLEAPY=30;; 218 *) 219 ORCA_NLEAPY=30 138 ( leap|gregorian) OPA_NLEAPY=1 ;; 139 ( noleap ) OPA_NLEAPY=0 ;; 140 ( 360d ) OPA_NLEAPY=30 ;; 141 ( * ) OPA_NLEAPY=30 ;; 220 142 esac 221 143 222 144 typeset -r PRECIS=8 223 NEMO_END=$( echo $( awk "BEGIN { printf \"%0${PRECIS}d\",${O RCA_NITEND} }" ) )145 NEMO_END=$( echo $( awk "BEGIN { printf \"%0${PRECIS}d\",${OPA_NITEND} }" ) ) 224 146 225 226 case ${SEAICE_MODEL} in 227 ( LIM2 ) 228 NN_ICE_EMBD=0 229 ICEFLX=none 230 ;; 231 ( LIM3 ) 232 NN_ICE_EMBD=1 233 ICEFLX=${opa9_UserChoices_iceflx:-linear} 234 ;; 235 esac 236 237 IGCM_debug_Print 1 "NUM_PROC_OCE : " ${NUM_PROC_OCE} 238 239 sed -e "s/${PAT_CEXPER}/ cn_exp=\"${config_UserChoices_JobName}\"/" \ 240 -e "s/${PAT_NIT000}/ nn_it000=${ORCA_NIT000}/" \ 241 -e "s/${PAT_NITEND}/ nn_itend=${ORCA_NITEND}/" \ 242 -e "s/${PAT_NDATE0}/ nn_date0=${PeriodDateBegin}/" \ 243 -e "s%${PAT_NLEAPY}% nn_leapy=${ORCA_NLEAPY}%" \ 244 -e "s/${PAT_NSTOCK}/ nn_stock=${ORCA_NSTOCK}/" \ 245 -e "s/${PAT_RESTAR}/ ln_rstart=${ORCA_LRSTAR}/" \ 246 -e "s/${PAT_NRSTAR}/ nn_rstctl=${ORCA_NRSTDT}/" \ 247 -e "s/${PAT_NMSH}/ nn_msh=${ORCA_NMSH}/" \ 248 -e "s/${PAT_NN_FSBC}/ nn_fsbc=${ORCA_NN_FSBC}/" \ 249 -e "s/${PAT_ICE_EMBD}/ nn_ice_embd=${NN_ICE_EMBD}/" \ 250 -e "s/${PAT_ICEFLX}/ cn_iceflx=\'${ICEFLX}'/" \ 251 -e "s/${PAT_JPNI}/ jpni=1/" \ 252 -e "s/${PAT_JPNJ}/ jpnj=${NUM_PROC_OCE}/" \ 253 -e "s/${PAT_JPNIJ}/ jpnij=${NUM_PROC_OCE}/" \ 254 namelist_cfg > namelist_cfg.tmp 255 256 IGCM_sys_Mv namelist_cfg.tmp namelist_cfg 257 258 IGCM_debug_Print 1 'Variables automatically updated in ORCA namelist_cfg' 259 grep AUTO namelist_cfg 260 261 # update iodef.xml 147 IGCM_comp_modifyNamelist blocker namelist_cfg cn_exp ${config_UserChoices_JobName} 148 IGCM_comp_modifyNamelist blocker namelist_cfg nn_it000 ${OPA_NIT000} 149 IGCM_comp_modifyNamelist blocker namelist_cfg nn_itend ${OPA_NITEND} 150 IGCM_comp_modifyNamelist blocker namelist_cfg ln_rstart ${OPA_LRSTAR} 151 IGCM_comp_modifyNamelist blocker namelist_cfg nn_stock ${OPA_NSTOCK} 152 IGCM_comp_modifyNamelist blocker namelist_cfg nn_rstctl ${OPA_NRSTDT} 153 IGCM_comp_modifyNamelist blocker namelist_cfg nn_date0 ${PeriodDateBegin} 154 IGCM_comp_modifyNamelist nonblocker namelist_cfg nn_msh ${OPA_NMSH} 155 IGCM_comp_modifyNamelist blocker namelist_cfg nn_leapy ${OPA_NLEAPY} 156 157 # Update iodef.xml 262 158 263 159 IGCM_debug_Print 1 'Informations into iodef.xml : V1D_ENABLE V1M_ENABLE V1Y_ENABLE OUTPUT_LEVEL' 264 160 IGCM_debug_Print 1 ${V1D_ENABLE} ${V1M_ENABLE} ${V1Y_ENABLE} ${OUTPUT_LEVEL} 265 161 266 sed -e "s/_1D_ENABLE_/${V1D_ENABLE}/" \ 267 -e "s/_1M_ENABLE_/${V1M_ENABLE}/" \ 268 -e "s/_1Y_ENABLE_/${V1Y_ENABLE}/" \ 269 -e "s/_OUTPUT_LEVEL_/${OUTPUT_LEVEL}/" \ 270 context_nemo.xml > context_nemo.xml.tmp 271 272 IGCM_sys_Mv context_nemo.xml.tmp context_nemo.xml 273 162 IGCM_comp_modifyXmlFile force context_nemo.xml 1d enabled ${V1D_ENABLE} 163 IGCM_comp_modifyXmlFile force context_nemo.xml 1m enabled ${V1M_ENABLE} 164 IGCM_comp_modifyXmlFile force context_nemo.xml 1y enabled ${V1Y_ENABLE} 165 274 166 # vargas/titane/MPP and switch from 1 proc to 5 procs. We need to suppres restartopa the second month, if restartopa_0000 exist 275 167 # same thing for restart_trc and restart_ice_in … … 288 180 rm iodef.xml.tmp add.tmp 289 181 290 291 182 IGCM_debug_PopStack "OCE_Update" 292 183 }
Note: See TracChangeset
for help on using the changeset viewer.