Changeset 1236 for trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys
- Timestamp:
- May 5, 2014, 11:38:51 AM (11 years ago)
- Location:
- trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F
r1212 r1236 29 29 num_3d_s,SCALAR, & 30 30 MARS_MODE, & 31 M ARS_ALB,MARS_TI,MARS_CICE,MARS_EMISS, &32 M ARS_WICE, &33 M ARS_TSOIL, &34 M ARS_Q2, &35 M ARS_TSURF, &36 #ifdef NEWPHYS 37 M ARS_FLUXRAD, &38 M ARS_WSTAR, &39 M ARS_ISOIL, &40 M ARS_DSOIL, &41 M ARS_Z0, &31 M_ALBEDO,M_TI,M_CO2ICE,M_EMISS, & 32 M_H2OICE, & 33 M_TSOIL, & 34 M_Q2, & 35 M_TSURF, & 36 #ifdef NEWPHYS 37 M_FLUXRAD, & 38 M_WSTAR, & 39 M_ISOIL, & 40 M_DSOIL, & 41 M_Z0, & 42 42 CST_Z0, & 43 43 #endif 44 M ARS_GW, &44 M_GW, & 45 45 NUM_SOIL_LAYERS, & 46 46 CST_AL, & … … 49 49 diff_opt, & 50 50 km_opt, & 51 UAVE, USTD, &52 VAVE, VSTD, &53 WAVE, WSTD, &54 TAVE, TSTD, &55 51 HISTORY_INTERVAL, & 56 52 #ifndef NOPHYS … … 119 115 MSFT,MSFU,MSFV, & 120 116 XLAT,XLONG,HT, & 121 M ARS_ALB,MARS_TI,MARS_EMISS, &117 M_ALBEDO,M_TI,M_EMISS, & 122 118 SLPX,SLPY 123 119 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT ) :: & 124 M ARS_CICE,MARS_WICE, &125 M ARS_TSURF120 M_CO2ICE,M_H2OICE, & 121 M_TSURF 126 122 ! 3D arrays 127 123 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN ) :: & 128 124 dz8w,p8w,p,exner,t,t8w,rho,u,v,w,z,th 129 125 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT ) :: & 130 M ARS_Q2126 M_Q2 131 127 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 132 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: &133 UAVE, USTD, VAVE, VSTD, WAVE, WSTD, TAVE, TSTD134 128 INTEGER, INTENT(IN ) :: HISTORY_INTERVAL 135 129 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 136 130 REAL, DIMENSION( ims:ime, NUM_SOIL_LAYERS, jms:jme ), INTENT(INOUT ) :: & 137 M ARS_TSOIL131 M_TSOIL 138 132 #ifdef NEWPHYS 139 133 REAL, INTENT(IN ) :: CST_Z0 140 134 REAL, DIMENSION( ims:ime, NUM_SOIL_LAYERS, jms:jme ), INTENT(IN ) :: & 141 M ARS_ISOIL, MARS_DSOIL135 M_ISOIL, M_DSOIL 142 136 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN ) :: & 143 M ARS_Z0137 M_Z0 144 138 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT ) :: & 145 M ARS_FLUXRAD,MARS_WSTAR139 M_FLUXRAD,M_WSTAR 146 140 #endif 147 141 REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN ) :: & 148 M ARS_GW142 M_GW 149 143 ! 4D arrays 150 144 INTEGER, INTENT(IN ) :: num_3d_s … … 924 918 !-----------------------------------------! 925 919 IF (JULYR .ne. 9999) THEN 926 zmea_val=M ARS_GW(i,1,j)927 zstd_val=M ARS_GW(i,2,j)928 zsig_val=M ARS_GW(i,3,j)929 zgam_val=M ARS_GW(i,4,j)930 zthe_val=M ARS_GW(i,5,j)920 zmea_val=M_GW(i,1,j) 921 zstd_val=M_GW(i,2,j) 922 zsig_val=M_GW(i,3,j) 923 zgam_val=M_GW(i,4,j) 924 zthe_val=M_GW(i,5,j) 931 925 ELSE 932 926 IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** IDEALIZED SIMULATION GWdrag OFF' … … 943 937 IF (JULYR .ne. 9999) THEN 944 938 IF (CST_AL == 0) THEN 945 albedodat_val=M ARS_ALB(i,j)939 albedodat_val=M_ALBEDO(i,j) 946 940 ELSE 947 941 albedodat_val=CST_AL … … 949 943 ENDIF 950 944 IF (CST_TI == 0) THEN 951 inertiedat_val=M ARS_TI(i,j)945 inertiedat_val=M_TI(i,j) 952 946 ELSE 953 947 inertiedat_val=CST_TI … … 967 961 IF (JULYR .ne. 9999) THEN 968 962 IF (CST_Z0 == 0) THEN 969 z0_val = M ARS_Z0(i,j)963 z0_val = M_Z0(i,j) 970 964 ELSE 971 965 z0_val = CST_Z0 … … 999 993 ! Ground temperature, emissivity, CO2 ice cover ! 1000 994 !-----------------------------------------------! 1001 IF (.not. restart) THEN 1002 tsurf_val=tsk(i,j) ! because tsk is not updated in lmd_driver, the stored value in restart is at t, not t+dt 1003 ! note to aslmd: i dont know why we dont update tsk, so I use MARS_TSURF to be conservative 1004 ELSE 1005 tsurf_val=MARS_TSURF(i,j) 1006 ENDIF 1007 emis_val=MARS_EMISS(i,j) 1008 co2ice_val=MARS_CICE(i,j) 995 IF (M_TSURF(i,j) .gt. 0.) THEN 996 tsurf_val=M_TSURF(i,j) 997 ELSE 998 tsurf_val=TSK(i,j) ! retro-compatibility 999 ENDIF 1000 emis_val=M_EMISS(i,j) 1001 co2ice_val=M_CO2ICE(i,j) 1009 1002 1010 1003 !------------------------! … … 1012 1005 !------------------------! 1013 1006 IF (JULYR .ne. 9999) THEN 1014 IF (M ARS_TSOIL(i,1,j) .gt. 0.) THEN1015 tsoil_val(:)=M ARS_TSOIL(i,:,j)1007 IF (M_TSOIL(i,1,j) .gt. 0.) THEN 1008 tsoil_val(:)=M_TSOIL(i,:,j) 1016 1009 ELSE 1017 1010 tsoil_val = tsoil_val*0. + tsurf_val 1018 1011 ENDIF 1019 1012 #ifdef NEWPHYS 1020 isoil_val(:)=M ARS_ISOIL(i,:,j)1021 dsoil_val(:)=M ARS_DSOIL(i,:,j)1013 isoil_val(:)=M_ISOIL(i,:,j) 1014 dsoil_val(:)=M_DSOIL(i,:,j) 1022 1015 #endif 1023 1016 ELSE … … 1028 1021 ELSE 1029 1022 !this is a restart run. We must not set tsoil to tsurf in the init. 1030 !tsoil was saved in physiq.F under the name M ARS_TSOIL in the restart file1023 !tsoil was saved in physiq.F under the name M_TSOIL in the restart file 1031 1024 !(see Registry) 1032 tsoil_val(k)=M ARS_TSOIL(i,k,j)1025 tsoil_val(k)=M_TSOIL(i,k,j) 1033 1026 ENDIF 1034 1027 … … 1055 1048 CASE(1) 1056 1049 qsurf_val(1)=0. 1057 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus1050 qsurf_val(2)=M_H2OICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus 1058 1051 !! ----- retrocompatible ancienne physique 1059 1052 !! ----- [H2O ice is last tracer in qsurf in LMD physics] … … 1066 1059 CASE(11) 1067 1060 qsurf_val(1)=0. 1068 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus1061 qsurf_val(2)=M_H2OICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus 1069 1062 qsurf_val(3)=0. !! not coupled with lifting for the moment [non remobilise] 1070 1063 qsurf_val(4)=0. 1071 1064 CASE(12) 1072 1065 qsurf_val(1)=0. 1073 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus1066 qsurf_val(2)=M_H2OICE(i,j) !! logique avec wtnom(2) = 'h2o_ice' defini ci-dessus 1074 1067 qsurf_val(3)=0. !! not coupled with lifting for the moment [non remobilise] 1075 1068 qsurf_val(4)=0. … … 1156 1149 #endif 1157 1150 ELSE 1158 q2_val(:)=M ARS_Q2(i,:,j)1159 #ifdef NEWPHYS 1160 fluxrad_val=M ARS_FLUXRAD(i,j)1161 wstar_val=M ARS_WSTAR(i,j)1151 q2_val(:)=M_Q2(i,:,j) 1152 #ifdef NEWPHYS 1153 fluxrad_val=M_FLUXRAD(i,j) 1154 wstar_val=M_WSTAR(i,j) 1162 1155 #endif 1163 1156 ENDIF … … 1524 1517 #ifndef NORESTART 1525 1518 #ifdef SPECIAL_NEST_SAVE 1526 M ARS_TSOIL(i,:,j)=save_tsoil_restart(subs,:,id)1527 M ARS_CICE(i,j)=save_co2ice_restart(subs,id)1528 M ARS_Q2(i,kps:kpe+1,j)=save_q2_restart(subs,:,id)1519 M_TSOIL(i,:,j)=save_tsoil_restart(subs,:,id) 1520 M_CO2ICE(i,j)=save_co2ice_restart(subs,id) 1521 M_Q2(i,kps:kpe+1,j)=save_q2_restart(subs,:,id) 1529 1522 SELECT CASE (MARS_MODE) 1530 1523 CASE (1,11,12) 1531 M ARS_WICE(i,j)=save_qsurf_restart(subs,2,id) !! see above Tracer at surface1524 M_H2OICE(i,j)=save_qsurf_restart(subs,2,id) !! see above Tracer at surface 1532 1525 END SELECT 1533 M ARS_TSURF(i,j)=save_tsurf_restart(subs,id)1534 #ifdef NEWPHYS 1535 M ARS_WSTAR(i,j)=save_wstar_restart(subs,id)1536 M ARS_FLUXRAD(i,j)=save_fluxrad_restart(subs,id)1526 M_TSURF(i,j)=save_tsurf_restart(subs,id) 1527 #ifdef NEWPHYS 1528 M_WSTAR(i,j)=save_wstar_restart(subs,id) 1529 M_FLUXRAD(i,j)=save_fluxrad_restart(subs,id) 1537 1530 #endif 1538 1531 #else 1539 M ARS_TSOIL(i,:,j)=save_tsoil_restart(subs,:)1540 M ARS_CICE(i,j)=save_co2ice_restart(subs)1541 M ARS_Q2(i,kps:kpe+1,j)=save_q2_restart(subs,:)1532 M_TSOIL(i,:,j)=save_tsoil_restart(subs,:) 1533 M_CO2ICE(i,j)=save_co2ice_restart(subs) 1534 M_Q2(i,kps:kpe+1,j)=save_q2_restart(subs,:) 1542 1535 SELECT CASE (MARS_MODE) 1543 1536 CASE (1,11,12) 1544 M ARS_WICE(i,j)=save_qsurf_restart(subs,2) !! see above Tracer at surface1537 M_H2OICE(i,j)=save_qsurf_restart(subs,2) !! see above Tracer at surface 1545 1538 END SELECT 1546 M ARS_TSURF(i,j)=save_tsurf_restart(subs)1547 #ifdef NEWPHYS 1548 M ARS_WSTAR(i,j)=save_wstar_restart(subs)1549 M ARS_FLUXRAD(i,j)=save_fluxrad_restart(subs)1539 M_TSURF(i,j)=save_tsurf_restart(subs) 1540 #ifdef NEWPHYS 1541 M_WSTAR(i,j)=save_wstar_restart(subs) 1542 M_FLUXRAD(i,j)=save_fluxrad_restart(subs) 1550 1543 #endif 1551 1544 #endif -
trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F.new
r1234 r1236 30 30 num_3d_s,SCALAR, & 31 31 MARS_MODE, & 32 MARS_ALB,MARS_TI,MARS_CICE,MARS_EMISS, & 33 MARS_WICE, & 34 MARS_TSOIL, & 35 MARS_Q2, & 36 MARS_TSURF, & 37 MARS_FLUXRAD, & 38 MARS_WSTAR, & 39 MARS_ISOIL, & 40 MARS_DSOIL, & 41 MARS_Z0, & 42 CST_Z0, & 43 MARS_GW, & 32 M_ALBEDO,M_TI,M_CO2ICE,M_EMISS, & 33 M_H2OICE,M_TSOIL,M_Q2,M_TSURF, & 34 M_FLUXRAD,M_WSTAR,M_ISOIL,M_DSOIL,& 35 M_Z0, CST_Z0, M_GW, & 44 36 NUM_SOIL_LAYERS, & 45 CST_AL, & 46 CST_TI, & 47 isfflx, & 48 diff_opt, & 49 km_opt, & 50 UAVE, USTD, & 51 VAVE, VSTD, & 52 WAVE, WSTD, & 53 TAVE, TSTD, & 37 CST_AL, CST_TI, & 38 isfflx, diff_opt, km_opt, & 54 39 HISTORY_INTERVAL, & 40 ! sert a rien ce NOPHYS. il le faudrait sur tout. 55 41 #ifndef NOPHYS 56 #include "module_lmd_driver_output1.inc" 42 HR_SW,HR_LW,SWDOWNZ,& 43 TAU_DUST,RDUST,QSURFDUST,& 44 MTOT,ICETOT,VMR_ICE,TAU_ICE,RICE,& 45 HFMAX,ZMAX,& 46 USTM,HFX,& 57 47 #endif 58 48 SLPX,SLPY,RESTART) … … 83 73 peri_day,obliquit,emin_turb, & 84 74 lmixmin 85 use turb_mod, only: q2,wstar,hfmax_th 75 use turb_mod, only: q2,wstar,ustar,sensibFlux,& 76 hfmax_th,zmax_th,turb_resolved 86 77 use dimradmars_mod, only: fluxrad 87 78 use tracer_mod, only: noms 88 79 use comcstfi_h, only: omeg,mugaz 89 80 use comgeomfi_h, only: ini_fillgeom 81 USE comm_wrf 90 82 #endif 91 83 … … 93 85 IMPLICIT NONE 94 86 !================================================================== 95 96 !==================================================================97 ! COMMON98 !==================================================================99 100 #ifndef NOPHYS101 !102 ! INCLUDE AUTOMATIQUEMENT GENERE A PARTIR DU REGISTRY103 !104 include "../mars_lmd/libf/phymars/wrf_output_2d.h"105 include "../mars_lmd/libf/phymars/wrf_output_3d.h"106 #endif107 87 108 88 !================================================================== … … 124 104 REAL, INTENT(IN ) :: CST_AL, CST_TI 125 105 REAL, INTENT(IN ) :: PTOP 106 INTEGER, INTENT(IN ) :: HISTORY_INTERVAL 126 107 ! 2D arrays 127 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN 108 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: & 128 109 MSFT,MSFU,MSFV, & 129 110 XLAT,XLONG,HT, & 130 MARS_ALB,MARS_TI,MARS_EMISS, & 131 SLPX,SLPY 132 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT ) :: & 133 MARS_CICE,MARS_WICE, & 134 MARS_TSURF 111 M_ALBEDO,M_TI,M_EMISS, & 112 SLPX,SLPY, & 113 M_CO2ICE,M_H2OICE, & 114 M_TSURF, M_Z0, & 115 M_FLUXRAD,M_WSTAR, & 116 PSFC,TSK 117 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(OUT) :: & 118 SWDOWNZ,& 119 TAU_DUST,QSURFDUST,& 120 MTOT,ICETOT,TAU_ICE,& 121 HFMAX,ZMAX,& 122 USTM,HFX 135 123 ! 3D arrays 136 124 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN ) :: & 137 125 dz8w,p8w,p,exner,t,t8w,rho,u,v,w,z,th 126 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(OUT ) :: & 127 RTHBLTEN,RUBLTEN,RVBLTEN, & 128 HR_SW,HR_LW,RDUST,VMR_ICE,RICE 138 129 REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT ) :: & 139 MARS_Q2 140 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 141 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: & 142 UAVE, USTD, VAVE, VSTD, WAVE, WSTD, TAVE, TSTD 143 INTEGER, INTENT(IN ) :: HISTORY_INTERVAL 144 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 130 M_Q2 145 131 REAL, DIMENSION( ims:ime, NUM_SOIL_LAYERS, jms:jme ), INTENT(INOUT ) :: & 146 M ARS_TSOIL132 M_TSOIL,M_ISOIL, M_DSOIL 147 133 REAL, INTENT(IN ) :: CST_Z0 148 REAL, DIMENSION( ims:ime, NUM_SOIL_LAYERS, jms:jme ), INTENT(IN ) :: &149 MARS_ISOIL, MARS_DSOIL150 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN ) :: &151 MARS_Z0152 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT ) :: &153 MARS_FLUXRAD,MARS_WSTAR154 134 REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN ) :: & 155 M ARS_GW135 M_GW 156 136 ! 4D arrays 157 137 INTEGER, INTENT(IN ) :: num_3d_s … … 160 140 ! Logical 161 141 LOGICAL, INTENT(IN ) :: restart 162 163 !-------------------------------------------164 ! OUTPUT VARIABLES165 !-------------------------------------------166 !167 ! Generated from Registry168 !169 ! default definitions :170 ! 2D : TSK, PSFC171 ! 3D : RTHBLTEN,RUBLTEN,RVBLTEN172 #ifndef NOPHYS173 #include "module_lmd_driver_output2.inc"174 REAL, DIMENSION(:,:), ALLOCATABLE :: output_tab2d175 REAL, DIMENSION(:,:,:), ALLOCATABLE :: output_tab3d176 #else177 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: PSFC,TSK178 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(OUT) :: RTHBLTEN,RUBLTEN,RVBLTEN179 #endif180 !-------------------------------------------181 ! OUTPUT VARIABLES182 !-------------------------------------------183 184 142 185 143 !------------------------------------------- … … 201 159 REAL :: aire_val,lat_val,lon_val 202 160 REAL :: phisfi_val,albedodat_val,inertiedat_val 203 REAL :: tsurf_val,co2ice_val,emis_val204 161 REAL :: zmea_val,zstd_val,zsig_val,zgam_val,zthe_val 205 162 REAL :: theta_val, psi_val … … 230 187 INTEGER :: test 231 188 REAL :: wappel_phys 232 LOGICAL :: flag_LES233 189 LOGICAL, SAVE :: flag_first_restart 234 190 !************************************************** … … 270 226 271 227 IF (JULYR .ne. 9999) THEN 272 flag_LES= .false. ! "True" LES is not available in this version228 turb_resolved = .false. ! "True" LES is not available in this version 273 229 PRINT *, '*** REAL-CASE SIMULATION ***' 274 230 ELSE … … 278 234 PRINT *, '*** diff_opt = 2 *** km_opt = 2' 279 235 PRINT *, '*** forcing is isfflx = ',isfflx 280 flag_LES= .true.236 turb_resolved = .true. 281 237 !! SPECIAL LES 282 238 ELSE … … 284 240 PRINT *, '*** diff_opt = ',diff_opt 285 241 PRINT *, '*** km_opt = ',km_opt 286 flag_LES= .false.242 turb_resolved = .false. 287 243 !! IDEALIZED, no LES 288 244 !! cependant, ne veut-on pas pouvoir … … 302 258 jte = j_end(num_tiles) 303 259 !! 304 IF ( flag_LES.eqv. .false.) THEN260 IF (turb_resolved .eqv. .false.) THEN 305 261 relax=0 306 262 sponge_top=0 ! another value than 0 triggers instabilities … … 311 267 jps=jts 312 268 jpe=jte 313 IF ( flag_LES.eqv. .false.) THEN269 IF (turb_resolved .eqv. .false.) THEN 314 270 IF (ips .eq. ids) ips=its+relax !! IF tests necesary for parallel runs 315 271 IF (ipe .eq. ide-1) ipe=ite-relax … … 318 274 ENDIF 319 275 kps=kts !! start at surface 320 IF ( flag_LES.eqv. .false.) THEN276 IF (turb_resolved .eqv. .false.) THEN 321 277 kpe=kte-sponge_top 322 278 ELSE … … 492 448 ! inputs ... 493 449 #ifndef NOPHYS 494 ALLOCATE(output_tab2d(ngrid,n2d)) 495 ALLOCATE(output_tab3d(ngrid,nlayer,n3d)) 450 CALL allocate_comm_wrf(ngrid,nlayer) 496 451 #endif 497 452 ALLOCATE(q2_val(nlayer+1)) … … 841 796 IF (JULYR .ne. 9999) THEN 842 797 IF (CST_AL == 0) THEN 843 albedodat_val=M ARS_ALB(i,j)798 albedodat_val=M_ALBEDO(i,j) 844 799 ELSE 845 800 albedodat_val=CST_AL … … 855 810 !-----------------------------------------! 856 811 IF (JULYR .ne. 9999) THEN 857 zmea_val=M ARS_GW(i,1,j)858 zstd_val=M ARS_GW(i,2,j)859 zsig_val=M ARS_GW(i,3,j)860 zgam_val=M ARS_GW(i,4,j)861 zthe_val=M ARS_GW(i,5,j)812 zmea_val=M_GW(i,1,j) 813 zstd_val=M_GW(i,2,j) 814 zsig_val=M_GW(i,3,j) 815 zgam_val=M_GW(i,4,j) 816 zthe_val=M_GW(i,5,j) 862 817 ELSE 863 818 IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** IDEALIZED SIMULATION GWdrag OFF' … … 880 835 IF (JULYR .ne. 9999) THEN 881 836 IF (CST_Z0 == 0) THEN 882 z0_val = M ARS_Z0(i,j)837 z0_val = M_Z0(i,j) 883 838 ELSE 884 839 z0_val = CST_Z0 … … 905 860 ! Ground temperature, emissivity, CO2 ice cover ! 906 861 !-----------------------------------------------! 907 IF (.not. restart) THEN 908 tsurf_val=tsk(i,j) ! because tsk is not updated in lmd_driver, the stored value in restart is at t, not t+dt 909 ! note to aslmd: i dont know why we dont update tsk, so I use MARS_TSURF to be conservative 910 ELSE 911 tsurf_val=MARS_TSURF(i,j) 912 ENDIF 913 tsurf(subs) = tsurf_val 914 emis(subs) = MARS_EMISS(i,j) 915 co2ice(subs) = MARS_CICE(i,j) 862 tsurf(subs) = M_TSURF(i,j) 863 emis(subs) = M_EMISS(i,j) 864 co2ice(subs) = M_CO2ICE(i,j) 916 865 !-------------------! 917 866 ! Tracer at surface ! … … 920 869 SELECT CASE (MARS_MODE) 921 870 CASE(1) 922 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus871 qsurf_val(2)=M_H2OICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus 923 872 !! ----- retrocompatible ancienne physique 924 873 !! ----- [H2O ice is last tracer in qsurf in LMD physics] … … 929 878 qsurf_val(2)=q_prof(1,2) 930 879 CASE(11) 931 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus880 qsurf_val(2)=M_H2OICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus 932 881 qsurf_val(3)=0. !! not coupled with lifting for the moment [non remobilise] 933 882 CASE(12) 934 qsurf_val(2)=M ARS_WICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus883 qsurf_val(2)=M_H2OICE(i,j) !! logique avec noms(2) = 'h2o_ice' defini ci-dessus 935 884 qsurf_val(3)=0. !! not coupled with lifting for the moment [non remobilise] 936 885 END SELECT … … 945 894 IF (JULYR .ne. 9999) THEN 946 895 IF (CST_TI == 0) THEN 947 inertiedat_val=M ARS_TI(i,j)896 inertiedat_val=M_TI(i,j) 948 897 ELSE 949 898 inertiedat_val=CST_TI … … 957 906 !--pb de dimensions???!!??? 958 907 IF (JULYR .ne. 9999) THEN 959 isoil_val(:)=M ARS_ISOIL(i,:,j)960 dsoil_val(:)=M ARS_DSOIL(i,:,j)908 isoil_val(:)=M_ISOIL(i,:,j) 909 dsoil_val(:)=M_DSOIL(i,:,j) 961 910 ELSE 962 911 IF ( nsoil .lt. 18 ) THEN … … 986 935 ! Deep soil temperatures ! 987 936 !------------------------! 988 IF (JULYR .ne. 9999) THEN 989 IF (MARS_TSOIL(i,1,j) .gt. 0.) THEN 990 tsoil_val(:)=MARS_TSOIL(i,:,j) 991 ELSE 992 tsoil_val = tsoil_val*0. + tsurf_val 993 ENDIF 994 ELSE 995 IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** IDEALIZED SIMULATION tsoil is set to tsurf' 937 IF (M_TSOIL(i,1,j) .gt. 0. .and. JULYR .ne. 9999) THEN 938 tsoil_val(:)=M_TSOIL(i,:,j) 939 ELSE 940 IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** no tsoil. set it to tsurf.' 996 941 do k=1,nsoil 997 IF (.not.restart) THEN 998 tsoil_val(k) = tsurf_val 999 ELSE 1000 !this is a restart run. We must not set tsoil to tsurf in the init. 1001 !tsoil was saved in physiq.F under the name MARS_TSOIL in the restart file 1002 !(see Registry) 1003 tsoil_val(k)=MARS_TSOIL(i,k,j) 1004 ENDIF 942 tsoil_val(k) = M_TSURF(i,j) 1005 943 enddo 1006 944 ENDIF … … 1014 952 wstar_val=0. 1015 953 ELSE 1016 q2_val(:)=M ARS_Q2(i,:,j)1017 wstar_val=M ARS_WSTAR(i,j)954 q2_val(:)=M_Q2(i,:,j) 955 wstar_val=M_WSTAR(i,j) 1018 956 ENDIF 1019 957 q2(subs,:) = q2_val(:) … … 1026 964 fluxrad_val=0. 1027 965 ELSE 1028 fluxrad_val=M ARS_FLUXRAD(i,j)966 fluxrad_val=M_FLUXRAD(i,j) 1029 967 ENDIF 1030 968 fluxrad(subs) = fluxrad_val … … 1107 1045 firstcall,lastcall,pday,ptime,ptimestep, & 1108 1046 pplev,pplay,pphi,pu,pv,pt,pq,pw, & 1109 pdu,pdv,pdt,pdq,pdpsrf,tracerdyn, & 1110 output_tab2d,output_tab3d,flag_LES) 1047 pdu,pdv,pdt,pdq,pdpsrf,tracerdyn) 1111 1048 #endif 1049 print *, '** Mars ** CALL TO LMD PHYSICS DONE' 1112 1050 DEALLOCATE(pplev) 1113 1051 DEALLOCATE(pplay) … … 1118 1056 DEALLOCATE(pw) 1119 1057 DEALLOCATE(pq) 1120 1121 !-------------------------------!1122 ! PHYSIQ OUTPUT IN THE WRF FILE !1123 !-------------------------------!1124 #ifndef NOPHYS1125 DO j = jps,jpe1126 DO i = ips,ipe1127 subs = (j-jps)*(ipe-ips+1)+(i-ips+1)1128 #include "module_lmd_driver_output3.inc"1129 ! ^-- generated from Registry1130 ENDDO1131 ENDDO1132 DEALLOCATE(output_tab2d)1133 DEALLOCATE(output_tab3d)1134 #endif1135 1058 1136 1059 !---------------------------------------------------------------------------------! … … 1150 1073 dq_save(:,:,:)=pdq(:,:,:) 1151 1074 #endif 1075 1076 !! OUTPUT OUTPUT OUTPUT 1077 DO j = jps,jpe 1078 DO i = ips,ipe 1079 1080 subs = (j-jps)*(ipe-ips+1)+(i-ips+1) 1081 1082 !-------------------------------------------------------! 1083 ! Save key variables for restart and output and nesting ! 1084 !-------------------------------------------------------! 1085 M_TSOIL(i,:,j) = tsoil(subs,:) 1086 M_CO2ICE(i,j) = co2ice(subs) 1087 M_Q2(i,kps:kpe+1,j) = q2(subs,:) 1088 M_TSURF(i,j) = tsurf(subs) 1089 M_WSTAR(i,j) = wstar(subs) 1090 M_FLUXRAD(i,j) = fluxrad(subs) 1091 SELECT CASE (MARS_MODE) 1092 CASE (1,11,12) 1093 M_H2OICE(i,j) = qsurf(subs,2) !! see above Tracer at surface 1094 END SELECT 1095 1096 !! output only (arrays already in phys modules) 1097 HFMAX(i,j) = HFMAX_TH(subs) 1098 ZMAX(i,j) = ZMAX_TH(subs) 1099 USTM(i,j) = ustar(subs) 1100 HFX(i,j) = sensibFlux(subs) 1101 1102 !! output only (cf comm_wrf) 1103 SWDOWNZ(i,j) = comm_SWDOWNZ(subs) 1104 TAU_DUST(i,j) = comm_TAU_DUST(subs) 1105 QSURFDUST(i,j) = comm_QSURFDUST(subs) 1106 MTOT(i,j) = comm_MTOT(subs) 1107 ICETOT(i,j) = comm_ICETOT(subs) 1108 TAU_ICE(i,j) = comm_TAU_ICE(subs) 1109 HR_SW(i,kps:kpe,j) = comm_HR_SW(subs,kps:kpe) 1110 HR_LW(i,kps:kpe,j) = comm_HR_LW(subs,kps:kpe) 1111 RDUST(i,kps:kpe,j) = comm_RDUST(subs,kps:kpe) 1112 VMR_ICE(i,kps:kpe,j) = comm_VMR_ICE(subs,kps:kpe) 1113 RICE(i,kps:kpe,j) = comm_RICE(subs,kps:kpe) 1114 1115 ENDDO 1116 ENDDO 1117 1118 CALL deallocate_comm_wrf 1119 1152 1120 ENDIF call_physics 1153 1121 … … 1206 1174 END SELECT 1207 1175 1208 !------------------------------------!1209 ! Save key variables for restart !1210 !------------------------------------!1211 MARS_TSOIL(i,:,j) = tsoil(subs,:)1212 MARS_CICE(i,j) = co2ice(subs)1213 MARS_Q2(i,kps:kpe+1,j) = q2(subs,:)1214 MARS_TSURF(i,j) = tsurf(subs)1215 MARS_WSTAR(i,j) = wstar(subs)1216 MARS_FLUXRAD(i,j) = fluxrad(subs)1217 SELECT CASE (MARS_MODE)1218 CASE (1,11,12)1219 MARS_WICE(i,j) = qsurf(subs,2) !! see above Tracer at surface1220 END SELECT1221 1222 1176 ENDDO 1223 1177 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.