- Timestamp:
- 08/08/22 10:39:24 (21 months ago)
- Location:
- TOOLS/CPLRESTART
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/CPLRESTART/CreateRestartAtm4Oasis.bash
r6226 r6228 28 28 # Usage exemples : 29 29 # CreateRestartAtm4Oasis.bash --oce ORCA2.3 /ccc/store/cont003/dsm/p25sepul/IGCM_OUT/IPSLCM5A2/PROD/piControl/CM5A2.1.pi.00/ATM/Output/MO/CM5A2.1.pi.00_40100101_40191231_1M_histmth.nc 30 # CreateRestartAtm4Oasis.bash --oce eORCA1.2 /ccc/store/cont003/gencmip6/p86maf/IGCM_OUT/IPSLCM6/PROD/piControl/CM61-LR-pi-03/ATM/Output/MO/CM61-LR-pi-03_23400101_23491231_1M_histmth.nc 30 31 # CreateRestartAtm4Oasis.bash --oce ORCA2.3 /ccc/work/cont003/gencmip6/bedidil/SAVE8_ORCA2/STORE1/dynamico_grid.nc 31 32 # CreateRestartAtm4Oasis.bash --oce ORCA2.3 /ccc/work/cont003/gencmip6/bedidil/SAVE9_ORCA2_DYN30_1MO/STORE1/histmth.nc … … 49 50 if [[ $(hostname) = curie* ]] ; then arch=curie ; center=tgcc ; fi 50 51 if [[ $(hostname) = irene* ]] ; then arch=irene ; center=tgcc ; fi 52 if [[ $(hostname) = lsce* ]] ; then arch=spip ; center=spip ; fi 51 53 52 54 case ${arch} in 53 ( curie | irene ) 54 set +vx 55 module unload cdo nco ferret 56 module unload netcdf hdf5 57 module load python # /2.7.12 58 module load netcdf/4.3.3.1_hdf5_parallel # Version for XIOS 55 ( irene ) 56 set +e 57 R_IN=$(ccc_home -u igcmg --cccwork)/IGCM 58 TMPDIR=${CCCWORKDIR}/TMP 59 SUBMIT_DIR=${BRIDGE_MSUB_PWD:-${SUBMIT_DIR}} 60 MpiRun="time ccc_mprun" 61 PyRun="time ccc_mprun -n 1" # Needed to force python to run on one process only 62 module purge 63 module load hdf5 64 module load netcdf-c 59 65 module load nco 60 R_IN=$(ccc_home -u igcmg --cccwork)/IGCM 61 TMPDIR=${SCRATCHDIR}/TMP 62 SUBMIT_DIR=${BRIDGE_MSUB_PWD:-${SUBMIT_DIR}} 66 module load cdo 67 module load python3 68 module load datadir/igcmg 69 module list 70 set -e 71 ;; 72 ( spip ) 73 R_IN=${HOME}/Scratch/IGCM 74 TMPDIR=${HOME}/Scratch/TMP 75 SUBMIT_DIR=$(pwd) 76 MpiRun="/opt/local/bin/mpirun -n 1" 77 PyRun="time" 63 78 ;; 64 79 ( * ) … … 87 102 shift 88 103 done 104 105 106 set -e 89 107 90 108 #AtmFile=${1:-/ccc/store/cont003/dsm/p25sepul/IGCM_OUT/IPSLCM5A2/PROD/piControl/CM5A2.1.pi.00/ATM/Output/MO/CM5A2.1.pi.00_40100101_40191231_1M_histmth.nc} … … 135 153 ncap2 --history --overwrite --fl_fmt=${FL_FMT} --script-file add_dim.nco flxat_fields_notime.nc tmp_flxat_fields_notime.nc 136 154 mv tmp_flxat_fields_notime.nc flxat_fields_notime.nc 137 138 cat<<EOF > lonlat2xyz.nco139 // Value at North Pole for DYNAMICO grid140 where ( lat(:,:) >= 90.0d ) COTAUXXU = double(-tau_y) ;141 where ( lat(:,:) >= 90.0d ) COTAUYYU = double( tau_x) ;142 // Value at South Pole for DYNAMICO grid ?143 EOF144 155 else 145 156 # lat/lon … … 158 169 ATM=LMD${dim_lon}${dim_lat} 159 170 (( n_lat = dim_lat - 1 )) 160 cat<<EOF > lonlat2xyz.nco 161 // Value at North Pole for LMDZ lon/lat grid 162 COTAUXXU(0,:) = double( -tau_x (0, 0) ) ; 163 COTAUYYU(0,:) = double( -tau_y (0, 0) ) ; 164 COTAUZZU(0,:) = 0.0d ; 165 // Value at south Pole for LMDZ lon/lat grid ? 166 COTAUXXU(${n_lat},:) = double( -tau_x (${n_lat}, 0) ) ; 167 COTAUYYU(${n_lat},:) = double( -tau_y (${n_lat}, 0) ) ; 168 COTAUZZU(${n_lat},:) = 0.0d ; 169 EOF 171 170 172 171 173 fi … … 178 180 ## =========================================================================== 179 181 180 cat <<EOF > create_flxat.nco 181 // 182 *fract_oce_plus_sic = double(fract_oce + fract_sic) ; // ocean fraction 183 *fract_oce_norm[y,x] = 0.0d ; *fract_sic_norm[y,x] = 0.0d ; 184 where (fract_oce_plus_sic > 0.0d ) fract_oce_norm = double(fract_oce)/fract_oce_plus_sic ; // free ocean vs. total ocean fraction 185 where (fract_oce_plus_sic > 0.0d ) fract_sic_norm = double(fract_sic)/fract_oce_plus_sic ; // sea ice vs. total ocean fraction 186 // 187 COTOTRAI[y,x] = double(precip-snow) ; // Liquid precip 188 COTOTSNO[y,x] = double(snow) ; // Solid precipitation 189 COTOTEVA[y,x] = double(evap_oce*fract_oce_norm + evap_sic*fract_sic_norm) ; 190 COICEVAP[y,x] = double(evap_sic) ; // Evaporation on sea ice 191 COQSRMIX[y,x] = double(sols) ; // Heat flux short wave 192 COQNSMIX[y,x] = double(soll) ; // Heat flux minus short wave 193 COSHFICE[y,x] = double(sols) ; // Heat flux short wave over sea ice 194 CONSFICE[y,x] = double(soll) ; // Heat flux minus short wave over sea ice 195 CODFLXDT[y,x] = -20.0d ; // W/m2 - dQ/dt 196 COCALVIN[y,x] = 0.0d ; // Calving of icebergs, solid 197 COLIQRUN[y,x] = 0.0d ; // River run-off , liquid 198 COWINDSP[y,x] = double( wind10m ) ; // Wind speed at 10m high 199 COTAUMOD[y,x] = 0.0d ; // Wind stress modulus 200 // Wind stress 201 *tau_x[y,x] = double(taux_oce*fract_oce_norm + taux_sic*fract_sic_norm) ; 202 *tau_y[y,x] = double(tauy_oce*fract_oce_norm + tauy_sic*fract_sic_norm) ; 203 COTAUMOD[y,x] = sqrt ( double(tau_x*tau_x + tau_y*tau_y) ) ; 204 // Wind stress, from east/north components to geocentric 205 *rpi = acos (-1.0d) ; *rad = rpi / 180.0d ; 206 COTAUXXU[y,x] = double( -tau_x * sin(rad * lon) - tau_y * sin(rad * lat) * cos(rad * lon) ); 207 COTAUYYU[y,x] = double( tau_x * cos(rad * lon) - tau_y * sin(rad * lat) * sin(rad * lon) ); 208 COTAUZZU[y,x] = double( tau_y * cos(rad * lat) ) ; 209 // Value at North Pole 210 #include "lonlat2xyz.nco" 211 // 212 COTAUXXV[y,x] = COTAUXXU ; 213 COTAUYYV[y,x] = COTAUYYU ; 214 COTAUZZV[y,x] = COTAUZZU ; 215 // 216 EOF 217 ncap2 --overwrite --fl_fmt=${FL_FMT} --history --script-file create_flxat.nco flxat_fields_notime.nc tmp_flxat.nc 218 219 ncks --fl_fmt=${FL_FMT} --overwrite --history --variable lon,lat tmp_flxat.nc flxat.nc 220 [[ ${IsUnstructured} = yes ]] && ncks --fl_fmt=${FL_FMT} --history --append --variable bounds_lon,bounds_lat tmp_flxat.nc flxat.nc 182 python3 create_flxat.py --IsUnstructured=${IsUnstructured} --input flxat_fields_notime.nc --output tmp_flxat.nc 183 184 [[ ${IsUnstructured} = yes ]] && ncks --fl_fmt=${FL_FMT} --history --append --variable bounds_lon,bounds_lat flxat.nc tmp_flxat.nc 221 185 ncks --fl_fmt=${FL_FMT} --append --history --variable COTAUXXU,COTAUYYU,COTAUZZU,COTAUXXV,COTAUYYV,COTAUZZV,COTOTRAI,COTOTSNO,COTOTEVA,COICEVAP,COQSRMIX,COQNSMIX,COSHFICE,CONSFICE,CODFLXDT,COCALVIN,COLIQRUN,COWINDSP,COTAUMOD tmp_flxat.nc flxat.nc 222 186 … … 251 215 --attribute Comment,global,o,c,"Preliminary attempt - Do not trust !" \ 252 216 --attribute SVN_Author,global,o,c,"$Author$" \ 253 --attribute SVN_Date,global,o,c,"$Date$" 217 --attribute SVN_Date,global,o,c,"$Date$" \ 254 218 --attribute SVN_Revision,global,o,c,"$Revision$" \ 255 --attribute SVN_Id,global,o,c,"$Id$" 219 --attribute SVN_Id,global,o,c,"$Id$" \ 256 220 flxat.nc 257 221 -
TOOLS/CPLRESTART/CreateRestartOce4Oasis.bash
r5155 r6228 30 30 # CreateRestartOce4Oasis.bash --ocefile /ccc/store/cont003/dsm/p25sepul/IGCM_OUT/IPSLCM5A2/PROD/piControl/CM5A2.1.pi.00/OCE/Output/MO/CM5A2.1.pi.00_40100101_40191231_1M_grid_T.nc --icefile /ccc/store/cont003/dsm/p25sepul/IGCM_OUT/IPSLCM5A2/PROD/piControl/CM5A2.1.pi.00/ICE/Output/MO/CM5A2.1.pi.00_40100101_40191231_1M_icemod.nc --icefrc ice_pres --icetem tsice --icealb ialb 31 31 # 32 # CreateRestartOce4Oasis.bash --ocefile /ccc/store/cont003/gencmip6/p86mart/IGCM_OUT/IPSLCM6/DEVT/pdControl/CM6010.2.rivgeo-LR-pdCtrl/OCE/Output/MO/CM6010.2.rivgeo-LR-pdCtrl_22400101_22491231_1M_grid_T.nc --icefrc siconc 32 # CreateRestartOce4Oasis.bash --ocefile /ccc/store/cont003/gencmip6/p86mart/IGCM_OUT/IPSLCM6/DEVT/pdControl/CM6010.2.rivgeo-LR-pdCtrl/OCE/Output/MO/CM6010.2.rivgeo-LR-pdCtrl_22400101_22491231_1M_grid_T.nc --icefrc siconc 33 34 # CreateRestartOce4Oasis.bash --ocefile /ccc/store/cont003/gencmip6/p86maf/IGCM_OUT/IPSLCM6/PROD/piControl/CM61-LR-pi-03/OCE/Output/MO/CM61-LR-pi-03_23400101_23491231_1M_grid_T.nc --icefile /ccc/store/cont003/gencmip6/p86maf/IGCM_OUT/IPSLCM6/PROD/piControl/CM61-LR-pi-03/ICE/Output/MO/CM61-LR-pi-03_23400101_23491231_1M_icemod.nc --icefrc siconc 33 35 34 36 # CreateRestartOce4Oasis.bash --ocefile /ccc/store/cont003/gen7451/personr/IGCM_OUT/ORCA025_LIM3_PISCES/DEVT/ORCA025ia/eOR025L3P-IA-REF07-MUSCL/OCE/Output/MO/eOR025L3P-IA-REF07-MUSCL_20090101_20091231_1M_grid_T.nc … … 50 52 # 51 53 # --ocefile : file in which sea surface temperature is read 52 # --icefile : file in which sea ice fraction, albedo and surface temperature are read.54 # --icefile : file in which sea ice fraction, albedo and ice surface temperature are read. 53 55 # if not specified, these variables are readed in the ocean file 54 56 # … … 88 90 case ${arch} in 89 91 ( irene ) 90 set +vx 91 module unload cdo nco ferret 92 module unload netcdf hdf5 93 module load python # /2.7.12 94 #module load netcdf/4.3.3.1_hdf5_parallel # Version for XIOS 92 set +e 93 R_IN=$(ccc_home -u igcmg --cccwork)/IGCM 94 TMPDIR=${CCCWORKDIR}/TMP 95 SUBMIT_DIR=${BRIDGE_MSUB_PWD:-${SUBMIT_DIR}} 96 MpiRun="time ccc_mprun" 97 PyRun="time ccc_mprun -n 1" # Needed to force python to run on one process only 98 module purge 99 module load hdf5 100 module load netcdf-c 95 101 module load nco 102 module load cdo 96 103 module load python3 97 R_IN=$(ccc_home -u igcmg --cccwork)/IGCM 98 TMPDIR=${SCRATCHDIR}/TMP 99 SUBMIT_DIR=${BRIDGE_MSUB_PWD:-${SUBMIT_DIR}} 104 module load datadir/igcmg 105 module list 106 set -e 107 ;; 108 ( spip ) 109 R_IN=${HOME}/Scratch/IGCM 110 TMPDIR=${HOME}/Scratch/TMP 111 SUBMIT_DIR=$(pwd) 112 MpiRun="/opt/local/bin/mpirun -n 1" 113 PyRun="time" 100 114 ;; 101 115 ( * ) … … 203 217 [[ ${dim_x} = 182 && ${dim_y} = 149 ]] && OCE=ORCA2.3 204 218 [[ ${dim_x} = 362 && ${dim_y} = 332 ]] && OCE=eORCA1.2 219 [[ ${dim_x} = 360 && ${dim_y} = 331 ]] && OCE=eORCA1.4 205 220 [[ ${dim_x} = 1442 && ${dim_y} = 1207 ]] && OCE=eORCA025.1 206 221 … … 209 224 ## =========================================================================== 210 225 cat <<EOF > create_sstoce.nco 211 *OceSst[y,x] 212 OIceFrc[y,x] 226 *OceSst[y,x] = double ( ${OceSst}(:,:) + 273.15d ) ; 227 OIceFrc[y,x] = double ( ${IceFrc}(:,:) ) ; 213 228 // 214 229 EOF … … 216 231 if [[ "X${IceAlb}" != "Xnone" ]] ; then 217 232 cat <<EOF >> create_sstoce.nco 218 *IceAlb[y,x] 233 *IceAlb[y,x] = double ( ${IceAlb}(:,:) ) ; 219 234 // 220 235 EOF … … 239 254 240 255 cat <<EOF >> create_sstoce.nco 241 O_SSTSST[y,x] 242 O_AlbIce[y,x] 243 O_TepIce[y,x] 244 O_OCurx1[y,x] 245 O_OCury1[y,x] 246 O_OCurz1[y,x] 256 O_SSTSST[y,x] = OceSst (:,:) * (1.0d-OIceFrc(:,:)) ; 257 O_AlbIce[y,x] = IceAlb (:,:) * OIceFrc(:,:) ; 258 O_TepIce[y,x] = IceTem (:,:) * OIceFrc(:,:) ; 259 O_OCurx1[y,x] = 0.0d ; 260 O_OCury1[y,x] = 0.0d ; 261 O_OCurz1[y,x] = 0.0d ; 247 262 EOF 248 263
Note: See TracChangeset
for help on using the changeset viewer.