Changeset 836 for LMDZ4/trunk/libf
- Timestamp:
- Aug 30, 2007, 10:55:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk/libf/phylmd/cpl_mod.F90
r793 r836 17 17 ! Use statements 18 18 !************************************************************************************* 19 USE dimphy, ONLY : klon , zmasq19 USE dimphy, ONLY : klon 20 20 USE mod_phys_lmdz_para 21 21 USE ioipsl … … 71 71 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: pctsrf_sav 72 72 !$OMP THREADPRIVATE(pctsrf_sav) 73 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: zmasq2D74 !$OMP THREADPRIVATE(zmasq2D)75 73 INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: unity 76 74 !$OMP THREADPRIVATE(unity) … … 181 179 ALLOCATE(read_alb_sic(iim, jj_nb), stat = error) 182 180 sum_error = sum_error + error 183 ALLOCATE(zmasq2D(iim, jj_nb), stat = error)184 sum_error = sum_error + error185 186 181 187 182 IF (sum_error /= 0) THEN … … 202 197 cpl_taux = 0. ; cpl_tauy = 0. ; cpl_rriv2D = 0. ; cpl_rcoa2D = 0. 203 198 cpl_rlic2D = 0. ; cpl_windsp = 0. 204 205 !*************************************************************************************206 ! Transform the land-ocean mask into 2D grid.207 ! Colorize zmasq2D with 99 so that after gath2cpl points not valid can be recognized.208 !209 !*************************************************************************************210 zmasq2D(:,:) = 99.211 CALL gath2cpl(zmasq, zmasq2D, klon, unity)212 199 213 200 !************************************************************************************* … … 936 923 INTEGER, DIMENSION(iim*(jjm+1)) :: ndexct 937 924 REAL :: Up, Down 938 REAL, DIMENSION(iim, jj_nb) :: tmp_lon, tmp_lat939 REAL, DIMENSION(iim, jj_nb, 4) :: pctsrf2D940 REAL, DIMENSION(iim, jj_nb) :: deno925 REAL, DIMENSION(iim, jj_nb) :: tmp_lon, tmp_lat 926 REAL, DIMENSION(iim, jj_nb, 4) :: pctsrf2D 927 REAL, DIMENSION(iim, jj_nb) :: deno 941 928 CHARACTER(len = 20) :: modname = 'cpl_send_all' 942 929 CHARACTER(len = 80) :: abort_message 943 930 944 931 ! Variables with fields to coupler 945 REAL, DIMENSION(iim, jj_nb) :: tmp_taux946 REAL, DIMENSION(iim, jj_nb) :: tmp_tauy947 REAL, DIMENSION(iim, jj_nb) :: tmp_calv932 REAL, DIMENSION(iim, jj_nb) :: tmp_taux 933 REAL, DIMENSION(iim, jj_nb) :: tmp_tauy 934 REAL, DIMENSION(iim, jj_nb) :: tmp_calv 948 935 ! Table with all fields to send to coupler 949 REAL, DIMENSION(iim, jj_nb, jpflda2o1+jpflda2o2) :: tab_flds936 REAL, DIMENSION(iim, jj_nb, jpflda2o1+jpflda2o2) :: tab_flds 950 937 #ifdef CPP_PARA 951 938 INCLUDE 'mpif.h' … … 1036 1023 tmp_tauy(:,:) = 0.0 1037 1024 1038 ! For all valid grid cells not entier land 1039 WHERE (zmasq2D /= 1. .AND. zmasq2D /=99. ) 1040 deno = pctsrf2D(:,:,is_oce) + pctsrf2D(:,:,is_sic) ! fraction oce+seaice 1025 1026 ! fraction oce+seaice 1027 deno = pctsrf2D(:,:,is_oce) + pctsrf2D(:,:,is_sic) 1028 ! For all valid grid cells containing some fraction of ocean or sea-ice 1029 WHERE ( deno(:,:) /= 0 ) 1030 tab_flds(:,:,15) = cpl_rain2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1031 cpl_rain2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1032 tab_flds(:,:,16) = cpl_snow2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1033 cpl_snow2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1041 1034 1042 tab_flds(:,:,15) = cpl_rain2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno + & 1043 cpl_rain2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno 1044 tab_flds(:,:,16) = cpl_snow2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno + & 1045 cpl_snow2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno 1046 1047 tmp_taux = cpl_taux2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno + & 1048 cpl_taux2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno 1049 tmp_tauy = cpl_tauy2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno + & 1050 cpl_tauy2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno 1035 tmp_taux = cpl_taux2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1036 cpl_taux2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1037 tmp_tauy = cpl_tauy2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) + & 1038 cpl_tauy2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:) 1051 1039 ENDWHERE 1052 1040
Note: See TracChangeset
for help on using the changeset viewer.