Changeset 4656
- Timestamp:
- Aug 30, 2023, 11:04:56 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/Replay/replay_equip.sh
r4614 r4656 1 1 #!/bin/bash 2 2 3 # set -vx3 # set -vx 4 4 5 5 #============================================================================= … … 44 44 # Le script a comme argument le nom de la routine à traiter, nommée $param 45 45 # Des correpspondances en déduisent : 46 # param ini=wake_ini # nom de la subroutine d'intialisation46 # param_ini=wake_ini # nom de la subroutine d'intialisation 47 47 # inimod= # nom du module contenant $param_ini 48 48 # klon=klon ; klev=klev # nom des dimensions horiz; vert utilisée … … 110 110 111 111 case $param in 112 vdif_k ) paramini=None ; inimod=None; klon=ngrid ; klev=nlay ;;112 vdif_k|vdif_cd|vdif|my_25) param_ini=vdif_ini_ ; inimod=vdif_ini ; klon=ngrid ; klev=nlay ;; 113 113 thermcell_main|thermcell_plume_6A|thermcell_env|thermcell_height|thermcell_dry|\ 114 114 thermcell_closure|thermcell_height|thermcell_dq|thermcell_flux2|thermcell_down| \ 115 115 thermcell_updown_dq) \ 116 paramini=thermcell_ini ; inimod=lmdz_thermcell_ini ; klon=ngrid ; klev=nlay ;; 117 wake|wake_popdyn_1|wake_popdyn_2) paramini=wake_ini ; inimod=lmdz_wake_ini ; klon=klon ; klev=klev ;; 118 ratqs_main|ratqs_inter|ratqs_oro|ratqs_hetero|ratqs_tke) paramini=ratqs_ini ; inimod=lmdz_ratqs_ini ; klon=klon ; klev=klev ;; 116 param_ini=thermcell_ini ; inimod=lmdz_thermcell_ini ; klon=ngrid ; klev=nlay ;; 117 wake|wake_popdyn_1|wake_popdyn_2|vdif_kcay) param_ini=wake_ini ; inimod=lmdz_wake_ini ; klon=klon ; klev=klev ;; 118 ratqs_main|ratqs_inter|ratqs_oro|ratqs_hetero|ratqs_tke) param_ini=ratqs_ini ; inimod=lmdz_ratqs_ini ; klon=klon ; klev=klev ;; 119 lscp) param_ini=lscp_ini ; inimod=lscp_ini_mod ; klon=klon ; klev=klev ;; 119 120 *) echo Cas non prevu ; exit 120 121 esac … … 290 291 sed -i"" -e "/$replay_comment/d" $file 291 292 done 292 line=`sed -n -e "/CALL wake_ini/=" physiq_mod.F90 | head -1`293 sed -i"" -e "${line}s/ $/\n CALL iophys_ini(pdtphys) ! $replay_comment ! $replay_comment/" physiq_mod.F90293 line=`sed -n -e "/CALL "$param_ini"/=" physiq_mod.F90 | head -1` 294 sed -i"" -e "${line}s/^/ CALL iophys_ini(pdtphys) ! $replay_comment ! $replay_comment\n/" physiq_mod.F90 294 295 fi 295 296 … … 343 344 344 345 for var in $varinout0 ; do 345 sed -e 's/::/ :: /' -e 's/,/ , /g' -e 's/$/ /' input | grep 'intent.*inout.*::.* '$var' ' | sed -e 's/ //g' -e 's/,intent(.*[nt])//' | sed -e 's/::.*$/, allocatable, save :: '$var'_Replay0/' | sed -e 's/'$klon'/:/' -e 's/'$ klev'/:/' >> call_param_replay.F90346 sed -e 's/::/ :: /' -e 's/,/ , /g' -e 's/$/ /' input | grep 'intent.*inout.*::.* '$var' ' | sed -e 's/ //g' -e 's/,intent(.*[nt])//' | sed -e 's/::.*$/, allocatable, save :: '$var'_Replay0/' | sed -e 's/'$klon'/:/' -e 's/'${klev}'+1/:/' -e 's/'${klev}'/:/' >> call_param_replay.F90 346 347 done 347 348 # Initalisation, shared with dump_param1.sh … … 420 421 #----------------------------------------------------------------------------- 421 422 422 if [ $nconly = false -a $param ini != None ] ; then423 if [ $nconly = false -a $param_ini != None ] ; then 423 424 varinmod=`grep -i 'intent.in' $inimod.F90 | sed -e 's/\!.*$//' | cut -d: -f3 | sed -e 's/,/ /g'` 424 425 varinmodv=`echo $varinmod | sed -e 's/ /,/g'` … … 428 429 close(90) 429 430 ...eod............................................... 430 include_line "include \"$iniinc\"" $param ini $inimod.F90 -before_return431 include_line "include \"$iniinc\"" $param_ini $inimod.F90 -before_return 431 432 fi # nconly = false 432 433 … … 435 436 # call_ini_replay.F90 gere l'initialisation du module en mode replay 436 437 #----------------------------------------------------------------------------- 437 if [ $nconly = false -a $param ini != None ] ; then438 if [ $nconly = false -a $param_ini != None ] ; then 438 439 cat > call_ini_replay.F90 <<....eod............................................ 439 440 subroutine call_ini_replay … … 447 448 close(90) 448 449 ....eod........................................... 449 #get_subroutine_arg $param ini $inimod.F90 ; exit450 get_subroutine_arg $param ini $inimod.F90 | sed -e 's/subroutine/call/' >> call_ini_replay.F90450 #get_subroutine_arg $param_ini $inimod.F90 ; exit 451 get_subroutine_arg $param_ini $inimod.F90 | sed -e 's/subroutine/call/' >> call_ini_replay.F90 451 452 cat >> call_ini_replay.F90 <<....eod........................................... 452 453 return
Note: See TracChangeset
for help on using the changeset viewer.