Changeset 1535 for CONFIG/IPSLCM/IPSLCM5-2/Chistorical/COMP/pisces.driver
- Timestamp:
- 08/18/11 17:41:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/IPSLCM/IPSLCM5-2/Chistorical/COMP/pisces.driver
r1437 r1535 10 10 grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%" 11 11 } 12 13 12 14 13 ##--Variables used by MBG -- … … 76 75 IGCM_sys_Mv iodef.xml.tmp iodef.xml 77 76 78 ##-- GHG forcing for the current year. Normally constant 79 PathCO2log=${SUBMIT_DIR} 80 PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log ) 81 IPCC_PIS_CO2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' ) 77 ##-- CO2 forcing : update atcco2 value in namelist_pisces for some cases 78 if [ "${piseces_UserChoices_CARBON_CYCLE}" = "y" ]; then 79 # Special case for carbon cycle 80 # Activate this case by putting CARBON_CYCLE=y in pisces.card section UserChoices 81 echo 'Update atcco2 in namelist_pisces with value from file co2.log' 82 PathCO2log=${SUBMIT_DIR} 83 PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log ) 84 IPCC_PIS_CO2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' ) 85 sed -e "s%${PAT_PIS_ATCCO2}% atcco2=${IPCC_PIS_CO2}%" \ 86 namelist_pisces > namelist_pisces.tmp 87 IGCM_sys_Mv namelist_pisces.tmp namelist_pisces 88 elif [ -f CO2.txt ] ; then 89 # This case is activated if the file CO2.txt is found in run directory, add file in BoundaryFiles in pisces.card or lmdz.card 90 echo 'Update atcco2 in namelist_pisces with annual value from file CO2.txt' 91 IPCC_PIS_CO2=`grep Annee_${year} CO2.txt | awk -F= '{print $2}'` 92 sed -e "s%${PAT_PIS_ATCCO2}% atcco2=${IPCC_PIS_CO2}%" \ 93 namelist_pisces > namelist_pisces.tmp 94 IGCM_sys_Mv namelist_pisces.tmp namelist_pisces 95 fi 82 96 83 97 ##-- Update namelist_top and namelist_pisces … … 89 103 IGCM_sys_Mv namelist_top.tmp namelist_top 90 104 91 sed -e "s%${PAT_PIS_ATCCO2}% atcco2=${IPCC_PIS_CO2}%" \ 92 -e "s%${PAT_PIS_LRIVER}% ln_river=${PISCES_LRIVER}%" \ 105 sed -e "s%${PAT_PIS_LRIVER}% ln_river=${PISCES_LRIVER}%" \ 93 106 namelist_pisces > namelist_pisces.tmp 94 107 95 IGCM_sys_Mv namelist_pisces.tmp 108 IGCM_sys_Mv namelist_pisces.tmp namelist_pisces 96 109 97 110
Note: See TracChangeset
for help on using the changeset viewer.