- Timestamp:
- Aug 21, 2015, 9:23:13 AM (9 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/condsurf.F90
r2311 r2344 6 6 USE mod_phys_lmdz_para 7 7 USE indice_sol_mod 8 USE time_phylmdz_mod, ONLY: annee_ref 8 9 IMPLICIT NONE 9 10 … … 24 25 INTEGER epais(2) 25 26 26 ! ym#include "dimensions.h"27 ! ym#include "dimphy.h"28 include "temps.h"29 27 include "clesphys.h" 30 28 -
LMDZ5/trunk/libf/phylmd/conf_phys_m.F90
r2311 r2344 27 27 USE phys_cal_mod 28 28 USE carbon_cycle_mod, ONLY : carbon_cycle_tr, carbon_cycle_cpl 29 USE control_mod30 29 USE mod_grid_phy_lmdz, only: klon_glo 31 30 USE print_control_mod, ONLY: lunout -
LMDZ5/trunk/libf/phylmd/cpl_mod.F90
r2311 r2344 24 24 USE oasis 25 25 USE write_field_phy 26 USE control_mod27 26 ! USE control_mod 27 USE time_phylmdz_mod, ONLY: day_step_phy 28 28 29 29 ! Global attributes … … 102 102 USE surface_data 103 103 USE indice_sol_mod 104 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 105 USE time_phylmdz_mod, ONLY: annee_ref, day_ini, itau_phy, itaufin_phy 104 106 USE print_control_mod, ONLY: lunout 105 106 INCLUDE "dimensions.h"107 INCLUDE "temps.h"108 107 109 108 ! Input arguments … … 121 120 INTEGER :: npas ! only for OASIS2 122 121 REAL :: zjulian 123 REAL, DIMENSION( iim,jjm+1):: zx_lon, zx_lat122 REAL, DIMENSION(nbp_lon,nbp_lat) :: zx_lon, zx_lat 124 123 CHARACTER(len = 20) :: modname = 'cpl_init' 125 124 CHARACTER(len = 80) :: abort_message … … 131 130 !************************************************************************************* 132 131 133 npas = itaufin / iphysiq132 npas = itaufin_phy 134 133 ! nexca = 86400 / dtime 135 134 nexca = t_coupl / dtime … … 172 171 ALLOCATE(cpl_taumod(klon,2), stat = error) 173 172 sum_error = sum_error + error 174 ALLOCATE(cpl_rriv2D( iim,jj_nb), stat=error)175 sum_error = sum_error + error 176 ALLOCATE(cpl_rcoa2D( iim,jj_nb), stat=error)177 sum_error = sum_error + error 178 ALLOCATE(cpl_rlic2D( iim,jj_nb), stat=error)179 sum_error = sum_error + error 180 ALLOCATE(read_sst( iim, jj_nb), stat = error)181 sum_error = sum_error + error 182 ALLOCATE(read_sic( iim, jj_nb), stat = error)183 sum_error = sum_error + error 184 ALLOCATE(read_sit( iim, jj_nb), stat = error)185 sum_error = sum_error + error 186 ALLOCATE(read_alb_sic( iim, jj_nb), stat = error)187 sum_error = sum_error + error 188 ALLOCATE(read_u0( iim, jj_nb), stat = error)189 sum_error = sum_error + error 190 ALLOCATE(read_v0( iim, jj_nb), stat = error)173 ALLOCATE(cpl_rriv2D(nbp_lon,jj_nb), stat=error) 174 sum_error = sum_error + error 175 ALLOCATE(cpl_rcoa2D(nbp_lon,jj_nb), stat=error) 176 sum_error = sum_error + error 177 ALLOCATE(cpl_rlic2D(nbp_lon,jj_nb), stat=error) 178 sum_error = sum_error + error 179 ALLOCATE(read_sst(nbp_lon, jj_nb), stat = error) 180 sum_error = sum_error + error 181 ALLOCATE(read_sic(nbp_lon, jj_nb), stat = error) 182 sum_error = sum_error + error 183 ALLOCATE(read_sit(nbp_lon, jj_nb), stat = error) 184 sum_error = sum_error + error 185 ALLOCATE(read_alb_sic(nbp_lon, jj_nb), stat = error) 186 sum_error = sum_error + error 187 ALLOCATE(read_u0(nbp_lon, jj_nb), stat = error) 188 sum_error = sum_error + error 189 ALLOCATE(read_v0(nbp_lon, jj_nb), stat = error) 191 190 sum_error = sum_error + error 192 191 193 192 IF (carbon_cycle_cpl) THEN 194 ALLOCATE(read_co2( iim, jj_nb), stat = error)193 ALLOCATE(read_co2(nbp_lon, jj_nb), stat = error) 195 194 sum_error = sum_error + error 196 195 ALLOCATE(cpl_atm_co2(klon,2), stat = error) … … 230 229 idayref = day_ini 231 230 CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) 232 CALL gr_fi_ecrit(1,klon, iim,jjm+1,rlon,zx_lon)233 DO i = 1, iim231 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon,zx_lon) 232 DO i = 1, nbp_lon 234 233 zx_lon(i,1) = rlon(i+1) 235 zx_lon(i, jjm+1) = rlon(i+1)234 zx_lon(i,nbp_lat) = rlon(i+1) 236 235 ENDDO 237 CALL gr_fi_ecrit(1,klon, iim,jjm+1,rlat,zx_lat)236 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat,zx_lat) 238 237 clintocplnam="cpl_atm_tauflx" 239 CALL histbeg(clintocplnam, iim,zx_lon(:,1),jjm+1,zx_lat(1,:),&240 1, iim,1,jjm+1, itau_phy,zjulian,dtime,nhoridct,nidct)238 CALL histbeg(clintocplnam,nbp_lon,zx_lon(:,1),nbp_lat,zx_lat(1,:),& 239 1,nbp_lon,1,nbp_lat, itau_phy,zjulian,dtime,nhoridct,nidct) 241 240 ! no vertical axis 242 241 CALL histdef(nidct, 'tauxe','tauxe', & 243 "-", iim, jjm+1, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)242 "-",nbp_lon,nbp_lat, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime) 244 243 CALL histdef(nidct, 'tauyn','tauyn', & 245 "-", iim, jjm+1, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)244 "-",nbp_lon,nbp_lat, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime) 246 245 CALL histdef(nidct, 'tmp_lon','tmp_lon', & 247 "-", iim, jjm+1, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)246 "-",nbp_lon,nbp_lat, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime) 248 247 CALL histdef(nidct, 'tmp_lat','tmp_lat', & 249 "-", iim, jjm+1, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)248 "-",nbp_lon,nbp_lat, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime) 250 249 DO jf=1,maxsend 251 250 IF (infosend(i)%action) THEN 252 251 CALL histdef(nidct, infosend(i)%name ,infosend(i)%name , & 253 "-", iim, jjm+1, nhoridct, 1, 1, 1, -99, 32, "inst",dtime,dtime)252 "-",nbp_lon,nbp_lat,nhoridct,1,1,1,-99,32,"inst",dtime,dtime) 254 253 ENDIF 255 254 END DO … … 258 257 259 258 clfromcplnam="cpl_atm_sst" 260 CALL histbeg(clfromcplnam, iim,zx_lon(:,1),jjm+1,zx_lat(1,:),1,iim,1,jjm+1, &259 CALL histbeg(clfromcplnam,nbp_lon,zx_lon(:,1),nbp_lat,zx_lat(1,:),1,nbp_lon,1,nbp_lat, & 261 260 0,zjulian,dtime,nhoridcs,nidcs) 262 261 ! no vertical axis … … 264 263 IF (inforecv(i)%action) THEN 265 264 CALL histdef(nidcs,inforecv(i)%name ,inforecv(i)%name , & 266 "-", iim, jjm+1, nhoridcs, 1, 1, 1, -99, 32, "inst",dtime,dtime)265 "-",nbp_lon,nbp_lat,nhoridcs,1,1,1,-99,32,"inst",dtime,dtime) 267 266 ENDIF 268 267 END DO … … 297 296 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl 298 297 USE indice_sol_mod 299 300 INCLUDE "temps.h" 298 USE time_phylmdz_mod, ONLY: start_time, itau_phy 299 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 300 301 301 INCLUDE "YOMCST.h" 302 INCLUDE "dimensions.h"303 302 304 303 ! Arguments … … 313 312 INTEGER :: j, i, time_sec 314 313 INTEGER :: itau_w 315 INTEGER, DIMENSION( iim*(jjm+1)):: ndexcs314 INTEGER, DIMENSION(nbp_lon*nbp_lat) :: ndexcs 316 315 CHARACTER(len = 20) :: modname = 'cpl_receive_frac' 317 316 CHARACTER(len = 80) :: abort_message 318 317 REAL, DIMENSION(klon) :: read_sic1D 319 REAL, DIMENSION( iim,jj_nb,maxrecv) :: tab_read_flds318 REAL, DIMENSION(nbp_lon,jj_nb,maxrecv) :: tab_read_flds 320 319 REAL, DIMENSION(klon,nbsrf) :: pctsrf_old 321 320 REAL, DIMENSION(klon_mpi) :: rlon_mpi, rlat_mpi 322 REAL, DIMENSION( iim,jj_nb) :: tmp_lon, tmp_lat323 REAL, DIMENSION( iim,jj_nb) :: tmp_r0321 REAL, DIMENSION(nbp_lon,jj_nb) :: tmp_lon, tmp_lat 322 REAL, DIMENSION(nbp_lon,jj_nb) :: tmp_r0 324 323 325 324 !************************************************************************************* … … 345 344 IF (is_sequential) THEN 346 345 ndexcs(:) = 0 347 itau_w = itau_phy + itime + start_time * day_step / iphysiq346 itau_w = itau_phy + itime + start_time * day_step_phy 348 347 DO i = 1, maxrecv 349 348 IF (inforecv(i)%action) THEN 350 CALL histwrite(nidcs,inforecv(i)%name,itau_w,tab_read_flds(:,:,i), iim*(jjm+1),ndexcs)349 CALL histwrite(nidcs,inforecv(i)%name,itau_w,tab_read_flds(:,:,i),nbp_lon*(nbp_lat),ndexcs) 351 350 ENDIF 352 351 END DO … … 373 372 ! Transform the currents from cartesian to spheric coordinates 374 373 ! tmp_r0 should be zero 375 CALL geo2atm( iim, jj_nb, tab_read_flds(:,:,idr_curenx), &374 CALL geo2atm(nbp_lon, jj_nb, tab_read_flds(:,:,idr_curenx), & 376 375 tab_read_flds(:,:,idr_cureny), tab_read_flds(:,:,idr_curenz), & 377 376 tmp_lon, tmp_lat, & … … 542 541 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send 543 542 USE indice_sol_mod 544 INCLUDE "dimensions.h"543 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 545 544 546 545 ! Input arguments … … 635 634 IF (.NOT. ALLOCATED(cpl_sols2D)) THEN 636 635 sum_error = 0 637 ALLOCATE(cpl_sols2D( iim,jj_nb,2), stat=error)638 sum_error = sum_error + error 639 ALLOCATE(cpl_nsol2D( iim,jj_nb,2), stat=error)640 sum_error = sum_error + error 641 ALLOCATE(cpl_rain2D( iim,jj_nb,2), stat=error)642 sum_error = sum_error + error 643 ALLOCATE(cpl_snow2D( iim,jj_nb,2), stat=error)644 sum_error = sum_error + error 645 ALLOCATE(cpl_evap2D( iim,jj_nb,2), stat=error)646 sum_error = sum_error + error 647 ALLOCATE(cpl_tsol2D( iim,jj_nb,2), stat=error)648 sum_error = sum_error + error 649 ALLOCATE(cpl_fder2D( iim,jj_nb,2), stat=error)650 sum_error = sum_error + error 651 ALLOCATE(cpl_albe2D( iim,jj_nb,2), stat=error)652 sum_error = sum_error + error 653 ALLOCATE(cpl_taux2D( iim,jj_nb,2), stat=error)654 sum_error = sum_error + error 655 ALLOCATE(cpl_tauy2D( iim,jj_nb,2), stat=error)656 sum_error = sum_error + error 657 ALLOCATE(cpl_windsp2D( iim,jj_nb), stat=error)658 sum_error = sum_error + error 659 ALLOCATE(cpl_taumod2D( iim,jj_nb,2), stat=error)636 ALLOCATE(cpl_sols2D(nbp_lon,jj_nb,2), stat=error) 637 sum_error = sum_error + error 638 ALLOCATE(cpl_nsol2D(nbp_lon,jj_nb,2), stat=error) 639 sum_error = sum_error + error 640 ALLOCATE(cpl_rain2D(nbp_lon,jj_nb,2), stat=error) 641 sum_error = sum_error + error 642 ALLOCATE(cpl_snow2D(nbp_lon,jj_nb,2), stat=error) 643 sum_error = sum_error + error 644 ALLOCATE(cpl_evap2D(nbp_lon,jj_nb,2), stat=error) 645 sum_error = sum_error + error 646 ALLOCATE(cpl_tsol2D(nbp_lon,jj_nb,2), stat=error) 647 sum_error = sum_error + error 648 ALLOCATE(cpl_fder2D(nbp_lon,jj_nb,2), stat=error) 649 sum_error = sum_error + error 650 ALLOCATE(cpl_albe2D(nbp_lon,jj_nb,2), stat=error) 651 sum_error = sum_error + error 652 ALLOCATE(cpl_taux2D(nbp_lon,jj_nb,2), stat=error) 653 sum_error = sum_error + error 654 ALLOCATE(cpl_tauy2D(nbp_lon,jj_nb,2), stat=error) 655 sum_error = sum_error + error 656 ALLOCATE(cpl_windsp2D(nbp_lon,jj_nb), stat=error) 657 sum_error = sum_error + error 658 ALLOCATE(cpl_taumod2D(nbp_lon,jj_nb,2), stat=error) 660 659 sum_error = sum_error + error 661 660 662 661 IF (carbon_cycle_cpl) THEN 663 ALLOCATE(cpl_atm_co22D( iim,jj_nb), stat=error)662 ALLOCATE(cpl_atm_co22D(nbp_lon,jj_nb), stat=error) 664 663 sum_error = sum_error + error 665 664 END IF … … 733 732 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl 734 733 USE indice_sol_mod 735 INCLUDE "dimensions.h"734 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 736 735 737 736 ! Input arguments … … 820 819 IF (.NOT. ALLOCATED(cpl_sols2D)) THEN 821 820 sum_error = 0 822 ALLOCATE(cpl_sols2D( iim,jj_nb,2), stat=error)823 sum_error = sum_error + error 824 ALLOCATE(cpl_nsol2D( iim,jj_nb,2), stat=error)825 sum_error = sum_error + error 826 ALLOCATE(cpl_rain2D( iim,jj_nb,2), stat=error)827 sum_error = sum_error + error 828 ALLOCATE(cpl_snow2D( iim,jj_nb,2), stat=error)829 sum_error = sum_error + error 830 ALLOCATE(cpl_evap2D( iim,jj_nb,2), stat=error)831 sum_error = sum_error + error 832 ALLOCATE(cpl_tsol2D( iim,jj_nb,2), stat=error)833 sum_error = sum_error + error 834 ALLOCATE(cpl_fder2D( iim,jj_nb,2), stat=error)835 sum_error = sum_error + error 836 ALLOCATE(cpl_albe2D( iim,jj_nb,2), stat=error)837 sum_error = sum_error + error 838 ALLOCATE(cpl_taux2D( iim,jj_nb,2), stat=error)839 sum_error = sum_error + error 840 ALLOCATE(cpl_tauy2D( iim,jj_nb,2), stat=error)841 sum_error = sum_error + error 842 ALLOCATE(cpl_windsp2D( iim,jj_nb), stat=error)843 sum_error = sum_error + error 844 ALLOCATE(cpl_taumod2D( iim,jj_nb,2), stat=error)821 ALLOCATE(cpl_sols2D(nbp_lon,jj_nb,2), stat=error) 822 sum_error = sum_error + error 823 ALLOCATE(cpl_nsol2D(nbp_lon,jj_nb,2), stat=error) 824 sum_error = sum_error + error 825 ALLOCATE(cpl_rain2D(nbp_lon,jj_nb,2), stat=error) 826 sum_error = sum_error + error 827 ALLOCATE(cpl_snow2D(nbp_lon,jj_nb,2), stat=error) 828 sum_error = sum_error + error 829 ALLOCATE(cpl_evap2D(nbp_lon,jj_nb,2), stat=error) 830 sum_error = sum_error + error 831 ALLOCATE(cpl_tsol2D(nbp_lon,jj_nb,2), stat=error) 832 sum_error = sum_error + error 833 ALLOCATE(cpl_fder2D(nbp_lon,jj_nb,2), stat=error) 834 sum_error = sum_error + error 835 ALLOCATE(cpl_albe2D(nbp_lon,jj_nb,2), stat=error) 836 sum_error = sum_error + error 837 ALLOCATE(cpl_taux2D(nbp_lon,jj_nb,2), stat=error) 838 sum_error = sum_error + error 839 ALLOCATE(cpl_tauy2D(nbp_lon,jj_nb,2), stat=error) 840 sum_error = sum_error + error 841 ALLOCATE(cpl_windsp2D(nbp_lon,jj_nb), stat=error) 842 sum_error = sum_error + error 843 ALLOCATE(cpl_taumod2D(nbp_lon,jj_nb,2), stat=error) 845 844 sum_error = sum_error + error 846 845 847 846 IF (carbon_cycle_cpl) THEN 848 ALLOCATE(cpl_atm_co22D( iim,jj_nb), stat=error)847 ALLOCATE(cpl_atm_co22D(nbp_lon,jj_nb), stat=error) 849 848 sum_error = sum_error + error 850 849 END IF … … 913 912 ! (it is done in cpl_send_seaice_fields). 914 913 ! 915 INCLUDE "dimensions.h"914 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 916 915 917 916 ! Input arguments … … 925 924 ! Local variables 926 925 !************************************************************************************* 927 REAL, DIMENSION( iim,jj_nb) :: rriv2D928 REAL, DIMENSION( iim,jj_nb) :: rcoa2D926 REAL, DIMENSION(nbp_lon,jj_nb) :: rriv2D 927 REAL, DIMENSION(nbp_lon,jj_nb) :: rcoa2D 929 928 930 929 !************************************************************************************* … … 972 971 ! 973 972 974 INCLUDE "dimensions.h"973 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 975 974 976 975 ! Input varibales … … 983 982 ! Local varibales 984 983 !************************************************************************************* 985 REAL, DIMENSION( iim,jj_nb) :: rlic2D984 REAL, DIMENSION(nbp_lon,jj_nb) :: rlic2D 986 985 987 986 !************************************************************************************* … … 1027 1026 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl 1028 1027 USE indice_sol_mod 1028 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1029 USE time_phylmdz_mod, ONLY: start_time, itau_phy 1029 1030 ! Some includes 1030 !************************************************************************************* 1031 INCLUDE "temps.h" 1032 INCLUDE "dimensions.h" 1033 1031 ! 1034 1032 ! Input arguments 1035 1033 !************************************************************************************* … … 1045 1043 INTEGER :: itau_w 1046 1044 INTEGER :: time_sec 1047 INTEGER, DIMENSION( iim*(jjm+1)) :: ndexct1045 INTEGER, DIMENSION(nbp_lon*(nbp_lat)) :: ndexct 1048 1046 REAL :: Up, Down 1049 REAL, DIMENSION( iim, jj_nb) :: tmp_lon, tmp_lat1050 REAL, DIMENSION( iim, jj_nb, 4) :: pctsrf2D1051 REAL, DIMENSION( iim, jj_nb) :: deno1047 REAL, DIMENSION(nbp_lon, jj_nb) :: tmp_lon, tmp_lat 1048 REAL, DIMENSION(nbp_lon, jj_nb, 4) :: pctsrf2D 1049 REAL, DIMENSION(nbp_lon, jj_nb) :: deno 1052 1050 CHARACTER(len = 20) :: modname = 'cpl_send_all' 1053 1051 CHARACTER(len = 80) :: abort_message 1054 1052 1055 1053 ! Variables with fields to coupler 1056 REAL, DIMENSION( iim, jj_nb) :: tmp_taux1057 REAL, DIMENSION( iim, jj_nb) :: tmp_tauy1058 REAL, DIMENSION( iim, jj_nb) :: tmp_calv1054 REAL, DIMENSION(nbp_lon, jj_nb) :: tmp_taux 1055 REAL, DIMENSION(nbp_lon, jj_nb) :: tmp_tauy 1056 REAL, DIMENSION(nbp_lon, jj_nb) :: tmp_calv 1059 1057 ! Table with all fields to send to coupler 1060 REAL, DIMENSION( iim, jj_nb, maxsend) :: tab_flds1058 REAL, DIMENSION(nbp_lon, jj_nb, maxsend) :: tab_flds 1061 1059 REAL, DIMENSION(klon_mpi) :: rlon_mpi, rlat_mpi 1062 1060 … … 1112 1110 1113 1111 DO j = 1, jj_nb 1114 tmp_calv(:,j) = DOT_PRODUCT (cpl_rlic2D(1: iim,j), &1115 pctsrf2D(1: iim,j,is_lic)) / REAL(iim)1112 tmp_calv(:,j) = DOT_PRODUCT (cpl_rlic2D(1:nbp_lon,j), & 1113 pctsrf2D(1:nbp_lon,j,is_lic)) / REAL(nbp_lon) 1116 1114 ENDDO 1117 1115 … … 1133 1131 1134 1132 IF (.NOT. is_north_pole .AND. ii_begin /=1) THEN 1135 Up=Up+tmp_calv( iim,1)1133 Up=Up+tmp_calv(nbp_lon,1) 1136 1134 tmp_calv(:,1)=Up 1137 1135 ENDIF 1138 1136 1139 IF (.NOT. is_south_pole .AND. ii_end /= iim) THEN1137 IF (.NOT. is_south_pole .AND. ii_end /= nbp_lon) THEN 1140 1138 Down=Down+tmp_calv(1,jj_nb) 1141 1139 tmp_calv(:,jj_nb)=Down … … 1226 1224 IF (is_sequential) THEN 1227 1225 IF (is_north_pole) tmp_lon(:,1) = tmp_lon(:,2) 1228 IF (is_south_pole) tmp_lon(:, jjm+1) = tmp_lon(:,jjm)1226 IF (is_south_pole) tmp_lon(:,nbp_lat) = tmp_lon(:,nbp_lat-1) 1229 1227 ENDIF 1230 1228 … … 1232 1230 IF (is_sequential) THEN 1233 1231 ndexct(:) = 0 1234 itau_w = itau_phy + itime + start_time * day_step / iphysiq1235 CALL histwrite(nidct,'tauxe',itau_w,tmp_taux, iim*(jjm+1),ndexct)1236 CALL histwrite(nidct,'tauyn',itau_w,tmp_tauy, iim*(jjm+1),ndexct)1237 CALL histwrite(nidct,'tmp_lon',itau_w,tmp_lon, iim*(jjm+1),ndexct)1238 CALL histwrite(nidct,'tmp_lat',itau_w,tmp_lat, iim*(jjm+1),ndexct)1232 itau_w = itau_phy + itime + start_time * day_step_phy 1233 CALL histwrite(nidct,'tauxe',itau_w,tmp_taux,nbp_lon*(nbp_lat),ndexct) 1234 CALL histwrite(nidct,'tauyn',itau_w,tmp_tauy,nbp_lon*(nbp_lat),ndexct) 1235 CALL histwrite(nidct,'tmp_lon',itau_w,tmp_lon,nbp_lon*(nbp_lat),ndexct) 1236 CALL histwrite(nidct,'tmp_lat',itau_w,tmp_lat,nbp_lon*(nbp_lat),ndexct) 1239 1237 ENDIF 1240 1238 … … 1242 1240 ! cartesian 3D coordinates 1243 1241 !$OMP MASTER 1244 CALL atm2geo ( iim, jj_nb, tmp_taux, tmp_tauy, tmp_lon, tmp_lat, &1242 CALL atm2geo (nbp_lon, jj_nb, tmp_taux, tmp_tauy, tmp_lon, tmp_lat, & 1245 1243 tab_flds(:,:,ids_tauxxu), tab_flds(:,:,ids_tauyyu), tab_flds(:,:,ids_tauzzu) ) 1246 1244 … … 1257 1255 DO j=1,maxsend 1258 1256 IF (infosend(j)%action) CALL histwrite(nidct,infosend(j)%name, itau_w, & 1259 tab_flds(:,:,j), iim*(jjm+1),ndexct)1257 tab_flds(:,:,j),nbp_lon*(nbp_lat),ndexct) 1260 1258 ENDDO 1261 1259 ENDIF … … 1311 1309 ! champ_out champ sur la grille 'gatherd' 1312 1310 ! 1313 INCLUDE "dimensions.h"1311 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1314 1312 1315 1313 ! Input 1316 1314 INTEGER, INTENT(IN) :: knon 1317 REAL, DIMENSION( iim,jj_nb), INTENT(IN) :: champ_in1315 REAL, DIMENSION(nbp_lon,jj_nb), INTENT(IN) :: champ_in 1318 1316 INTEGER, DIMENSION(klon), INTENT(IN) :: knindex 1319 1317 … … 1330 1328 1331 1329 1332 ! Transform from 2 dimensions ( iim,jj_nb) to 1 dimension (klon)1330 ! Transform from 2 dimensions (nbp_lon,jj_nb) to 1 dimension (klon) 1333 1331 !$OMP MASTER 1334 1332 CALL Grid2Dto1D_mpi(champ_in,temp_mpi) … … 1360 1358 ! champ_out champ sur la grille 2D 1361 1359 ! 1362 INCLUDE "dimensions.h"1360 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1363 1361 1364 1362 ! Input arguments … … 1370 1368 ! Output arguments 1371 1369 !************************************************************************************* 1372 REAL, DIMENSION( iim,jj_nb), INTENT(OUT) :: champ_out1370 REAL, DIMENSION(nbp_lon,jj_nb), INTENT(OUT) :: champ_out 1373 1371 1374 1372 ! Local variables … … 1386 1384 ENDDO 1387 1385 1388 ! Transform from 1 dimension (klon) to 2 dimensions ( iim,jj_nb)1386 ! Transform from 1 dimension (klon) to 2 dimensions (nbp_lon,jj_nb) 1389 1387 CALL gather_omp(temp_omp,temp_mpi) 1390 1388 -
LMDZ5/trunk/libf/phylmd/ini_histday_seri.h
r1907 r2344 7 7 IF (type_run.EQ."AMIP") THEN 8 8 ! 9 zstophy = dtime9 zstophy = pdtphys 10 10 zout = ecrit_day 11 11 ! … … 13 13 CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) 14 14 ! 15 CALL gr_fi_ecrit(1,klon, iim,jjmp1,rlon,zx_lon)16 DO i = 1, iim15 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon,zx_lon) 16 DO i = 1, nbp_lon 17 17 zx_lon(i,1) = rlon(i+1) 18 zx_lon(i, jjmp1) = rlon(i+1)18 zx_lon(i,nbp_lat) = rlon(i+1) 19 19 ENDDO 20 20 DO ll=1,klev 21 21 znivsig(ll)=REAL(ll) 22 22 ENDDO 23 CALL gr_fi_ecrit(1,klon, iim,jjmp1,rlat,zx_lat)23 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat,zx_lat) 24 24 ! 25 25 imin_debut=1 … … 29 29 ! 30 30 CALL histbeg("histday_seri.nc", & 31 iim,zx_lon(:,1), jjmp1,zx_lat(1,:), &31 nbp_lon,zx_lon(:,1),nbp_lat,zx_lat(1,:), & 32 32 imin_debut,nbpti,jmin_debut,nbptj, & 33 33 itau_phy, zjulian, dtime, & … … 40 40 CALL histdef(nid_day_seri, "bilTOA", & 41 41 "Net radiation at model top", "W/m2", & 42 iim,jjmp1,nhori, 1,1,1, -99, 32, &42 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 43 43 "ave(X)", zstophy,zout) 44 44 ! 45 45 CALL histdef(nid_day_seri, "bils", & 46 46 "Net downward energy flux at surface","W/m2", & 47 iim,jjmp1,nhori, 1,1,1, -99, 32, &47 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 48 48 "ave(X)", zstophy,zout) 49 49 ! 50 50 CALL histdef(nid_day_seri, "ecin", & 51 51 "Total kinetic energy (per unit area)","J/m2", & 52 iim,jjmp1,nhori, 1,1,1, -99, 32, &52 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 53 53 "ave(X)", zstophy,zout) 54 54 ! … … 59 59 "Total relative angular momentum (per unit area)", & 60 60 "kg/s", & 61 iim,jjmp1,nhori, 1,1,1, -99, 32, &61 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 62 62 "ave(X)", zstophy,zout) 63 63 ! 64 64 CALL histdef(nid_day_seri, "frictor", & 65 65 "Friction torque (per unit area)", "N/m", & 66 iim,jjmp1,nhori, 1,1,1, -99, 32, &66 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 67 67 "ave(X)", zstophy,zout) 68 68 ! 69 69 CALL histdef(nid_day_seri, "mountor", & 70 70 "Mountain torque (per unit area)", "N/m", & 71 iim,jjmp1,nhori, 1,1,1, -99, 32, &71 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 72 72 "ave(X)", zstophy,zout) 73 73 ! … … 77 77 "Axial angular momentum (per unit area)", & 78 78 "kg/s", & 79 iim,jjmp1,nhori, 1,1,1, -99, 32, &79 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 80 80 "ave(X)", zstophy,zout) 81 81 ! 82 82 CALL histdef(nid_day_seri, "torsfc", & 83 83 "Total surface torque (including mountain torque)", "N/m", & 84 iim,jjmp1,nhori, 1,1,1, -99, 32, &84 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 85 85 "ave(X)", zstophy,zout) 86 86 ! … … 89 89 CALL histdef(nid_day_seri, "tamv", & 90 90 "Temperature (mass-weighted vert. ave)", "K", & 91 iim,jjmp1,nhori, 1,1,1, -99, 32, &91 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 92 92 "ave(X)", zstophy,zout) 93 93 ! 94 94 CALL histdef(nid_day_seri, "psol", & 95 95 "Surface pressure", "Pa", & 96 iim,jjmp1,nhori, 1,1,1, -99, 32, &96 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 97 97 "ave(X)", zstophy,zout) 98 98 ! … … 100 100 "Evaporation and sublimation (per unit area)", & 101 101 "kg/(m2*s)", & 102 iim,jjmp1,nhori, 1,1,1, -99, 32, &102 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 103 103 "ave(X)", zstophy,zout) 104 104 ! … … 106 106 ! . "SnowFrac", 107 107 ! . "Snow-covered area ", "%", 108 ! . iim,jjmp1,nhori, 1,1,1, -99, 32,108 ! . nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, 109 109 ! . "ave(X)", zstophy,zout) 110 110 ! … … 113 113 !IM 191104 . "Snow Depth (water equivalent)", "kg/m2", 114 114 ! . "Snow Mass", "kg/m2", 115 ! . iim,jjmp1,nhori, 1,1,1, -99, 32,115 ! . nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, 116 116 ! . "ave(X)", zstophy,zout) 117 117 ! … … 119 119 "tsol_"//clnsurf(is_oce), & 120 120 "SST over open (ice-free) ocean ", "K", & 121 iim,jjmp1,nhori, 1,1,1, -99, 32, &121 nbp_lon,nbp_lat,nhori, 1,1,1, -99, 32, & 122 122 "ave(X)", zstophy,zout) 123 123 ! -
LMDZ5/trunk/libf/phylmd/ini_paramLMDZ_phy.h
r1907 r2344 9 9 if (is_mpi_root) then 10 10 ! 11 zstophy = dtime11 zstophy = pdtphys 12 12 zout = mth_len*un_jour 13 13 ! … … 15 15 CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) 16 16 ! 17 CALL gr_fi_ecrit(1,klon, iim,jjmp1,rlon_glo,zx_lon)18 if ( iim.gt.1) then19 DO i = 1, iim17 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon_glo,zx_lon) 18 if (nbp_lon.gt.1) then 19 DO i = 1, nbp_lon 20 20 zx_lon(i,1) = rlon_glo(i+1) 21 zx_lon(i, jjmp1) = rlon_glo(i+1)21 zx_lon(i,nbp_lat) = rlon_glo(i+1) 22 22 ENDDO 23 23 endif 24 CALL gr_fi_ecrit(1,klon, iim,jjmp1,rlat_glo,zx_lat)24 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat_glo,zx_lat) 25 25 ! 26 26 CALL histbeg("paramLMDZ_phy.nc", & -
LMDZ5/trunk/libf/phylmd/iophy.F90
r2319 r2344 54 54 #endif 55 55 IMPLICIT NONE 56 INCLUDE 'dimensions.h'56 ! INCLUDE 'dimensions.h' 57 57 REAL,DIMENSION(klon),INTENT(IN) :: rlon 58 58 REAL,DIMENSION(klon),INTENT(IN) :: rlat … … 77 77 78 78 !$OMP MASTER 79 ALLOCATE(io_lat( jjm+1-1/(iim*jjm)))79 ALLOCATE(io_lat(nbp_lat-1/(nbp_lon*(nbp_lat-1)))) 80 80 io_lat(1)=rlat_glo(1) 81 io_lat( jjm+1-1/(iim*jjm))=rlat_glo(klon_glo)82 IF (( iim*jjm) > 1) then83 DO i=2, jjm84 io_lat(i)=rlat_glo(2+(i-2)* iim)81 io_lat(nbp_lat-1/(nbp_lon*(nbp_lat-1)))=rlat_glo(klon_glo) 82 IF ((nbp_lon*nbp_lat) > 1) then 83 DO i=2,nbp_lat-1 84 io_lat(i)=rlat_glo(2+(i-2)*nbp_lon) 85 85 ENDDO 86 86 ENDIF 87 87 88 ALLOCATE(io_lon(iim)) 89 io_lon(:)=rlon_glo(2-1/(iim*jjm):iim+1-1/(iim*jjm)) 88 ALLOCATE(io_lon(nbp_lon)) 89 IF (klon_glo == 1) THEN 90 io_lon(1)=rlon_glo(1) 91 ELSE 92 io_lon(1:nbp_lon)=rlon_glo(2:nbp_lon+1) 93 ENDIF 94 90 95 !! (I) dtnb : total number of domains 91 96 !! (I) dnb : domain number … … 104 109 105 110 ddid=(/ 1,2 /) 106 dsg=(/ iim, jjm+1-1/(iim*jjm)/)107 dsl=(/ iim, jj_nb /)111 dsg=(/ nbp_lon, nbp_lat /) 112 dsl=(/ nbp_lon, jj_nb /) 108 113 dpf=(/ 1,jj_begin /) 109 dpl=(/ iim, jj_end /)114 dpl=(/ nbp_lon, jj_end /) 110 115 dhs=(/ ii_begin-1,0 /) 111 116 IF (mpi_rank==mpi_size-1) THEN 112 117 dhe=(/0,0/) 113 118 ELSE 114 dhe=(/ iim-ii_end,0 /)119 dhe=(/ nbp_lon-ii_end,0 /) 115 120 ENDIF 116 121 … … 155 160 mpi_size, mpi_rank 156 161 USE ioipsl, only: flio_dom_set 162 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 157 163 IMPLICIT NONE 158 INCLUDE 'dimensions.h' 159 REAL,DIMENSION(iim),INTENT(IN) :: lon 160 REAL,DIMENSION(jjm+1-1/(iim*jjm)),INTENT(IN) :: lat 164 REAL,DIMENSION(nbp_lon),INTENT(IN) :: lon 165 REAL,DIMENSION(nbp_lat),INTENT(IN) :: lat 161 166 162 167 INTEGER,DIMENSION(2) :: ddid … … 169 174 170 175 !$OMP MASTER 171 allocate(io_lat( jjm+1-1/(iim*jjm)))176 allocate(io_lat(nbp_lat)) 172 177 io_lat(:)=lat(:) 173 allocate(io_lon( iim))178 allocate(io_lon(nbp_lon)) 174 179 io_lon(:)=lon(:) 175 180 176 181 ddid=(/ 1,2 /) 177 dsg=(/ iim, jjm+1-1/(iim*jjm)/)178 dsl=(/ iim, jj_nb /)182 dsg=(/ nbp_lon, nbp_lat /) 183 dsl=(/ nbp_lon, jj_nb /) 179 184 dpf=(/ 1,jj_begin /) 180 dpl=(/ iim, jj_end /)185 dpl=(/ nbp_lon, jj_end /) 181 186 dhs=(/ ii_begin-1,0 /) 182 187 if (mpi_rank==mpi_size-1) then 183 188 dhe=(/0,0/) 184 189 else 185 dhe=(/ iim-ii_end,0 /)190 dhe=(/ nbp_lon-ii_end,0 /) 186 191 endif 187 192 … … 198 203 USE mod_phys_lmdz_para, only: is_sequential, is_using_mpi, is_mpi_root, & 199 204 jj_begin, jj_end, jj_nb 205 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 200 206 use ioipsl, only: histbeg 201 207 #ifdef CPP_XIOS … … 203 209 #endif 204 210 IMPLICIT NONE 205 include 'dimensions.h'206 211 include 'clesphys.h' 207 212 … … 217 222 !$OMP MASTER 218 223 if (is_sequential) then 219 call histbeg(name, iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &220 1, iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)224 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 225 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day) 221 226 else 222 call histbeg(name, iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &223 1, iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)227 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 228 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id) 224 229 endif 225 230 … … 240 245 241 246 USE mod_phys_lmdz_para, only: jj_begin, jj_end, jj_nb, is_sequential 247 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 242 248 use ioipsl, only: histbeg 243 249 244 250 IMPLICIT NONE 245 include 'dimensions.h'246 251 247 252 character*(*), INTENT(IN) :: name … … 255 260 #ifndef CPP_IOIPSL_NO_OUTPUT 256 261 if (is_sequential) then 257 call histbeg(name, iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &258 1, iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)262 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 263 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day) 259 264 else 260 call histbeg(name, iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &261 1, iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)265 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 266 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id) 262 267 endif 263 268 #endif … … 274 279 is_sequential, klon_mpi_begin, klon_mpi_end, & 275 280 mpi_rank 276 USE mod_grid_phy_lmdz, only: klon_glo 281 USE mod_grid_phy_lmdz, only: klon_glo, nbp_lon, nbp_lat 277 282 use ioipsl, only: histbeg 278 283 279 284 IMPLICIT NONE 280 include 'dimensions.h'281 285 282 286 REAL,DIMENSION(klon),INTENT(IN) :: rlon … … 304 308 REAL, allocatable, DIMENSION(:) :: npplat, npplon 305 309 REAL, allocatable, DIMENSION(:,:) :: npplat_bounds, npplon_bounds 306 INTEGER, PARAMETER :: jjmp1=jjm+1-1/jjm 307 REAL, DIMENSION(iim,jjmp1) :: zx_lon, zx_lat 310 REAL, DIMENSION(nbp_lon,nbp_lat) :: zx_lon, zx_lat 308 311 309 312 CALL gather(rlat,rlat_glo) … … 330 333 endif 331 334 ! 332 IF ( tabij(i).LE. iim) THEN335 IF ( tabij(i).LE.nbp_lon) THEN 333 336 plat_bounds(i,1)=rlat_glo(tabij(i)) 334 337 ELSE 335 plat_bounds(i,1)=rlat_glo(tabij(i)- iim)338 plat_bounds(i,1)=rlat_glo(tabij(i)-nbp_lon) 336 339 ENDIF 337 plat_bounds(i,2)=rlat_glo(tabij(i)+ iim)340 plat_bounds(i,2)=rlat_glo(tabij(i)+nbp_lon) 338 341 ! 339 342 ! print*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon_glo(tabij(i)),plon_bounds(i,2) … … 351 354 ENDDO 352 355 353 CALL gr_fi_ecrit(1,klon, iim,jjmp1,rlon_glo,zx_lon)354 if (( iim*jjm).gt.1) then355 DO i = 1, iim356 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon_glo,zx_lon) 357 if ((nbp_lon*nbp_lat).gt.1) then 358 DO i = 1, nbp_lon 356 359 zx_lon(i,1) = rlon_glo(i+1) 357 zx_lon(i, jjmp1) = rlon_glo(i+1)360 zx_lon(i,nbp_lat) = rlon_glo(i+1) 358 361 ENDDO 359 362 endif 360 CALL gr_fi_ecrit(1,klon, iim,jjmp1,rlat_glo,zx_lat)363 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat_glo,zx_lat) 361 364 362 365 DO i=1,pim … … 367 370 368 371 if (ipt(i).EQ.1) then 369 plon_bounds(i,1)=zx_lon( iim,jpt(i))372 plon_bounds(i,1)=zx_lon(nbp_lon,jpt(i)) 370 373 plon_bounds(i,2)=360.+zx_lon(ipt(i)+1,jpt(i)) 371 374 endif 372 375 373 if (ipt(i).EQ. iim) then376 if (ipt(i).EQ.nbp_lon) then 374 377 plon_bounds(i,2)=360.+zx_lon(1,jpt(i)) 375 378 endif … … 383 386 endif 384 387 385 if (jpt(i).EQ. jjmp1) then386 plat_bounds(i,1)=zx_lat(ipt(i), jjmp1)+0.001387 plat_bounds(i,2)=zx_lat(ipt(i), jjmp1)-0.001388 if (jpt(i).EQ.nbp_lat) then 389 plat_bounds(i,1)=zx_lat(ipt(i),nbp_lat)+0.001 390 plat_bounds(i,2)=zx_lat(ipt(i),nbp_lat)-0.001 388 391 endif 389 392 ! … … 451 454 use phys_output_var_mod, only: type_ecri, zoutm, zdtime_moy, lev_files, & 452 455 nid_files, nhorim, swaero_diag, nfiles 456 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 453 457 IMPLICIT NONE 454 458 455 INCLUDE "dimensions.h"456 INCLUDE "temps.h"457 459 INCLUDE "clesphys.h" 458 460 … … 478 480 IF ( flag_var(iff)<=lev_files(iff) ) THEN 479 481 CALL histdef (nid_files(iff),nomvar,titrevar,unitvar, & 480 iim,jj_nb,nhorim(iff), 1,1,1, -99, 32, &482 nbp_lon,jj_nb,nhorim(iff), 1,1,1, -99, 32, & 481 483 type_ecri(iff), zstophym,zoutm(iff)) 482 484 ENDIF … … 507 509 nhorim, zdtime_moy, levmin, levmax, & 508 510 nvertm, nfiles 511 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 509 512 IMPLICIT NONE 510 513 511 INCLUDE "dimensions.h"512 INCLUDE "temps.h"513 ! INCLUDE "indicesol.h"514 514 INCLUDE "clesphys.h" 515 515 … … 535 535 IF ( flag_var(iff)<=lev_files(iff) ) THEN 536 536 CALL histdef (nid_files(iff), nomvar, titrevar, unitvar, & 537 iim, jj_nb, nhorim(iff), klev, levmin(iff), &537 nbp_lon, jj_nb, nhorim(iff), klev, levmin(iff), & 538 538 levmax(iff)-levmin(iff)+1, nvertm(iff), 32, type_ecri(iff), & 539 539 zstophym, zoutm(iff)) … … 564 564 nid_files, nhorim, swaero_diag 565 565 USE print_control_mod, ONLY: prt_level,lunout 566 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 566 567 #ifdef CPP_XIOS 567 568 use wxios, only: wxios_add_field_to_file … … 569 570 IMPLICIT NONE 570 571 571 INCLUDE "dimensions.h"572 INCLUDE "temps.h"573 572 INCLUDE "clesphys.h" 574 573 … … 621 620 IF ( var%flag(iff)<=lev_files(iff) ) THEN 622 621 CALL histdef (nid_files(iff), var%name, var%description, var%unit, & 623 iim,jj_nb,nhorim(iff), 1,1,1, -99, 32, &622 nbp_lon,jj_nb,nhorim(iff), 1,1,1, -99, 32, & 624 623 typeecrit, zstophym,zoutm(iff)) 625 624 ENDIF … … 651 650 levmax, nvertm 652 651 USE print_control_mod, ONLY: prt_level,lunout 652 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 653 653 #ifdef CPP_XIOS 654 654 use wxios, only: wxios_add_field_to_file … … 656 656 IMPLICIT NONE 657 657 658 INCLUDE "dimensions.h"659 INCLUDE "temps.h"660 658 INCLUDE "clesphys.h" 661 659 … … 708 706 IF ( var%flag(iff)<=lev_files(iff) ) THEN 709 707 CALL histdef (nid_files(iff), var%name, var%description, var%unit, & 710 iim, jj_nb, nhorim(iff), klev, levmin(iff), &708 nbp_lon, jj_nb, nhorim(iff), klev, levmin(iff), & 711 709 levmax(iff)-levmin(iff)+1, nvertm(iff), 32, typeecrit, & 712 710 zstophym, zoutm(iff)) … … 750 748 USE ioipsl, only: histwrite 751 749 USE print_control_mod, ONLY: prt_level,lunout 750 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 752 751 IMPLICIT NONE 753 include 'dimensions.h'754 752 755 753 integer,INTENT(IN) :: nid … … 760 758 REAL,DIMENSION(klon_mpi) :: buffer_omp 761 759 INTEGER, allocatable, DIMENSION(:) :: index2d 762 REAL :: Field2d( iim,jj_nb)760 REAL :: Field2d(nbp_lon,jj_nb) 763 761 764 762 integer :: ip … … 772 770 CALL grid1Dto2D_mpi(buffer_omp,Field2d) 773 771 if(.NOT.lpoint) THEN 774 ALLOCATE(index2d( iim*jj_nb))775 ALLOCATE(fieldok( iim*jj_nb))772 ALLOCATE(index2d(nbp_lon*jj_nb)) 773 ALLOCATE(fieldok(nbp_lon*jj_nb)) 776 774 IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL' 777 CALL histwrite(nid,name,itau,Field2d, iim*jj_nb,index2d)775 CALL histwrite(nid,name,itau,Field2d,nbp_lon*jj_nb,index2d) 778 776 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL' 779 777 else … … 813 811 is_sequential, klon_mpi_begin, klon_mpi_end, & 814 812 jj_nb, klon_mpi 813 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 815 814 use ioipsl, only: histwrite 816 815 USE print_control_mod, ONLY: prt_level,lunout 817 816 IMPLICIT NONE 818 include 'dimensions.h'819 817 820 818 integer,INTENT(IN) :: nid … … 824 822 REAL,DIMENSION(:,:),INTENT(IN) :: field ! --> field(klon,:) 825 823 REAL,DIMENSION(klon_mpi,size(field,2)) :: buffer_omp 826 REAL :: Field3d( iim,jj_nb,size(field,2))824 REAL :: Field3d(nbp_lon,jj_nb,size(field,2)) 827 825 INTEGER :: ip, n, nlev 828 826 INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d … … 837 835 CALL grid1Dto2D_mpi(buffer_omp,field3d) 838 836 if(.NOT.lpoint) THEN 839 ALLOCATE(index3d( iim*jj_nb*nlev))840 ALLOCATE(fieldok( iim*jj_nb,nlev))837 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 838 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) 841 839 IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL' 842 CALL histwrite(nid,name,itau,Field3d, iim*jj_nb*nlev,index3d)840 CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d) 843 841 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL' 844 842 else … … 889 887 nid_files 890 888 USE print_control_mod, ONLY: prt_level,lunout 889 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 891 890 #ifdef CPP_XIOS 892 891 USE xios, only: xios_send_field … … 895 894 896 895 IMPLICIT NONE 897 INCLUDE 'dimensions.h'898 896 include 'clesphys.h' 899 897 … … 908 906 REAL,DIMENSION(klon_mpi) :: buffer_omp 909 907 INTEGER, allocatable, DIMENSION(:) :: index2d 910 REAL :: Field2d( iim,jj_nb)908 REAL :: Field2d(nbp_lon,jj_nb) 911 909 912 910 INTEGER :: ip … … 989 987 990 988 IF(.NOT.clef_stations(iff)) THEN 991 ALLOCATE(index2d( iim*jj_nb))992 ALLOCATE(fieldok( iim*jj_nb))989 ALLOCATE(index2d(nbp_lon*jj_nb)) 990 ALLOCATE(fieldok(nbp_lon*jj_nb)) 993 991 #ifndef CPP_IOIPSL_NO_OUTPUT 994 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field2d, iim*jj_nb,index2d)992 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field2d,nbp_lon*jj_nb,index2d) 995 993 #endif 996 994 !#ifdef CPP_XIOS … … 1048 1046 nfiles, vars_defined, clef_stations, & 1049 1047 nid_files 1048 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1050 1049 #ifdef CPP_XIOS 1051 1050 USE xios, only: xios_send_field … … 1054 1053 1055 1054 IMPLICIT NONE 1056 INCLUDE 'dimensions.h'1057 1055 include 'clesphys.h' 1058 1056 … … 1065 1063 !$OMP THREADPRIVATE(firstx) 1066 1064 REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp 1067 REAL :: Field3d( iim,jj_nb,SIZE(field,2))1065 REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2)) 1068 1066 INTEGER :: ip, n, nlev, nlevx 1069 1067 INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d … … 1131 1129 write(lunout,*)'histwrite3d_phy: call xios_send_field for ', & 1132 1130 trim(var%name), ' with iim jjm nlevx = ', & 1133 iim,jj_nb,nlevx1131 nbp_lon,jj_nb,nlevx 1134 1132 endif 1135 1133 CALL xios_send_field(var%name, Field3d(:,:,1:nlevx)) … … 1138 1136 #endif 1139 1137 IF (.NOT.clef_stations(iff)) THEN 1140 ALLOCATE(index3d( iim*jj_nb*nlev))1141 ALLOCATE(fieldok( iim*jj_nb,nlev))1138 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 1139 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) 1142 1140 1143 1141 #ifndef CPP_IOIPSL_NO_OUTPUT 1144 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field3d, iim*jj_nb*nlev,index3d)1142 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field3d,nbp_lon*jj_nb*nlev,index3d) 1145 1143 #endif 1146 1144 … … 1194 1192 is_sequential, klon_mpi_begin, klon_mpi_end, & 1195 1193 jj_nb, klon_mpi 1194 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1196 1195 USE xios, only: xios_send_field 1197 1196 USE print_control_mod, ONLY: prt_level,lunout 1198 1197 1199 1198 IMPLICIT NONE 1200 INCLUDE 'dimensions.h'1201 1199 1202 1200 CHARACTER(LEN=*), INTENT(IN) :: field_name … … 1205 1203 REAL,DIMENSION(klon_mpi) :: buffer_omp 1206 1204 INTEGER, allocatable, DIMENSION(:) :: index2d 1207 REAL :: Field2d( iim,jj_nb)1205 REAL :: Field2d(nbp_lon,jj_nb) 1208 1206 1209 1207 INTEGER :: ip … … 1224 1222 !IF(.NOT.clef_stations(iff)) THEN 1225 1223 IF (.TRUE.) THEN 1226 ALLOCATE(index2d( iim*jj_nb))1227 ALLOCATE(fieldok( iim*jj_nb))1224 ALLOCATE(index2d(nbp_lon*jj_nb)) 1225 ALLOCATE(fieldok(nbp_lon*jj_nb)) 1228 1226 1229 1227 … … 1265 1263 jj_nb, klon_mpi 1266 1264 USE xios, only: xios_send_field 1265 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1267 1266 USE print_control_mod, ONLY: prt_level,lunout 1268 1267 1269 1268 IMPLICIT NONE 1270 INCLUDE 'dimensions.h'1271 1269 1272 1270 CHARACTER(LEN=*), INTENT(IN) :: field_name … … 1274 1272 1275 1273 REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp 1276 REAL :: Field3d( iim,jj_nb,SIZE(field,2))1274 REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2)) 1277 1275 INTEGER :: ip, n, nlev 1278 1276 INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d … … 1295 1293 !IF (.NOT.clef_stations(iff)) THEN 1296 1294 IF(.TRUE.)THEN 1297 ALLOCATE(index3d( iim*jj_nb*nlev))1298 ALLOCATE(fieldok( iim*jj_nb,nlev))1295 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 1296 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) 1299 1297 CALL xios_send_field(field_name, Field3d(:,:,1:nlev)) 1300 1298 -
LMDZ5/trunk/libf/phylmd/limit_slab.F90
r2311 r2344 4 4 5 5 USE dimphy 6 USE mod_grid_phy_lmdz 6 USE mod_grid_phy_lmdz, ONLY: klon_glo 7 7 USE mod_phys_lmdz_para 8 8 USE netcdf … … 11 11 IMPLICIT NONE 12 12 13 INCLUDE "temps.h"14 13 INCLUDE "clesphys.h" 15 INCLUDE "dimensions.h"16 14 17 15 ! In- and ouput arguments -
LMDZ5/trunk/libf/phylmd/pbl_surface_mod.F90
r2311 r2344 261 261 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send 262 262 USE indice_sol_mod 263 USE time_phylmdz_mod, ONLY: day_ini,annee_ref,itau_phy 264 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 263 265 USE print_control_mod, ONLY: prt_level,lunout 264 266 … … 271 273 INCLUDE "clesphys.h" 272 274 INCLUDE "compbl.h" 273 INCLUDE "dimensions.h"274 INCLUDE "temps.h"275 275 INCLUDE "flux_arp.h" 276 276 !**************************************************************************************** … … 733 733 734 734 ! For debugging with IOIPSL 735 INTEGER, DIMENSION( iim*(jjm+1)) :: ndexbg735 INTEGER, DIMENSION(nbp_lon*nbp_lat) :: ndexbg 736 736 REAL :: zjulian 737 737 REAL, DIMENSION(klon) :: tabindx 738 REAL, DIMENSION( iim,jjm+1) :: zx_lon, zx_lat739 REAL, DIMENSION( iim,jjm+1) :: debugtab738 REAL, DIMENSION(nbp_lon,nbp_lat) :: zx_lon, zx_lat 739 REAL, DIMENSION(nbp_lon,nbp_lat) :: debugtab 740 740 741 741 … … 794 794 idayref = day_ini 795 795 CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) 796 CALL gr_fi_ecrit(1,klon, iim,jjm+1,rlon,zx_lon)797 DO i = 1, iim796 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon,zx_lon) 797 DO i = 1, nbp_lon 798 798 zx_lon(i,1) = rlon(i+1) 799 zx_lon(i, jjm+1) = rlon(i+1)799 zx_lon(i,nbp_lat) = rlon(i+1) 800 800 ENDDO 801 CALL gr_fi_ecrit(1,klon, iim,jjm+1,rlat,zx_lat)802 CALL histbeg("sous_index", iim,zx_lon(:,1),jjm+1,zx_lat(1,:), &803 1, iim,1,jjm+1, &801 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat,zx_lat) 802 CALL histbeg("sous_index",nbp_lon,zx_lon(:,1),nbp_lat,zx_lat(1,:), & 803 1,nbp_lon,1,nbp_lat, & 804 804 itau_phy,zjulian,dtime,nhoridbg,nidbg) 805 805 ! no vertical axis … … 809 809 cl_surf(4)='sic' 810 810 DO nsrf=1,nbsrf 811 CALL histdef(nidbg, cl_surf(nsrf),cl_surf(nsrf), "-", iim, &812 jjm+1,nhoridbg, 1, 1, 1, -99, 32, "inst", dtime,dtime)811 CALL histdef(nidbg, cl_surf(nsrf),cl_surf(nsrf), "-",nbp_lon, & 812 nbp_lat,nhoridbg, 1, 1, 1, -99, 32, "inst", dtime,dtime) 813 813 END DO 814 814 … … 1144 1144 ndexbg(:) = 0 1145 1145 CALL gath2cpl(tabindx,debugtab,knon,ni) 1146 CALL histwrite(nidbg,cl_surf(nsrf),itap,debugtab, iim*(jjm+1), ndexbg)1146 CALL histwrite(nidbg,cl_surf(nsrf),itap,debugtab,nbp_lon*nbp_lat, ndexbg) 1147 1147 ENDIF 1148 1148 -
LMDZ5/trunk/libf/phylmd/phyaqua_mod.F90
r2243 r2344 25 25 USE fonte_neige_mod, ONLY: fonte_neige_init 26 26 USE phys_state_var_mod 27 USE control_mod, ONLY: dayref, nday, iphysiq 27 USE time_phylmdz_mod, ONLY: day_ref, ndays, pdtphys, & 28 day_ini,day_end 28 29 USE indice_sol_mod 29 30 USE nrtype, ONLY: pi 30 31 USE ioipsl 31 32 IMPLICIT NONE 32 33 33 include "dimensions.h" 34 ! #include "dimphy.h" 35 ! #include "YOMCST.h" 36 include "comconst.h" 34 include "YOMCST.h" 37 35 include "clesphys.h" 38 36 include "dimsoil.h" 39 include "temps.h"40 37 41 38 INTEGER, INTENT (IN) :: nlon, iflag_phys … … 161 158 ! ----------------------------------------------------------------------- 162 159 163 day_ini = day ref164 day_end = day_ini + nday 160 day_ini = day_ref 161 day_end = day_ini + ndays 165 162 airefi = 1. 166 163 zcufi = 1. … … 276 273 ! Ecriture etat initial physique 277 274 278 timestep = dtvr*float(iphysiq)279 radpas = nint( daysec/timestep/float(nbapp_rad))275 timestep = pdtphys 276 radpas = nint(rday/timestep/float(nbapp_rad)) 280 277 281 278 DO i = 1, longcles -
LMDZ5/trunk/libf/phylmd/phyetat0.F90
r2333 r2344 26 26 USE indice_sol_mod, only: nbsrf, is_ter, epsfra, is_lic, is_oce, is_sic 27 27 USE ocean_slab_mod, ONLY: tslab, seaice, tice, ocean_slab_init 28 USE time_phylmdz_mod, ONLY: init_iteration, pdtphys, itau_phy 28 29 29 30 IMPLICIT none … … 32 33 ! Objet: Lecture de l'etat initial pour la physique 33 34 !====================================================================== 34 include "dimensions.h"35 35 include "netcdf.inc" 36 36 include "dimsoil.h" 37 37 include "clesphys.h" 38 include "temps.h"39 38 include "thermcell.h" 40 39 include "compbl.h" … … 75 74 ! FH1D 76 75 ! real iolat(jjm+1) 77 real iolat(jjm+1-1/(iim*jjm))76 !real iolat(jjm+1-1/(iim*jjm)) 78 77 79 78 ! Ouvrir le fichier contenant l'etat initial: … … 100 99 ENDDO 101 100 102 tab_cntrl(1)= dtime101 tab_cntrl(1)=pdtphys 103 102 tab_cntrl(2)=radpas 104 103 … … 134 133 clesphy0(7)=tab_cntrl( 11 ) 135 134 clesphy0(8)=tab_cntrl( 12 ) 135 136 ! set time iteration 137 CALL init_iteration(itau_phy) 136 138 137 139 ! Lecture des latitudes (coordonnees): -
LMDZ5/trunk/libf/phylmd/phyredem.F90
r2333 r2344 20 20 USE surface_data 21 21 USE ocean_slab_mod, ONLY : tslab, seaice, tice, fsic 22 USE time_phylmdz_mod, ONLY: annee_ref, day_end, itau_phy, pdtphys 22 23 23 24 IMPLICIT none … … 25 26 include "dimsoil.h" 26 27 include "clesphys.h" 27 include "temps.h"28 28 include "thermcell.h" 29 29 include "compbl.h" … … 67 67 tab_cntrl(ierr) = 0.0 68 68 ENDDO 69 tab_cntrl(1) = dtime69 tab_cntrl(1) = pdtphys 70 70 tab_cntrl(2) = radpas 71 71 ! co2_ppm : current value of atmospheric CO2 -
LMDZ5/trunk/libf/phylmd/phys_cal_mod.F90
r2098 r2344 1 1 ! $Id:$ 2 2 MODULE phys_cal_mod 3 ! This module contains information on the calendar at the actualtime step3 ! This module contains information on the calendar at the current time step 4 4 5 SAVE 6 7 INTEGER :: year_cur ! current year 8 INTEGER :: mth_cur ! current month 9 INTEGER :: day_cur ! current day 10 INTEGER :: days_elapsed ! number of whole days since start of the simulation 11 INTEGER :: mth_len ! number of days in the current month 12 INTEGER year_len ! number of days in the current year 13 REAL :: hour 14 REAL :: jD_1jan 15 REAL :: jH_1jan 16 REAL :: xjour 5 INTEGER,SAVE :: year_cur ! current year 6 !$OMP THREADPRIVATE(year_cur) 7 INTEGER,SAVE :: mth_cur ! current month 8 !$OMP THREADPRIVATE(mth_cur) 9 INTEGER,SAVE :: day_cur ! current day 10 !$OMP THREADPRIVATE(day_cur) 11 INTEGER,SAVE :: days_elapsed ! number of whole days since start of the simulation 12 !$OMP THREADPRIVATE(days_elapsed) 13 INTEGER,SAVE :: mth_len ! number of days in the current month 14 !$OMP THREADPRIVATE(mth_len) 15 INTEGER,SAVE :: year_len ! number of days in the current year 16 !$OMP THREADPRIVATE(year_len) 17 REAL,SAVE :: hour 18 !$OMP THREADPRIVATE(hour) 19 REAL,SAVE :: jD_1jan 20 !$OMP THREADPRIVATE(jD_1jan) 21 REAL,SAVE :: jH_1jan 22 !$OMP THREADPRIVATE(jH_1jan) 23 REAL,SAVE :: xjour 24 !$OMP THREADPRIVATE(xjour) 25 REAL,SAVE :: jD_cur ! jour courant a l'appel de la physique (jour julien) 26 !$OMP THREADPRIVATE(jD_cur) 27 REAL,SAVE :: jH_cur ! heure courante a l'appel de la physique (jour julien) 28 !$OMP THREADPRIVATE(jH_cur) 29 REAL,SAVE :: jD_ref ! jour du demarage de la simulation (jour julien) 30 !$OMP THREADPRIVATE(jD_ref) 17 31 18 32 19 33 CONTAINS 20 34 35 SUBROUTINE phys_cal_init(annee_ref,day_ref) 36 USE IOIPSL, ONLY: ymds2ju 37 IMPLICIT NONE 38 INTEGER,INTENT(IN) :: annee_ref 39 INTEGER,INTENT(IN) :: day_ref 40 41 CALL ymds2ju(annee_ref, 1, day_ref, 0., jD_ref) 42 jD_ref=INT(jD_ref) 43 44 END SUBROUTINE phys_cal_init 45 21 46 SUBROUTINE phys_cal_update(jD_cur, jH_cur) 22 47 ! This subroutine updates the module saved variables. -
LMDZ5/trunk/libf/phylmd/phys_output_mod.F90
r2327 r2344 44 44 USE surface_data, ONLY : ok_snow 45 45 USE phys_output_ctrlout_mod 46 USE mod_grid_phy_lmdz, only: klon_glo 46 USE mod_grid_phy_lmdz, only: klon_glo,nbp_lon,nbp_lat 47 47 USE print_control_mod, ONLY: prt_level,lunout 48 48 USE vertical_layers_mod, ONLY: ap,bp,preff,presnivs 49 49 USE time_phylmdz_mod, ONLY: day_ini, itau_phy, start_time, annee_ref, day_ref 50 50 #ifdef CPP_XIOS 51 51 ! ug Pour les sorties XIOS … … 54 54 55 55 IMPLICIT NONE 56 include "dimensions.h"57 include "temps.h"58 56 include "clesphys.h" 59 57 include "thermcell.h" … … 69 67 REAL, DIMENSION(klon, klev+1), INTENT(IN) :: paprs 70 68 REAL, DIMENSION(klon,klev,nqtot), INTENT(IN):: qx, d_qx 71 REAL, DIMENSION(klon, llm), INTENT(IN) :: zmasse69 REAL, DIMENSION(klon, klev), INTENT(IN) :: zmasse 72 70 73 71 … … 106 104 CHARACTER(LEN=2) :: bb3 107 105 CHARACTER(LEN=6) :: type_ocean 108 INTEGER, DIMENSION( iim*jjmp1) :: ndex2d109 INTEGER, DIMENSION( iim*jjmp1*klev) :: ndex3d106 INTEGER, DIMENSION(nbp_lon*jjmp1) :: ndex2d 107 INTEGER, DIMENSION(nbp_lon*jjmp1*klev) :: ndex3d 110 108 INTEGER :: imin_ins, imax_ins 111 109 INTEGER :: jmin_ins, jmax_ins … … 343 341 IF (phys_out_regfkey(iff)) then 344 342 imin_ins=1 345 imax_ins= iim343 imax_ins=nbp_lon 346 344 jmin_ins=1 347 345 jmax_ins=jjmp1 348 346 349 347 ! correction abderr 350 do i=1, iim348 do i=1,nbp_lon 351 349 WRITE(lunout,*)'io_lon(i)=',io_lon(i) 352 350 IF (io_lon(i).le.phys_out_lonmin(iff)) imin_ins=i … … 367 365 io_lat(jmax_ins),io_lat(jmin_ins) 368 366 369 CALL histbeg(phys_out_filenames(iff), iim,io_lon,jjmp1,io_lat, &367 CALL histbeg(phys_out_filenames(iff),nbp_lon,io_lon,jjmp1,io_lat, & 370 368 imin_ins,imax_ins-imin_ins+1, & 371 369 jmin_ins,jmax_ins-jmin_ins+1, & … … 523 521 use ioipsl 524 522 USE phys_cal_mod 523 USE time_phylmdz_mod, ONLY: day_ref, annee_ref 525 524 USE print_control_mod, ONLY: lunout 526 525 … … 532 531 real :: ttt,xxx,timestep,dayseconde,dtime 533 532 parameter (dayseconde=86400.) 534 include "temps.h"535 533 include "comconst.h" 536 534 -
LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
r2333 r2344 25 25 26 26 USE dimphy, only: klon, klev, klevp1, nslay 27 USE control_mod, only: day_step, iphysiq 27 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 28 USE time_phylmdz_mod, only: day_step_phy, start_time, itau_phy 28 29 USE phys_output_ctrlout_mod, only: o_phis, o_aire, is_ter, is_lic, is_oce, & 29 30 is_ave, is_sic, o_contfracATM, o_contfracOR, & … … 268 269 269 270 270 INCLUDE "temps.h"271 271 INCLUDE "clesphys.h" 272 272 INCLUDE "thermcell.h" 273 273 INCLUDE "compbl.h" 274 274 INCLUDE "YOMCST.h" 275 INCLUDE "dimensions.h"276 275 277 276 ! Input … … 288 287 REAL, DIMENSION(klon, klev+1) :: paprs 289 288 REAL, DIMENSION(klon,klev,nqtot) :: qx, d_qx 290 REAL, DIMENSION(klon, llm) :: zmasse289 REAL, DIMENSION(klon, klev) :: zmasse 291 290 LOGICAL :: flag_aerosol_strat 292 291 INTEGER :: flag_aerosol … … 295 294 296 295 ! Local 297 INTEGER, PARAMETER :: jjmp1=jjm+1-1/jjm298 296 INTEGER :: itau_w 299 297 INTEGER :: i, iinit, iinitend=1, iff, iq, nsrf, k, ll, naero … … 302 300 REAL, DIMENSION (klon,klev+1) :: zx_tmp_fi3d1 303 301 CHARACTER (LEN=4) :: bb2 304 INTEGER, DIMENSION( iim*jjmp1) :: ndex2d305 INTEGER, DIMENSION( iim*jjmp1*klev) :: ndex3d302 INTEGER, DIMENSION(nbp_lon*nbp_lat) :: ndex2d 303 INTEGER, DIMENSION(nbp_lon*nbp_lat*klev) :: ndex3d 306 304 REAL, PARAMETER :: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 307 305 ! REAL, PARAMETER :: missing_val=nf90_fill_real … … 312 310 313 311 ! On calcul le nouveau tau: 314 itau_w = itau_phy + itap + start_time * day_step / iphysiq312 itau_w = itau_phy + itap + start_time * day_step_phy 315 313 ! On le donne à iophy pour que les histwrite y aient accès: 316 314 CALL set_itau_iophy(itau_w) -
LMDZ5/trunk/libf/phylmd/physiq.F90
r2343 r2344 3 3 4 4 SUBROUTINE physiq (nlon,nlev, & 5 debut,lafin,jD_cur , jH_cur,pdtphys, &5 debut,lafin,jD_cur_,jH_cur_,pdtphys_, & 6 6 paprs,pplay,pphi,pphis,presnivs, & 7 7 u,v,rot,t,qx, & … … 14 14 USE comgeomphy 15 15 USE phys_cal_mod, only: year_len, mth_len, days_elapsed, jh_1jan, year_cur, & 16 mth_cur, phys_cal_update16 mth_cur,jD_cur, jH_cur, jD_ref, phys_cal_update 17 17 USE write_field_phy 18 18 USE dimphy 19 19 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, type_trac 20 USE mod_grid_phy_lmdz 20 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, klon_glo 21 21 USE mod_phys_lmdz_para 22 22 USE iophy … … 48 48 use radlwsw_m, only: radlwsw 49 49 use phyaqua_mod, only: zenang_an 50 USE time_phylmdz_mod, only: day_step_phy, annee_ref, day_ref, itau_phy, & 51 start_time, pdtphys 50 52 USE control_mod, ONLY: config_inca 51 53 #ifdef CPP_XIOS … … 114 116 !! d_ps----output-R-tendance physique de la pression au sol 115 117 !!====================================================================== 116 include "dimensions.h"117 118 integer jjmp1 118 parameter (jjmp1=jjm+1-1/jjm)119 integer iip1120 parameter (iip1=iim+1)119 ! parameter (jjmp1=jjm+1-1/jjm) ! => (jjmp1=nbp_lat-1/(nbp_lat-1)) 120 ! integer iip1 121 ! parameter (iip1=iim+1) 121 122 122 123 include "regdim.h" 123 124 include "dimsoil.h" 124 125 include "clesphys.h" 125 include "temps.h"126 126 include "thermcell.h" 127 127 !====================================================================== … … 219 219 INTEGER nlon 220 220 INTEGER nlev 221 REAL, intent(in):: jD_cur, jH_cur 222 223 REAL pdtphys 221 REAL, intent(in):: jD_cur_, jH_cur_ 222 ! JD_cur and JH_cur to be used in physics are in phys_cal_mod 223 REAL,INTENT(IN) :: pdtphys_ 224 ! NB: pdtphys to be used in physics is in time_phylmdz_mod 224 225 LOGICAL debut, lafin 225 226 REAL paprs(klon,klev+1) … … 509 510 SAVE lmt_pas ! frequence de mise a jour 510 511 !$OMP THREADPRIVATE(lmt_pas) 511 real zmasse(klon, llm),exner(klon, llm)512 real zmasse(klon, nbp_lev),exner(klon, nbp_lev) 512 513 ! (column-density of mass of air in a cell, in kg m-2) 513 514 real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 … … 694 695 REAL tabcntr0( length ) 695 696 ! 696 INTEGER ndex2d( iim*jjmp1)697 INTEGER ndex2d(nbp_lon*nbp_lat) 697 698 !IM 698 699 ! … … 706 707 !IM 141004 END 707 708 !IM 190504 BEG 708 INTEGER ij, imp1jmp1 709 PARAMETER(imp1jmp1=(iim+1)*jjmp1) 709 INTEGER ij 710 ! INTEGER imp1jmp1 711 ! PARAMETER(imp1jmp1=(iim+1)*jjmp1) 710 712 !ym A voir plus tard 711 REAL zx_tmp(imp1jmp1), airedyn(iim+1,jjmp1) 712 REAL padyn(iim+1,jjmp1,klev+1) 713 REAL dudyn(iim+1,jjmp1,klev) 714 REAL rlatdyn(iim+1,jjmp1) 713 REAL zx_tmp((nbp_lon+1)*nbp_lat) 714 REAL airedyn(nbp_lon+1,nbp_lat) 715 REAL padyn(nbp_lon+1,nbp_lat,klev+1) 716 REAL dudyn(nbp_lon+1,nbp_lat,klev) 717 REAL rlatdyn(nbp_lon+1,nbp_lat) 715 718 !IM 190504 END 716 719 LOGICAL ok_msk … … 724 727 REAL zx_tmp_fi2d(klon) ! variable temporaire grille physique 725 728 REAL zx_tmp_fi3d(klon,klev) ! variable temporaire pour champs 3D 726 REAL zx_tmp_2d(iim,jjmp1) 727 REAL zx_lon(iim,jjmp1), zx_lat(iim,jjmp1) 729 REAL zx_tmp_2d(nbp_lon,nbp_lat) 730 REAL zx_lon(nbp_lon,nbp_lat) 731 REAL zx_lat(nbp_lon,nbp_lat) 728 732 ! 729 733 INTEGER nid_day_seri, nid_ctesGCM … … 900 904 !albedo SB <<< 901 905 906 ! Ehouarn: set value of jjmp1 since it is no longer a "fixed parameter" 907 jjmp1=nbp_lat 908 902 909 !====================================================================== 903 910 ! Gestion calendrier : mise a jour du module phys_cal_mod 904 911 ! 912 JD_cur=JD_cur_ 913 JH_cur=JH_cur_ 914 pdtphys=pdtphys_ 905 915 CALL phys_cal_update(jD_cur,jH_cur) 906 916 … … 992 1002 993 1003 torsfc=0. 994 forall (k=1: llm) zmasse(:, k) = (paprs(:, k)-paprs(:, k+1)) / rg1004 forall (k=1: nbp_lev) zmasse(:, k) = (paprs(:, k)-paprs(:, k+1)) / rg 995 1005 996 1006 … … 1832 1842 1833 1843 if (mydebug) then 1834 call writefield_phy('u_seri',u_seri, llm)1835 call writefield_phy('v_seri',v_seri, llm)1836 call writefield_phy('t_seri',t_seri, llm)1837 call writefield_phy('q_seri',q_seri, llm)1844 call writefield_phy('u_seri',u_seri,nbp_lev) 1845 call writefield_phy('v_seri',v_seri,nbp_lev) 1846 call writefield_phy('t_seri',t_seri,nbp_lev) 1847 call writefield_phy('q_seri',q_seri,nbp_lev) 1838 1848 endif 1839 1849 … … 1978 1988 1979 1989 if (mydebug) then 1980 call writefield_phy('u_seri',u_seri, llm)1981 call writefield_phy('v_seri',v_seri, llm)1982 call writefield_phy('t_seri',t_seri, llm)1983 call writefield_phy('q_seri',q_seri, llm)1990 call writefield_phy('u_seri',u_seri,nbp_lev) 1991 call writefield_phy('v_seri',v_seri,nbp_lev) 1992 call writefield_phy('t_seri',t_seri,nbp_lev) 1993 call writefield_phy('q_seri',q_seri,nbp_lev) 1984 1994 endif 1985 1995 … … 2469 2479 2470 2480 if (mydebug) then 2471 call writefield_phy('u_seri',u_seri, llm)2472 call writefield_phy('v_seri',v_seri, llm)2473 call writefield_phy('t_seri',t_seri, llm)2474 call writefield_phy('q_seri',q_seri, llm)2481 call writefield_phy('u_seri',u_seri,nbp_lev) 2482 call writefield_phy('v_seri',v_seri,nbp_lev) 2483 call writefield_phy('t_seri',t_seri,nbp_lev) 2484 call writefield_phy('q_seri',q_seri,nbp_lev) 2475 2485 endif 2476 2486 … … 3039 3049 3040 3050 if (mydebug) then 3041 call writefield_phy('u_seri',u_seri, llm)3042 call writefield_phy('v_seri',v_seri, llm)3043 call writefield_phy('t_seri',t_seri, llm)3044 call writefield_phy('q_seri',q_seri, llm)3051 call writefield_phy('u_seri',u_seri,nbp_lev) 3052 call writefield_phy('v_seri',v_seri,nbp_lev) 3053 call writefield_phy('t_seri',t_seri,nbp_lev) 3054 call writefield_phy('q_seri',q_seri,nbp_lev) 3045 3055 endif 3046 3056 … … 3397 3407 ibas_con, & 3398 3408 cldfra, & 3399 iim, &3400 jjm, &3409 nbp_lon, & 3410 nbp_lat-1, & 3401 3411 tr_seri, & 3402 3412 ftsol, & … … 3525 3535 3526 3536 if (mydebug) then 3527 call writefield_phy('u_seri',u_seri, llm)3528 call writefield_phy('v_seri',v_seri, llm)3529 call writefield_phy('t_seri',t_seri, llm)3530 call writefield_phy('q_seri',q_seri, llm)3537 call writefield_phy('u_seri',u_seri,nbp_lev) 3538 call writefield_phy('v_seri',v_seri,nbp_lev) 3539 call writefield_phy('t_seri',t_seri,nbp_lev) 3540 call writefield_phy('q_seri',q_seri,nbp_lev) 3531 3541 endif 3532 3542 … … 3716 3726 ! 3717 3727 if (mydebug) then 3718 call writefield_phy('u_seri',u_seri, llm)3719 call writefield_phy('v_seri',v_seri, llm)3720 call writefield_phy('t_seri',t_seri, llm)3721 call writefield_phy('q_seri',q_seri, llm)3728 call writefield_phy('u_seri',u_seri,nbp_lev) 3729 call writefield_phy('v_seri',v_seri,nbp_lev) 3730 call writefield_phy('t_seri',t_seri,nbp_lev) 3731 call writefield_phy('q_seri',q_seri,nbp_lev) 3722 3732 endif 3723 3733 … … 3801 3811 ! 3802 3812 if (mydebug) then 3803 call writefield_phy('u_seri',u_seri, llm)3804 call writefield_phy('v_seri',v_seri, llm)3805 call writefield_phy('t_seri',t_seri, llm)3806 call writefield_phy('q_seri',q_seri, llm)3813 call writefield_phy('u_seri',u_seri,nbp_lev) 3814 call writefield_phy('v_seri',v_seri,nbp_lev) 3815 call writefield_phy('t_seri',t_seri,nbp_lev) 3816 call writefield_phy('q_seri',q_seri,nbp_lev) 3807 3817 endif 3808 3818 … … 3909 3919 3910 3920 if (mydebug) then 3911 call writefield_phy('u_seri',u_seri, llm)3912 call writefield_phy('v_seri',v_seri, llm)3913 call writefield_phy('t_seri',t_seri, llm)3914 call writefield_phy('q_seri',q_seri, llm)3921 call writefield_phy('u_seri',u_seri,nbp_lev) 3922 call writefield_phy('v_seri',v_seri,nbp_lev) 3923 call writefield_phy('t_seri',t_seri,nbp_lev) 3924 call writefield_phy('q_seri',q_seri,nbp_lev) 3915 3925 endif 3916 3926 … … 4082 4092 4083 4093 d_t_ec(:,:)=0. 4084 forall (k=1: llm) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA4094 forall (k=1: nbp_lev) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA 4085 4095 CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx(:,:,ivap), & 4086 4096 u_seri,v_seri,t_seri,q_seri,pbl_tke(:,:,is_ave)-tke0(:,:), & … … 4178 4188 ! 4179 4189 if (mydebug) then 4180 call writefield_phy('u_seri',u_seri, llm)4181 call writefield_phy('v_seri',v_seri, llm)4182 call writefield_phy('t_seri',t_seri, llm)4183 call writefield_phy('q_seri',q_seri, llm)4190 call writefield_phy('u_seri',u_seri,nbp_lev) 4191 call writefield_phy('v_seri',v_seri,nbp_lev) 4192 call writefield_phy('t_seri',t_seri,nbp_lev) 4193 call writefield_phy('q_seri',q_seri,nbp_lev) 4184 4194 endif 4185 4195 -
LMDZ5/trunk/libf/phylmd/phytrac_mod.F90
r2320 r2344 106 106 107 107 INCLUDE "YOMCST.h" 108 INCLUDE "dimensions.h"109 108 INCLUDE "clesphys.h" 110 INCLUDE "temps.h"111 INCLUDE "paramet.h"112 109 INCLUDE "thermcell.h" 113 110 !========================================================================== -
LMDZ5/trunk/libf/phylmd/readaerosol_interp.F90
r2315 r2344 27 27 INCLUDE "YOMCST.h" 28 28 INCLUDE "chem.h" 29 INCLUDE "temps.h"30 29 INCLUDE "clesphys.h" 31 INCLUDE "dimensions.h" 30 32 31 ! 33 32 ! Input: -
LMDZ5/trunk/libf/phylmd/surf_land_orchidee_mod.F90
r2311 r2344 46 46 USE indice_sol_mod 47 47 USE print_control_mod, ONLY: lunout 48 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 48 49 ! 49 50 ! Cette routine sert d'interface entre le modele atmospherique et le … … 98 99 ! qsurf air moisture at surface 99 100 ! 100 INCLUDE "temps.h"101 101 INCLUDE "YOMCST.h" 102 INCLUDE "dimensions.h"103 102 104 103 ! … … 229 228 DO igrid = 2, klon - 1 230 229 indi = indi + 1 231 IF ( indi > iim) THEN230 IF ( indi > nbp_lon) THEN 232 231 indi = 1 233 232 indj = indj + 1 … … 237 236 ENDDO 238 237 ig(klon) = 1 239 jg(klon) = jjm + 1238 jg(klon) = nbp_lat 240 239 241 240 IF ((.NOT. ALLOCATED(lalo))) THEN … … 247 246 ENDIF 248 247 IF ((.NOT. ALLOCATED(lon_scat))) THEN 249 ALLOCATE(lon_scat( iim,jjm+1), stat = error)248 ALLOCATE(lon_scat(nbp_lon,nbp_lat), stat = error) 250 249 IF (error /= 0) THEN 251 250 abort_message='Pb allocation lon_scat' … … 254 253 ENDIF 255 254 IF ((.NOT. ALLOCATED(lat_scat))) THEN 256 ALLOCATE(lat_scat( iim,jjm+1), stat = error)255 ALLOCATE(lat_scat(nbp_lon,nbp_lat), stat = error) 257 256 IF (error /= 0) THEN 258 257 abort_message='Pb allocation lat_scat' … … 275 274 IF (is_mpi_root) THEN 276 275 index = 1 277 DO jj = 2, jjm278 DO ij = 1, iim276 DO jj = 2, nbp_lat-1 277 DO ij = 1, nbp_lon 279 278 index = index + 1 280 279 lon_scat(ij,jj) = rlon_g(index) … … 284 283 lon_scat(:,1) = lon_scat(:,2) 285 284 lat_scat(:,1) = rlat_g(1) 286 lon_scat(:, jjm+1) = lon_scat(:,2)287 lat_scat(:, jjm+1) = rlat_g(klon_glo)285 lon_scat(:,nbp_lat) = lon_scat(:,2) 286 lat_scat(:,nbp_lat) = rlat_g(klon_glo) 288 287 ENDIF 289 288 … … 395 394 396 395 #ifdef CPP_VEGET 397 CALL intersurf_main (itime+itau_phy-1, iim, jjm+1, knon, ktindex, dtime, &396 CALL intersurf_main (itime+itau_phy-1, nbp_lon, nbp_lat, knon, ktindex, dtime, & 398 397 lrestart_read, lrestart_write, lalo, & 399 398 contfrac, neighbours, resolution, date0, & … … 419 418 IF (knon > 0) THEN 420 419 #ifdef CPP_VEGET 421 CALL intersurf_main (itime+itau_phy, iim, jjm+1, knon, ktindex, dtime, &420 CALL intersurf_main (itime+itau_phy, nbp_lon, nbp_lat, knon, ktindex, dtime, & 422 421 lrestart_read, lrestart_write, lalo, & 423 422 contfrac, neighbours, resolution, date0, & -
LMDZ5/trunk/libf/phylmd/surf_land_orchidee_noopenmp_mod.F90
r2311 r2344 98 98 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, fco2_land_inst, fco2_lu_inst 99 99 USE indice_sol_mod 100 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 100 101 IMPLICIT NONE 101 102 102 INCLUDE "temps.h"103 103 INCLUDE "YOMCST.h" 104 INCLUDE "dimensions.h"105 104 106 105 ! … … 231 230 DO igrid = 2, klon - 1 232 231 indi = indi + 1 233 IF ( indi > iim) THEN232 IF ( indi > nbp_lon) THEN 234 233 indi = 1 235 234 indj = indj + 1 … … 239 238 ENDDO 240 239 ig(klon) = 1 241 jg(klon) = jjm + 1240 jg(klon) = nbp_lat 242 241 243 242 IF ((.NOT. ALLOCATED(lalo))) THEN … … 249 248 ENDIF 250 249 IF ((.NOT. ALLOCATED(lon_scat))) THEN 251 ALLOCATE(lon_scat( iim,jjm+1), stat = error)250 ALLOCATE(lon_scat(nbp_lon,nbp_lat), stat = error) 252 251 IF (error /= 0) THEN 253 252 abort_message='Pb allocation lon_scat' … … 256 255 ENDIF 257 256 IF ((.NOT. ALLOCATED(lat_scat))) THEN 258 ALLOCATE(lat_scat( iim,jjm+1), stat = error)257 ALLOCATE(lat_scat(nbp_lon,nbp_lat), stat = error) 259 258 IF (error /= 0) THEN 260 259 abort_message='Pb allocation lat_scat' … … 277 276 IF (is_mpi_root) THEN 278 277 index = 1 279 DO jj = 2, jjm280 DO ij = 1, iim278 DO jj = 2, nbp_lat-1 279 DO ij = 1, nbp_lon 281 280 index = index + 1 282 281 lon_scat(ij,jj) = rlon_g(index) … … 286 285 lon_scat(:,1) = lon_scat(:,2) 287 286 lat_scat(:,1) = rlat_g(1) 288 lon_scat(:, jjm+1) = lon_scat(:,2)289 lat_scat(:, jjm+1) = rlat_g(klon_glo)287 lon_scat(:,nbp_lat) = lon_scat(:,2) 288 lat_scat(:,nbp_lat) = rlat_g(klon_glo) 290 289 ENDIF 291 290 … … 398 397 ! if (pole_nord) then 399 398 ! offset=0 400 ! ktindex(:)=ktindex(:)+ iim-1399 ! ktindex(:)=ktindex(:)+nbp_lon-1 401 400 ! else 402 ! offset = klon_mpi_begin-1+ iim-1403 ! ktindex(:)=ktindex(:)+MOD(offset, iim)404 ! offset=offset-MOD(offset, iim)401 ! offset = klon_mpi_begin-1+nbp_lon-1 402 ! ktindex(:)=ktindex(:)+MOD(offset,nbp_lon) 403 ! offset=offset-MOD(offset,nbp_lon) 405 404 ! endif 406 405 … … 412 411 #ifndef CPP_MPI 413 412 ! Interface for ORCHIDEE compiled in sequential mode(without preprocessing flag CPP_MPI) 414 CALL intersurf_main (itime+itau_phy-1, iim, jjm+1, knon, ktindex, dtime, &413 CALL intersurf_main (itime+itau_phy-1, nbp_lon, nbp_lat, knon, ktindex, dtime, & 415 414 lrestart_read, lrestart_write, lalo, & 416 415 contfrac, neighbours, resolution, date0, & … … 429 428 #else 430 429 ! Interface for ORCHIDEE version 1.9 or later(1.9.2, 1.9.3, 1.9.4, 1.9.5) compiled in parallel mode(with preprocessing flag CPP_MPI) 431 CALL intersurf_main (itime+itau_phy-1, iim, jjm+1, offset, knon, ktindex, &430 CALL intersurf_main (itime+itau_phy-1, nbp_lon, nbp_lat, offset, knon, ktindex, & 432 431 orch_comm, dtime, lrestart_read, lrestart_write, lalo, & 433 432 contfrac, neighbours, resolution, date0, & … … 457 456 #ifndef CPP_MPI 458 457 ! Interface for ORCHIDEE compiled in sequential mode(without preprocessing flag CPP_MPI) 459 CALL intersurf_main (itime+itau_phy, iim, jjm+1, knon, ktindex, dtime, &458 CALL intersurf_main (itime+itau_phy, nbp_lon, nbp_lat, knon, ktindex, dtime, & 460 459 lrestart_read, lrestart_write, lalo, & 461 460 contfrac, neighbours, resolution, date0, & … … 473 472 #else 474 473 ! Interface for ORCHIDEE version 1.9 or later compiled in parallel mode(with preprocessing flag CPP_MPI) 475 CALL intersurf_main (itime+itau_phy, iim, jjm+1,offset, knon, ktindex, &474 CALL intersurf_main (itime+itau_phy, nbp_lon, nbp_lat,offset, knon, ktindex, & 476 475 orch_comm,dtime, lrestart_read, lrestart_write, lalo, & 477 476 contfrac, neighbours, resolution, date0, & … … 529 528 SUBROUTINE Init_orchidee_index(knon,orch_comm,knindex,offset,ktindex) 530 529 531 INCLUDE "dimensions.h"530 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 532 531 533 532 #ifdef CPP_MPI … … 562 561 !**************************************************************************************** 563 562 564 MyLastPoint=klon_mpi_begin-1+knindex(knon)+ iim-1563 MyLastPoint=klon_mpi_begin-1+knindex(knon)+nbp_lon-1 565 564 566 565 IF (is_parallel) THEN … … 591 590 offset=0 592 591 ELSE 593 offset=LastPoint-MOD(LastPoint, iim)594 ENDIF 595 596 ktindex(1:knon)=knindex(1:knon)+(klon_mpi_begin+ iim-1)-offset-1592 offset=LastPoint-MOD(LastPoint,nbp_lon) 593 ENDIF 594 595 ktindex(1:knon)=knindex(1:knon)+(klon_mpi_begin+nbp_lon-1)-offset-1 597 596 598 597 … … 634 633 635 634 USE indice_sol_mod 636 637 INCLUDE "dimensions.h" 635 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 636 638 637 #ifdef CPP_MPI 639 638 INCLUDE 'mpif.h' … … 661 660 INTEGER, DIMENSION(8) :: offset 662 661 INTEGER, DIMENSION(knon) :: ktindex_p 663 INTEGER, DIMENSION( iim,jjm+1) :: correspond662 INTEGER, DIMENSION(nbp_lon,nbp_lat) :: correspond 664 663 INTEGER, ALLOCATABLE, DIMENSION(:) :: ktindex_g 665 664 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: neighbours_g … … 694 693 ENDIF 695 694 696 ktindex_p(1:knon)=ktindex(1:knon)+klon_mpi_begin-1+ iim-1695 ktindex_p(1:knon)=ktindex(1:knon)+klon_mpi_begin-1+nbp_lon-1 697 696 698 697 IF (is_sequential) THEN … … 713 712 ! 714 713 ! offset bord ouest 715 off_ini(1,1) = - iim ; off_ini(2,1) = - iim+ 1; off_ini(3,1) = 1716 off_ini(4,1) = iim + 1; off_ini(5,1) = iim ; off_ini(6,1) = 2 * iim- 1717 off_ini(7,1) = iim-1 ; off_ini(8,1) = - 1714 off_ini(1,1) = - nbp_lon ; off_ini(2,1) = - nbp_lon + 1; off_ini(3,1) = 1 715 off_ini(4,1) = nbp_lon + 1; off_ini(5,1) = nbp_lon ; off_ini(6,1) = 2 * nbp_lon - 1 716 off_ini(7,1) = nbp_lon -1 ; off_ini(8,1) = - 1 718 717 ! offset point normal 719 off_ini(1,2) = - iim ; off_ini(2,2) = - iim+ 1; off_ini(3,2) = 1720 off_ini(4,2) = iim + 1; off_ini(5,2) = iim ; off_ini(6,2) = iim- 1721 off_ini(7,2) = -1 ; off_ini(8,2) = - iim- 1718 off_ini(1,2) = - nbp_lon ; off_ini(2,2) = - nbp_lon + 1; off_ini(3,2) = 1 719 off_ini(4,2) = nbp_lon + 1; off_ini(5,2) = nbp_lon ; off_ini(6,2) = nbp_lon - 1 720 off_ini(7,2) = -1 ; off_ini(8,2) = - nbp_lon - 1 722 721 ! offset bord est 723 off_ini(1,3) = - iim; off_ini(2,3) = - 2 * iim + 1; off_ini(3,3) = - iim+ 1724 off_ini(4,3) = 1 ; off_ini(5,3) = iim ; off_ini(6,3) = iim- 1725 off_ini(7,3) = -1 ; off_ini(8,3) = - iim- 1722 off_ini(1,3) = - nbp_lon; off_ini(2,3) = - 2 * nbp_lon + 1; off_ini(3,3) = - nbp_lon + 1 723 off_ini(4,3) = 1 ; off_ini(5,3) = nbp_lon ; off_ini(6,3) = nbp_lon - 1 724 off_ini(7,3) = -1 ; off_ini(8,3) = - nbp_lon - 1 726 725 ! 727 726 ! … … 730 729 DO igrid = 1, knon_g 731 730 index = ktindex_g(igrid) 732 jj = INT((index - 1)/ iim) + 1733 ij = index - (jj - 1) * iim731 jj = INT((index - 1)/nbp_lon) + 1 732 ij = index - (jj - 1) * nbp_lon 734 733 correspond(ij,jj) = igrid 735 734 ENDDO … … 737 736 DO igrid = 1, knon_g 738 737 iglob = ktindex_g(igrid) 739 IF (MOD(iglob, iim) == 1) THEN738 IF (MOD(iglob, nbp_lon) == 1) THEN 740 739 offset = off_ini(:,1) 741 ELSE IF(MOD(iglob, iim) == 0) THEN740 ELSE IF(MOD(iglob, nbp_lon) == 0) THEN 742 741 offset = off_ini(:,3) 743 742 ELSE … … 746 745 DO i = 1, 8 747 746 index = iglob + offset(i) 748 ireal = (MIN(MAX(1, index - iim+ 1), klon_glo))747 ireal = (MIN(MAX(1, index - nbp_lon + 1), klon_glo)) 749 748 IF (pctsrf_g(ireal) > EPSFRA) THEN 750 jj = INT((index - 1)/ iim) + 1751 ij = index - (jj - 1) * iim749 jj = INT((index - 1)/nbp_lon) + 1 750 ij = index - (jj - 1) * nbp_lon 752 751 neighbours_g(igrid, i) = correspond(ij, jj) 753 752 ENDIF -
LMDZ5/trunk/libf/phylmd/time_phylmdz_mod.F90
r2343 r2344 26 26 INTEGER,SAVE :: itau_phy ! number of physiq iteration from origin 27 27 !$OMP THREADPRIVATE(itau_phy) 28 INTEGER,SAVE :: itaufin ! final iteration29 !$OMP THREADPRIVATE(itaufin )28 INTEGER,SAVE :: itaufin_phy ! final iteration (in itau_phy steps) 29 !$OMP THREADPRIVATE(itaufin_phy) 30 30 REAL,SAVE :: current_time ! current elapsed time (s) from the begining of the run 31 31 !$OMP THREADPRIVATE(current_time) … … 37 37 ndays_, pdtphys_) 38 38 USE ioipsl_getin_p_mod, ONLY : getin_p 39 USE phys_cal_mod, ONLY: phys_cal_init 39 40 IMPLICIT NONE 40 41 INCLUDE 'YOMCST.h' … … 62 63 current_time=0 63 64 64 !CALL phys_cal_init(annee_ref,day_ref)65 CALL phys_cal_init(annee_ref,day_ref) 65 66 66 67 END SUBROUTINE init_time 67 68 69 SUBROUTINE init_iteration(itau_phy_) 70 IMPLICIT NONE 71 INTEGER, INTENT(IN) :: itau_phy_ 72 itau_phy=itau_phy_ 73 IF (raz_date==1) itau_phy=0 74 75 itaufin_phy=itau_phy+NINT(ndays/pdtphys) 76 77 END SUBROUTINE init_iteration 78 68 79 END MODULE time_phylmdz_mod 69 80 -
LMDZ5/trunk/libf/phylmd/write_histday_seri.h
r2343 r2344 24 24 zx_tmp_fi2d(1:klon)=moyglo 25 25 ! 26 CALL gr_fi_ecrit(1, klon, iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)26 CALL gr_fi_ecrit(1, klon,nbp_lon,nbp_lat, zx_tmp_fi2d,zx_tmp_2d) 27 27 CALL histwrite(nid_day_seri,"bilTOA",itau_w, & 28 zx_tmp_2d, iim*jjmp1,ndex2d)28 zx_tmp_2d,nbp_lon*nbp_lat,ndex2d) 29 29 ! 30 30 ok_msk=.FALSE. … … 33 33 zx_tmp_fi2d(1:klon)=moyglo 34 34 ! 35 CALL gr_fi_ecrit(1, klon, iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)35 CALL gr_fi_ecrit(1, klon,nbp_lon,nbp_lat, zx_tmp_fi2d,zx_tmp_2d) 36 36 CALL histwrite(nid_day_seri,"bils",itau_w, & 37 zx_tmp_2d, iim*jjmp1,ndex2d)37 zx_tmp_2d,nbp_lon*nbp_lat,ndex2d) 38 38 ! 39 39 DO k=1, klev … … 48 48 zx_tmp_fi2d(1:klon)=moyglo 49 49 ! 50 CALL gr_fi_ecrit(1, klon, iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)50 CALL gr_fi_ecrit(1, klon,nbp_lon,nbp_lat, zx_tmp_fi2d,zx_tmp_2d) 51 51 CALL histwrite(nid_day_seri,"ecin",itau_w, & 52 zx_tmp_2d, iim*jjmp1,ndex2d)52 zx_tmp_2d,nbp_lon*nbp_lat,ndex2d) 53 53 ! 54 54 !IM 151004 BEG … … 65 65 zx_tmp_fi2d(1:klon)=moyglo 66 66 ! 67 CALL gr_fi_ecrit(1, klon, iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)67 CALL gr_fi_ecrit(1, klon,nbp_lon,nbp_lat, zx_tmp_fi2d,zx_tmp_2d) 68 68 CALL histwrite(nid_day_seri,"momang",itau_w,zx_tmp_2d, & 69 iim*jjmp1,ndex2d)69 nbp_lon*nbp_lat,ndex2d) 70 70 ! 71 71 ! friction torque … … 80 80 zx_tmp_fi2d(1:klon)=moyglo 81 81 ! 82 CALL gr_fi_ecrit(1, klon, iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)82 CALL gr_fi_ecrit(1, klon,nbp_lon,nbp_lat, zx_tmp_fi2d,zx_tmp_2d) 83 83 CALL histwrite(nid_day_seri,"frictor",itau_w,zx_tmp_2d, & 84 iim*jjmp1,ndex2d)84 nbp_lon*nbp_lat,ndex2d) 85 85 ! 86 86 ! mountain torque 87 87 ! 88 88 !IM 190504 BEG 89 CALL gr_fi_dyn(1,klon, iim+1,jjm+1,airephy,airedyn)90 CALL gr_fi_dyn(klev+1,klon, iim+1,jjm+1,paprs,padyn)91 CALL gr_fi_dyn(1,klon, iim+1,jjm+1,rlat,rlatdyn)89 CALL gr_fi_dyn(1,klon,nbp_lon+1,nbp_lat,airephy,airedyn) 90 CALL gr_fi_dyn(klev+1,klon,nbp_lon+1,nbp_lat,paprs,padyn) 91 CALL gr_fi_dyn(1,klon,nbp_lon+1,nbp_lat,rlat,rlatdyn) 92 92 mountor=0. 93 93 airetot=0. 94 DO j = 1, jjmp195 DO i = 1, iim+196 ij=i+( iim+1)*(j-1)94 DO j = 1, nbp_lat 95 DO i = 1, nbp_lon+1 96 ij=i+(nbp_lon+1)*(j-1) 97 97 zx_tmp(ij)=0. 98 98 DO k = 1, klev … … 113 113 ! 114 114 !IM 190504 END 115 zx_tmp_2d(1: iim,1:jjmp1)=mountor115 zx_tmp_2d(1:nbp_lon,1:nbp_lat)=mountor 116 116 CALL histwrite(nid_day_seri,"mountor",itau_w,zx_tmp_2d, & 117 iim*jjmp1,ndex2d)117 nbp_lon*nbp_lat,ndex2d) 118 118 ! 119 119 ENDIF !(1.EQ.0) THEN 120 120 ! 121 121 ! 122 CALL gr_fi_dyn(1,klon, iim+1,jjm+1,airephy,airedyn)123 CALL gr_fi_ecrit(1,klon, iim,jjmp1,airephy,zx_tmp_2d)122 CALL gr_fi_dyn(1,klon,nbp_lon+1,nbp_lat,airephy,airedyn) 123 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,airephy,zx_tmp_2d) 124 124 airetot=0. 125 ! DO j = 1, jjmp1126 ! DO i = 1, iim+1127 ! ij=i+( iim+1)*(j-1)125 ! DO j = 1, nbp_lat 126 ! DO i = 1, nbp_lon+1 127 ! ij=i+(nbp_lon+1)*(j-1) 128 128 ! DO k = 1, klev 129 129 ! airetot=airetot+airedyn(i,j) … … 139 139 ! 140 140 airetot=0. 141 DO j=1, jjmp1142 DO i=1, iim141 DO j=1, nbp_lat 142 DO i=1, nbp_lon 143 143 airetot=airetot+zx_tmp_2d(i,j) 144 144 ENDDO … … 149 149 ! 150 150 zx_tmp_fi2d(1:klon)=aam/airetot 151 CALL gr_fi_ecrit(1,klon, iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)151 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,zx_tmp_fi2d,zx_tmp_2d) 152 152 CALL histwrite(nid_day_seri,"momang",itau_w,zx_tmp_2d, & 153 iim*jjmp1,ndex2d)153 nbp_lon*nbp_lat,ndex2d) 154 154 ! 155 155 zx_tmp_fi2d(1:klon)=torsfc/airetot 156 CALL gr_fi_ecrit(1,klon, iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)156 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,zx_tmp_fi2d,zx_tmp_2d) 157 157 CALL histwrite(nid_day_seri,"torsfc",itau_w,zx_tmp_2d, & 158 iim*jjmp1,ndex2d)158 nbp_lon*nbp_lat,ndex2d) 159 159 ! 160 160 !IM 151004 END … … 164 164 zx_tmp_fi2d(1:klon)=moyglo 165 165 ! 166 CALL gr_fi_ecrit(1,klon, iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)166 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,zx_tmp_fi2d,zx_tmp_2d) 167 167 CALL histwrite(nid_day_seri,"tamv",itau_w, & 168 zx_tmp_2d, iim*jjmp1,ndex2d)168 zx_tmp_2d,nbp_lon*nbp_lat,ndex2d) 169 169 ! 170 170 ok_msk=.FALSE. … … 173 173 zx_tmp_fi2d(1:klon)=moyglo 174 174 ! 175 CALL gr_fi_ecrit(1, klon, iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)175 CALL gr_fi_ecrit(1, klon,nbp_lon,nbp_lat, zx_tmp_fi2d,zx_tmp_2d) 176 176 CALL histwrite(nid_day_seri,"psol",itau_w, & 177 zx_tmp_2d, iim*jjmp1,ndex2d)177 zx_tmp_2d,nbp_lon*nbp_lat,ndex2d) 178 178 ! 179 179 ok_msk=.FALSE. … … 182 182 zx_tmp_fi2d(1:klon)=moyglo 183 183 ! 184 CALL gr_fi_ecrit(1, klon, iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)184 CALL gr_fi_ecrit(1, klon,nbp_lon,nbp_lat, zx_tmp_fi2d,zx_tmp_2d) 185 185 CALL histwrite(nid_day_seri,"evap",itau_w, & 186 zx_tmp_2d, iim*jjmp1,ndex2d)186 zx_tmp_2d,nbp_lon*nbp_lat,ndex2d) 187 187 ! 188 188 ! DO i=1, klon … … 196 196 ! zx_tmp_fi2d(1:klon)=moyglo 197 197 ! 198 ! CALL gr_fi_ecrit(1, klon, iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)198 ! CALL gr_fi_ecrit(1, klon,nbp_lon,nbp_lat,zx_tmp_fi2d,zx_tmp_2d) 199 199 ! CALL histwrite(nid_day_seri,"SnowFrac", 200 ! . itau_w,zx_tmp_2d, iim*jjmp1,ndex2d)200 ! . itau_w,zx_tmp_2d,nbp_lon*nbp_lat,ndex2d) 201 201 ! 202 202 ! DO i=1, klon … … 212 212 ! zx_tmp_fi2d(1:klon)=moyglo 213 213 ! 214 ! CALL gr_fi_ecrit(1, klon, iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)214 ! CALL gr_fi_ecrit(1, klon,nbp_lon,nbp_lat,zx_tmp_fi2d,zx_tmp_2d) 215 215 ! CALL histwrite(nid_day_seri,"snow_depth",itau_w, 216 ! . zx_tmp_2d, iim*jjmp1,ndex2d)216 ! . zx_tmp_2d,nbp_lon*nbp_lat,ndex2d) 217 217 ! 218 218 DO i=1, klon … … 226 226 zx_tmp_fi2d(1:klon)=moyglo 227 227 ! 228 CALL gr_fi_ecrit(1, klon, iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)228 CALL gr_fi_ecrit(1, klon,nbp_lon,nbp_lat, zx_tmp_fi2d, zx_tmp_2d) 229 229 CALL histwrite(nid_day_seri,"tsol_"//clnsurf(is_oce), & 230 itau_w,zx_tmp_2d, iim*jjmp1,ndex2d)230 itau_w,zx_tmp_2d,nbp_lon*nbp_lat,ndex2d) 231 231 ! 232 232 !=================================================================
Note: See TracChangeset
for help on using the changeset viewer.