Changeset 3815 for LMDZ6/trunk/libf
- Timestamp:
- Feb 1, 2021, 3:30:57 PM (4 years ago)
- Location:
- LMDZ6/trunk
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk
-
LMDZ6/trunk/libf/dynphy_lonlat/phylmd/ce0l.F90
r2665 r3815 29 29 USE iniphysiq_mod, ONLY: iniphysiq 30 30 USE mod_const_mpi, ONLY: comm_lmdz 31 31 32 #ifdef CPP_PARA 32 33 USE mod_const_mpi, ONLY: init_const_mpi 33 USE parallel_lmdz, ONLY: init_parallel, mpi_rank, omp_rank 34 USE parallel_lmdz, ONLY: init_parallel, mpi_rank, omp_rank, using_mpi 34 35 USE bands, ONLY: read_distrib, distrib_phys 35 36 USE mod_hallo, ONLY: init_mod_hallo 36 37 USE mod_interface_dyn_phys, ONLY: init_interface_dyn_phys 37 #endif 38 #ifdef CPP_XIOS 39 USE xios, only: xios_finalize 40 #endif 41 #endif 42 38 43 USE comconst_mod, ONLY: cpp, daysec, dtphys, dtvr, g, kappa, omeg, r, rad, & 39 44 pi, jmp1 … … 50 55 include "comgeom2.h" 51 56 include "iniprint.h" 57 #ifdef CPP_MPI 58 include 'mpif.h' 59 #endif 60 52 61 REAL :: masque(iip1,jjp1) !--- CONTINENTAL MASK 53 62 REAL :: phis (iip1,jjp1) !--- GROUND GEOPOTENTIAL … … 67 76 REAL, ALLOCATABLE :: masktmp(:) 68 77 69 #ifndef CPP_PARA 78 #ifdef CPP_PARA 79 integer ierr 80 #else 70 81 ! for iniphysiq in serial mode 71 82 INTEGER,PARAMETER :: mpi_rank=0 … … 168 179 ocemask = ocetmp 169 180 IF(dlat_omask(1)<dlat_omask(jml_omask)) THEN 170 DO j=1,jjp1; ocemask(:,j) = ocetmp(:,jjp1-j+1); END DO 181 DO j=1,jjp1 182 ocemask(:,j) = ocetmp(:,jjp1-j+1) 183 END DO 171 184 END IF 172 185 DEALLOCATE(ocetmp,lon_omask,lat_omask,dlon_omask,dlat_omask) … … 239 252 #ifdef CPP_PARA 240 253 END IF 254 #ifdef CPP_XIOS 255 CALL xios_finalize 256 #endif 257 #ifdef CPP_MPI 258 IF (using_mpi) call MPI_FINALIZE(ierr) 259 #endif 241 260 #endif 242 261 -
LMDZ6/trunk/libf/misc/handle_err_m.F90
r3435 r3815 27 27 28 28 if (ncerr /= nf90_noerr) then 29 print *, "NetCDF95 handle_err:" 29 30 print *, message, ":" 30 31 if (present(varid)) print *, "varid = ", varid … … 39 40 end if 40 41 end if 41 call abort_physic("NetCDF95 handle_err", " ", 1)42 call abort_physic("NetCDF95 handle_err", "see above", 1) 42 43 end if 43 44 -
LMDZ6/trunk/libf/phylmd/YOMCST.h
r3447 r3815 22 22 REAL RMO3,RMCO2,RMC,RMCH4,RMN2O,RMCFC11,RMCFC12 23 23 REAL R,RMD,RMV,RD,RV,RCPD,RCPV,RCVD,RCVV 24 REAL RKAPPA,RETV 24 REAL RKAPPA,RETV, eps_w 25 25 ! A1.5,6 Thermodynamic liquid,solid phases 26 26 REAL RCW,RCS … … 38 38 & ,R ,RMD ,RMV ,RD ,RV ,RCPD & 39 39 & ,RMO3 ,RMCO2 ,RMC ,RMCH4 ,RMN2O ,RMCFC11 ,RMCFC12 & 40 & ,RCPV ,RCVD ,RCVV ,RKAPPA,RETV 40 & ,RCPV ,RCVD ,RCVV ,RKAPPA,RETV, eps_w & 41 41 & ,RCW ,RCS & 42 42 & ,RLVTT ,RLSTT ,RLMLT ,RTT ,RATM & -
LMDZ6/trunk/libf/phylmd/calcul_fluxs_mod.F90
r3319 r3815 13 13 fqsat, petAcoef, peqAcoef, petBcoef, peqBcoef, & 14 14 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 15 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol )15 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 16 16 17 17 18 18 USE dimphy, ONLY : klon 19 19 USE indice_sol_mod 20 use sens_heat_rain_m, only: sens_heat_rain 20 21 21 22 INCLUDE "clesphys.h" … … 71 72 REAL, DIMENSION(klon), INTENT(IN) :: ps, q1lay 72 73 REAL, DIMENSION(klon), INTENT(IN) :: tsurf, p1lay, cal, beta, cdragh,cdragq 73 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow ! pas utiles74 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 74 75 REAL, DIMENSION(klon), INTENT(IN) :: radsol, dif_grnd 75 76 REAL, DIMENSION(klon), INTENT(IN) :: t1lay, u1lay, v1lay,gustiness 76 77 REAL, INTENT(IN) :: fqsat ! correction factor on qsat (generally 0.98 over salty water, 1 everywhere else) 77 78 79 real, intent(in), optional:: rhoa(:) ! (knon) 80 ! density of moist air (kg / m3) 81 78 82 ! Parametres entree-sorties 79 83 !**************************************************************************************** … … 85 89 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new, evap, fluxsens, fluxlat 86 90 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 87 REAL, DIMENSION(klon), OPTIONAL :: sens_prec_liq, sens_prec_sol91 REAL, intent(out), OPTIONAL:: sens_prec_liq(:), sens_prec_sol(:) ! (knon) 88 92 REAL, DIMENSION(klon), OPTIONAL :: lat_prec_liq, lat_prec_sol 89 93 … … 140 144 dflux_s = 0. 141 145 dflux_l = 0. 142 if (PRESENT(sens_prec_liq)) sens_prec_liq = 0.143 if (PRESENT(sens_prec_sol)) sens_prec_sol = 0.144 146 if (PRESENT(lat_prec_liq)) lat_prec_liq = 0. 145 147 if (PRESENT(lat_prec_sol)) lat_prec_sol = 0. … … 259 261 ! 260 262 ! calcul de l'enthalpie des precipitations liquides et solides 261 ! 262 ! if (PRESENT(enth_prec_liq)) & 263 ! enth_prec_liq(i) = rcw * (t1lay(i) - tsurf(i)) * & 264 ! precip_rain(i) 265 ! if (PRESENT(enth_prec_sol)) & 266 ! enth_prec_sol(i) = rcs * (t1lay(i) - tsurf(i)) * & 267 ! precip_snow(i) 268 ! On calcule par rapport a T=0 269 if (PRESENT(sens_prec_liq)) & 270 sens_prec_liq(i) = rcw * (t1lay(i) - RTT) * & 271 precip_rain(i) 272 if (PRESENT(sens_prec_sol)) & 273 sens_prec_sol(i) = rcs * (t1lay(i) - RTT) * & 274 precip_snow(i) 263 if (PRESENT(sens_prec_liq)) sens_prec_liq(i) & 264 = - sens_heat_rain(precip_rain(i) + precip_snow(i), t1lay(i), & 265 q1lay(i), rhoa(i), rlvtt, tsurf_new(i), ps(i)) 266 if (PRESENT(sens_prec_sol)) sens_prec_sol(i) = 0. 267 ! On calcule par rapport a T=0 268 !! sens_prec_liq(i) = rcw * (t1lay(i) - RTT) * precip_rain(i) 269 !! sens_prec_sol(i) = rcs * (t1lay(i) - RTT) * precip_snow(i) 270 275 271 if (PRESENT(lat_prec_liq)) & 276 272 lat_prec_liq(i) = precip_rain(i) * (RLVTT - RLVTT) … … 280 276 281 277 282 ! if (PRESENT(sens_prec_liq)) & 283 ! WRITE(*,*)' calculs_fluxs sens_prec_liq (min, max)', & 284 ! MINVAL(sens_prec_liq(1:knon)), MAXVAL(sens_prec_liq(1:knon)) 285 ! if (PRESENT(sens_prec_sol)) & 286 ! WRITE(*,*)' calculs_fluxs sens_prec_sol (min, max)', & 287 ! MINVAL(sens_prec_sol(1:knon)), MAXVAL(sens_prec_sol(1:knon)) 288 289 ! 290 !**************************************************************************************** 278 !************************************************************************** 291 279 ! 292 280 END SUBROUTINE calcul_fluxs -
LMDZ6/trunk/libf/phylmd/conf_phys_m.F90
r3792 r3815 29 29 USE mod_grid_phy_lmdz, ONLY: klon_glo 30 30 USE print_control_mod, ONLY: lunout 31 use config_ocean_skin_m, only: config_ocean_skin 31 32 USE phys_state_var_mod, ONLY: phys_tstep 32 33 … … 2820 2821 2821 2822 !$OMP END MASTER 2822 2823 RETURN 2823 call config_ocean_skin 2824 2824 2825 2825 END SUBROUTINE conf_phys -
LMDZ6/trunk/libf/phylmd/cpl_mod.F90
r3790 r3815 48 48 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: cpl_snow, cpl_evap, cpl_tsol 49 49 !$OMP THREADPRIVATE(cpl_snow,cpl_evap,cpl_tsol) 50 51 REAL, ALLOCATABLE, SAVE:: cpl_delta_sst(:), cpl_delta_sal(:) 52 !$OMP THREADPRIVATE(cpl_delta_sst, cpl_delta_sal) 53 50 54 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: cpl_fder, cpl_albe, cpl_taux, cpl_tauy 51 55 !$OMP THREADPRIVATE(cpl_fder,cpl_albe,cpl_taux,cpl_tauy) … … 66 70 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: read_sit ! sea ice temperature 67 71 !$OMP THREADPRIVATE(read_sit) 72 73 REAL, ALLOCATABLE, SAVE:: read_sss(:, :) 74 ! bulk salinity of the surface layer of the ocean, in ppt 75 !$OMP THREADPRIVATE(read_sss) 76 68 77 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: read_sic ! sea ice fraction 69 78 !$OMP THREADPRIVATE(read_sic) … … 84 93 REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE :: cpl_snow2D, cpl_evap2D, cpl_tsol2D 85 94 !$OMP THREADPRIVATE(cpl_snow2D, cpl_evap2D, cpl_tsol2D) 95 96 REAL, ALLOCATABLE, SAVE:: cpl_delta_sst_2D(:,:), cpl_delta_sal_2D(:,:) 97 !$OMP THREADPRIVATE(cpl_delta_sst_2D, cpl_delta_sal_2D) 98 86 99 REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE :: cpl_fder2D, cpl_albe2D 87 100 !$OMP THREADPRIVATE(cpl_fder2D, cpl_albe2D) … … 122 135 USE geometry_mod, ONLY : longitude_deg, latitude_deg, ind_cell_glo, cell_area 123 136 USE ioipsl_getin_p_mod, ONLY: getin_p 137 use config_ocean_skin_m, only: activate_ocean_skin 124 138 125 139 ! Input arguments … … 218 232 ALLOCATE(read_sit(nbp_lon, jj_nb), stat = error) 219 233 sum_error = sum_error + error 234 235 if (activate_ocean_skin >= 1) then 236 ALLOCATE(read_sss(nbp_lon, jj_nb), stat = error) 237 sum_error = sum_error + error 238 239 if (activate_ocean_skin == 2) then 240 ALLOCATE(cpl_delta_sst(klon), cpl_delta_sal(klon), stat = error) 241 sum_error = sum_error + error 242 end if 243 end if 244 220 245 ALLOCATE(read_alb_sic(nbp_lon, jj_nb), stat = error) 221 246 sum_error = sum_error + error … … 380 405 USE time_phylmdz_mod, ONLY: start_time, itau_phy 381 406 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 407 use config_ocean_skin_m, only: activate_ocean_skin 382 408 383 409 INCLUDE "YOMCST.h" … … 441 467 read_alb_sic(:,:) = tab_read_flds(:,:,idr_icealw) ! Albedo at sea ice 442 468 read_sit(:,:) = tab_read_flds(:,:,idr_icetem) ! Sea ice temperature 469 if (activate_ocean_skin >= 1) read_sss(:,:) = tab_read_flds(:,:,idr_sss) 443 470 !$OMP END MASTER 444 471 … … 498 525 ! 499 526 500 SUBROUTINE cpl_receive_ocean_fields(knon, knindex, tsurf_new, u0_new, v0_new) 527 SUBROUTINE cpl_receive_ocean_fields(knon, knindex, tsurf_new, u0_new, & 528 v0_new, sss) 501 529 ! 502 530 ! This routine returns the field for the ocean that has been read from the coupler … … 506 534 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, fco2_ocn_day 507 535 USE indice_sol_mod 536 use config_ocean_skin_m, only: activate_ocean_skin 508 537 509 538 ! Input arguments … … 515 544 !************************************************************************************* 516 545 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 546 547 REAL, INTENT(OUT):: sss(:) ! (klon) 548 ! bulk salinity of the surface layer of the ocean, in ppt 549 517 550 REAL, DIMENSION(klon), INTENT(OUT) :: u0_new 518 551 REAL, DIMENSION(klon), INTENT(OUT) :: v0_new … … 529 562 !************************************************************************************* 530 563 CALL cpl2gath(read_sst, tsurf_new, knon, knindex) 564 if (activate_ocean_skin >= 1) CALL cpl2gath(read_sss, sss, knon, knindex) 531 565 CALL cpl2gath(read_sic, sic_new, knon, knindex) 532 566 CALL cpl2gath(read_u0, u0_new, knon, knindex) … … 615 649 swdown, lwdown, fluxlat, fluxsens, & 616 650 precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy, windsp,& 617 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 618 ! 619 ! This subroutine cumulates some fields for each time-step during a coupling 620 ! period. At last time-step in a coupling period the fields are transformed to the 621 ! grid accepted by the coupler. No sending to the coupler will be done from here 622 ! (it is done in cpl_send_seaice_fields). 623 ! 651 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, delta_sst, & 652 delta_sal) 653 654 ! This subroutine cumulates some fields for each time-step during 655 ! a coupling period. At last time-step in a coupling period the 656 ! fields are transformed to the grid accepted by the coupler. No 657 ! sending to the coupler will be done from here (it is done in 658 ! cpl_send_seaice_fields). Crucial hypothesis is that the surface 659 ! fractions do not change between coupling time-steps. 660 624 661 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send 625 662 USE indice_sol_mod 626 663 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 664 use config_ocean_skin_m, only: activate_ocean_skin 627 665 628 666 ! Input arguments … … 636 674 REAL, DIMENSION(klon), INTENT(IN) :: evap, tsurf, fder, albsol 637 675 REAL, DIMENSION(klon), INTENT(IN) :: taux, tauy, windsp 638 REAL, DIMENSION(klon), INTENT(IN) :: sens_prec_liq, sens_prec_sol676 REAL, INTENT(IN):: sens_prec_liq(:), sens_prec_sol(:) ! (knon) 639 677 REAL, DIMENSION(klon), INTENT(IN) :: lat_prec_liq, lat_prec_sol 678 679 REAL, intent(in):: delta_sst(:) ! (knon) 680 ! Ocean-air interface temperature minus bulk SST, in 681 ! K. Defined only if activate_ocean_skin >= 1. 682 683 real, intent(in):: delta_sal(:) ! (knon) 684 ! Ocean-air interface salinity minus bulk salinity, in ppt. 640 685 641 686 ! Local variables … … 673 718 cpl_taumod(1:knon,cpl_index) = 0.0 674 719 IF (carbon_cycle_cpl) cpl_atm_co2(1:knon,cpl_index) = 0.0 720 721 if (activate_ocean_skin == 2) then 722 cpl_delta_sst = 0. 723 cpl_delta_sal = 0. 724 end if 675 725 ENDIF 676 726 … … 714 764 !!---OB: this is correct but why knindex ?? 715 765 ENDIF 766 767 if (activate_ocean_skin == 2) then 768 cpl_delta_sst(ig) = cpl_delta_sst(ig) + delta_sst(ig) / REAL(nexca) 769 cpl_delta_sal(ig) = cpl_delta_sal(ig) + delta_sal(ig) / REAL(nexca) 770 end if 716 771 ENDDO 717 772 … … 759 814 sum_error = sum_error + error 760 815 ENDIF 816 817 if (activate_ocean_skin == 2) then 818 ALLOCATE(cpl_delta_sst_2D(nbp_lon, jj_nb), & 819 cpl_delta_sal_2D(nbp_lon, jj_nb), stat = error) 820 sum_error = sum_error + error 821 end if 761 822 762 823 IF (sum_error /= 0) THEN … … 814 875 IF (carbon_cycle_cpl) & 815 876 CALL gath2cpl(cpl_atm_co2(:,cpl_index), cpl_atm_co22D(:,:), knon, knindex) 816 ENDIF 877 if (activate_ocean_skin == 2) then 878 CALL gath2cpl(cpl_delta_sst, cpl_delta_sst_2D, knon, knindex) 879 CALL gath2cpl(cpl_delta_sal, cpl_delta_sal_2D, knon, knindex) 880 end if 881 ENDIF 817 882 818 883 END SUBROUTINE cpl_send_ocean_fields … … 850 915 REAL, DIMENSION(klon), INTENT(IN) :: albsol, taux, tauy 851 916 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 852 REAL, DIMENSION(klon), INTENT(IN) :: sens_prec_liq, sens_prec_sol917 REAL, INTENT(IN):: sens_prec_liq(:), sens_prec_sol(:) ! (knon) 853 918 REAL, DIMENSION(klon), INTENT(IN) :: lat_prec_liq, lat_prec_sol 854 919 LOGICAL, INTENT(IN) :: lafin … … 1149 1214 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1150 1215 USE time_phylmdz_mod, ONLY: start_time, itau_phy 1216 use config_ocean_skin_m, only: activate_ocean_skin 1151 1217 ! Some includes 1152 1218 ! … … 1206 1272 tab_flds(:,:,ids_qraiic) = cpl_sens_rain2D(:,:,2) 1207 1273 tab_flds(:,:,ids_qsnoic) = cpl_sens_snow2D(:,:,2) 1274 1275 if (activate_ocean_skin == 2) then 1276 tab_flds(:, :, ids_delta_sst) = cpl_delta_sst_2D 1277 tab_flds(:, :, ids_delta_sal) = cpl_delta_sal_2D 1278 end if 1208 1279 1209 1280 IF (version_ocean=='nemo') THEN … … 1442 1513 ENDIF 1443 1514 1515 if (activate_ocean_skin == 2) deallocate(cpl_delta_sst_2d, cpl_delta_sal_2d) 1516 1444 1517 IF (sum_error /= 0) THEN 1445 1518 abort_message='Pb in deallocation of cpl_xxxx2D coupling variables' -
LMDZ6/trunk/libf/phylmd/oasis.F90
r3465 r3815 59 59 INTEGER, PARAMETER :: ids_qraiic = 28 60 60 INTEGER, PARAMETER :: ids_qsnoic = 29 61 INTEGER, PARAMETER :: maxsend = 29 ! Maximum number of fields to send 61 INTEGER, PARAMETER :: ids_delta_sst = 30, ids_delta_sal = 31 62 63 INTEGER, PARAMETER :: maxsend = 31 ! Maximum number of fields to send 62 64 63 65 ! Id for fields received from ocean 66 64 67 INTEGER, PARAMETER :: idr_sisutw = 1 65 68 INTEGER, PARAMETER :: idr_icecov = 2 … … 70 73 INTEGER, PARAMETER :: idr_curenz = 7 71 74 INTEGER, PARAMETER :: idr_oceco2 = 8 72 INTEGER, PARAMETER :: maxrecv = 8 ! Maximum number of fields to receive 75 76 INTEGER, PARAMETER :: idr_sss = 9 77 ! bulk salinity of the surface layer of the ocean, in ppt 78 79 INTEGER, PARAMETER :: maxrecv = 9 ! Maximum number of fields to receive 73 80 74 81 … … 110 117 USE geometry_mod, ONLY: ind_cell_glo 111 118 USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi_para_nb 112 113 119 use config_ocean_skin_m, only: activate_ocean_skin 114 120 115 121 ! Local variables … … 183 189 infosend(ids_calvin)%action = .TRUE. ; infosend(ids_calvin)%name = 'COCALVIN' 184 190 191 if (activate_ocean_skin == 2) then 192 infosend(ids_delta_sst)%action = .TRUE. 193 infosend(ids_delta_sst)%name = 'CODELSST' 194 infosend(ids_delta_sal)%action = .TRUE. 195 infosend(ids_delta_sal)%name = 'CODELSSS' 196 end if 197 185 198 IF (version_ocean=='nemo') THEN 186 199 infosend(ids_shftot)%action = .TRUE. ; infosend(ids_shftot)%name = 'COQSRMIX' … … 219 232 inforecv(idr_icealw)%action = .TRUE. ; inforecv(idr_icealw)%name = 'SIICEALW' 220 233 inforecv(idr_icetem)%action = .TRUE. ; inforecv(idr_icetem)%name = 'SIICTEMW' 234 235 if (activate_ocean_skin >= 1) then 236 inforecv(idr_sss)%action = .TRUE. 237 inforecv(idr_sss)%name = 'SISUSALW' 238 end if 221 239 222 240 IF (cpl_current ) THEN -
LMDZ6/trunk/libf/phylmd/ocean_cpl_mod.F90
r3102 r3815 52 52 AcoefH, AcoefQ, BcoefH, BcoefQ, & 53 53 AcoefU, AcoefV, BcoefU, BcoefV, & 54 ps, u1, v1, gustiness, &54 ps, u1, v1, gustiness, tsurf_in, & 55 55 radsol, snow, agesno, & 56 56 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 57 tsurf_new, dflux_s, dflux_l) 57 tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, delta_sal, rhoa, & 58 delta_sst) 58 59 59 60 ! … … 63 64 ! 64 65 USE dimphy, ONLY : klon 65 USE cpl_mod66 66 USE calcul_fluxs_mod 67 67 USE indice_sol_mod 68 68 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 69 USE cpl_mod, ONLY : gath2cpl 69 USE cpl_mod, ONLY : gath2cpl, cpl_receive_ocean_fields, & 70 cpl_send_ocean_fields 71 use config_ocean_skin_m, only: activate_ocean_skin 70 72 71 73 INCLUDE "YOMCST.h" … … 90 92 REAL, DIMENSION(klon), INTENT(IN) :: ps 91 93 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness 94 REAL, INTENT(IN) :: tsurf_in(:) ! (klon) 95 96 real, intent(in):: delta_sal(:) ! (knon) 97 ! ocean-air interface salinity minus bulk salinity, in ppt 98 99 real, intent(in):: rhoa(:) ! (knon) density of moist air (kg / m3) 100 101 REAL, intent(in):: delta_sst(:) ! (knon) 102 ! Ocean-air interface temperature minus bulk SST, in K. Defined 103 ! only if activate_ocean_skin >= 1. 92 104 93 105 ! In/Output arguments … … 104 116 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 105 117 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 118 REAL, intent(out):: sens_prec_liq(:) ! (knon) 119 120 REAL, INTENT(OUT):: sss(:) ! (klon) 121 ! bulk salinity of the surface layer of the ocean, in ppt 106 122 107 123 … … 116 132 REAL, DIMENSION(klon) :: u1_lay, v1_lay 117 133 LOGICAL :: check=.FALSE. 118 REAL , DIMENSION(klon) :: sens_prec_liq, sens_prec_sol134 REAL sens_prec_sol(knon) 119 135 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 120 136 … … 128 144 ! 129 145 !**************************************************************************************** 130 CALL cpl_receive_ocean_fields(knon, knindex, tsurf_cpl, u0_cpl, v0_cpl) 146 CALL cpl_receive_ocean_fields(knon, knindex, tsurf_cpl, u0_cpl, v0_cpl, & 147 sss) 131 148 132 149 !**************************************************************************************** … … 138 155 dif_grnd = 0. 139 156 agesno(:) = 0. 140 sens_prec_liq = 0.; sens_prec_sol = 0.;lat_prec_liq = 0.; lat_prec_sol = 0.157 lat_prec_liq = 0.; lat_prec_sol = 0. 141 158 142 159 … … 147 164 148 165 CALL calcul_fluxs(knon, is_oce, dtime, & 149 tsurf_cpl, p1lay, cal, beta, cdragh, cdragq, ps, & 166 merge(tsurf_in, tsurf_cpl, activate_ocean_skin == 2), p1lay, cal, & 167 beta, cdragh, cdragq, ps, & 150 168 precip_rain, precip_snow, snow, qsurf, & 151 169 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, & 152 170 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 153 171 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 154 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 172 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 173 174 if (activate_ocean_skin == 2) then 175 ! tsurf_new was set to tsurf_in in calcul_flux, correct it to 176 ! the new bulk SST tsurf_cpl: 177 tsurf_new = tsurf_cpl 178 end if 179 180 ! assertion: tsurf_new == tsurf_cpl 181 155 182 do j = 1, knon 156 183 i = knindex(j) … … 189 216 !**************************************************************************************** 190 217 191 CALL cpl_send_ocean_fields(itime, knon, knindex, & 192 swnet, lwnet, fluxlat, fluxsens, & 193 precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1, windsp,& 194 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 195 218 CALL cpl_send_ocean_fields(itime, knon, knindex, swnet, lwnet, fluxlat, & 219 fluxsens, precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, & 220 flux_u1, flux_v1, windsp, sens_prec_liq, sens_prec_sol, lat_prec_liq, & 221 lat_prec_sol, delta_sst, delta_sal) 196 222 197 223 END SUBROUTINE ocean_cpl_noice … … 210 236 radsol, snow, qsurf, & 211 237 alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 212 tsurf_new, dflux_s, dflux_l )238 tsurf_new, dflux_s, dflux_l, rhoa) 213 239 ! 214 240 ! This subroutine treats the ocean where there is ice. The subroutine first receives … … 245 271 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness 246 272 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 273 real, intent(in):: rhoa(:) ! (knon) density of moist air (kg / m3) 247 274 248 275 ! In/output arguments … … 272 299 REAL, DIMENSION(klon) :: u0, v0 273 300 REAL, DIMENSION(klon) :: u1_lay, v1_lay 274 REAL , DIMENSION(klon) :: sens_prec_liq, sens_prec_sol301 REAL sens_prec_liq(knon), sens_prec_sol(knon) 275 302 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 276 303 … … 280 307 IF (check) WRITE(*,*)'Entering surface_seaice, knon=',knon 281 308 282 sens_prec_liq = 0.; sens_prec_sol = 0.;lat_prec_liq = 0.; lat_prec_sol = 0.309 lat_prec_liq = 0.; lat_prec_sol = 0. 283 310 284 311 !**************************************************************************************** … … 313 340 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 314 341 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 315 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol )342 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 316 343 do j = 1, knon 317 344 i = knindex(j) -
LMDZ6/trunk/libf/phylmd/ocean_forced_mod.F90
r3784 r3815 19 19 AcoefH, AcoefQ, BcoefH, BcoefQ, & 20 20 AcoefU, AcoefV, BcoefU, BcoefV, & 21 ps, u1, v1, gustiness, &21 ps, u1, v1, gustiness, tsurf_in, & 22 22 radsol, snow, agesno, & 23 23 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 24 tsurf_new, dflux_s, dflux_l )24 tsurf_new, dflux_s, dflux_l, sens_prec_liq, rhoa) 25 25 ! 26 26 ! This subroutine treats the "open ocean", all grid points that are not entierly covered … … 35 35 USE indice_sol_mod 36 36 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 37 use config_ocean_skin_m, only: activate_ocean_skin 37 38 38 39 INCLUDE "YOMCST.h" … … 53 54 REAL, DIMENSION(klon), INTENT(IN) :: ps 54 55 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness 56 REAL, DIMENSION(klon), INTENT(IN) :: tsurf_in 57 real, intent(in):: rhoa(:) ! (knon) density of moist air (kg / m3) 55 58 56 59 ! In/Output arguments … … 67 70 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 68 71 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 72 REAL, intent(out):: sens_prec_liq(:) ! (knon) 69 73 70 74 ! Local variables … … 76 80 REAL, DIMENSION(klon) :: u1_lay, v1_lay 77 81 LOGICAL :: check=.FALSE. 78 REAL , DIMENSION(klon) :: sens_prec_liq, sens_prec_sol82 REAL sens_prec_sol(knon) 79 83 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 80 84 … … 122 126 alb_neig(:) = 0. 123 127 agesno(:) = 0. 124 sens_prec_liq = 0.; sens_prec_sol = 0.;lat_prec_liq = 0.; lat_prec_sol = 0.128 lat_prec_liq = 0.; lat_prec_sol = 0. 125 129 126 130 ! Suppose zero surface speed … … 132 136 ! Calcul de tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l and qsurf 133 137 CALL calcul_fluxs(knon, is_oce, dtime, & 134 tsurf_lim, p1lay, cal, beta, cdragh, cdragq, ps, & 138 merge(tsurf_in, tsurf_lim, activate_ocean_skin == 2), p1lay, cal, & 139 beta, cdragh, cdragq, ps, & 135 140 precip_rain, precip_snow, snow, qsurf, & 136 141 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, & 137 142 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 138 143 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 139 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 144 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 145 if (activate_ocean_skin == 2) tsurf_new = tsurf_lim 140 146 141 147 do j = 1, knon … … 167 173 radsol, snow, qsol, agesno, tsoil, & 168 174 qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 169 tsurf_new, dflux_s, dflux_l )175 tsurf_new, dflux_s, dflux_l, rhoa) 170 176 ! 171 177 ! This subroutine treats the ocean where there is ice. … … 201 207 REAL, DIMENSION(klon), INTENT(IN) :: ps 202 208 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness 209 real, intent(in):: rhoa(:) ! (knon) density of moist air (kg / m3) 203 210 204 211 ! In/Output arguments … … 230 237 REAL, DIMENSION(klon) :: u0, v0 231 238 REAL, DIMENSION(klon) :: u1_lay, v1_lay 232 REAL , DIMENSION(klon) :: sens_prec_liq, sens_prec_sol239 REAL sens_prec_liq(knon), sens_prec_sol (knon) 233 240 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 234 241 … … 264 271 265 272 ! beta = 1.0 266 sens_prec_liq = 0.; sens_prec_sol = 0.;lat_prec_liq = 0.; lat_prec_sol = 0.273 lat_prec_liq = 0.; lat_prec_sol = 0. 267 274 268 275 ! Suppose zero surface speed … … 277 284 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 278 285 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 279 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol )286 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 280 287 do j = 1, knon 281 288 i = knindex(j) -
LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90
r3784 r3815 27 27 !! wx_pbl_fuse, wx_pbl_split 28 28 wx_pbl0_fuse, wx_pbl0_split 29 use config_ocean_skin_m, only: activate_ocean_skin 29 30 30 31 IMPLICIT NONE … … 292 293 USE print_control_mod, ONLY : prt_level,lunout 293 294 USE ioipsl_getin_p_mod, ONLY : getin_p 295 use phys_state_var_mod, only: ds_ns, dt_ns, delta_sst, delta_sal 296 use phys_output_var_mod, only: dter, dser, tkt, tks, taur, sss 297 #ifdef CPP_XIOS 298 USE wxios, ONLY: missing_val 299 #else 300 use netcdf, only: missing_val => nf90_fill_real 301 #endif 294 302 295 303 IMPLICIT NONE … … 824 832 ! Martin 825 833 834 real, DIMENSION(klon):: ydelta_sst, ydelta_sal, yds_ns, ydt_ns, ydter, ydser, & 835 ytkt, ytks, ytaur, ysss 836 ! compression of delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, tkt, tks, 837 ! taur, sss on ocean points 838 826 839 !**************************************************************************************** 827 840 ! End of declarations … … 959 972 !!! jyg le 10/02/2012 960 973 rh2m_x(:) = 0. ; qsat2m_x(:) = 0. ; rh2m_w(:) = 0. ; qsat2m_w(:) = 0. 961 !!!962 974 963 975 ! 2b) Initialization of all local variables that will be compressed later … … 1426 1438 ENDDO 1427 1439 ENDIF 1440 1441 if (nsrf == is_oce .and. activate_ocean_skin >= 1) then 1442 if (activate_ocean_skin == 2 .and. type_ocean == "couple") then 1443 ydelta_sal(:knon) = delta_sal(ni(:knon)) 1444 ydelta_sst(:knon) = delta_sst(ni(:knon)) 1445 end if 1446 1447 yds_ns(:knon) = ds_ns(ni(:knon)) 1448 ydt_ns(:knon) = dt_ns(ni(:knon)) 1449 end if 1428 1450 1429 1451 !**************************************************************************************** … … 1949 1971 yz0m, yz0h, SFRWL,yalb_dir_new, yalb_dif_new, yevap, yfluxsens,yfluxlat,& 1950 1972 ytsurf_new, y_dflux_t, y_dflux_q, slab_wfbils, & 1951 y_flux_u1, y_flux_v1) 1973 y_flux_u1, y_flux_v1, ydelta_sst(:knon), ydelta_sal(:knon), & 1974 yds_ns(:knon), ydt_ns(:knon), ydter(:knon), ydser(:knon), & 1975 ytkt(:knon), ytks(:knon), ytaur(:knon), ysss) 1952 1976 IF (prt_level >=10) THEN 1953 1977 print *,'arg de surf_ocean: ycdragh ',ycdragh … … 2563 2587 ENDIF 2564 2588 2589 if (nsrf == is_oce .and. activate_ocean_skin >= 1) then 2590 delta_sal = missing_val 2591 ds_ns = missing_val 2592 dt_ns = missing_val 2593 delta_sst = missing_val 2594 dter = missing_val 2595 dser = missing_val 2596 tkt = missing_val 2597 tks = missing_val 2598 taur = missing_val 2599 sss = missing_val 2600 2601 delta_sal(ni(:knon)) = ydelta_sal(:knon) 2602 ds_ns(ni(:knon)) = yds_ns(:knon) 2603 dt_ns(ni(:knon)) = ydt_ns(:knon) 2604 delta_sst(ni(:knon)) = ydelta_sst(:knon) 2605 dter(ni(:knon)) = ydter(:knon) 2606 dser(ni(:knon)) = ydser(:knon) 2607 tkt(ni(:knon)) = ytkt(:knon) 2608 tks(ni(:knon)) = ytks(:knon) 2609 taur(ni(:knon)) = ytaur(:knon) 2610 sss(ni(:knon)) = ysss(:knon) 2611 end if 2612 2565 2613 !**************************************************************************************** 2566 2614 ! 14) Calculate the temperature and relative humidity at 2m and the wind at 10m … … 3166 3214 3167 3215 !albedo SB >>> 3168 SUBROUTINE pbl_surface_newfrac(itime, pctsrf_new, pctsrf_old, &3169 evap, z0m, z0h, agesno, &3170 tsurf,alb_dir,alb_dif, ustar, u10m, v10m, tke)3171 !albedo SB <<<3216 SUBROUTINE pbl_surface_newfrac(itime, pctsrf_new, pctsrf_old, & 3217 evap, z0m, z0h, agesno, & 3218 tsurf,alb_dir,alb_dif, ustar, u10m, v10m, tke) 3219 !albedo SB <<< 3172 3220 ! Give default values where new fraction has appread 3173 3221 3174 3222 USE indice_sol_mod 3223 use phys_state_var_mod, only: delta_sal, ds_ns, dt_ns, delta_sst 3224 use config_ocean_skin_m, only: activate_ocean_skin 3175 3225 3176 3226 INCLUDE "dimsoil.h" … … 3259 3309 alb_dif(i,k,nsrf) = 0.06 3260 3310 ENDDO 3311 if (activate_ocean_skin >= 1) then 3312 if (activate_ocean_skin == 2 & 3313 .and. type_ocean == "couple") then 3314 delta_sal(i) = 0. 3315 delta_sst(i) = 0. 3316 end if 3317 3318 ds_ns(i) = 0. 3319 dt_ns(i) = 0. 3320 end if 3261 3321 ELSE IF (nsrf.EQ.is_sic) THEN 3262 3322 tsurf(i,nsrf) = 271.35 -
LMDZ6/trunk/libf/phylmd/phyetat0.F90
r3756 r3815 19 19 wake_s, wake_dens, zgam, zmax0, zmea, zpic, zsig, & 20 20 zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg, & 21 ale_wake, ale_bl_stat 21 ale_wake, ale_bl_stat, ds_ns, dt_ns, delta_sst, delta_sal 22 22 !FC 23 23 USE geometry_mod, ONLY : longitude_deg, latitude_deg … … 29 29 USE ocean_slab_mod, ONLY: nslay, tslab, seaice, tice, ocean_slab_init 30 30 USE time_phylmdz_mod, ONLY: init_iteration, pdtphys, itau_phy 31 #ifdef CPP_XIOS 32 USE wxios, ONLY: missing_val 33 #else 34 use netcdf, only: missing_val => nf90_fill_real 35 #endif 36 use config_ocean_skin_m, only: activate_ocean_skin 31 37 32 38 IMPLICIT none … … 35 41 ! Objet: Lecture de l'etat initial pour la physique 36 42 !====================================================================== 37 include "netcdf.inc"38 43 include "dimsoil.h" 39 44 include "clesphys.h" … … 519 524 ENDIF ! Slab 520 525 526 if (activate_ocean_skin >= 1) then 527 if (activate_ocean_skin == 2 .and. type_ocean == 'couple') then 528 found = phyetat0_get(1, delta_sal, "delta_sal", & 529 "ocean-air interface salinity minus bulk salinity", 0.) 530 found = phyetat0_get(1, delta_sst, "delta_SST", & 531 "ocean-air interface temperature minus bulk SST", 0.) 532 end if 533 534 found = phyetat0_get(1, ds_ns, "dS_ns", "delta salinity near surface", 0.) 535 found = phyetat0_get(1, dt_ns, "dT_ns", "delta temperature near surface", & 536 0.) 537 538 where (pctsrf(:, is_oce) == 0.) 539 ds_ns = missing_val 540 dt_ns = missing_val 541 delta_sst = missing_val 542 delta_sal = missing_val 543 end where 544 end if 545 521 546 ! on ferme le fichier 522 547 CALL close_startphy -
LMDZ6/trunk/libf/phylmd/phyredem.F90
r3756 r3815 26 26 detr_therm, ale_bl, ale_bl_trig, alp_bl, & 27 27 ale_wake, ale_bl_stat, & 28 du_gwd_rando, du_gwd_front, u10m, v10m, & 29 treedrg, solswfdiff 28 du_gwd_rando, du_gwd_front, u10m, v10m, & 29 treedrg, solswfdiff, delta_sal, ds_ns, dt_ns, & 30 delta_sst 31 30 32 USE geometry_mod, ONLY : longitude_deg, latitude_deg 31 33 USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var … … 37 39 USE ocean_slab_mod, ONLY : nslay, tslab, seaice, tice, fsic 38 40 USE time_phylmdz_mod, ONLY: annee_ref, day_end, itau_phy, pdtphys 41 use config_ocean_skin_m, only: activate_ocean_skin 39 42 40 43 IMPLICIT none … … 342 345 "tendency on zonal wind due to acama gravity waves", du_gwd_front) 343 346 347 if (activate_ocean_skin >= 1) then 348 if (activate_ocean_skin == 2 .and. type_ocean == 'couple') then 349 CALL put_field(pass, "delta_sal", & 350 "ocean-air interface salinity minus bulk salinity", delta_sal) 351 CALL put_field(pass, "delta_SST", & 352 "ocean-air interface temperature minus bulk SST", delta_sst) 353 end if 354 355 CALL put_field(pass, "dS_ns", "delta salinity near surface", ds_ns) 356 CALL put_field(pass, "dT_ns", "delta temperature near surface", dT_ns) 357 end if 358 344 359 IF (pass==1) CALL enddef_restartphy 345 360 IF (pass==2) CALL close_restartphy 346 361 ENDDO 347 362 348 363 !$OMP BARRIER -
LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
r3780 r3815 1954 1954 #endif 1955 1955 1956 type(ctrl_out), save:: o_delta_sst & 1957 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'delta_SST', & 1958 "ocean-air interface temperature minus bulk SST", "K", '') 1959 1960 type(ctrl_out), save:: o_delta_sal & 1961 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'delta_sal', & 1962 "ocean-air interface salinity minus bulk salinity", "ppt", '') 1963 1964 type(ctrl_out), save:: o_ds_ns & 1965 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dS_ns', & 1966 "subskin salinity minus foundation salinity", "ppt", '') 1967 1968 type(ctrl_out), save:: o_dt_ns & 1969 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dT_ns', & 1970 "subskin temperature minus foundation temperature", "K", '') 1971 1972 type(ctrl_out), save:: o_dter & 1973 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dTer', & 1974 "ocean-air interface temperature minus sub-skin temperature", "K", '') 1975 1976 type(ctrl_out), save:: o_dser & 1977 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dSer', & 1978 "ocean-air interface salinity minus sub-skin salinity", "ppt", '') 1979 1980 type(ctrl_out), save:: o_tkt & 1981 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'tkt', & 1982 "thickness of thermal microlayer", "m", '') 1983 1984 type(ctrl_out), save:: o_tks & 1985 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'tks', & 1986 "thickness of salinity microlayer", "m", '') 1987 1988 type(ctrl_out), save:: o_taur & 1989 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'taur', & 1990 "momentum flux due to rain", "Pa", '') 1991 1992 type(ctrl_out), save:: o_sss & 1993 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'SSS', & 1994 "bulk sea-surface salinity", "ppt", '') 1995 1956 1996 END MODULE phys_output_ctrlout_mod -
LMDZ6/trunk/libf/phylmd/phys_output_var_mod.F90
r3149 r3815 133 133 !$OMP THREADPRIVATE(sens_prec_liq_o, sens_prec_sol_o,lat_prec_liq_o,lat_prec_sol_o) 134 134 135 ! Ocean-atmosphere interface, subskin ocean and near-surface ocean: 136 137 REAL, ALLOCATABLE, SAVE:: dter(:) 138 ! Temperature variation in the diffusive microlayer, that is 139 ! ocean-air interface temperature minus subskin temperature. In K. 140 141 REAL, SAVE, ALLOCATABLE:: dser(:) 142 ! Temperature variation in the diffusive microlayer, that is 143 ! subskin temperature minus ocean-air interface temperature. In K. 144 145 REAL, SAVE, ALLOCATABLE:: tkt(:) 146 ! épaisseur (m) de la couche de diffusion thermique (microlayer) 147 ! cool skin thickness 148 149 REAL, SAVE, ALLOCATABLE:: tks(:) 150 ! épaisseur (m) de la couche de diffusion de masse (microlayer) 151 152 REAL, SAVE, ALLOCATABLE:: taur(:) ! momentum flux due to rain, in Pa 153 154 REAL, SAVE, ALLOCATABLE:: sss(:) 155 ! bulk salinity of the surface layer of the ocean, in ppt 156 157 !$OMP THREADPRIVATE(dter, dser, tkt, tks, taur, sss) 158 135 159 CONTAINS 136 160 … … 138 162 SUBROUTINE phys_output_var_init 139 163 use dimphy 164 use config_ocean_skin_m, only: activate_ocean_skin 140 165 141 166 IMPLICIT NONE … … 191 216 IF (ok_gwd_rando) allocate(zustr_gwd_rando(klon), zvstr_gwd_rando(klon)) 192 217 218 if (activate_ocean_skin >= 1) allocate(dter(klon), dser(klon), tkt(klon), & 219 tks(klon), taur(klon), sss(klon)) 220 193 221 END SUBROUTINE phys_output_var_init 194 222 -
LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
r3799 r3815 199 199 o_col_O3_strato, o_col_O3_tropo, & 200 200 !--interactive CO2 201 o_flx_co2_ocean, o_flx_co2_land, o_flx_co2_ff, o_flx_co2_bb 202 201 o_flx_co2_ocean, o_flx_co2_land, o_flx_co2_ff, o_flx_co2_bb, & 202 o_delta_sst, o_delta_sal, o_ds_ns, o_dt_ns, o_dter, o_dser, o_tkt, & 203 o_tks, o_taur, o_sss 203 204 204 205 #ifdef CPP_StratAer … … 245 246 T2sumSTD, nlevSTD, du_gwd_rando, du_gwd_front, & 246 247 ulevSTD, vlevSTD, wlevSTD, philevSTD, qlevSTD, tlevSTD, & 247 rhlevSTD, O3STD, O3daySTD, uvSTD, vqSTD, vTSTD, wqSTD, & 248 vphiSTD, wTSTD, u2STD, v2STD, T2STD, missing_val_nf90 248 rhlevSTD, O3STD, O3daySTD, uvSTD, vqSTD, vTSTD, wqSTD, vphiSTD, & 249 wTSTD, u2STD, v2STD, T2STD, missing_val_nf90, delta_sal, ds_ns, & 250 dt_ns, delta_sst 249 251 250 252 USE phys_local_var_mod, ONLY: zxfluxlat, slp, ptstar, pt0, zxtsol, zt2m, & … … 353 355 alt_tropo, & 354 356 !Ionela 355 ok_4xCO2atm 357 ok_4xCO2atm, dter, dser, tkt, tks, taur, sss 356 358 357 359 USE ocean_slab_mod, ONLY: nslay, tslab, slab_bilg, tice, seaice, & … … 380 382 #endif 381 383 USE tracinca_mod, ONLY: config_inca 384 use config_ocean_skin_m, only: activate_ocean_skin 382 385 383 386 USE vertical_layers_mod, ONLY: presnivs … … 2385 2388 ENDIF !(iflag_phytrac==1) 2386 2389 2390 if (activate_ocean_skin >= 1) then 2391 CALL histwrite_phy(o_delta_sst, delta_sst) 2392 CALL histwrite_phy(o_delta_sal, delta_sal) 2393 CALL histwrite_phy(o_ds_ns, ds_ns) 2394 CALL histwrite_phy(o_dt_ns, dt_ns) 2395 CALL histwrite_phy(o_dter, dter) 2396 CALL histwrite_phy(o_dser, dser) 2397 CALL histwrite_phy(o_tkt, tkt) 2398 CALL histwrite_phy(o_tks, tks) 2399 CALL histwrite_phy(o_taur, taur) 2400 CALL histwrite_phy(o_sss, sss) 2401 end if 2402 2387 2403 IF (.NOT.vars_defined) THEN 2388 2404 !$OMP MASTER -
LMDZ6/trunk/libf/phylmd/phys_state_var_mod.F90
r3781 r3815 430 430 !$OMP THREADPRIVATE(is_initialized) 431 431 432 CONTAINS 432 ! Ocean-atmosphere interface: 433 434 REAL, ALLOCATABLE, SAVE:: ds_ns(:) ! (klon) 435 ! "delta salinity near surface". Salinity variation in the 436 ! near-surface turbulent layer. That is subskin salinity minus 437 ! foundation salinity. In ppt. 438 439 REAL, ALLOCATABLE, SAVE:: dt_ns(:) ! (klon) 440 ! "delta temperature near surface". Temperature variation in the 441 ! near-surface turbulent layer. That is subskin temperature 442 ! minus foundation temperature. (Can be negative.) In K. 443 444 REAL, ALLOCATABLE, SAVE:: delta_sst(:) ! (klon) 445 ! Ocean-air interface temperature minus bulk SST, in 446 ! K. Allocated and defined only if activate_ocean_skin >= 1. 447 448 REAL, ALLOCATABLE, SAVE:: delta_sal(:) ! (klon) 449 ! Ocean-air interface salinity minus bulk salinity, in ppt 450 451 !$OMP THREADPRIVATE(delta_sal, ds_ns, dt_ns, delta_sst) 452 453 CONTAINS 433 454 434 455 !====================================================================== … … 438 459 USE infotrac_phy, ONLY : nbtr 439 460 USE indice_sol_mod 461 use config_ocean_skin_m, only: activate_ocean_skin 440 462 IMPLICIT NONE 441 463 … … 638 660 du_gwd_front(:,:) = 0 !ym missing init 639 661 ENDIF 640 END SUBROUTINE phys_state_var_init 662 if (activate_ocean_skin >= 1) ALLOCATE(delta_sal(klon), ds_ns(klon), & 663 dt_ns(klon), delta_sst(klon)) 664 665 END SUBROUTINE phys_state_var_init 641 666 642 667 !====================================================================== 643 SUBROUTINE phys_state_var_end 668 SUBROUTINE phys_state_var_end 669 ! Useful only for lmdz1d. 644 670 !USE dimphy 645 671 USE indice_sol_mod 672 use config_ocean_skin_m, only: activate_ocean_skin 646 673 IMPLICIT NONE 647 674 include "clesphys.h" … … 771 798 DEALLOCATE(ale_bl_trig) 772 799 !!! fin nrlmd le 10/04/2012 800 801 if (activate_ocean_skin >= 1) deALLOCATE(delta_sal, ds_ns, dt_ns, & 802 delta_sst) 803 773 804 is_initialized=.FALSE. 805 774 806 END SUBROUTINE phys_state_var_end 775 807 -
LMDZ6/trunk/libf/phylmd/suphel.F90
r3447 r3815 131 131 rcvv = rcpv - rv 132 132 rkappa = rd/rcpd 133 eps_w = rmv / rmd 133 134 retv = rv/rd - 1. 134 135 WRITE (UNIT=6, FMT='('' *** Thermodynamic, gas ***'')') -
LMDZ6/trunk/libf/phylmd/surf_ocean_mod.F90
r3395 r3815 20 20 z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, & 21 21 tsurf_new, dflux_s, dflux_l, lmt_bils, & 22 flux_u1, flux_v1) 22 flux_u1, flux_v1, delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, tkt, tks, & 23 taur, sss) 23 24 24 25 use albedo, only: alboc, alboc_cd 26 use bulk_flux_m, only: bulk_flux 25 27 USE dimphy, ONLY: klon, zmasq 26 28 USE surface_data, ONLY : type_ocean … … 30 32 USE indice_sol_mod, ONLY : nbsrf, is_oce 31 33 USE limit_read_mod 34 use config_ocean_skin_m, only: activate_ocean_skin 32 35 ! 33 36 ! This subroutine will make a call to ocean_XXX_noice according to the ocean mode (force, … … 50 53 REAL, DIMENSION(klon), INTENT(IN) :: lwnet ! net longwave radiation at surface 51 54 REAL, DIMENSION(klon), INTENT(IN) :: alb1 ! albedo in visible SW interval 52 REAL, DIMENSION(klon), INTENT(IN) :: windsp 55 REAL, DIMENSION(klon), INTENT(IN) :: windsp ! wind at 10 m, in m s-1 53 56 REAL, DIMENSION(klon), INTENT(IN) :: rmu0 54 57 REAL, DIMENSION(klon), INTENT(IN) :: fder 55 REAL, DIMENSION(klon), INTENT(IN) :: tsurf_in58 REAL, INTENT(IN):: tsurf_in(klon) ! defined only for subscripts 1:knon 56 59 REAL, DIMENSION(klon), INTENT(IN) :: p1lay,z1lay ! pression (Pa) et altitude (m) du premier niveau 57 60 REAL, DIMENSION(klon), INTENT(IN) :: cdragh … … 73 76 REAL, DIMENSION(klon), INTENT(inOUT):: z0h 74 77 78 REAL, intent(inout):: delta_sst(:) ! (knon) 79 ! Ocean-air interface temperature minus bulk SST, in K. Defined 80 ! only if activate_ocean_skin >= 1. 81 82 real, intent(inout):: delta_sal(:) ! (knon) 83 ! Ocean-air interface salinity minus bulk salinity, in ppt. Defined 84 ! only if activate_ocean_skin >= 1. 85 86 REAL, intent(inout):: ds_ns(:) ! (knon) 87 ! "delta salinity near surface". Salinity variation in the 88 ! near-surface turbulent layer. That is subskin salinity minus 89 ! foundation salinity. In ppt. 90 91 REAL, intent(inout):: dt_ns(:) ! (knon) 92 ! "delta temperature near surface". Temperature variation in the 93 ! near-surface turbulent layer. That is subskin temperature 94 ! minus foundation temperature. (Can be negative.) In K. 95 75 96 ! Output variables 76 !************************************************************************** ****97 !************************************************************************** 77 98 REAL, DIMENSION(klon), INTENT(OUT) :: z0m 78 99 !albedo SB >>> … … 83 104 !albedo SB <<< 84 105 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat 85 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new106 REAL, INTENT(OUT):: tsurf_new(klon) ! sea surface temperature, in K 86 107 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 87 108 REAL, DIMENSION(klon), INTENT(OUT) :: lmt_bils 88 109 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 89 110 111 REAL, intent(out):: dter(:) ! (knon) 112 ! Temperature variation in the diffusive microlayer, that is 113 ! ocean-air interface temperature minus subskin temperature. In 114 ! K. 115 116 REAL, intent(out):: dser(:) ! (knon) 117 ! Salinity variation in the diffusive microlayer, that is 118 ! ocean-air interface salinity minus subskin salinity. In ppt. 119 120 REAL, intent(out):: tkt(:) ! (knon) 121 ! épaisseur (m) de la couche de diffusion thermique (microlayer) 122 ! cool skin thickness 123 124 REAL, intent(out):: tks(:) ! (knon) 125 ! épaisseur (m) de la couche de diffusion de masse (microlayer) 126 127 REAL, intent(out):: taur(:) ! (knon) 128 ! momentum flux due to rain, in Pa 129 130 real, intent(out):: sss(:) ! (klon) 131 ! Bulk salinity of the surface layer of the ocean, in ppt. (Only 132 ! defined for subscripts 1:knon, but we have to declare it with 133 ! size klon because of the coupling machinery.) 134 90 135 ! Local variables 91 !************************************************************************* *****136 !************************************************************************* 92 137 INTEGER :: i, k 93 138 REAL :: tmp … … 97 142 REAL, DIMENSION(klon) :: cdragq ! Cdrag pour l'evaporation 98 143 CHARACTER(len=20),PARAMETER :: modname="surf_ocean" 99 100 ! End definition 101 !****************************************************************************** 144 real rhoa(knon) ! density of moist air (kg / m3) 145 REAL sens_prec_liq(knon) 146 147 REAL t_int(knon) ! ocean-air interface temperature, in K 148 real s_int(knon) ! ocean-air interface salinity, in ppt 149 150 !************************************************************************** 102 151 103 152 … … 126 175 ENDIF 127 176 128 177 rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon))) 129 178 !****************************************************************************** 130 179 ! Switch according to type of ocean (couple, slab or forced) … … 139 188 AcoefH, AcoefQ, BcoefH, BcoefQ, & 140 189 AcoefU, AcoefV, BcoefU, BcoefV, & 141 ps, u1, v1, gustiness, &190 ps, u1, v1, gustiness, tsurf_in, & 142 191 radsol, snow, agesno, & 143 192 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 144 tsurf_new, dflux_s, dflux_l) 193 tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, delta_sal, rhoa, & 194 delta_sst) 145 195 146 196 CASE('slab') … … 162 212 AcoefH, AcoefQ, BcoefH, BcoefQ, & 163 213 AcoefU, AcoefV, BcoefU, BcoefV, & 164 ps, u1, v1, gustiness, &214 ps, u1, v1, gustiness, tsurf_in, & 165 215 radsol, snow, agesno, & 166 216 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 167 tsurf_new, dflux_s, dflux_l )217 tsurf_new, dflux_s, dflux_l, sens_prec_liq, rhoa) 168 218 END SELECT 169 219 … … 268 318 CALL abort_physic(modname,'version non prevue',1) 269 319 ENDIF 270 ! 271 !****************************************************************************** 320 321 if (activate_ocean_skin >= 1) then 322 if (type_ocean /= 'couple') sss(:knon) = 35. 323 call bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, & 324 u = windsp(:knon), t_ocean_1 = tsurf_new(:knon), s1 = sss(:knon), & 325 rain = precip_rain(:knon) + precip_snow(:knon), & 326 hf = - fluxsens(:knon), hlb = - fluxlat(:knon), & 327 rnl = - lwnet(:knon), & 328 tau = sqrt(flux_u1(:knon)**2 + flux_v1(:knon)**2), rhoa = rhoa, & 329 xlv = [(rlvtt, i = 1, knon)], rf = - sens_prec_liq, dtime = dtime, & 330 rns = swnet(:knon)) 331 delta_sst = t_int - tsurf_new(:knon) 332 delta_sal = s_int - sss(:knon) 333 if (activate_ocean_skin >= 2) tsurf_new(:knon) = t_int 334 end if 335 272 336 END SUBROUTINE surf_ocean 273 !**************************************************************************** **337 !**************************************************************************** 274 338 ! 275 339 END MODULE surf_ocean_mod -
LMDZ6/trunk/libf/phylmd/surf_seaice_mod.F90
r3102 r3815 37 37 INCLUDE "dimsoil.h" 38 38 INCLUDE "clesphys.h" 39 40 INCLUDE "YOMCST.h" 41 ! for rd and retv 39 42 40 43 ! Input arguments … … 87 90 REAL, DIMENSION(klon) :: alb1_new,alb2_new 88 91 !albedo SB <<< 89 ! 92 93 real rhoa(knon) ! density of moist air (kg / m3) 94 90 95 ! End definitions 91 96 !**************************************************************************************** … … 98 103 radsol(:) = 0.0 99 104 radsol(1:knon) = swnet(1:knon) + lwnet(1:knon) 105 106 rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon))) 100 107 101 108 !**************************************************************************************** … … 116 123 radsol, snow, qsurf, & 117 124 alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 118 tsurf_new, dflux_s, dflux_l )125 tsurf_new, dflux_s, dflux_l, rhoa) 119 126 120 127 ELSE IF (type_ocean == 'slab'.AND.version_ocean=='sicINT') THEN … … 138 145 radsol, snow, qsol, agesno, tsoil, & 139 146 qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 140 tsurf_new, dflux_s, dflux_l )147 tsurf_new, dflux_s, dflux_l, rhoa) 141 148 142 149 END IF
Note: See TracChangeset
for help on using the changeset viewer.