[1700] | 1 | # This is a script in Bash. |
---|
| 2 | |
---|
| 3 | # This script installs the source files of LMDZ 1D. Run this script |
---|
| 4 | # from "libf". |
---|
| 5 | |
---|
| 6 | set -xe |
---|
| 7 | |
---|
| 8 | # cp --no-clobber phylmd/* phy1d: |
---|
| 9 | cd phylmd |
---|
| 10 | set +x |
---|
| 11 | for my_file in * |
---|
| 12 | do |
---|
| 13 | if [[ ! -a ../phy1d/$my_file ]] |
---|
| 14 | then |
---|
| 15 | cp $my_file ../phy1d |
---|
| 16 | fi |
---|
| 17 | done |
---|
| 18 | set -x |
---|
| 19 | |
---|
| 20 | cd ../phy1d |
---|
| 21 | if grep -iq "subroutine *writelim" *.F *.F90 |
---|
| 22 | then |
---|
| 23 | mv 1DUTILS.h_no_writelim 1DUTILS.h |
---|
| 24 | else |
---|
| 25 | mv 1DUTILS.h_with_writelim 1DUTILS.h |
---|
| 26 | rm -f ttt |
---|
| 27 | sed -e "s/^ *call *writelim *( *1 *,/ call writelim (/" lmdz1d.F >ttt |
---|
| 28 | rm -f lmdz1d.F |
---|
| 29 | mv ttt lmdz1d.F |
---|
| 30 | fi |
---|
| 31 | rm 1DUTILS.h*writelim |
---|
| 32 | rm wrgradsfi.F # already in 1DUTILS.h |
---|
| 33 | |
---|
| 34 | sed -i -e "/add_phys_tend.*_vdf/s/add_phys_tend/add_pbl_tend/" physiq.F |
---|
| 35 | |
---|
| 36 | sed -i -e "/SUBROUTINE *convers_timesteps/,/END SUBROUTINE convers_timesteps/{ |
---|
| 37 | /USE *phys_cal_mod/d |
---|
| 38 | /use *ioipsl/a\\ |
---|
| 39 | USE phys_cal_mod |
---|
| 40 | s/ioget_mon_len(annee_ref,day_ref)/mth_len/ |
---|
| 41 | };/SUBROUTINE *phys_output_open/,/end *subroutine *phys_output_open/{ |
---|
| 42 | /USE *ioipsl/a\\ |
---|
| 43 | USE phys_cal_mod, only : hour |
---|
| 44 | /ymds2ju.*annee_ref.*zjulian/c\\ |
---|
| 45 | !!! CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) !jyg \\ |
---|
| 46 | ! correction pour l heure initiale !jyg \\ |
---|
| 47 | ! !jyg \\ |
---|
| 48 | CALL ymds2ju(annee_ref, 1, idayref, hour, zjulian) !jyg |
---|
| 49 | }" phys_output_mod.F90 |
---|
| 50 | |
---|
[1788] | 51 | sed -i -e "/^ *INCLUDE *\"temps.h\"/{ |
---|
| 52 | a\\ |
---|
| 53 | !****************************************************************************************\\ |
---|
| 54 | ! Declarations specifiques pour le 1D. A reprendre \\ |
---|
| 55 | INCLUDE \"flux_arp.h\" |
---|
| 56 | }; /^.*REAL *::.*fsens *, *flat/d; /^.*LOGICAL *::.*ok_flux_surf/d; /^.*COMMON.*flux_arp.*/d " pbl_surface_mod.F90 |
---|
[1700] | 57 | |
---|
| 58 | ln -s ../dyn3d/mod_const_mpi.F90 . |
---|
| 59 | ln -s ../dyn3d/infotrac.F90 . |
---|
| 60 | ln -s ../dyn3d/conf_gcm.F . |
---|
[1722] | 61 | ln -s ../dyn3d/pres2lev* . |
---|
[1700] | 62 | ln -s ../dyn3d/control_mod.F90 . |
---|
| 63 | ln -s ../dyn3d/q_sat.F . |
---|
[1769] | 64 | ln -s ../dyn3d/disvert.F90 . |
---|