Changeset 1300 for trunk/LMDZ.COMMON
- Timestamp:
- Jun 25, 2014, 1:19:59 PM (10 years ago)
- Location:
- trunk/LMDZ.COMMON
- Files:
-
- 1 added
- 137 deleted
- 15 edited
- 129 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/bld.cfg
r1107 r1300 26 26 src::dyn %SRC_PATH/%DYN 27 27 src::phys %SRC_PATH/%PHYS 28 #src::sisvat %SRC_PATH/%PHYS/sisvat 28 29 src::grid %SRC_PATH/grid 29 30 src::filtrez %SRC_PATH/filtrez 30 31 src::bibio %SRC_PATH/bibio 32 src::dyn3d_common %SRC_PATH/dyn3d_common 31 33 src::cosp %COSP 32 34 src::chem %CHEM … … 86 88 bld::excl_dep use::mod_prism_get_proto 87 89 bld::excl_dep use::mod_prism_put_proto 90 bld::excl_dep use::xios 91 bld::excl_dep use::iaxis 92 bld::excl_dep use::iaxis_attr 93 bld::excl_dep use::icontext_attr 94 bld::excl_dep use::idate 95 bld::excl_dep use::idomain_attr 96 bld::excl_dep use::ifield_attr 97 bld::excl_dep use::ifile_attr 98 bld::excl_dep use::ixml_tree 88 99 89 100 # Don't generate interface files -
trunk/LMDZ.COMMON/create_make_gcm
r1107 r1300 42 42 echo 'LIBF = $(GCM)/libf' 43 43 if [ "$CRAY" = '0' ] ; then 44 # echo 'LIBO = $(GCM)/libo/$(MACHINE)'45 44 echo 'LIBO = $(LIBOGCM)/$(MACHINE)' 46 45 else 47 46 echo 'LIBO = $(GCM)/libo' 48 47 fi 49 #echo 'LOCAL_DIR=$(GCM)'50 #echo $localdir51 48 echo "LOCAL_DIR=`echo $localdir`" 52 49 echo 'BIBIO = $(LIBF)/bibio' 50 echo 'DYN3D_COMMON = $(LIBF)/dyn3d_common' 53 51 echo "FILTRE = filtre" 54 52 echo "PHYS = " … … 70 68 echo 'L_PHY = -lphy$(PHYS) ' 71 69 echo 'L_BIBIO = -lbibio' 70 echo 'L_DYN3D_COMMON = -ldyn3d_common' 72 71 echo 'L_ADJNT =' 73 72 echo 'L_COSP = -lcosp' … … 103 102 echo 104 103 #echo 'main : chimie $(DYN) bibio phys $(OPTION_DEP) ' 105 echo 'main : bibio $(DYN)phys $(OPTION_DEP) '104 echo 'main : $(DYN) bibio dyn3d_common phys $(OPTION_DEP) ' 106 105 echo ' cd $(LIBO) ; $(RANLIB) lib*.a ; cd $(GCM) ;\' 107 106 echo ' cd $(LOCAL_DIR); \' 108 107 echo ' $(COMPILE90) $(LIBF)/$(DIRMAIN)/$(SOURCE) -o $(PROG).o ; \' 109 echo ' $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_ADJNT) $(L_COSP) $(L_AERONOMARS) $(L_ FILTRE) $(L_PHY) $(L_DYN) $(L_BIBIO) $(L_DYN) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o '108 echo ' $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_ADJNT) $(L_COSP) $(L_AERONOMARS) $(L_PHY) $(L_DYN) $(L_DYN3D_COMMON) $(L_BIBIO) $(L_DYN3D_COMMON) $(L_PHY) $(L_DYN) $(L_FILTRE) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o ' 110 109 echo 111 110 echo 'dyn : $(LIBO)/libdyn$(DIM)d$(FLAG_PARA).a $(FILTRE)$(DIM)d' … … 116 115 echo 117 116 echo 'bibio : $(LIBO)/libbibio.a' 117 echo 118 echo 'dyn3d_common : $(LIBO)/libdyn3d_common.a' 118 119 echo 119 120 echo 'adjnt : $(LIBO)/libadjnt.a' … … 212 213 strj=`echo $stri | tr [A-Z] [a-z]` 213 214 str2="" 214 for dirinc in filtrez bibio grid dyn3d$diri $diri/*/ ; do215 for dirinc in filtrez bibio dyn3d_common grid dyn3d phydev $diri $diri/*/ ; do 215 216 # Recherche dans l'ordre hierarchique inverse car seule la derniere 216 217 # ligne est conservee 218 if [ $dirinc = phydev ] ; then 219 dirstr='$(PHYS)' 220 libstr='phy$(PHYS)' 221 else 222 dirstr=$dirinc 223 libstr=$dirinc 224 fi 217 225 if [ -f $dirinc/$stri ] ; then 218 str2='$(LIBF)/'$dir inc/$stri226 str2='$(LIBF)/'$dirstr/$stri 219 227 elif [ -f $dirinc/$strj ] ; then 220 str2='$(LIBF)/'$dir inc/$stri228 str2='$(LIBF)/'$dirstr/$stri 221 229 elif [ -f $dirinc/$strj.F90 ] || [ -f $dirinc/$strj.F ] ; then 222 strlib=`echo $ dirinc| awk -F/ ' { print $1 } '`230 strlib=`echo $libstr | awk -F/ ' { print $1 } '` 223 231 str2='$(LIBO)/lib'$strlib'.a('$strj'.o)' 232 elif [ -f $dirinc/$stri.F90 ] || [ -f $dirinc/$stri.F ] ; then 233 strlib=`echo $libstr | awk -F/ ' { print $1 } '` 234 str2='$(LIBO)/lib'$strlib'.a('$stri'.o)' 224 235 fi 225 236 done -
trunk/LMDZ.COMMON/libf/bibio/wxios.F90
r1019 r1300 18 18 TYPE(xios_context), SAVE :: g_ctx 19 19 !$OMP THREADPRIVATE(g_comm,g_cts_name,g_ctx) 20 LOGICAL, SAVE :: g_flag_xml = .FALSE. 21 CHARACTER(len=100) :: g_field_name = "nofield" 22 !$OMP THREADPRIVATE(g_flag_xml,g_field_name) 23 20 24 21 25 CONTAINS … … 25 29 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 26 30 27 SUBROUTINE concat(str, i, str_i) !MAX i = 99 28 CHARACTER(len=*), INTENT(IN) :: str 29 INTEGER, INTENT(IN) :: i 30 CHARACTER(len=100), INTENT(OUT) :: str_i 31 32 33 !INT -> CHAR: 34 CHARACTER(len=10) :: num 35 WRITE(num, "(I5)") i 36 str_i = TRIM(ADJUSTL(str//"_"//TRIM(ADJUSTL(num)))) 37 31 SUBROUTINE concat(str, str2, str_str2) 32 CHARACTER(len=*), INTENT(IN) :: str, str2 33 CHARACTER(len=20), INTENT(OUT) :: str_str2 34 35 36 str_str2 = TRIM(ADJUSTL(str//"_"//TRIM(ADJUSTL(str2)))) 37 !IF (prt_level >= 10) WRITE(lunout,*) "Xios. ",str,"+",str2,"=",str_str2 38 38 END SUBROUTINE concat 39 39 … … 47 47 48 48 INTEGER :: i = 0 49 49 !!!!!!!!!!!!!!!!!! 50 ! Pour XIOS: 51 ! year : y 52 ! month : mo 53 ! day : d 54 ! hour : h 55 ! minute : mi 56 ! second : s 57 !!!!!!!!!!!!!!!!!! 58 50 59 i = INDEX(odate, "day") 51 60 IF (i > 0) THEN 52 61 ndate = odate(1:i-1)//"d" 53 ELSE 54 i = INDEX(odate, "hr") 55 IF (i > 0) THEN 56 ndate = odate(1:i-1)//"h" 57 ELSE 58 ndate = odate 59 END IF 60 END IF 61 62 !WRITE(*,*) "Xios. ", odate, " => ", ndate 62 END IF 63 64 i = INDEX(odate, "hr") 65 IF (i > 0) THEN 66 ndate = odate(1:i-1)//"h" 67 END IF 68 69 i = INDEX(odate, "mth") 70 IF (i > 0) THEN 71 ndate = odate(1:i-1)//"mo" 72 END IF 73 74 !IF (prt_level >= 10) WRITE(lunout,*) "Xios. ", odate, " => ", ndate 63 75 END SUBROUTINE reformadate 64 76 … … 89 101 END IF 90 102 91 ! WRITE(*,*) "Xios. ", op, " => ", reformaop103 !IF (prt_level >= 10) WRITE(lunout,*) "Xios. ", op, " => ", reformaop 92 104 END FUNCTION reformaop 93 105 … … 97 109 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 98 110 99 SUBROUTINE wxios_init(xios_ctx_name) 111 SUBROUTINE wxios_init(xios_ctx_name, locom, outcom) 112 IMPLICIT NONE 113 INCLUDE 'iniprint.h' 114 100 115 CHARACTER(len=*), INTENT(IN) :: xios_ctx_name 101 102 INTEGER :: xios_comm 116 INTEGER, INTENT(IN), OPTIONAL :: locom 117 INTEGER, INTENT(OUT), OPTIONAL :: outcom 118 119 103 120 TYPE(xios_context) :: xios_ctx 104 105 WRITE(*,*) "Xios. Initialization" 106 107 !Lancement de xios: 108 CALL xios_initialize(xios_ctx_name, return_comm = xios_comm ) 109 110 !Initialisation du contexte: 111 CALL xios_context_initialize(xios_ctx_name, xios_comm) 112 CALL xios_get_handle(xios_ctx_name, xios_ctx) !Récupération 113 CALL xios_set_current_context(xios_ctx) !Activation 121 INTEGER :: xios_comm 122 123 IF (prt_level >= 10) WRITE(lunout,*) "wxios_init: Initialization" 124 125 126 127 IF (PRESENT(locom)) THEN 128 CALL xios_initialize(xios_ctx_name, local_comm = locom, return_comm = xios_comm ) 129 IF (prt_level >= 10) WRITE(lunout,*) "wxios_init: ctx=",xios_ctx_name," local_comm=",locom,", return_comm=",xios_comm 130 ELSE 131 CALL xios_initialize(xios_ctx_name, return_comm = xios_comm ) 132 IF (prt_level >= 10) WRITE(lunout,*) "wxios_init: ctx=",xios_ctx_name," return_comm=",xios_comm 133 END IF 134 135 IF (PRESENT(outcom)) THEN 136 outcom = xios_comm 137 IF (prt_level >= 10) WRITE(lunout,*) "wxios_init: ctx=",xios_ctx_name," outcom=",outcom 138 END IF 114 139 115 140 !Enregistrement des variables globales: 116 141 g_comm = xios_comm 117 142 g_ctx_name = xios_ctx_name 143 144 CALL wxios_context_init() 145 146 END SUBROUTINE wxios_init 147 148 SUBROUTINE wxios_context_init() 149 IMPLICIT NONE 150 INCLUDE 'iniprint.h' 151 152 TYPE(xios_context) :: xios_ctx 153 154 !Initialisation du contexte: 155 CALL xios_context_initialize(g_ctx_name, g_comm) 156 CALL xios_get_handle(g_ctx_name, xios_ctx) !Récupération 157 CALL xios_set_current_context(xios_ctx) !Activation 118 158 g_ctx = xios_ctx 119 120 WRITE(*,*) "Xios. Current context is ", xios_ctx_name 121 END SUBROUTINE wxios_init 159 160 IF (prt_level >= 10) WRITE(lunout,*) "wxios_context_init: Current context is ",trim(g_ctx_name) 161 162 !Une première analyse des héritages: 163 CALL xios_solve_inheritance() 164 END SUBROUTINE wxios_context_init 122 165 123 166 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 126 169 127 170 SUBROUTINE wxios_set_cal(pasdetemps, calendrier, annee, mois, jour, heure) 171 IMPLICIT NONE 172 INCLUDE 'iniprint.h' 173 128 174 !Paramètres: 129 175 CHARACTER(len=*), INTENT(IN) :: calendrier … … 146 192 CASE('earth_360d') 147 193 CALL xios_set_context_attr_hdl(g_ctx, calendar_type= "D360") 148 WRITE(*,*) 'Xios.Calendrier terrestre a 360 jours/an'194 IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier terrestre a 360 jours/an' 149 195 CASE('earth_365d') 150 196 CALL xios_set_context_attr_hdl(g_ctx, calendar_type= "NoLeap") 151 WRITE(*,*) 'Xios.Calendrier terrestre a 365 jours/an'197 IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier terrestre a 365 jours/an' 152 198 CASE('earth_366d') 153 199 CALL xios_set_context_attr_hdl(g_ctx, calendar_type= "Gregorian") 154 WRITE(*,*) 'Xios.Calendrier gregorien'200 IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier gregorien' 155 201 CASE DEFAULT 156 abort_message = ' Xios.Mauvais choix de calendrier'202 abort_message = 'wxios_set_cal: Mauvais choix de calendrier' 157 203 CALL abort_gcm('Gcm:Xios',abort_message,1) 158 204 END SELECT … … 161 207 WRITE(date, "(i4.4,'-',i2.2,'-',i2.2,' 00:00:00')") annee, mois, jour 162 208 163 WRITE(*,*) "Xios.Initial time: ", date209 IF (prt_level >= 10) WRITE(lunout,*) "wxios_set_cal: Initial time: ", date 164 210 165 211 CALL xios_set_context_attr_hdl(g_ctx, start_date= date) … … 167 213 !Et enfin,le pas de temps: 168 214 CALL xios_set_timestep(mdtime) 169 WRITE(*,*) "Xios.ts=",mdtime215 IF (prt_level >= 10) WRITE(lunout,*) "wxios_set_cal: ts=",mdtime 170 216 END SUBROUTINE wxios_set_cal 217 218 SUBROUTINE wxios_set_timestep(ts) 219 REAL, INTENT(IN) :: ts 220 TYPE(xios_time) :: mdtime 221 222 mdtime = xios_time(0, 0, 0, 0, 0, ts) 223 224 CALL xios_set_timestep(mdtime) 225 END SUBROUTINE wxios_set_timestep 171 226 172 227 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 173 228 ! Pour initialiser un domaine !!!!!!!!!!!!!!!!!!!! 174 229 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 175 SUBROUTINE wxios_domain_param(dom_id, is_sequential, iim, jjm, io_lat, io_lon) 230 SUBROUTINE wxios_domain_param(dom_id, is_sequential, ni, nj, ni_glo, nj_glo, & 231 ibegin, iend, ii_begin, ii_end, jbegin, jend, & 232 data_ni, data_ibegin, data_iend, & 233 io_lat, io_lon,is_south_pole,mpi_rank) 176 234 177 CHARACTER (len=*), INTENT(IN) :: dom_id 178 LOGICAL, INTENT(IN) :: is_sequential 179 INTEGER, INTENT(IN) :: iim, jjm 180 REAL, DIMENSION(:) :: io_lat, io_lon 181 235 236 IMPLICIT NONE 237 INCLUDE 'iniprint.h' 238 239 CHARACTER(len=*),INTENT(IN) :: dom_id ! domain identifier 240 LOGICAL,INTENT(IN) :: is_sequential ! flag 241 INTEGER,INTENT(IN) :: ni ! local MPI domain number of longitudes 242 INTEGER,INTENT(IN) :: nj ! local MPI domain number of latitudes 243 INTEGER,INTENT(IN) :: ni_glo ! global grid number of longitudes 244 INTEGER,INTENT(IN) :: nj_glo ! global grid number of latitudes 245 INTEGER,INTENT(IN) :: ibegin ! start index, on global grid, of local MPI domain 246 INTEGER,INTENT(IN) :: iend ! end index, on global grid, of local MPI domain 247 INTEGER,INTENT(IN) :: ii_begin ! i index at which local data starts (first row) 248 INTEGER,INTENT(IN) :: ii_end ! i index at which local data ends (last row) 249 INTEGER,INTENT(IN) :: jbegin ! start index, on global grid, of local MPI domain 250 INTEGER,INTENT(IN) :: jend ! end index, on global grid, of local MPI domain 251 INTEGER,INTENT(IN) :: data_ni 252 INTEGER,INTENT(IN) :: data_ibegin 253 INTEGER,INTENT(IN) :: data_iend 254 REAL,INTENT(IN) :: io_lat(:) ! latitudes (of global grid) 255 REAL,INTENT(IN) :: io_lon(:) ! longitudes (of global grid) 256 logical,intent(in) :: is_south_pole ! does this process include the south pole? 257 integer,intent(in) :: mpi_rank ! rank of process 182 258 183 259 TYPE(xios_domain) :: dom 184 INTEGER :: ni, nj, ni_glo, nj_glo, ibegin, iend, jbegin, jend 185 LOGICAl :: boool 186 187 ni_glo = iim 188 nj_glo = jjm 189 ni = iim 190 nj = jjm 191 ibegin = 1 192 jbegin = 1 193 iend = ibegin + ni - 1 194 jend = jbegin + nj - 1 260 LOGICAL :: boool 261 262 !Masque pour les problèmes de recouvrement MPI: 263 LOGICAL :: mask(ni,nj) 195 264 196 265 !On récupère le handle: 197 266 CALL xios_get_domain_handle(dom_id, dom) 198 267 199 WRITE(*,*) "Xios. ni:",iim," ni_glo:", iim, " nj:", jjm, " nj_glo:", jjm 200 WRITE(*,*) "Xios. Size lon:", SIZE(io_lon), " lat:", SIZE(io_lat) 268 IF (prt_level >= 10) THEN 269 WRITE(lunout,*) "wxios_domain_param: mpirank=",mpi_rank," ni:",ni," ni_glo:", ni_glo, " nj:", nj, " nj_glo:", nj_glo 270 WRITE(lunout,*) "wxios_domain_param: mpirank=",mpi_rank," ibegin:",ibegin," iend:", iend, " jbegin:", jbegin, " jend:", jend 271 WRITE(lunout,*) "wxios_domain_param: mpirank=",mpi_rank," ii_begin:",ii_begin," ii_end:", ii_end 272 WRITE(lunout,*) "wxios_domain_param: mpirank=",mpi_rank," Size io_lon:", SIZE(io_lon(ibegin:iend)), " io_lat:", SIZE(io_lat(jbegin:jend)) 273 ENDIF 201 274 202 275 !On parametrise le domaine: 203 !IF (is_sequential) THEN 204 CALL xios_set_domain_attr_hdl(dom, ni_glo=iim, ibegin=1, ni=iim,& 205 & nj_glo=jjm, jbegin=1,nj=jjm,& 206 & lonvalue=io_lon(ibegin:iend), latvalue=io_lat(jbegin:jend)) 207 !END IF 276 CALL xios_set_domain_attr_hdl(dom, ni_glo=ni_glo, ibegin=ibegin, ni=ni) 277 CALL xios_set_domain_attr_hdl(dom, nj_glo=nj_glo, jbegin=jbegin, nj=nj, data_dim=2) 278 CALL xios_set_domain_attr_hdl(dom, lonvalue=io_lon(ibegin:iend), latvalue=io_lat(jbegin:jend)) 279 280 IF (.NOT.is_sequential) THEN 281 mask(:,:)=.TRUE. 282 if (ii_begin>1) mask(1:ii_begin-1,1) = .FALSE. 283 if (ii_end<ni) mask(ii_end+1:ni,nj) = .FALSE. 284 ! special case for south pole 285 if ((ii_end.eq.1).and.(is_south_pole)) mask(1:ni,nj)=.true. 286 IF (prt_level >= 10) THEN 287 WRITE(lunout,*) "wxios_domain_param: mpirank=",mpi_rank," mask(:,1)=",mask(:,1) 288 WRITE(lunout,*) "wxios_domain_param: mpirank=",mpi_rank," mask(:,nj)=",mask(:,nj) 289 ENDIF 290 CALL xios_set_domain_attr_hdl(dom, mask=mask) 291 END IF 292 208 293 CALL xios_is_defined_domain_attr_hdl(dom,ni_glo=boool) 209 294 !Vérification: 210 295 IF (xios_is_valid_domain(dom_id)) THEN 211 WRITE(*,*) "Xios. Domain initialized: ", dom_id, boool212 ELSE 213 WRITE(*,*) "Xios. Invalid domain: ", dom_id296 IF (prt_level >= 10) WRITE(lunout,*) "wxios_domain_param: Domain initialized: ", trim(dom_id), boool 297 ELSE 298 IF (prt_level >= 10) WRITE(lunout,*) "wxios_domain_param: Invalid domain: ", trim(dom_id) 214 299 END IF 215 300 END SUBROUTINE wxios_domain_param … … 218 303 ! Pour déclarer un axe vertical !!!!!!!!!!!!!!! 219 304 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 220 SUBROUTINE wxios_add_vaxis(axisgroup_id, axis_file_id, axis_size, axis_value) 221 CHARACTER (len=*), INTENT(IN) :: axisgroup_id 222 INTEGER, INTENT(IN) :: axis_file_id, axis_size 305 SUBROUTINE wxios_add_vaxis(axisgroup_id, axis_file, axis_size, axis_value) 306 IMPLICIT NONE 307 INCLUDE 'iniprint.h' 308 309 CHARACTER (len=*), INTENT(IN) :: axisgroup_id, axis_file 310 INTEGER, INTENT(IN) :: axis_size 223 311 REAL, DIMENSION(axis_size), INTENT(IN) :: axis_value 224 312 225 313 TYPE(xios_axisgroup) :: axgroup 226 314 TYPE(xios_axis) :: ax 227 CHARACTER(len= 100) :: axis_id315 CHARACTER(len=20) :: axis_id 228 316 229 317 230 318 !Préparation du nom de l'axe: 231 CALL concat(axisgroup_id, axis_file _id, axis_id)319 CALL concat(axisgroup_id, axis_file, axis_id) 232 320 233 321 !On récupère le groupe d'axes qui va bien: … … 235 323 236 324 !On ajoute l'axe correspondant à ce fichier: 237 CALL xios_add_axis(axgroup, ax, axis_id)325 CALL xios_add_axis(axgroup, ax, TRIM(ADJUSTL(axis_id))) 238 326 239 327 !Et on le parametrise: … … 241 329 242 330 !Vérification: 243 IF (xios_is_valid_axis( axis_id)) THEN244 WRITE(*,*) "Xios. Axis created: ", axis_id245 ELSE 246 WRITE(*,*) " Xios. Invalid axis: ", axis_id331 IF (xios_is_valid_axis(TRIM(ADJUSTL(axis_id)))) THEN 332 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_vaxis: Axis created: ", TRIM(ADJUSTL(axis_id)) 333 ELSE 334 WRITE(*,*) "wxios_add_vaxis: Invalid axis: ", TRIM(ADJUSTL(axis_id)) 247 335 END IF 248 336 … … 254 342 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 255 343 SUBROUTINE wxios_add_file(fname, ffreq, flvl) 344 IMPLICIT NONE 345 INCLUDE 'iniprint.h' 346 256 347 CHARACTER(len=*), INTENT(IN) :: fname 257 348 CHARACTER(len=*), INTENT(IN) :: ffreq … … 262 353 CHARACTER(len=100) :: nffreq 263 354 264 !On créé le noeud: 265 CALL xios_get_filegroup_handle("defile", x_fg) 266 CALL xios_add_file(x_fg, x_file, "X"//fname) 267 268 !On reformate la fréquence: 269 CALL reformadate(ffreq, nffreq) 270 271 !On configure: 272 CALL xios_set_file_attr_hdl(x_file, name="X"//fname,& 355 !On regarde si le fichier n'est pas défini par XML: 356 IF (.NOT.xios_is_valid_file(fname)) THEN 357 !On créé le noeud: 358 CALL xios_get_filegroup_handle("defile", x_fg) 359 CALL xios_add_file(x_fg, x_file, fname) 360 361 !On reformate la fréquence: 362 CALL reformadate(ffreq, nffreq) 363 364 !On configure: 365 CALL xios_set_file_attr_hdl(x_file, name="X"//fname,& 273 366 output_freq=TRIM(ADJUSTL(nffreq)), output_level=flvl, enabled=.TRUE.) 274 367 275 IF (xios_is_valid_file("X"//fname)) THEN 276 WRITE(*,*) "Xios. New file: ", "X"//fname 277 WRITE(*,*) "Xios. output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl 278 ELSE 279 WRITE(*,*) "Xios. Error, invalid file: ", "X"//fname 280 WRITE(*,*) "Xios. output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl 368 IF (xios_is_valid_file("X"//fname)) THEN 369 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_file: New file: ", "X"//fname 370 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl 371 ELSE 372 WRITE(*,*) "wxios_add_file: Error, invalid file: ", "X"//trim(fname) 373 WRITE(*,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl 374 END IF 375 ELSE 376 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_file: File ",trim(fname), " défined using XML." 377 CALL xios_set_file_attr(fname, enabled=.TRUE.) 281 378 END IF 282 379 END SUBROUTINE wxios_add_file … … 286 383 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 287 384 SUBROUTINE wxios_add_field(fieldname, fieldgroup, fieldlongname, fieldunit) 288 USE netcdf 385 USE netcdf, only: nf90_fill_real 386 387 IMPLICIT NONE 388 INCLUDE 'iniprint.h' 289 389 290 390 CHARACTER(len=*), INTENT(IN) :: fieldname … … 308 408 !On ajoute le champ: 309 409 CALL xios_add_field(fieldgroup, field, fieldname) 310 ! WRITE(*,*) "Xios.",fieldname,fieldgroup, fieldlongname, fieldunit410 !IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_field: ",fieldname,fieldgroup, fieldlongname, fieldunit 311 411 312 412 !On rentre ses paramètres: 313 413 CALL xios_set_field_attr_hdl(field, standard_name=fieldlongname, unit=newunit, default_value=def) 314 WRITE(*,*) "Xios. Champ ", fieldname, "cree:"315 WRITE(*,*) "Xios. long_name=",fieldlongname,"; unit=",newunit,"; default_value=",nf90_fill_real414 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_field: Field ",trim(fieldname), "cree:" 415 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_field: long_name=",trim(fieldlongname),"; unit=",trim(newunit),"; default_value=",nf90_fill_real 316 416 317 417 END SUBROUTINE wxios_add_field … … 321 421 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 322 422 SUBROUTINE wxios_add_field_to_file(fieldname, fdim, fid, fname, fieldlongname, fieldunit, field_level, op) 423 IMPLICIT NONE 424 INCLUDE 'iniprint.h' 425 323 426 CHARACTER(len=*), INTENT(IN) :: fieldname 324 427 INTEGER, INTENT(IN) :: fdim, fid … … 329 432 CHARACTER(len=*), INTENT(IN) :: op 330 433 331 CHARACTER(len= 100) :: axis_id434 CHARACTER(len=20) :: axis_id 332 435 CHARACTER(len=100) :: operation 333 436 TYPE(xios_file) :: f 334 437 TYPE(xios_field) :: field 335 438 TYPE(xios_fieldgroup) :: fieldgroup 439 LOGICAL :: bool=.FALSE. 440 INTEGER :: lvl =0 336 441 337 442 338 443 !Préparation du nom de l'axe: 339 CALL concat("presnivs", f id, axis_id)444 CALL concat("presnivs", fname, axis_id) 340 445 341 446 !on prépare le nom de l'opération: … … 352 457 353 458 !On regarde si le champ à déjà été créé ou non: 354 IF (xios_is_valid_field(fieldname)) THEN 355 WRITE(*,*) "Xios. Champ ", fieldname, "existe" 356 ELSE 357 WRITE(*,*) "Xios. Champ ", fieldname, "nexiste pas" 459 IF (xios_is_valid_field(fieldname) .AND. .NOT. g_field_name == fieldname) THEN 460 !Si ce champ existe via XML (ie, dès le premier passage, ie g_field_name != fieldname) alors rien d'autre à faire 461 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_field_to_file: Field ", trim(fieldname), "exists via XML" 462 g_flag_xml = .TRUE. 463 g_field_name = fieldname 464 465 ELSE IF (.NOT. g_field_name == fieldname) THEN 466 !Si premier pssage et champ indéfini, alors on le créé 467 468 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_field_to_file: Field ", trim(fieldname), "does not exist" 358 469 359 470 !On le créé: 360 471 CALL wxios_add_field(fieldname, fieldgroup, fieldlongname, fieldunit) 361 472 IF (xios_is_valid_field(fieldname)) THEN 362 WRITE(*,*) "Xios. Champ ", fieldname, "cree"473 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_field_to_file: Field ", trim(fieldname), "created" 363 474 ENDIF 364 ENDIF 365 366 !On ajoute le champ: 367 CALL xios_get_file_handle("X"//fname, f) 368 CALL xios_add_fieldtofile(f, field) 369 370 371 !L'operation, sa frequence: 372 CALL xios_set_field_attr_hdl(field, field_ref=fieldname, operation=TRIM(ADJUSTL(operation)), freq_op="1ts", prec=4) 373 374 375 !On rentre ses paramètres: 376 CALL xios_set_field_attr_hdl(field, level=field_level, enabled=.TRUE.) 377 378 IF (fdim.EQ.2) THEN 379 !Si c'est un champ 2D: 380 WRITE(*,*) "Xios. Champ 2D ", fieldname, " de ", "X"//fname ," configure:" 381 WRITE (*,*) "Xios. op=", TRIM(ADJUSTL(operation)) 382 WRITE(*,*) "Xios. freq_op=1ts","; lvl=",field_level 383 ELSE 384 !Si 3D : 385 !On ajoute l'axe vertical qui va bien: 386 CALL xios_set_field_attr_hdl(field, axis_ref=axis_id) 475 476 g_flag_xml = .FALSE. 477 g_field_name = fieldname 478 479 END IF 480 481 IF (.NOT. g_flag_xml) THEN 482 !Champ existe déjà , mais pas XML, alors on l'ajoute 483 !On ajoute le champ: 484 CALL xios_get_file_handle(fname, f) 485 CALL xios_add_fieldtofile(f, field) 387 486 388 WRITE(*,*) "Xios. Champ 3D ", fieldname, " de ", "X"//fname, "configure:" 389 WRITE(*,*) "Xios. freq_op=1ts","; lvl=",field_level 390 WRITE(*,*) "Xios. axe=",axis_id 391 END IF 487 488 !L'operation, sa frequence: 489 CALL xios_set_field_attr_hdl(field, field_ref=fieldname, operation=TRIM(ADJUSTL(operation)), freq_op="1ts", prec=4) 490 491 492 !On rentre ses paramètres: 493 CALL xios_set_field_attr_hdl(field, level=field_level, enabled=.TRUE.) 494 495 IF (fdim.EQ.2) THEN 496 !Si c'est un champ 2D: 497 IF (prt_level >= 10) THEN 498 WRITE(lunout,*) "wxios_add_field_to_file: 2D Field ", trim(fieldname), " in ", "X"//trim(fname) ," configured with:" 499 WRITE(lunout,*) "wxios_add_field_to_file: op=", TRIM(ADJUSTL(operation)) 500 WRITE(lunout,*) "wxios_add_field_to_file: freq_op=1ts","; lvl=",field_level 501 ENDIF 502 ELSE 503 !Si 3D : 504 !On ajoute l'axe vertical qui va bien: 505 CALL xios_set_field_attr_hdl(field, axis_ref=TRIM(ADJUSTL(axis_id))) 506 507 IF (prt_level >= 10) THEN 508 WRITE(lunout,*) "wxios_add_field_to_file: 3D Field",trim(fieldname), " in ", "X"//trim(fname), "configured with:" 509 WRITE(lunout,*) "wxios_add_field_to_file: freq_op=1ts","; lvl=",field_level 510 WRITE(lunout,*) "wxios_add_field_to_file: axis=",TRIM(ADJUSTL(axis_id)) 511 ENDIF 512 END IF 513 514 ELSE 515 !Sinon on se contente de l'activer: 516 CALL xios_set_field_attr(fieldname, enabled=.TRUE.) 517 ENDIF 392 518 393 519 END SUBROUTINE wxios_add_field_to_file -
trunk/LMDZ.COMMON/libf/dyn3d/gcm.F
r1107 r1300 348 348 start_time = starttime 349 349 ELSE 350 WRITE(lunout,*)'Je m''arrete' 351 CALL abort 350 call abort_gcm("gcm", "'Je m''arrete'", 1) 352 351 ENDIF 353 352 ENDIF -
trunk/LMDZ.COMMON/libf/dyn3d/guide_mod.F90
r979 r1300 87 87 CALL getpar('guide_teta',.false.,guide_teta,'guidage de T par Teta') 88 88 89 CALL getpar('guide_add',.false.,guide_add,'for �age constant?')89 CALL getpar('guide_add',.false.,guide_add,'for�age constant?') 90 90 CALL getpar('guide_zon',.false.,guide_zon,'guidage moy zonale') 91 91 … … 104 104 CALL getpar('guide_BL',.true.,guide_BL,'guidage dans C.Lim') 105 105 106 ! Sauvegarde du for �age106 ! Sauvegarde du for�age 107 107 CALL getpar('guide_sav',.false.,guide_sav,'sauvegarde guidage') 108 108 CALL getpar('iguide_sav',4,iguide_sav,'freq. sauvegarde guidage') … … 143 143 ncidpl=-99 144 144 if (guide_modele) then 145 if (ncidpl.eq.-99) rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl) 145 if (ncidpl.eq.-99) then 146 rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl) 147 if (rcod.NE.NF_NOERR) THEN 148 print *,'Guide: probleme -> pas de fichier apbp.nc' 149 CALL abort_gcm(modname,abort_message,1) 150 endif 151 endif 146 152 else 147 153 if (guide_u) then 148 if (ncidpl.eq.-99) rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl) 154 if (ncidpl.eq.-99) then 155 rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl) 156 if (rcod.NE.NF_NOERR) THEN 157 print *,'Guide: probleme -> pas de fichier u.nc' 158 CALL abort_gcm(modname,abort_message,1) 159 endif 160 endif 149 161 elseif (guide_v) then 150 if (ncidpl.eq.-99) rcod=nf90_open('v.nc',nf90_nowrite,ncidpl) 162 if (ncidpl.eq.-99) then 163 rcod=nf90_open('v.nc',nf90_nowrite,ncidpl) 164 if (rcod.NE.NF_NOERR) THEN 165 print *,'Guide: probleme -> pas de fichier v.nc' 166 CALL abort_gcm(modname,abort_message,1) 167 endif 168 endif 151 169 elseif (guide_T) then 152 if (ncidpl.eq.-99) rcod=nf90_open('T.nc',nf90_nowrite,ncidpl) 170 if (ncidpl.eq.-99) then 171 rcod=nf90_open('T.nc',nf90_nowrite,ncidpl) 172 if (rcod.NE.NF_NOERR) THEN 173 print *,'Guide: probleme -> pas de fichier T.nc' 174 CALL abort_gcm(modname,abort_message,1) 175 endif 176 endif 153 177 elseif (guide_Q) then 154 if (ncidpl.eq.-99) rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl) 178 if (ncidpl.eq.-99) then 179 rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl) 180 if (rcod.NE.NF_NOERR) THEN 181 print *,'Guide: probleme -> pas de fichier hur.nc' 182 CALL abort_gcm(modname,abort_message,1) 183 endif 184 endif 155 185 endif 156 186 endif … … 990 1020 INTEGER :: status,rcode 991 1021 1022 CHARACTER (len = 80) :: abort_message 1023 CHARACTER (len = 20) :: modname = 'guide_read' 992 1024 ! ----------------------------------------------------------------- 993 1025 ! Premier appel: initialisation de la lecture des fichiers … … 998 1030 ! Niveaux de pression si non constants 999 1031 if (guide_modele) then 1000 print *,'Lecture du guidage sur niveaux mod �le'1032 print *,'Lecture du guidage sur niveaux modele' 1001 1033 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 1034 IF (rcode.NE.NF_NOERR) THEN 1035 print *,'Guide: probleme -> pas de fichier apbp.nc' 1036 CALL abort_gcm(modname,abort_message,1) 1037 ENDIF 1002 1038 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 1039 IF (rcode.NE.NF_NOERR) THEN 1040 print *,'Guide: probleme -> pas de variable AP, fichier apbp.nc' 1041 CALL abort_gcm(modname,abort_message,1) 1042 ENDIF 1003 1043 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1044 IF (rcode.NE.NF_NOERR) THEN 1045 print *,'Guide: probleme -> pas de variable BP, fichier apbp.nc' 1046 CALL abort_gcm(modname,abort_message,1) 1047 ENDIF 1004 1048 print*,'ncidpl,varidap',ncidpl,varidap 1005 1049 endif … … 1007 1051 if (guide_u) then 1008 1052 rcode = nf90_open('u.nc', nf90_nowrite, ncidu) 1053 IF (rcode.NE.NF_NOERR) THEN 1054 print *,'Guide: probleme -> pas de fichier u.nc' 1055 CALL abort_gcm(modname,abort_message,1) 1056 ENDIF 1009 1057 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 1058 IF (rcode.NE.NF_NOERR) THEN 1059 print *,'Guide: probleme -> pas de variable UWND, fichier u.nc' 1060 CALL abort_gcm(modname,abort_message,1) 1061 ENDIF 1010 1062 print*,'ncidu,varidu',ncidu,varidu 1011 1063 if (ncidpl.eq.-99) ncidpl=ncidu … … 1014 1066 if (guide_v) then 1015 1067 rcode = nf90_open('v.nc', nf90_nowrite, ncidv) 1068 IF (rcode.NE.NF_NOERR) THEN 1069 print *,'Guide: probleme -> pas de fichier v.nc' 1070 CALL abort_gcm(modname,abort_message,1) 1071 ENDIF 1016 1072 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 1073 IF (rcode.NE.NF_NOERR) THEN 1074 print *,'Guide: probleme -> pas de variable VWND, fichier v.nc' 1075 CALL abort_gcm(modname,abort_message,1) 1076 ENDIF 1017 1077 print*,'ncidv,varidv',ncidv,varidv 1018 1078 if (ncidpl.eq.-99) ncidpl=ncidv … … 1021 1081 if (guide_T) then 1022 1082 rcode = nf90_open('T.nc', nf90_nowrite, ncidt) 1083 IF (rcode.NE.NF_NOERR) THEN 1084 print *,'Guide: probleme -> pas de fichier T.nc' 1085 CALL abort_gcm(modname,abort_message,1) 1086 ENDIF 1023 1087 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 1088 IF (rcode.NE.NF_NOERR) THEN 1089 print *,'Guide: probleme -> pas de variable AIR, fichier T.nc' 1090 CALL abort_gcm(modname,abort_message,1) 1091 ENDIF 1024 1092 print*,'ncidT,varidT',ncidt,varidt 1025 1093 if (ncidpl.eq.-99) ncidpl=ncidt … … 1028 1096 if (guide_Q) then 1029 1097 rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ) 1098 IF (rcode.NE.NF_NOERR) THEN 1099 print *,'Guide: probleme -> pas de fichier hur.nc' 1100 CALL abort_gcm(modname,abort_message,1) 1101 ENDIF 1030 1102 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 1103 IF (rcode.NE.NF_NOERR) THEN 1104 print *,'Guide: probleme -> pas de variable RH, fichier hur.nc' 1105 CALL abort_gcm(modname,abort_message,1) 1106 ENDIF 1031 1107 print*,'ncidQ,varidQ',ncidQ,varidQ 1032 1108 if (ncidpl.eq.-99) ncidpl=ncidQ … … 1035 1111 if ((guide_P).OR.(guide_modele)) then 1036 1112 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1113 IF (rcode.NE.NF_NOERR) THEN 1114 print *,'Guide: probleme -> pas de fichier ps.nc' 1115 CALL abort_gcm(modname,abort_message,1) 1116 ENDIF 1037 1117 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 1118 IF (rcode.NE.NF_NOERR) THEN 1119 print *,'Guide: probleme -> pas de variable SP, fichier ps.nc' 1120 CALL abort_gcm(modname,abort_message,1) 1121 ENDIF 1038 1122 print*,'ncidps,varidps',ncidps,varidps 1039 1123 endif … … 1173 1257 INTEGER :: i 1174 1258 1259 CHARACTER (len = 80) :: abort_message 1260 CHARACTER (len = 20) :: modname = 'guide_read2D' 1175 1261 ! ----------------------------------------------------------------- 1176 1262 ! Premier appel: initialisation de la lecture des fichiers … … 1181 1267 ! Niveaux de pression si non constants 1182 1268 if (guide_modele) then 1183 print *,'Lecture du guidage sur niveaux mod �le'1269 print *,'Lecture du guidage sur niveaux modele' 1184 1270 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 1271 IF (rcode.NE.NF_NOERR) THEN 1272 print *,'Guide: probleme -> pas de fichier apbp.nc' 1273 CALL abort_gcm(modname,abort_message,1) 1274 ENDIF 1185 1275 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 1276 IF (rcode.NE.NF_NOERR) THEN 1277 print *,'Guide: probleme -> pas de variable AP, fichier apbp.nc' 1278 CALL abort_gcm(modname,abort_message,1) 1279 ENDIF 1186 1280 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1281 IF (rcode.NE.NF_NOERR) THEN 1282 print *,'Guide: probleme -> pas de variable BP, fichier apbp.nc' 1283 CALL abort_gcm(modname,abort_message,1) 1284 ENDIF 1187 1285 print*,'ncidpl,varidap',ncidpl,varidap 1188 1286 endif … … 1190 1288 if (guide_u) then 1191 1289 rcode = nf90_open('u.nc', nf90_nowrite, ncidu) 1290 IF (rcode.NE.NF_NOERR) THEN 1291 print *,'Guide: probleme -> pas de fichier u.nc' 1292 CALL abort_gcm(modname,abort_message,1) 1293 ENDIF 1192 1294 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 1295 IF (rcode.NE.NF_NOERR) THEN 1296 print *,'Guide: probleme -> pas de variable UWND, fichier u.nc' 1297 CALL abort_gcm(modname,abort_message,1) 1298 ENDIF 1193 1299 print*,'ncidu,varidu',ncidu,varidu 1194 1300 if (ncidpl.eq.-99) ncidpl=ncidu … … 1197 1303 if (guide_v) then 1198 1304 rcode = nf90_open('v.nc', nf90_nowrite, ncidv) 1305 IF (rcode.NE.NF_NOERR) THEN 1306 print *,'Guide: probleme -> pas de fichier v.nc' 1307 CALL abort_gcm(modname,abort_message,1) 1308 ENDIF 1199 1309 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 1310 IF (rcode.NE.NF_NOERR) THEN 1311 print *,'Guide: probleme -> pas de variable VWND, fichier v.nc' 1312 CALL abort_gcm(modname,abort_message,1) 1313 ENDIF 1200 1314 print*,'ncidv,varidv',ncidv,varidv 1201 1315 if (ncidpl.eq.-99) ncidpl=ncidv … … 1204 1318 if (guide_T) then 1205 1319 rcode = nf90_open('T.nc', nf90_nowrite, ncidt) 1320 IF (rcode.NE.NF_NOERR) THEN 1321 print *,'Guide: probleme -> pas de fichier T.nc' 1322 CALL abort_gcm(modname,abort_message,1) 1323 ENDIF 1206 1324 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 1325 IF (rcode.NE.NF_NOERR) THEN 1326 print *,'Guide: probleme -> pas de variable AIR, fichier T.nc' 1327 CALL abort_gcm(modname,abort_message,1) 1328 ENDIF 1207 1329 print*,'ncidT,varidT',ncidt,varidt 1208 1330 if (ncidpl.eq.-99) ncidpl=ncidt … … 1211 1333 if (guide_Q) then 1212 1334 rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ) 1335 IF (rcode.NE.NF_NOERR) THEN 1336 print *,'Guide: probleme -> pas de fichier hur.nc' 1337 CALL abort_gcm(modname,abort_message,1) 1338 ENDIF 1213 1339 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 1340 IF (rcode.NE.NF_NOERR) THEN 1341 print *,'Guide: probleme -> pas de variable RH, fichier hur.nc' 1342 CALL abort_gcm(modname,abort_message,1) 1343 ENDIF 1214 1344 print*,'ncidQ,varidQ',ncidQ,varidQ 1215 1345 if (ncidpl.eq.-99) ncidpl=ncidQ … … 1218 1348 if ((guide_P).OR.(guide_modele)) then 1219 1349 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1350 IF (rcode.NE.NF_NOERR) THEN 1351 print *,'Guide: probleme -> pas de fichier ps.nc' 1352 CALL abort_gcm(modname,abort_message,1) 1353 ENDIF 1220 1354 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 1355 IF (rcode.NE.NF_NOERR) THEN 1356 print *,'Guide: probleme -> pas de variable SP, fichier ps.nc' 1357 CALL abort_gcm(modname,abort_message,1) 1358 ENDIF 1221 1359 print*,'ncidps,varidps',ncidps,varidps 1222 1360 endif … … 1427 1565 #endif 1428 1566 ! -------------------------------------------------------------------- 1429 ! Cr �ation des variables sauvegard�es1567 ! Cr�ation des variables sauvegard�es 1430 1568 ! -------------------------------------------------------------------- 1431 1569 ierr = NF_REDEF(nid) … … 1552 1690 !=========================================================================== 1553 1691 END MODULE guide_mod 1692 -
trunk/LMDZ.COMMON/libf/dyn3d_common/defrun.F
r1299 r1300 370 370 WRITE(tapeout,*)' La valeur de dzoomx passee par run.def est dif 371 371 *ferente de celle lue sur le fichier start ' 372 CALL ABORT 372 CALL ABORT_gcm("defrun", "", 1) 373 373 ENDIF 374 374 … … 376 376 WRITE(tapeout,*)' La valeur de dzoomy passee par run.def est dif 377 377 *ferente de celle lue sur le fichier start ' 378 CALL ABORT 378 CALL ABORT_gcm("defrun", "", 1) 379 379 ENDIF 380 380 … … 382 382 WRITE(6,*)' La valeur de taux passee par run.def est differente 383 383 * de celle lue sur le fichier start ' 384 CALL ABORT 384 CALL ABORT_gcm("defrun", "", 1) 385 385 ENDIF 386 386 … … 388 388 WRITE(6,*)' La valeur de tauy passee par run.def est differente 389 389 * de celle lue sur le fichier start ' 390 CALL ABORT 390 CALL ABORT_gcm("defrun", "", 1) 391 391 ENDIF 392 392 -
trunk/LMDZ.COMMON/libf/dyn3d_common/dynetat0.F
r1299 r1300 82 82 write(lunout,*)'dynetat0: Pb d''ouverture du fichier start.nc' 83 83 write(lunout,*)trim(nf90_strerror(ierr)) 84 CALL ABORT 84 CALL ABORT_gcm("dynetat0", "", 1) 85 85 ENDIF 86 86 … … 90 90 write(lunout,*)"dynetat0: Le champ <controle> est absent" 91 91 write(lunout,*)trim(nf90_strerror(ierr)) 92 CALL abort92 CALL ABORT_gcm("dynetat0", "", 1) 93 93 ENDIF 94 94 ierr = nf90_get_var(nid, nvarid, tab_cntrl) … … 96 96 write(lunout,*)"dynetat0: Lecture echoue pour <controle>" 97 97 write(lunout,*)trim(nf90_strerror(ierr)) 98 CALL abort98 CALL ABORT_gcm("dynetat0", "", 1) 99 99 ENDIF 100 100 … … 190 190 write(lunout,*)"dynetat0: Le champ <rlonu> est absent" 191 191 write(lunout,*)trim(nf90_strerror(ierr)) 192 CALL abort192 CALL ABORT_gcm("dynetat0", "", 1) 193 193 ENDIF 194 194 ierr = nf90_get_var(nid, nvarid, rlonu) … … 196 196 write(lunout,*)"dynetat0: Lecture echouee pour <rlonu>" 197 197 write(lunout,*)trim(nf90_strerror(ierr)) 198 CALL abort198 CALL ABORT_gcm("dynetat0", "", 1) 199 199 ENDIF 200 200 … … 203 203 write(lunout,*)"dynetat0: Le champ <rlatu> est absent" 204 204 write(lunout,*)trim(nf90_strerror(ierr)) 205 CALL abort205 CALL ABORT_gcm("dynetat0", "", 1) 206 206 ENDIF 207 207 ierr = nf90_get_var(nid, nvarid, rlatu) … … 209 209 write(lunout,*)"dynetat0: Lecture echouee pour <rlatu>" 210 210 write(lunout,*)trim(nf90_strerror(ierr)) 211 CALL abort211 CALL ABORT_gcm("dynetat0", "", 1) 212 212 ENDIF 213 213 … … 216 216 write(lunout,*)"dynetat0: Le champ <rlonv> est absent" 217 217 write(lunout,*)trim(nf90_strerror(ierr)) 218 CALL abort218 CALL ABORT_gcm("dynetat0", "", 1) 219 219 ENDIF 220 220 ierr = nf90_get_var(nid, nvarid, rlonv) … … 222 222 write(lunout,*)"dynetat0: Lecture echouee pour <rlonv>" 223 223 write(lunout,*)trim(nf90_strerror(ierr)) 224 CALL abort224 CALL ABORT_gcm("dynetat0", "", 1) 225 225 ENDIF 226 226 … … 229 229 write(lunout,*)"dynetat0: Le champ <rlatv> est absent" 230 230 write(lunout,*)trim(nf90_strerror(ierr)) 231 CALL abort231 CALL ABORT_gcm("dynetat0", "", 1) 232 232 ENDIF 233 233 ierr = nf90_get_var(nid, nvarid, rlatv) … … 235 235 write(lunout,*)"dynetat0: Lecture echouee pour rlatv" 236 236 write(lunout,*)trim(nf90_strerror(ierr)) 237 CALL abort237 CALL ABORT_gcm("dynetat0", "", 1) 238 238 ENDIF 239 239 … … 242 242 write(lunout,*)"dynetat0: Le champ <cu> est absent" 243 243 write(lunout,*)trim(nf90_strerror(ierr)) 244 CALL abort244 CALL ABORT_gcm("dynetat0", "", 1) 245 245 ENDIF 246 246 ierr = nf90_get_var(nid, nvarid, cu) … … 248 248 write(lunout,*)"dynetat0: Lecture echouee pour <cu>" 249 249 write(lunout,*)trim(nf90_strerror(ierr)) 250 CALL abort250 CALL ABORT_gcm("dynetat0", "", 1) 251 251 ENDIF 252 252 … … 255 255 write(lunout,*)"dynetat0: Le champ <cv> est absent" 256 256 write(lunout,*)trim(nf90_strerror(ierr)) 257 CALL abort257 CALL ABORT_gcm("dynetat0", "", 1) 258 258 ENDIF 259 259 ierr = nf90_get_var(nid, nvarid, cv) … … 261 261 write(lunout,*)"dynetat0: Lecture echouee pour <cv>" 262 262 write(lunout,*)trim(nf90_strerror(ierr)) 263 CALL abort263 CALL ABORT_gcm("dynetat0", "", 1) 264 264 ENDIF 265 265 … … 268 268 write(lunout,*)"dynetat0: Le champ <aire> est absent" 269 269 write(lunout,*)trim(nf90_strerror(ierr)) 270 CALL abort270 CALL ABORT_gcm("dynetat0", "", 1) 271 271 ENDIF 272 272 ierr = nf90_get_var(nid, nvarid, aire) … … 274 274 write(lunout,*)"dynetat0: Lecture echouee pour <aire>" 275 275 write(lunout,*)trim(nf90_strerror(ierr)) 276 CALL abort276 CALL ABORT_gcm("dynetat0", "", 1) 277 277 ENDIF 278 278 … … 281 281 write(lunout,*)"dynetat0: Le champ <phisinit> est absent" 282 282 write(lunout,*)trim(nf90_strerror(ierr)) 283 CALL abort283 CALL ABORT_gcm("dynetat0", "", 1) 284 284 ENDIF 285 285 ierr = nf90_get_var(nid, nvarid, phis) … … 287 287 write(lunout,*)"dynetat0: Lecture echouee pour <phisinit>" 288 288 write(lunout,*)trim(nf90_strerror(ierr)) 289 CALL abort289 CALL ABORT_gcm("dynetat0", "", 1) 290 290 ENDIF 291 291 … … 299 299 write(lunout,*)"dynetat0: Le champ <Time> est absent" 300 300 write(lunout,*)trim(nf90_strerror(ierr)) 301 CALL abort301 CALL ABORT_gcm("dynetat0", "", 1) 302 302 ENDIF 303 303 ! Get the length of the "Time" dimension … … 311 311 write(lunout,*)"dynetat0: Lecture echouee <Time>" 312 312 write(lunout,*)trim(nf90_strerror(ierr)) 313 CALL abort313 CALL ABORT_gcm("dynetat0", "", 1) 314 314 ENDIF 315 315 ELSE … … 324 324 write(lunout,*)"dynetat0: Lecture echouee <temps>" 325 325 write(lunout,*)trim(nf90_strerror(ierr)) 326 CALL abort326 CALL ABORT_gcm("dynetat0", "", 1) 327 327 ENDIF 328 328 ENDIF … … 346 346 PRINT*, time(i) 347 347 ENDDO 348 CALL abort348 CALL ABORT_gcm("dynetat0", "", 1) 349 349 ENDIF 350 350 ENDIF … … 379 379 write(lunout,*)"dynetat0: Le champ <vcov> est absent" 380 380 write(lunout,*)trim(nf90_strerror(ierr)) 381 CALL abort381 CALL ABORT_gcm("dynetat0", "", 1) 382 382 ENDIF 383 383 ierr=nf90_get_var(nid,nvarid,vcov,corner,edges) … … 385 385 write(lunout,*)"dynetat0: Lecture echouee pour <vcov>" 386 386 write(lunout,*)trim(nf90_strerror(ierr)) 387 CALL abort387 CALL ABORT_gcm("dynetat0", "", 1) 388 388 ENDIF 389 389 … … 401 401 write(lunout,*)"dynetat0: Le champ <ucov> est absent" 402 402 write(lunout,*)trim(nf90_strerror(ierr)) 403 CALL abort403 CALL ABORT_gcm("dynetat0", "", 1) 404 404 ENDIF 405 405 ierr=nf90_get_var(nid,nvarid,ucov,corner,edges) … … 407 407 write(lunout,*)"dynetat0: Lecture echouee pour <ucov>" 408 408 write(lunout,*)trim(nf90_strerror(ierr)) 409 CALL abort409 CALL ABORT_gcm("dynetat0", "", 1) 410 410 ENDIF 411 411 … … 415 415 write(lunout,*)"dynetat0: Le champ <teta> est absent" 416 416 write(lunout,*)trim(nf90_strerror(ierr)) 417 CALL abort417 CALL ABORT_gcm("dynetat0", "", 1) 418 418 ENDIF 419 419 ierr=nf90_get_var(nid,nvarid,teta,corner,edges) … … 421 421 write(lunout,*)"dynetat0: Lecture echouee pour <teta>" 422 422 write(lunout,*)trim(nf90_strerror(ierr)) 423 CALL abort423 CALL ABORT_gcm("dynetat0", "", 1) 424 424 ENDIF 425 425 … … 439 439 & //trim(tname(iq)) 440 440 write(lunout,*)trim(nf90_strerror(ierr)) 441 CALL abort441 CALL ABORT_gcm("dynetat0", "", 1) 442 442 ENDIF 443 443 ENDIF … … 450 450 write(lunout,*)"dynetat0: Le champ <masse> est absent" 451 451 write(lunout,*)trim(nf90_strerror(ierr)) 452 CALL abort452 CALL ABORT_gcm("dynetat0", "", 1) 453 453 ENDIF 454 454 ierr=nf90_get_var(nid,nvarid,masse,corner,edges) … … 456 456 write(lunout,*)"dynetat0: Lecture echouee pour <masse>" 457 457 write(lunout,*)trim(nf90_strerror(ierr)) 458 CALL abort458 CALL ABORT_gcm("dynetat0", "", 1) 459 459 ENDIF 460 460 … … 470 470 write(lunout,*)"dynetat0: Le champ <ps> est absent" 471 471 write(lunout,*)trim(nf90_strerror(ierr)) 472 CALL abort472 CALL ABORT_gcm("dynetat0", "", 1) 473 473 ENDIF 474 474 ierr=nf90_get_var(nid,nvarid,ps,corner,edges) … … 476 476 write(lunout,*)"dynetat0: Lecture echouee pour <ps>" 477 477 write(lunout,*)trim(nf90_strerror(ierr)) 478 CALL abort478 CALL ABORT_gcm("dynetat0", "", 1) 479 479 ENDIF 480 480 -
trunk/LMDZ.COMMON/libf/dyn3d_common/dynredem.F
r1299 r1300 158 158 & //trim(fichnom) 159 159 write(lunout,*)' ierr = ', ierr 160 CALL ABORT 160 CALL ABORT_GCM("DYNREDEM0", "", 1) 161 161 ENDIF 162 162 c … … 636 636 IF (ierr .NE. NF_NOERR) THEN 637 637 PRINT*, "dynredem1: Pb. d ouverture "//trim(fichnom) 638 CALL abort 638 CALL abort_gcm("dynredem1", "", 1) 639 639 ENDIF 640 640 -
trunk/LMDZ.COMMON/libf/dyn3d_common/fxhyp.F
r1299 r1300 178 178 WRITE(6,*)'Modifier les valeurs de grossismx ,tau ou dzoomx ', 179 179 , ' et relancer ! *** ' 180 CALL ABORT 180 CALL ABORT_GCM("FXHYP", "", 1) 181 181 ENDIF 182 182 c -
trunk/LMDZ.COMMON/libf/dyn3d_common/fyhyp.F
r1299 r1300 162 162 WRITE(6,*)'Modifier les valeurs de grossismy ,tauy ou dzoomy', 163 163 , ' et relancer ! *** ' 164 CALL ABORT 164 CALL ABORT_GCM("FYHYP", "", 1) 165 165 166 166 ENDIF -
trunk/LMDZ.COMMON/libf/dyn3d_common/grid_atob.F
r1299 r1300 55 55 IF (imar.GT.2200 .OR. jmar.GT.1100) THEN 56 56 PRINT*, 'imar ou jmar trop grand', imar, jmar 57 CALL ABORT 57 CALL ABORT_GCM("", "", 1) 58 58 ENDIF 59 59 c … … 119 119 ELSE 120 120 PRINT*, 'probleme,i,j=', i,j 121 ccc CALL ABORT 121 ccc CALL ABORT_GCM("", "", 1) 122 122 CALL dist_sphe(x(i),y(j),xdata,ydata,imdep,jmdep,distans) 123 123 #ifdef CRAY … … 193 193 IF (imar.GT.400 .OR. jmar.GT.200) THEN 194 194 PRINT*, 'imar ou jmar trop grand', imar, jmar 195 CALL ABORT 195 CALL ABORT_GCM("", "", 1) 196 196 ENDIF 197 197 c 198 198 IF (imdep.GT.400 .OR. jmdep.GT.200) THEN 199 199 PRINT*, 'imdep ou jmdep trop grand', imdep, jmdep 200 CALL ABORT 200 CALL ABORT_GCM("", "", 1) 201 201 ENDIF 202 202 c … … 258 258 PRINT*, 'Probleme grave,i,j,indx,indy=', 259 259 . i,j,indx(i,j),indy(i,j) 260 CALL abort 260 CALL abort_gcm("", "", 1) 261 261 ENDIF 262 262 ENDDO … … 309 309 ELSE 310 310 PRINT*, 'probleme,i,j=', i,j 311 CALL ABORT 311 CALL ABORT_GCM("", "", 1) 312 312 ENDIF 313 313 ENDDO … … 345 345 IF (imar.GT.2200 .OR. jmar.GT.1100) THEN 346 346 PRINT*, 'imar ou jmar trop grand', imar, jmar 347 CALL ABORT 347 CALL ABORT_GCM("", "", 1) 348 348 ENDIF 349 349 c … … 409 409 ELSE 410 410 PRINT*, 'probleme,i,j=', i,j 411 CALL ABORT 411 CALL ABORT_GCM("", "", 1) 412 412 ENDIF 413 413 ENDDO … … 452 452 IF (imar.GT.400 .OR. jmar.GT.400) THEN 453 453 PRINT*, 'imar ou jmar trop grand', imar, jmar 454 CALL ABORT 454 CALL ABORT_GCM("", "", 1) 455 455 ENDIF 456 456 c … … 513 513 ELSE 514 514 PRINT*, 'probleme,i,j=', i,j 515 ccc CALL ABORT 515 ccc CALL ABORT_GCM("", "", 1) 516 516 CALL dist_sphe(x(i),y(j),xdata,ydata,imdep,jmdep,distans) 517 517 #ifdef CRAY … … 577 577 IF (imar.GT.400 .OR. jmar.GT.400) THEN 578 578 PRINT*, 'imar ou jmar trop grand', imar, jmar 579 CALL ABORT 579 CALL ABORT_GCM("", "", 1) 580 580 ENDIF 581 581 c … … 642 642 ELSE 643 643 PRINT*, 'probleme,i,j=', i,j 644 ccc CALL ABORT 644 ccc CALL ABORT_GCM("", "", 1) 645 645 CALL dist_sphe(x(i),y(j),xdata,ydata,imdep,jmdep,distans) 646 646 #ifdef CRAY … … 712 712 IF (immod.GT.2200 .OR. jmmod.GT.1100) THEN 713 713 PRINT*, 'immod ou jmmod trop grand', immod, jmmod 714 CALL ABORT 714 CALL ABORT_GCM("", "", 1) 715 715 ENDIF 716 716 c … … 801 801 ELSE 802 802 PRINT*, 'probleme,i,j=', i,j 803 CALL ABORT 803 CALL ABORT_GCM("", "", 1) 804 804 ENDIF 805 805 ENDDO … … 875 875 ELSE 876 876 PRINT*, 'probleme,i,j=', i,j 877 ccc CALL ABORT 877 ccc CALL ABORT_GCM("", "", 1) 878 878 CALL dist_sphe(xmod(i),ymod(j),xtmp,ytmp,imtmp,jmtmp,distans) 879 879 #ifdef CRAY -
trunk/LMDZ.COMMON/libf/dyn3d_common/inigrads.F
r1299 r1300 13 13 real xmin,xmax,ymin,ymax 14 14 15 character file*10,titlel*40 15 character(len=*),intent(in) :: file 16 character(len=*),intent(in) :: titlel 16 17 17 18 #include "gradsdef.h" -
trunk/LMDZ.COMMON/libf/dyn3d_common/juldate.F
r1299 r1300 9 9 implicit real (a-h,o-z) 10 10 frac=((os/60.+om)/60.+oh)/24. 11 ojou=d float(ijou)+frac12 year=d float(ian)13 rmon=d float(imoi)11 ojou=dble(ijou)+frac 12 year=dble(ian) 13 rmon=dble(imoi) 14 14 if (imoi .le. 2) then 15 15 year=year-1. -
trunk/LMDZ.COMMON/libf/dyn3d_common/pres2lev_mod.F90
r1299 r1300 27 27 INTEGER, INTENT(IN) :: lmn ! dimensions nouvelle couches 28 28 29 INTEGER, INTENT(IN) :: ni,nj ! nombre de point horizontal 29 30 REAL, INTENT(IN) :: po(ni*nj,lmo) ! niveau de pression ancienne grille 30 31 REAL, INTENT(IN) :: pn(ni*nj,lmn) ! niveau de pression nouvelle grille 31 32 INTEGER, INTENT(IN) :: ni,nj ! nombre de point horizontal33 32 34 33 REAL, INTENT(IN) :: varo(ni*nj,lmo) ! var dans l'ancienne grille -
trunk/LMDZ.COMMON/libf/dyn3d_common/ran1.F
r1299 r1300 28 28 IX3=MOD(IA3*IX3+IC3,M3) 29 29 J=1+(97*IX3)/M3 30 IF(J.GT.97.OR.J.LT.1) PAUSE30 IF(J.GT.97.OR.J.LT.1) stop 1 31 31 RAN1=R(J) 32 32 R(J)=(REAL(IX1)+REAL(IX2)*RM2)*RM1 -
trunk/LMDZ.COMMON/libf/dyn3dpar/abort_gcm.F
r1019 r1300 1 1 ! 2 ! $Id: abort_gcm.F 1 748 2013-04-24 14:18:40Z emillour$2 ! $Id: abort_gcm.F 1907 2013-11-26 13:10:46Z lguez $ 3 3 ! 4 4 c … … 13 13 #endif 14 14 USE parallel_lmdz 15 16 17 18 15 19 #include "iniprint.h" 16 20 … … 37 41 c$OMP END MASTER 38 42 #endif 43 44 45 39 46 c call histclo(2) 40 47 c call histclo(3) … … 56 63 endif 57 64 END 65 -
trunk/LMDZ.COMMON/libf/dyn3dpar/bilan_dyn_p.F
r1019 r1300 1 1 ! 2 ! $Id: bilan_dyn_p.F 1 403 2010-07-01 09:02:53Z fairhead$2 ! $Id: bilan_dyn_p.F 1907 2013-11-26 13:10:46Z lguez $ 3 3 ! 4 4 SUBROUTINE bilan_dyn_p (ntrac,dt_app,dt_cum, … … 16 16 USE mod_hallo 17 17 use misc_mod 18 use write_field 18 use write_field_p 19 19 IMPLICIT NONE 20 20 … … 57 57 c ======= 58 58 59 integer icum,ncum 60 logical first 61 real zz,zqy,zfactv(jjm,llm) 62 63 integer nQ 64 parameter (nQ=7) 59 integer,save :: icum,ncum 60 !$OMP THREADPRIVATE(icum,ncum) 61 logical,SAVE :: first=.true. 62 !$OMP THREADPRIVATE(first) 63 64 real zz,zqy 65 real,save :: zfactv(jjm,llm) 66 67 integer,parameter :: nQ=7 65 68 66 69 67 70 cym character*6 nom(nQ) 68 71 cym character*6 unites(nQ) 69 character *6,save :: nom(nQ)70 character *6,save :: unites(nQ)71 72 character *10file72 character(len=6),save :: nom(nQ) 73 character(len=6),save :: unites(nQ) 74 75 character(len=10) file 73 76 integer ifile 74 77 parameter (ifile=4) 75 78 76 integer itemp,igeop,iecin,iang,iu,iovap,iun 77 integer i_sortie 78 79 save first,icum,ncum 80 save itemp,igeop,iecin,iang,iu,iovap,iun 81 save i_sortie 82 83 real time 84 integer itau 85 save time,itau 86 data time,itau/0.,0/ 87 88 data first/.true./ 89 data itemp,igeop,iecin,iang,iu,iovap,iun/1,2,3,4,5,6,7/ 90 data i_sortie/1/ 79 integer,PARAMETER :: itemp=1,igeop=2,iecin=3,iang=4,iu=5 80 INTEGER,PARAMETER :: iovap=6,iun=7 81 integer,PARAMETER :: i_sortie=1 82 83 real,SAVE :: time=0. 84 integer,SAVE :: itau=0. 85 !$OMP THREADPRIVATE(time,itau) 91 86 92 87 real ww 93 88 94 89 c variables dynamiques intermédiaires 95 REAL vcont(iip1,jjm,llm),ucont(iip1,jjp1,llm) 96 REAL ang(iip1,jjp1,llm),unat(iip1,jjp1,llm) 97 REAL massebx(iip1,jjp1,llm),masseby(iip1,jjm,llm) 98 REAL vorpot(iip1,jjm,llm) 99 REAL w(iip1,jjp1,llm),ecin(iip1,jjp1,llm),convm(iip1,jjp1,llm) 100 REAL bern(iip1,jjp1,llm) 90 REAL,save :: vcont(iip1,jjm,llm),ucont(iip1,jjp1,llm) 91 REAL,save :: ang(iip1,jjp1,llm),unat(iip1,jjp1,llm) 92 REAL,save :: massebx(iip1,jjp1,llm),masseby(iip1,jjm,llm) 93 REAL,save :: vorpot(iip1,jjm,llm) 94 REAL,save :: w(iip1,jjp1,llm),ecin(iip1,jjp1,llm) 95 REAL,save ::convm(iip1,jjp1,llm) 96 REAL,save :: bern(iip1,jjp1,llm) 101 97 102 98 c champ contenant les scalaires advectés. 103 real Q(iip1,jjp1,llm,nQ)99 real,save :: Q(iip1,jjp1,llm,nQ) 104 100 105 101 c champs cumulés 106 real ps_cum(iip1,jjp1) 107 real masse_cum(iip1,jjp1,llm) 108 real flux_u_cum(iip1,jjp1,llm) 109 real flux_v_cum(iip1,jjm,llm) 110 real Q_cum(iip1,jjp1,llm,nQ) 111 real flux_uQ_cum(iip1,jjp1,llm,nQ) 112 real flux_vQ_cum(iip1,jjm,llm,nQ) 113 real flux_wQ_cum(iip1,jjp1,llm,nQ) 114 real dQ(iip1,jjp1,llm,nQ) 115 116 save ps_cum,masse_cum,flux_u_cum,flux_v_cum 117 save Q_cum,flux_uQ_cum,flux_vQ_cum 102 real,save :: ps_cum(iip1,jjp1) 103 real,save :: masse_cum(iip1,jjp1,llm) 104 real,save :: flux_u_cum(iip1,jjp1,llm) 105 real,save :: flux_v_cum(iip1,jjm,llm) 106 real,save :: Q_cum(iip1,jjp1,llm,nQ) 107 real,save :: flux_uQ_cum(iip1,jjp1,llm,nQ) 108 real,save :: flux_vQ_cum(iip1,jjm,llm,nQ) 109 real,save :: flux_wQ_cum(iip1,jjp1,llm,nQ) 110 real,save :: dQ(iip1,jjp1,llm,nQ) 111 118 112 119 113 c champs de tansport en moyenne zonale … … 128 122 character*10,save :: zunites(ntr,nQ) 129 123 130 integer iave,itot,immc,itrs,istn131 data iave,itot,immc,itrs,istn/1,2,3,4,5/ 124 INTEGER,PARAMETER :: iave=1,itot=2,immc=3,itrs=4,istn=5 125 132 126 character*3 ctrs(ntr) 133 127 data ctrs/' ','TOT','MMC','TRS','STN'/ 134 128 135 real zvQ(jjm,llm,ntr,nQ),zvQtmp(jjm,llm)136 real zavQ(jjm,ntr,nQ),psiQ(jjm,llm+1,nQ)137 real zmasse(jjm,llm),zamasse(jjm)138 139 real zv(jjm,llm),psi(jjm,llm+1)129 real,save :: zvQ(jjm,llm,ntr,nQ),zvQtmp(jjm,llm) 130 real,save :: zavQ(jjm,ntr,nQ),psiQ(jjm,llm+1,nQ) 131 real,save :: zmasse(jjm,llm),zamasse(jjm) 132 133 real,save :: zv(jjm,llm),psi(jjm,llm+1) 140 134 141 135 integer i,j,l,iQ … … 151 145 save fileid 152 146 153 integer ndex3d(jjm*llm)147 integer,save :: ndex3d(jjm*llm) 154 148 155 149 C Variables locales … … 162 156 integer zan, dayref 163 157 C 164 real rlong(jjm),rlatg(jjm)158 real,save :: rlong(jjm),rlatg(jjm) 165 159 integer :: jjb,jje,jjn,ijb,ije 166 type(Request) :: Req 160 type(Request),SAVE :: Req 161 !$OMP THREADPRIVATE(Req) 167 162 168 163 ! definition du domaine d'ecriture pour le rebuild … … 182 177 c Initialisation 183 178 c===================================================================== 184 ndex3d=0185 179 if (adjust) return 186 180 … … 190 184 if (first) then 191 185 186 ndex3d=0 192 187 193 188 icum=0 … … 202 197 WRITE(lunout,*)'dt_cum=',dt_cum 203 198 stop 199 else 200 write(lunout,*) "bilan_dyn_p: ncum=",ncum 204 201 endif 205 202 206 if (i_sortie.eq.1) then 207 file='dynzon' 208 if (mpi_rank==0) then 209 call inigrads(ifile,1 210 s ,0.,180./pi,0.,0.,jjm,rlatv,-90.,90.,180./pi 211 s ,llm,presnivs,1. 212 s ,dt_cum,file,'dyn_zon ') 213 endif 214 endif 215 203 ! if (i_sortie.eq.1) then 204 ! file='dynzon' 205 ! if (mpi_rank==0) then 206 ! call inigrads(ifile,1 207 ! s ,0.,180./pi,0.,0.,jjm,rlatv,-90.,90.,180./pi 208 ! s ,llm,presnivs,1. 209 ! s ,dt_cum,file,'dyn_zon ') 210 ! endif 211 ! endif 212 213 !$OMP MASTER 216 214 nom(itemp)='T' 217 215 nom(igeop)='gz' … … 339 337 CALL histend(fileid) 340 338 341 339 !$OMP END MASTER 340 !$OMP BARRIER 342 341 endif 343 342 … … 351 350 352 351 c énergie cinétique 353 ucont(:,jjb:jje,:)=0352 ! ucont(:,jjb:jje,:)=0 354 353 355 354 call Register_Hallo(ucov,ip1jmp1,llm,1,1,1,1,Req) 356 355 call Register_Hallo(vcov,ip1jm,llm,1,1,1,1,Req) 357 356 call SendRequest(Req) 357 c$OMP BARRIER 358 358 call WaitRequest(Req) 359 c$OMP BARRIER 359 360 360 361 CALL covcont_p(llm,ucov,vcov,ucont,vcont) … … 362 363 363 364 c moment cinétique 365 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 364 366 do l=1,llm 365 367 ang(:,jjb:jje,l)=ucov(:,jjb:jje,l)+constang(:,jjb:jje) 366 368 unat(:,jjb:jje,l)=ucont(:,jjb:jje,l)*cu(:,jjb:jje) 367 369 enddo 368 369 Q(:,jjb:jje,:,itemp)=teta(:,jjb:jje,:)*pk(:,jjb:jje,:)/cpp 370 Q(:,jjb:jje,:,igeop)=phi(:,jjb:jje,:) 371 Q(:,jjb:jje,:,iecin)=ecin(:,jjb:jje,:) 372 Q(:,jjb:jje,:,iang)=ang(:,jjb:jje,:) 373 Q(:,jjb:jje,:,iu)=unat(:,jjb:jje,:) 374 Q(:,jjb:jje,:,iovap)=trac(:,jjb:jje,:,1) 375 Q(:,jjb:jje,:,iun)=1. 376 370 !$OMP END DO 371 372 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 373 DO l=1,llm 374 Q(:,jjb:jje,l,itemp)=teta(:,jjb:jje,l)*pk(:,jjb:jje,l)/cpp 375 Q(:,jjb:jje,l,igeop)=phi(:,jjb:jje,l) 376 Q(:,jjb:jje,l,iecin)=ecin(:,jjb:jje,l) 377 Q(:,jjb:jje,l,iang)=ang(:,jjb:jje,l) 378 Q(:,jjb:jje,l,iu)=unat(:,jjb:jje,l) 379 Q(:,jjb:jje,l,iovap)=trac(:,jjb:jje,l,1) 380 Q(:,jjb:jje,l,iun)=1. 381 ENDDO 382 !$OMP END DO NOWAIT 377 383 378 384 c===================================================================== … … 384 390 jje=jj_end 385 391 392 !$OMP MASTER 386 393 ps_cum(:,jjb:jje)=0. 387 masse_cum(:,jjb:jje,:)=0. 388 flux_u_cum(:,jjb:jje,:)=0. 389 Q_cum(:,jjb:jje,:,:)=0. 390 flux_uQ_cum(:,jjb:jje,:,:)=0. 391 if (pole_sud) jje=jj_end-1 392 flux_v_cum(:,jjb:jje,:)=0. 393 flux_vQ_cum(:,jjb:jje,:,:)=0. 394 !$OMP END MASTER 395 !$OMP BARRIER 396 397 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 398 DO l=1,llm 399 masse_cum(:,jjb:jje,l)=0. 400 flux_u_cum(:,jjb:jje,l)=0. 401 Q_cum(:,jjb:jje,l,:)=0. 402 flux_uQ_cum(:,jjb:jje,l,:)=0. 403 if (pole_sud) jje=jj_end-1 404 flux_v_cum(:,jjb:jje,l)=0. 405 flux_vQ_cum(:,jjb:jje,l,:)=0. 406 ENDDO 407 !$OMP END DO NOWAIT 394 408 endif 395 409 … … 402 416 jje=jj_end 403 417 418 !$OMP MASTER 404 419 ps_cum(:,jjb:jje)=ps_cum(:,jjb:jje)+ps(:,jjb:jje) 405 masse_cum(:,jjb:jje,:)=masse_cum(:,jjb:jje,:)+masse(:,jjb:jje,:) 406 flux_u_cum(:,jjb:jje,:)=flux_u_cum(:,jjb:jje,:) 407 . +flux_u(:,jjb:jje,:) 420 !$OMP END MASTER 421 !$OMP BARRIER 422 423 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 424 DO l=1,llm 425 masse_cum(:,jjb:jje,l)=masse_cum(:,jjb:jje,l)+masse(:,jjb:jje,l) 426 flux_u_cum(:,jjb:jje,l)=flux_u_cum(:,jjb:jje,l) 427 . +flux_u(:,jjb:jje,l) 428 ENDDO 429 !$OMP END DO NOWAIT 430 408 431 if (pole_sud) jje=jj_end-1 409 flux_v_cum(:,jjb:jje,:)=flux_v_cum(:,jjb:jje,:) 410 . +flux_v(:,jjb:jje,:) 411 412 jjb=jj_begin 413 jje=jj_end 414 415 do iQ=1,nQ 416 Q_cum(:,jjb:jje,:,iQ)=Q_cum(:,jjb:jje,:,iQ) 417 . +Q(:,jjb:jje,:,iQ)*masse(:,jjb:jje,:) 432 433 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 434 DO l=1,llm 435 flux_v_cum(:,jjb:jje,l)=flux_v_cum(:,jjb:jje,l) 436 . +flux_v(:,jjb:jje,l) 437 ENDDO 438 !$OMP END DO NOWAIT 439 440 jjb=jj_begin 441 jje=jj_end 442 443 do iQ=1,nQ 444 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 445 DO l=1,llm 446 Q_cum(:,jjb:jje,l,iQ)=Q_cum(:,jjb:jje,l,iQ) 447 . +Q(:,jjb:jje,l,iQ)*masse(:,jjb:jje,l) 448 ENDDO 449 !$OMP END DO NOWAIT 418 450 enddo 419 451 … … 425 457 c ----------------- 426 458 do iQ=1,nQ 459 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 427 460 do l=1,llm 428 461 do j=jjb,jje … … 434 467 enddo 435 468 enddo 469 !$OMP END DO NOWAIT 436 470 enddo 437 471 … … 442 476 enddo 443 477 call SendRequest(Req) 478 !$OMP BARRIER 444 479 call WaitRequest(Req) 445 480 !$OMP BARRIER 481 446 482 jjb=jj_begin 447 483 jje=jj_end … … 449 485 450 486 do iQ=1,nQ 487 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 451 488 do l=1,llm 452 489 do j=jjb,jje … … 457 494 enddo 458 495 enddo 496 !$OMP END DO NOWAIT 459 497 enddo 460 498 … … 467 505 call Register_Hallo(flux_vQ_cum,ip1jm,llm,2,2,2,2,Req) 468 506 call SendRequest(Req) 507 !$OMP BARRIER 469 508 call WaitRequest(Req) 509 c$OMP BARRIER 470 510 471 511 call convflu_p(flux_uQ_cum,flux_vQ_cum,llm*nQ,dQ) … … 475 515 call Register_Hallo(flux_v_cum,ip1jm,llm,2,2,2,2,Req) 476 516 call SendRequest(Req) 517 !$OMP BARRIER 477 518 call WaitRequest(Req) 519 c$OMP BARRIER 478 520 479 521 call convmas_p(flux_u_cum,flux_v_cum,convm) 480 522 CALL vitvert_p(convm,w) 481 482 jjb=jj_begin 483 jje=jj_end 484 485 do iQ=1,nQ 486 do l=1,llm-1 487 do j=jjb,jje 488 do i=1,iip1 489 ww=-0.5*w(i,j,l+1)*(Q(i,j,l,iQ)+Q(i,j,l+1,iQ)) 490 dQ(i,j,l ,iQ)=dQ(i,j,l ,iQ)-ww 491 dQ(i,j,l+1,iQ)=dQ(i,j,l+1,iQ)+ww 492 enddo 493 enddo 494 enddo 523 !$OMP BARRIER 524 525 jjb=jj_begin 526 jje=jj_end 527 528 do iQ=1,nQ 529 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 530 do l=1,llm 531 IF (l<llm) THEN 532 do j=jjb,jje 533 do i=1,iip1 534 ww=-0.5*w(i,j,l+1)*(Q(i,j,l,iQ)+Q(i,j,l+1,iQ)) 535 dQ(i,j,l ,iQ)=dQ(i,j,l ,iQ)-ww 536 dQ(i,j,l+1,iQ)=dQ(i,j,l+1,iQ)+ww 537 enddo 538 enddo 539 ENDIF 540 IF (l>2) THEN 541 do j=jjb,jje 542 do i=1,iip1 543 ww=-0.5*w(i,j,l)*(Q(i,j,l-1,iQ)+Q(i,j,l,iQ)) 544 dQ(i,j,l,iQ)=dQ(i,j,l,iQ)+ww 545 enddo 546 enddo 547 ENDIF 548 enddo 549 !$OMP ENDDO NOWAIT 495 550 enddo 496 551 IF (prt_level > 5) … … 505 560 . WRITE(lunout,*)'Pas d ecriture' 506 561 562 jjb=jj_begin 563 jje=jj_end 564 507 565 c Normalisation 508 566 do iQ=1,nQ 509 Q_cum(:,jjb:jje,:,iQ)=Q_cum(:,jjb:jje,:,iQ) 510 . /masse_cum(:,jjb:jje,:) 511 enddo 567 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 568 do l=1,llm 569 Q_cum(:,jjb:jje,l,iQ)=Q_cum(:,jjb:jje,l,iQ) 570 . /masse_cum(:,jjb:jje,l) 571 enddo 572 !$OMP ENDDO NOWAIT 573 enddo 574 512 575 zz=1./REAL(ncum) 513 576 514 jjb=jj_begin 515 jje=jj_end 516 577 !$OMP MASTER 517 578 ps_cum(:,jjb:jje)=ps_cum(:,jjb:jje)*zz 518 masse_cum(:,jjb:jje,:)=masse_cum(:,jjb:jje,:)*zz 519 flux_u_cum(:,jjb:jje,:)=flux_u_cum(:,jjb:jje,:)*zz 520 flux_uQ_cum(:,jjb:jje,:,:)=flux_uQ_cum(:,jjb:jje,:,:)*zz 521 dQ(:,jjb:jje,:,:)=dQ(:,jjb:jje,:,:)*zz 579 !$OMP END MASTER 580 581 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 582 DO l=1,llm 583 masse_cum(:,jjb:jje,l)=masse_cum(:,jjb:jje,l)*zz 584 flux_u_cum(:,jjb:jje,l)=flux_u_cum(:,jjb:jje,l)*zz 585 flux_uQ_cum(:,jjb:jje,l,:)=flux_uQ_cum(:,jjb:jje,l,:)*zz 586 dQ(:,jjb:jje,l,:)=dQ(:,jjb:jje,l,:)*zz 587 ENDDO 588 !$OMP ENDDO NOWAIT 589 522 590 523 591 IF (pole_sud) jje=jj_end-1 524 flux_v_cum(:,jjb:jje,:)=flux_v_cum(:,jjb:jje,:)*zz 525 flux_vQ_cum(:,jjb:jje,:,:)=flux_vQ_cum(:,jjb:jje,:,:)*zz 592 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 593 DO l=1,llm 594 flux_v_cum(:,jjb:jje,l)=flux_v_cum(:,jjb:jje,l)*zz 595 flux_vQ_cum(:,jjb:jje,l,:)=flux_vQ_cum(:,jjb:jje,l,:)*zz 596 ENDDO 597 !$OMP ENDDO 526 598 527 599 jjb=jj_begin … … 532 604 c division de dQ par la masse pour revenir aux bonnes grandeurs 533 605 do iQ=1,nQ 534 dQ(:,jjb:jje,:,iQ)=dQ(:,jjb:jje,:,iQ)/masse_cum(:,jjb:jje,:) 606 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 607 DO l=1,llm 608 dQ(:,jjb:jje,l,iQ)=dQ(:,jjb:jje,l,iQ)/masse_cum(:,jjb:jje,l) 609 ENDDO 610 !$OMP ENDDO NOWAIT 535 611 enddo 536 612 … … 545 621 if (pole_sud) jje=jj_end-1 546 622 547 zv(jjb:jje,:)=0. 548 zmasse(jjb:jje,:)=0. 623 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 624 DO l=1,llm 625 zv(jjb:jje,l)=0. 626 zmasse(jjb:jje,l)=0. 627 ENDDO 628 !$OMP ENDDO NOWAIT 549 629 550 630 call Register_Hallo(masse_cum,ip1jmp1,llm,1,1,1,1,Req) … … 554 634 555 635 call SendRequest(Req) 636 !$OMP BARRIER 556 637 call WaitRequest(Req) 638 c$OMP BARRIER 557 639 558 640 call massbar_p(masse_cum,massebx,masseby) … … 562 644 if (pole_sud) jje=jj_end-1 563 645 646 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 564 647 do l=1,llm 565 648 do j=jjb,jje … … 571 654 enddo 572 655 enddo 656 !$OMP ENDDO 573 657 574 658 c print*,'3OK' … … 609 693 psiQ=0. 610 694 do iQ=1,nQ 611 zvQtmp=0. 695 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 612 696 do l=1,llm 697 zvQtmp(:,l)=0. 613 698 do j=jjb,jje 614 699 c print*,'j,l,iQ=',j,l,iQ … … 633 718 enddo 634 719 enddo 720 !$OMP ENDDO NOWAIT 635 721 c fonction de courant meridienne pour la quantite Q 722 !$OMP BARRIER 723 !$OMP MASTER 636 724 do l=llm,1,-1 637 725 do j=jjb,jje … … 639 727 enddo 640 728 enddo 641 enddo 729 !$OMP END MASTER 730 !$OMP BARRIER 731 enddo ! of do iQ=1,nQ 642 732 643 733 c fonction de courant pour la circulation meridienne moyenne 734 !$OMP BARRIER 735 !$OMP MASTER 644 736 psi(jjb:jje,:)=0. 645 737 do l=llm,1,-1 … … 649 741 enddo 650 742 enddo 743 !$OMP END MASTER 744 !$OMP BARRIER 651 745 652 746 c print*,'4OK' 653 747 c sorties proprement dites 748 !$OMP MASTER 654 749 if (i_sortie.eq.1) then 655 750 jjb=jj_begin … … 669 764 s ,jjn*llm,ndex3d) 670 765 enddo 671 672 766 call histwrite(fileid,'masse',itau,zmasse(jjb:jje,1:llm) 673 767 s ,jjn*llm,ndex3d) … … 703 797 enddo 704 798 enddo 705 799 !$OMP END MASTER 800 !$OMP BARRIER 706 801 c on doit pouvoir tracer systematiquement la fonction de courant. 707 802 … … 712 807 c///////////////////////////////////////////////////////////////////// 713 808 c===================================================================== 714 715 809 return 716 810 end 811 -
trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F
r1189 r1300 15 15 use mod_filtre_fft, ONLY : use_filtre_fft 16 16 use mod_hallo, ONLY : use_mpi_alloc 17 use parallel_lmdz, ONLY : omp_chunk18 17 USE control_mod 19 18 USE infotrac, ONLY : type_trac … … 587 586 use_mpi_alloc=.FALSE. 588 587 CALL getin('use_mpi_alloc',use_mpi_alloc) 589 590 !Config Key = omp_chunk591 !Config Desc = taille des blocs openmp592 !Config Def = 1593 !Config Help = defini la taille des packets d'iteration openmp594 !Config distribuee a chaque tache lors de l'entree dans une595 !Config boucle parallelisee596 597 omp_chunk=1598 CALL getin('omp_chunk',omp_chunk)599 588 600 589 !Config key = ok_strato … … 1016 1005 write(lunout,*)' use_filtre_fft = ', use_filtre_fft 1017 1006 write(lunout,*)' use_mpi_alloc = ', use_mpi_alloc 1018 write(lunout,*)' omp_chunk = ', omp_chunk1019 1007 write(lunout,*)' ok_strato = ', ok_strato 1020 1008 write(lunout,*)' ok_gradsfile = ', ok_gradsfile -
trunk/LMDZ.COMMON/libf/dyn3dpar/gcm.F
r1107 r1300 10 10 #endif 11 11 12 13 #ifdef CPP_XIOS14 ! ug Pour les sorties XIOS15 USE wxios16 #endif17 12 18 13 USE mod_const_mpi, ONLY: init_const_mpi … … 193 188 c Initialisation partie parallele 194 189 c------------------------------------ 190 195 191 CALL init_const_mpi 196 197 192 call init_parallel 198 193 call ini_getparam("out.def") … … 225 220 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 226 221 227 #ifdef CPP_XIOS228 CALL wxios_init("LMDZ")229 #endif230 222 231 223 c … … 362 354 start_time = starttime 363 355 ELSE 364 WRITE(lunout,*)'Je m''arrete' 365 CALL abort 356 call abort_gcm("gcm", "'Je m''arrete'", 1) 366 357 ENDIF 367 358 ENDIF -
trunk/LMDZ.COMMON/libf/dyn3dpar/guide_p_mod.F90
r1019 r1300 91 91 CALL getpar('guide_teta',.false.,guide_teta,'guidage de T par Teta') 92 92 93 CALL getpar('guide_add',.false.,guide_add,'for �age constant?')93 CALL getpar('guide_add',.false.,guide_add,'for�age constant?') 94 94 CALL getpar('guide_zon',.false.,guide_zon,'guidage moy zonale') 95 95 … … 108 108 CALL getpar('guide_BL',.true.,guide_BL,'guidage dans C.Lim') 109 109 110 ! Sauvegarde du for �age110 ! Sauvegarde du for�age 111 111 CALL getpar('guide_sav',.false.,guide_sav,'sauvegarde guidage') 112 112 CALL getpar('iguide_sav',4,iguide_sav,'freq. sauvegarde guidage') … … 155 155 ncidpl=-99 156 156 if (guide_plevs.EQ.1) then 157 if (ncidpl.eq.-99) rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl) 157 if (ncidpl.eq.-99) then 158 rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl) 159 if (rcod.NE.NF_NOERR) THEN 160 print *,'Guide: probleme -> pas de fichier apbp.nc' 161 CALL abort_gcm(modname,abort_message,1) 162 endif 163 endif 158 164 elseif (guide_plevs.EQ.2) then 159 if (ncidpl.EQ.-99) rcod=nf90_open('P.nc',Nf90_NOWRITe,ncidpl) 165 if (ncidpl.EQ.-99) then 166 rcod=nf90_open('P.nc',Nf90_NOWRITe,ncidpl) 167 if (rcod.NE.NF_NOERR) THEN 168 print *,'Guide: probleme -> pas de fichier P.nc' 169 CALL abort_gcm(modname,abort_message,1) 170 endif 171 endif 160 172 elseif (guide_u) then 161 if (ncidpl.eq.-99) rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl) 173 if (ncidpl.eq.-99) then 174 rcod=nf90_open('u.nc',Nf90_NOWRITe,ncidpl) 175 if (rcod.NE.NF_NOERR) THEN 176 print *,'Guide: probleme -> pas de fichier u.nc' 177 CALL abort_gcm(modname,abort_message,1) 178 endif 179 endif 162 180 elseif (guide_v) then 163 if (ncidpl.eq.-99) rcod=nf90_open('v.nc',nf90_nowrite,ncidpl) 181 if (ncidpl.eq.-99) then 182 rcod=nf90_open('v.nc',nf90_nowrite,ncidpl) 183 if (rcod.NE.NF_NOERR) THEN 184 print *,'Guide: probleme -> pas de fichier v.nc' 185 CALL abort_gcm(modname,abort_message,1) 186 endif 187 endif 164 188 elseif (guide_T) then 165 if (ncidpl.eq.-99) rcod=nf90_open('T.nc',nf90_nowrite,ncidpl) 189 if (ncidpl.eq.-99) then 190 rcod=nf90_open('T.nc',nf90_nowrite,ncidpl) 191 if (rcod.NE.NF_NOERR) THEN 192 print *,'Guide: probleme -> pas de fichier T.nc' 193 CALL abort_gcm(modname,abort_message,1) 194 endif 195 endif 166 196 elseif (guide_Q) then 167 if (ncidpl.eq.-99) rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl) 197 if (ncidpl.eq.-99) then 198 rcod=nf90_open('hur.nc',nf90_nowrite, ncidpl) 199 if (rcod.NE.NF_NOERR) THEN 200 print *,'Guide: probleme -> pas de fichier hur.nc' 201 CALL abort_gcm(modname,abort_message,1) 202 endif 203 endif 168 204 endif 169 205 error=NF_INQ_DIMID(ncidpl,'LEVEL',rid) … … 292 328 !======================================================================= 293 329 SUBROUTINE guide_main(itau,ucov,vcov,teta,q,masse,ps) 294 useparallel_lmdz330 USE parallel_lmdz 295 331 USE control_mod 296 332 … … 1231 1267 INTEGER :: status,rcode 1232 1268 1269 CHARACTER (len = 80) :: abort_message 1270 CHARACTER (len = 20) :: modname = 'guide_read' 1233 1271 ! ----------------------------------------------------------------- 1234 1272 ! Premier appel: initialisation de la lecture des fichiers … … 1241 1279 print *,'Lecture du guidage sur niveaux modele' 1242 1280 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 1281 IF (rcode.NE.NF_NOERR) THEN 1282 print *,'Guide: probleme -> pas de fichier apbp.nc' 1283 CALL abort_gcm(modname,abort_message,1) 1284 ENDIF 1243 1285 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 1286 IF (rcode.NE.NF_NOERR) THEN 1287 print *,'Guide: probleme -> pas de variable AP, fichier apbp.nc' 1288 CALL abort_gcm(modname,abort_message,1) 1289 ENDIF 1244 1290 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1291 IF (rcode.NE.NF_NOERR) THEN 1292 print *,'Guide: probleme -> pas de variable BP, fichier apbp.nc' 1293 CALL abort_gcm(modname,abort_message,1) 1294 ENDIF 1245 1295 print*,'ncidpl,varidap',ncidpl,varidap 1246 1296 endif … … 1248 1298 if (guide_plevs.EQ.2) then 1249 1299 rcode = nf90_open('P.nc', nf90_nowrite, ncidp) 1300 IF (rcode.NE.NF_NOERR) THEN 1301 print *,'Guide: probleme -> pas de fichier P.nc' 1302 CALL abort_gcm(modname,abort_message,1) 1303 ENDIF 1250 1304 rcode = nf90_inq_varid(ncidp, 'PRES', varidp) 1305 IF (rcode.NE.NF_NOERR) THEN 1306 print *,'Guide: probleme -> pas de variable PRES, fichier P.nc' 1307 CALL abort_gcm(modname,abort_message,1) 1308 ENDIF 1251 1309 print*,'ncidp,varidp',ncidp,varidp 1252 1310 if (ncidpl.eq.-99) ncidpl=ncidp … … 1255 1313 if (guide_u) then 1256 1314 rcode = nf90_open('u.nc', nf90_nowrite, ncidu) 1315 IF (rcode.NE.NF_NOERR) THEN 1316 print *,'Guide: probleme -> pas de fichier u.nc' 1317 CALL abort_gcm(modname,abort_message,1) 1318 ENDIF 1257 1319 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 1320 IF (rcode.NE.NF_NOERR) THEN 1321 print *,'Guide: probleme -> pas de variable UWND, fichier u.nc' 1322 CALL abort_gcm(modname,abort_message,1) 1323 ENDIF 1258 1324 print*,'ncidu,varidu',ncidu,varidu 1259 1325 if (ncidpl.eq.-99) ncidpl=ncidu … … 1262 1328 if (guide_v) then 1263 1329 rcode = nf90_open('v.nc', nf90_nowrite, ncidv) 1330 IF (rcode.NE.NF_NOERR) THEN 1331 print *,'Guide: probleme -> pas de fichier v.nc' 1332 CALL abort_gcm(modname,abort_message,1) 1333 ENDIF 1264 1334 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 1335 IF (rcode.NE.NF_NOERR) THEN 1336 print *,'Guide: probleme -> pas de variable VWND, fichier v.nc' 1337 CALL abort_gcm(modname,abort_message,1) 1338 ENDIF 1265 1339 print*,'ncidv,varidv',ncidv,varidv 1266 1340 if (ncidpl.eq.-99) ncidpl=ncidv … … 1269 1343 if (guide_T) then 1270 1344 rcode = nf90_open('T.nc', nf90_nowrite, ncidt) 1345 IF (rcode.NE.NF_NOERR) THEN 1346 print *,'Guide: probleme -> pas de fichier T.nc' 1347 CALL abort_gcm(modname,abort_message,1) 1348 ENDIF 1271 1349 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 1350 IF (rcode.NE.NF_NOERR) THEN 1351 print *,'Guide: probleme -> pas de variable AIR, fichier T.nc' 1352 CALL abort_gcm(modname,abort_message,1) 1353 ENDIF 1272 1354 print*,'ncidT,varidT',ncidt,varidt 1273 1355 if (ncidpl.eq.-99) ncidpl=ncidt … … 1276 1358 if (guide_Q) then 1277 1359 rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ) 1360 IF (rcode.NE.NF_NOERR) THEN 1361 print *,'Guide: probleme -> pas de fichier hur.nc' 1362 CALL abort_gcm(modname,abort_message,1) 1363 ENDIF 1278 1364 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 1365 IF (rcode.NE.NF_NOERR) THEN 1366 print *,'Guide: probleme -> pas de variable RH, fichier hur.nc' 1367 CALL abort_gcm(modname,abort_message,1) 1368 ENDIF 1279 1369 print*,'ncidQ,varidQ',ncidQ,varidQ 1280 1370 if (ncidpl.eq.-99) ncidpl=ncidQ … … 1283 1373 if ((guide_P).OR.(guide_plevs.EQ.1)) then 1284 1374 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1375 IF (rcode.NE.NF_NOERR) THEN 1376 print *,'Guide: probleme -> pas de fichier ps.nc' 1377 CALL abort_gcm(modname,abort_message,1) 1378 ENDIF 1285 1379 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 1380 IF (rcode.NE.NF_NOERR) THEN 1381 print *,'Guide: probleme -> pas de variable SP, fichier ps.nc' 1382 CALL abort_gcm(modname,abort_message,1) 1383 ENDIF 1286 1384 print*,'ncidps,varidps',ncidps,varidps 1287 1385 endif … … 1434 1532 INTEGER :: i 1435 1533 1534 CHARACTER (len = 80) :: abort_message 1535 CHARACTER (len = 20) :: modname = 'guide_read2D' 1436 1536 ! ----------------------------------------------------------------- 1437 1537 ! Premier appel: initialisation de la lecture des fichiers … … 1442 1542 ! Ap et Bp si niveaux de pression hybrides 1443 1543 if (guide_plevs.EQ.1) then 1444 print *,'Lecture du guidage sur niveaux mod �le'1544 print *,'Lecture du guidage sur niveaux mod�le' 1445 1545 rcode = nf90_open('apbp.nc', nf90_nowrite, ncidpl) 1546 IF (rcode.NE.NF_NOERR) THEN 1547 print *,'Guide: probleme -> pas de fichier apbp.nc' 1548 CALL abort_gcm(modname,abort_message,1) 1549 ENDIF 1446 1550 rcode = nf90_inq_varid(ncidpl, 'AP', varidap) 1551 IF (rcode.NE.NF_NOERR) THEN 1552 print *,'Guide: probleme -> pas de variable AP, fichier apbp.nc' 1553 CALL abort_gcm(modname,abort_message,1) 1554 ENDIF 1447 1555 rcode = nf90_inq_varid(ncidpl, 'BP', varidbp) 1556 IF (rcode.NE.NF_NOERR) THEN 1557 print *,'Guide: probleme -> pas de variable BP, fichier apbp.nc' 1558 CALL abort_gcm(modname,abort_message,1) 1559 ENDIF 1448 1560 print*,'ncidpl,varidap',ncidpl,varidap 1449 1561 endif … … 1451 1563 if (guide_plevs.EQ.2) then 1452 1564 rcode = nf90_open('P.nc', nf90_nowrite, ncidp) 1565 IF (rcode.NE.NF_NOERR) THEN 1566 print *,'Guide: probleme -> pas de fichier P.nc' 1567 CALL abort_gcm(modname,abort_message,1) 1568 ENDIF 1453 1569 rcode = nf90_inq_varid(ncidp, 'PRES', varidp) 1570 IF (rcode.NE.NF_NOERR) THEN 1571 print *,'Guide: probleme -> pas de variable PRES, fichier P.nc' 1572 CALL abort_gcm(modname,abort_message,1) 1573 ENDIF 1454 1574 print*,'ncidp,varidp',ncidp,varidp 1455 1575 if (ncidpl.eq.-99) ncidpl=ncidp … … 1458 1578 if (guide_u) then 1459 1579 rcode = nf90_open('u.nc', nf90_nowrite, ncidu) 1580 IF (rcode.NE.NF_NOERR) THEN 1581 print *,'Guide: probleme -> pas de fichier u.nc' 1582 CALL abort_gcm(modname,abort_message,1) 1583 ENDIF 1460 1584 rcode = nf90_inq_varid(ncidu, 'UWND', varidu) 1585 IF (rcode.NE.NF_NOERR) THEN 1586 print *,'Guide: probleme -> pas de variable UWND, fichier u.nc' 1587 CALL abort_gcm(modname,abort_message,1) 1588 ENDIF 1461 1589 print*,'ncidu,varidu',ncidu,varidu 1462 1590 if (ncidpl.eq.-99) ncidpl=ncidu … … 1465 1593 if (guide_v) then 1466 1594 rcode = nf90_open('v.nc', nf90_nowrite, ncidv) 1595 IF (rcode.NE.NF_NOERR) THEN 1596 print *,'Guide: probleme -> pas de fichier v.nc' 1597 CALL abort_gcm(modname,abort_message,1) 1598 ENDIF 1467 1599 rcode = nf90_inq_varid(ncidv, 'VWND', varidv) 1600 IF (rcode.NE.NF_NOERR) THEN 1601 print *,'Guide: probleme -> pas de variable VWND, fichier v.nc' 1602 CALL abort_gcm(modname,abort_message,1) 1603 ENDIF 1468 1604 print*,'ncidv,varidv',ncidv,varidv 1469 1605 if (ncidpl.eq.-99) ncidpl=ncidv … … 1472 1608 if (guide_T) then 1473 1609 rcode = nf90_open('T.nc', nf90_nowrite, ncidt) 1610 IF (rcode.NE.NF_NOERR) THEN 1611 print *,'Guide: probleme -> pas de fichier T.nc' 1612 CALL abort_gcm(modname,abort_message,1) 1613 ENDIF 1474 1614 rcode = nf90_inq_varid(ncidt, 'AIR', varidt) 1615 IF (rcode.NE.NF_NOERR) THEN 1616 print *,'Guide: probleme -> pas de variable AIR, fichier T.nc' 1617 CALL abort_gcm(modname,abort_message,1) 1618 ENDIF 1475 1619 print*,'ncidT,varidT',ncidt,varidt 1476 1620 if (ncidpl.eq.-99) ncidpl=ncidt … … 1479 1623 if (guide_Q) then 1480 1624 rcode = nf90_open('hur.nc', nf90_nowrite, ncidQ) 1625 IF (rcode.NE.NF_NOERR) THEN 1626 print *,'Guide: probleme -> pas de fichier hur.nc' 1627 CALL abort_gcm(modname,abort_message,1) 1628 ENDIF 1481 1629 rcode = nf90_inq_varid(ncidQ, 'RH', varidQ) 1630 IF (rcode.NE.NF_NOERR) THEN 1631 print *,'Guide: probleme -> pas de variable RH, fichier hur.nc' 1632 CALL abort_gcm(modname,abort_message,1) 1633 ENDIF 1482 1634 print*,'ncidQ,varidQ',ncidQ,varidQ 1483 1635 if (ncidpl.eq.-99) ncidpl=ncidQ … … 1486 1638 if ((guide_P).OR.(guide_plevs.EQ.1)) then 1487 1639 rcode = nf90_open('ps.nc', nf90_nowrite, ncidps) 1640 IF (rcode.NE.NF_NOERR) THEN 1641 print *,'Guide: probleme -> pas de fichier ps.nc' 1642 CALL abort_gcm(modname,abort_message,1) 1643 ENDIF 1488 1644 rcode = nf90_inq_varid(ncidps, 'SP', varidps) 1645 IF (rcode.NE.NF_NOERR) THEN 1646 print *,'Guide: probleme -> pas de variable SP, fichier ps.nc' 1647 CALL abort_gcm(modname,abort_message,1) 1648 ENDIF 1489 1649 print*,'ncidps,varidps',ncidps,varidps 1490 1650 endif … … 1710 1870 #endif 1711 1871 ! -------------------------------------------------------------------- 1712 ! Cr �ation des variables sauvegard�es1872 ! Cr�ation des variables sauvegard�es 1713 1873 ! -------------------------------------------------------------------- 1714 1874 ierr = NF_REDEF(nid) … … 1836 1996 !=========================================================================== 1837 1997 END MODULE guide_p_mod 1998 -
trunk/LMDZ.COMMON/libf/dyn3dpar/leapfrog_p.F
r1190 r1300 29 29 use sponge_mod_p, only: callsponge,mode_sponge,sponge_p 30 30 use comuforc_h 31 32 #ifdef CPP_XIOS33 ! ug Pour les sorties XIOS34 USE wxios35 #endif36 31 37 32 IMPLICIT NONE … … 1545 1540 c$OMP BARRIER 1546 1541 RETURN 1547 ENDIF 1542 ENDIF ! of IF (itau==itaumax) 1548 1543 1549 1544 IF ( .NOT.purmats ) THEN … … 1579 1574 1580 1575 c$OMP MASTER 1581 1582 #ifdef CPP_XIOS1583 !Fermeture propre de XIOS1584 CALL wxios_close()1585 #endif1586 1576 call fin_getparam 1587 1577 call finalize_parallel … … 1604 1594 #ifdef CPP_IOIPSL 1605 1595 IF (ok_dynzon) THEN 1606 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest) 1607 call SendRequest(TestRequest) 1608 c$OMP BARRIER 1609 call WaitRequest(TestRequest) 1610 c$OMP BARRIER 1611 c$OMP MASTER 1612 ! CALL writedynav_p(histaveid, itau,vcov , 1613 ! , ucov,teta,pk,phi,q,masse,ps,phis) 1614 1615 c ATTENTION!!! bilan_dyn_p ne marche probablement pas avec OpenMP 1616 ! CALL bilan_dyn_p(2,dtvr*iperiod,dtvr*day_step*periodav, 1617 ! , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 1596 CALL bilan_dyn_p(2,dtvr*iperiod,dtvr*day_step*periodav, 1597 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 1618 1598 c les traceurs ne sont pas sortis, trop lourd. 1619 1599 c Peut changer eventuellement si besoin. 1620 CALL bilan_dyn_p(dtvr*iperiod,dtvr*day_step*periodav, 1621 & ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov, 1622 & du,dudis,dutop,dufi) 1623 c$OMP END MASTER 1600 ! CALL bilan_dyn_p(dtvr*iperiod,dtvr*day_step*periodav, 1601 ! & ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov, 1602 ! & du,dudis,dutop,dufi) 1624 1603 ENDIF !ok_dynzon 1625 1604 #endif … … 1828 1807 #ifdef CPP_IOIPSL 1829 1808 IF (ok_dynzon) THEN 1830 c$OMP BARRIER 1831 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest) 1832 call SendRequest(TestRequest) 1833 c$OMP BARRIER 1834 call WaitRequest(TestRequest) 1835 c$OMP BARRIER 1836 c$OMP MASTER 1837 ! CALL writedynav_p(histaveid, itau,vcov , 1838 ! , ucov,teta,pk,phi,q,masse,ps,phis) 1839 ! CALL bilan_dyn_p(2,dtvr*iperiod,dtvr*day_step*periodav, 1840 ! , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 1809 CALL bilan_dyn_p(2,dtvr*iperiod,dtvr*day_step*periodav, 1810 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 1841 1811 c les traceurs ne sont pas sortis, trop lourd. 1842 1812 c Peut changer eventuellement si besoin. 1843 CALL bilan_dyn_p(dtvr*iperiod,dtvr*day_step*periodav, 1844 & ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov, 1845 & du,dudis,dutop,dufi) 1846 1847 c$OMP END MASTER 1813 ! CALL bilan_dyn_p(dtvr*iperiod,dtvr*day_step*periodav, 1814 ! & ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov, 1815 ! & du,dudis,dutop,dufi) 1848 1816 END IF !ok_dynzon 1849 1817 #endif -
trunk/LMDZ.COMMON/libf/dyn3dpar/mod_const_mpi.F90
r979 r1300 3 3 ! 4 4 MODULE mod_const_mpi 5 5 IMPLICIT NONE 6 6 INTEGER,SAVE :: COMM_LMDZ 7 7 INTEGER,SAVE :: MPI_REAL_LMDZ … … 12 12 SUBROUTINE Init_const_mpi 13 13 #ifdef CPP_IOIPSL 14 USE IOIPSL 14 USE IOIPSL, ONLY: getin 15 15 #else 16 16 ! if not using IOIPSL, we still need to use (a local version of) getin 17 USE ioipsl_getincom 17 USE ioipsl_getincom, only: getin 18 18 #endif 19 19 … … 22 22 INCLUDE 'mpif.h' 23 23 #endif 24 24 25 INTEGER :: ierr 25 26 INTEGER :: comp_id … … 51 52 52 53 SUBROUTINE Init_mpi 54 #ifdef CPP_XIOS 55 USE wxios, only: wxios_init 56 #endif 53 57 IMPLICIT NONE 54 58 #ifdef CPP_MPI … … 70 74 COMM_LMDZ=MPI_COMM_WORLD 71 75 MPI_REAL_LMDZ=MPI_REAL8 76 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 77 ! Initialisation de XIOS 78 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 79 #ifdef CPP_XIOS 80 CALL wxios_init("LMDZ", outcom=COMM_LMDZ) 81 #endif 72 82 !$OMP END MASTER 83 #else 84 #ifdef CPP_XIOS 85 !$OMP MASTER 86 CALL wxios_init("LMDZ") 87 !$OMP END MASTER 88 #endif 73 89 #endif 74 90 … … 76 92 77 93 END MODULE mod_const_mpi 94 -
trunk/LMDZ.COMMON/libf/dyn3dpar/parallel_lmdz.F90
r1019 r1300 4 4 module parallel_lmdz 5 5 USE mod_const_mpi 6 #ifdef CPP_IOIPSL 7 use IOIPSL, only: getin 8 #else 9 ! if not using IOIPSL, we still need to use (a local version of) getin 10 use ioipsl_getincom, only: getin 11 #endif 6 12 7 13 LOGICAL,SAVE :: using_mpi=.TRUE. … … 155 161 omp_size=OMP_GET_NUM_THREADS() 156 162 !$OMP END MASTER 163 !$OMP BARRIER 157 164 omp_rank=OMP_GET_THREAD_NUM() 165 166 !Config Key = omp_chunk 167 !Config Desc = taille des blocs openmp 168 !Config Def = 1 169 !Config Help = defini la taille des packets d'it�ration openmp 170 !Config distribue a chaque tache lors de l'entree dans une 171 !Config boucle parallelisee 172 173 !$OMP MASTER 174 omp_chunk=(llm+1)/omp_size 175 IF (MOD(llm+1,omp_size)/=0) omp_chunk=omp_chunk+1 176 CALL getin('omp_chunk',omp_chunk) 177 !$OMP END MASTER 178 !$OMP BARRIER 158 179 #else 159 180 omp_size=1 … … 199 220 200 221 subroutine Finalize_parallel 222 #ifdef CPP_XIOS 223 ! ug Pour les sorties XIOS 224 USE wxios 225 #endif 201 226 #ifdef CPP_COUPLE 202 227 use mod_prism_proto … … 234 259 #endif 235 260 else 261 #ifdef CPP_XIOS 262 !Fermeture propre de XIOS 263 CALL wxios_close() 264 #endif 236 265 #ifdef CPP_MPI 237 266 IF (using_mpi) call MPI_FINALIZE(ierr) -
trunk/LMDZ.COMMON/makelmdz
r1107 r1300 25 25 fcm_path=none 26 26 cosp=false 27 sisvat=false 27 28 bands="" 28 29 scatterers="" … … 38 39 arch="SX8_BRODIE" 39 40 fi 40 if [[ "${machine:0:6}" == "vargas" ]] 41 then 42 arch="PW6_VARGAS" 43 fi 44 if [[ "${machine:0:6}" == "ada338" ]] 45 then 46 arch="PW6_VARGAS" 41 if [[ "${machine:0:3}" == "ada" ]] 42 then 43 arch="X64_ADA" 47 44 fi 48 45 if [[ "${machine:0:6}" == "ciclad" ]] … … 90 87 91 88 CPP_KEY="" 92 INCLUDE='-I$(LIBF)/grid -I$(LIBF)/bibio -I$(LIBF)/ filtrez -I. '89 INCLUDE='-I$(LIBF)/grid -I$(LIBF)/bibio -I$(LIBF)/dyn3d_common -I$(LIBF)/filtrez -I. ' 93 90 LIB="" 94 91 adjnt="" … … 195 192 cosp="$2" ; shift ; shift ;; 196 193 194 "-sisvat") 195 sisvat="$2" ; shift ; shift ;; 196 197 197 "-mem") 198 198 paramem="mem" ; shift ;; … … 434 434 INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}" 435 435 LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl" 436 elif [[ $io == xios ]] 437 then 438 # For now, xios implies also using ioipsl 439 CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS" 440 INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}" 441 LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios" 436 442 fi 437 443 … … 444 450 lcosp="-l${LIBPREFIX}cosp" 445 451 INCLUDE="$INCLUDE"' -I$(LIBF)/cosp' 452 fi 453 454 if [[ "$sisvat" == "true" ]] 455 then 456 CPP_KEY="$CPP_KEY CPP_SISVAT" 446 457 fi 447 458 -
trunk/LMDZ.COMMON/makelmdz_fcm
r1107 r1300 22 22 couple=false 23 23 veget=false 24 sisvat=false 24 25 chimie=false 25 26 chemistry=false … … 134 135 veget="$2" ; shift ; shift ;; 135 136 137 "-sisvat") 138 sisvat="$2" ; shift ; shift ;; 139 136 140 "-chimie") 137 141 chimie="$2" ; shift ; shift ;; … … 287 291 fi 288 292 if [[ "$veget" == "orchidee2.0" ]] ; then 289 orch_libs= orchidee293 orch_libs="sechiba parameters stomate parallel orglob orchidee" 290 294 else 291 295 orch_libs="sechiba parameters stomate parallel orglob" … … 303 307 fi 304 308 309 if [[ "$sisvat" == "true" ]] 310 then 311 CPP_KEY="$CPP_KEY CPP_SISVAT" 312 sed -e 's/^#src::sisvat/src::sisvat/' bld.cfg > bld.tmp 313 mv bld.tmp bld.cfg 314 fi 315 305 316 if [[ $io == ioipsl ]] 306 317 then … … 308 319 INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}" 309 320 LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl" 321 elif [[ $io == xios ]] 322 then 323 # For now, xios implies also using ioipsl 324 CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS" 325 INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}" 326 LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios" 310 327 fi 311 328 … … 549 566 ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/tmp tmp_src 550 567 568 #eventual cleanup for SISVAT 569 sed -e 's/^src::sisvat/#src::sisvat/' bld.cfg > bld.tmp 570 mv bld.tmp bld.cfg 571 572 551 573 if [[ -r $LIBFGCM/grid/dimensions.h ]] 552 574 then
Note: See TracChangeset
for help on using the changeset viewer.