source: trunk/WRF.COMMON/WRFV3/modif_mars/makeles_gnome @ 2757

Last change on this file since 2757 was 126, checked in by acolaitis, 14 years ago

LMD_LES_MARS et LMD_MM_MARS

M 125 000-USERS
Entree d'Arnaud Colaitis chez les committers.

M 125 mars/libf/phymars/dimradmars.h
M 125 mars/libf/phymars/callradite.F
Cas simple conrath sans doubleq OK avec LES par defaut

M 125 mesoscale/LMD_LES_MARS/modif_mars/module_initialize_les.F
Initialisation du LES a partir de profils de temperature potentielle
calcules avec r_cp de module_initialize_les
[en lieu et place du calcul effectue dans wrf_sounding.sci... risque de mismatch !]

M 125 mesoscale/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F
M 125 mesoscale/LMD_LES_MARS/modif_mars/Registry.EM
Mars mode 20 : add a passive tracer with radioactive-like decay

A 0 mesoscale/LMD_LES_MARS/modif_mars/makeles_gnome
A + - mesoscale/TESTS/newphys_tracers/callphys.def.mars0.ideal
Modifications mineures, ajout de fichiers pour cas specifiques

  • Property svn:executable set to *
File size: 4.8 KB
Line 
1#! /bin/bash
2
3#------------------------------
4# makeles
5#------------------------------
6#     MMM must be defined
7#------------------------------
8# A. Spiga 01/2009
9#------------------------------
10
11
12echo "Use -n if you don't want to recompile physics"
13echo "Use -p if you want the new LMD physics"
14
15#
16# SPECIAL CICLAD
17#
18
19donotcompilephys=0
20phys=""
21while getopts "np" options; do
22  case $options in
23   n ) donotcompilephys=1;; ## do not recompile physics
24   p ) phys="newphys_";;    ## with new physics
25  esac
26done
27
28#
29# LOCATIONS
30#
31here=$PWD
32whereliblmd=$here
33
34
35##############################################################
36##############################################################
37if [ ${donotcompilephys} -eq 0 ]
38then
39
40#
41# COMPILE PHYSICS
42#
43cd $MMM
44  if [[ "${phys}" == "newphys_" ]]
45  then
46    makemeso -j -p
47  else
48    makemeso -j
49  fi
50#
51#makemeso -rd < last > /dev/null
52folder=$PWD'/'$(more what_folder)'/WRFV2/'
53libphys_folder=$folder'mars_lmd/libo/'
54phymars_folder=$folder'mars_lmd/libf/phymars/'
55\rm what_folder 2> /dev/null
56
57#
58# GET liblmd GENERATED LIBRARY and INCLUDEs
59#
60echo $libphys_folder
61cp -rf ${libphys_folder}/liblmd.a ${whereliblmd}/
62#cp -rf ${phymars_folder}/dimphys.h ${here}/modif_mars/
63cp -rf ${phymars_folder}/dimphys.h ${here}/mars_lmd/libf/phymars/
64#cp -rf ${folder}/call_meso_inifis.inc ${here}/modif_mars/
65#cp -rf ${folder}/call_meso_physiq.inc ${here}/modif_mars/
66cp -rf ${folder}/call_meso_inifis.inc ${here}/
67cp -rf ${folder}/call_meso_physiq.inc ${here}/
68#cp -rf ${folder}/inc/module_lmd_driver_output*.inc ${here}/modif_mars/
69cp -rf ${folder}/inc/module_lmd_driver_output*.inc ${here}/inc/
70#cp -rf ${phymars_folder}/wrf_output_2d.h ${here}/modif_mars/
71#cp -rf ${phymars_folder}/wrf_output_3d.h ${here}/modif_mars/
72cp -rf ${phymars_folder}/wrf_output_2d.h ${here}/mars_lmd/libf/phymars/
73cp -rf ${phymars_folder}/wrf_output_3d.h ${here}/mars_lmd/libf/phymars/
74fi
75##############################################################
76##############################################################
77
78
79cd $here
80
81###------------------------------
82###------------------------------
83###
84### MPI (dm) 64 bits
85###
86###TODO: le rendre adapte aux reponses du user a makemeso
87#touch conf
88#echo 3 >> conf
89###echo 4 >> conf  #openMP n'arrange pas beaucoup de le tps de calcul
90#echo 1 >> conf
91###------------------------------
92###------------------------------
93
94
95
96### SINGLE PROC 32 bits g95
97#touch conf
98#echo 5 >> conf
99#echo 0 >> conf
100
101## SINGLE PROC 64 bits
102#touch conf
103#echo 1 >> conf
104#echo 0 >> conf
105
106### MPI (dm) 64 bits IFORT
107echo IFORT IFORT IFORT IFORT
108touch conf
109echo 7 >> conf
110echo 1 >> conf
111
112
113#
114# CONFIGURE
115#
116echo "configure..."
117#touch configure.wrf
118\rm configure.wrf
119./configure < conf > /dev/null 2> /dev/null
120#./configure
121#sed s+"-lnetcdf"+"-lnetcdf -L$whereliblmd -llmd"+g configure.wrf | sed s+'mpif90 -f90=$(SFC)'+'/usr/lib64/openmpi/1.2.8-pgf/bin/mpif90'+g | sed s+'mpicc -cc=$(SCC)'+'/usr/lib64/openmpi/1.2.8-gcc/bin/mpicc -DMPI2_SUPPORT'+g > yeah
122## WHERE_MPI must be defined
123sed s+"-lnetcdf"+"-lnetcdf -L$whereliblmd -llmd"+g configure.wrf | sed s+"mpif90"+"$WHERE_MPI/mpif90"+g | sed s+"mpicc"+"$WHERE_MPI/mpicc -DMPI2_SUPPORT"+g > yeah
124#sed s+"# -g"+"-fno-second-underscore # -g"+g configure.wrf | sed s+"-lnetcdf"+"-lnetcdf -L$whereliblmd -llmd"+g > yeah
125#sed s+"-lnetcdf"+"-lnetcdf -L$whereliblmd -llmd"+g configure.wrf | sed s+"#-g"+"-g"+g > yeah
126#sed s+"-lnetcdf"+"-lnetcdf -L$whereliblmd -llmd"+g configure.wrf > yeah
127mv yeah configure.wrf
128
129        ####
130        #### provoque des seg faults....
131        ####
132        #sed s+"-fastsse"+"-fastsse -mcmodel=medium -Mlarge_arrays"+g configure.wrf > yeah
133        #### TEST TEST
134        #mv yeah configure.wrf
135
136sed s+"-fastsse"+" "+g configure.wrf > yeah
137#sed s+"-fastsse"+"-mcmodel=medium -Mlarge_arrays"+g configure.wrf > yeah ##marche pas
138#
139# sometimes fastsse is problematic
140#
141
142##sed s+"-fastsse"+"-fastsse -mcmodel=medium"+g configure.wrf > yeah
143mv yeah configure.wrf
144
145#sed s+"-Mvect=noaltcode"+"#-Mvect=noaltcode"+g configure.wrf > yeah ; mv yeah configure.wrf
146
147#sed s+"-mp -Minfo=mp"+"-mp -Minfo=mp -mp=nonuma"+g configure.wrf > yeah
148#mv yeah configure.wrf
149
150#### OBLIGATOIRE POUR IFORT, OK AVEC LES AUTRES ??? a priori oui
151sed s+"-llmd"+"-llmd $NETCDF/lib/libnetcdf.a"+g configure.wrf > yeah
152mv yeah configure.wrf
153
154#############################################################
155  if [[ "${phys}" == "newphys_" ]]
156  then
157     sed s+"ARCH_LOCAL      =       "+"ARCH_LOCAL      =       -DNEWPHYS "+g configure.wrf > yeah
158     mv -f yeah configure.wrf
159  fi
160#############################################################
161
162
163\rm conf
164
165#
166# COMPILE LES TEST CASE w/ LMD PHYSICS
167#
168touch modif_mars/module_lmd_driver.F
169\rm log_compile
170\rm log_error
171echo "compile LES WRF with LMD Mars physics... look log_compile and log_error"
172compile em_les > log_compile 2> log_error
173
174echo '***********************************'
175tail -n 20 log_error
176
Note: See TracBrowser for help on using the repository browser.