Changeset 2868 for trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd
- Timestamp:
- Jan 16, 2023, 4:47:08 PM (3 years ago)
- Location:
- trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/callphysiq_mod.F
r2866 r2868 43 43 44 44 call allocate_comm_wrf(klon,llm) 45 46 45 ! Call physics package with required inputs/outputs 47 46 CALL physiq(klon, & ! ngrid 48 47 llm, & ! nlayer 49 48 nqtot, & ! nq 50 ! noms, & ! nametrac51 49 debut_split, & ! firstcall 52 50 lafin_split, & ! lastcall -
trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_inputs_physiq_mod.F
r2866 r2868 27 27 REAL :: sec,nsec 28 28 29 IF (JULYR .le. 8999) THEN30 if (tlocked .eqv. .false.) THEN29 !IF (JULYR .le. 8999) THEN 30 ! if (tlocked .eqv. .false.) THEN 31 31 JH_cur_split = (GMT + elaps/3600.) !! universal time (0<JH_cur_split<1): JH_cur_split=0.5 at 12:00 UT 32 32 JH_cur_split = MODULO(JH_cur_split,24.) !! the two arguments of MODULO must be of the same type … … 36 36 MY = (JULYR-2000) + (86400*(JULDAY - 1)+3600.0*GMT+elaps)/31968000 37 37 MY = INT(MY) 38 ELSE 39 JH_cur_split = (GMT)! + elaps/420000.) !! universal time (0<JH_cur_split<1): JH_cur_split=0.5 at 12:00 UT 40 JH_cur_split = MODULO(JH_cur_split,24.) !! the two arguments of MODULO must be of the same type 41 JH_cur_split = JH_cur_split / 24. 42 JD_cur = (JULDAY - 1 + INT((3600*GMT)/86400))!+elaps)/1.008e7)) 43 JD_cur = MODULO(int(JD_cur),2) 44 MY = (JULYR-2000) + (86400*(JULDAY - 1)+3600*GMT+elaps)/31968000 45 MY = INT(MY) 46 ENDIF 47 ELSE 48 if (tlocked .eqv. .false.) THEN 49 JH_cur_split = lct_input - lon_input / 15. + elaps/1500.0 50 JD_cur = INT((sec*(lct_input - lon_input / 15.) + elaps)/36000) 51 !ptime = lct_input - lon_input / 15. + elaps/3600. 52 !pday = INT((3600*(lct_input - lon_input / 15.) + elaps)/86400) 53 ELSE 54 JH_cur_split = lct_input - lon_input / 15. !+ elaps/1500.0 55 !pday = INT((sec*(lct_input - lon_input / 15.)+ elaps)/36000) 56 JD_cur = INT((sec*(lct_input - lon_input / 15.))/3600) 57 !print*,'ptime',ptime 58 !print*,'pday',pday 59 !pday = INT((3600*(lct_input - lon_input / 15.) + elaps)/86400) 60 JH_cur_split = MODULO(ptime,24.) 61 JH_cur_split = JH_cur_split / 24. 62 JD_cur = MODULO(int(pday),365) 63 MY = 2024 64 ENDIF 65 ENDIF 38 ! ELSE 39 ! JH_cur_split = (GMT)! + elaps/420000.) !! universal time (0<JH_cur_split<1): JH_cur_split=0.5 at 12:00 UT 40 ! JH_cur_split = MODULO(JH_cur_split,24.) !! the two arguments of MODULO must be of the same type 41 ! JH_cur_split = JH_cur_split / 24. 42 ! JD_cur = (JULDAY - 1 + INT((3600*GMT)/86400))!+elaps)/1.008e7)) 43 ! JD_cur = MODULO(int(JD_cur),2) 44 ! MY = (JULYR-2000) + (86400*(JULDAY - 1)+3600*GMT+elaps)/31968000 45 ! MY = INT(MY) 46 ! ENDIF 47 !ELSE 48 ! if (tlocked .eqv. .false.) THEN 49 ! JH_cur_split = lct_input - lon_input / 15. + elaps/1500.0 50 ! JD_cur = INT((sec*(lct_input - lon_input / 15.) + elaps)/36000) 51 ! !ptime = lct_input - lon_input / 15. + elaps/3600. 52 ! !pday = INT((3600*(lct_input - lon_input / 15.) + elaps)/86400) 53 ! ELSE 54 ! JH_cur_split = lct_input - lon_input / 15. !+ elaps/1500.0 55 ! !pday = INT((sec*(lct_input - lon_input / 15.)+ elaps)/36000) 56 ! JD_cur = INT((sec*(lct_input - lon_input / 15.))/3600) 57 ! !print*,'ptime',ptime 58 ! !print*,'pday',pday 59 ! !pday = INT((3600*(lct_input - lon_input / 15.) + elaps)/86400) 60 ! JH_cur_split = MODULO(ptime,24.) 61 ! JH_cur_split = JH_cur_split / 24. 62 ! JD_cur = MODULO(int(pday),365) 63 ! MY = 2024 64 ! ENDIF 65 !ENDIF 66 66 67 67 68 END SUBROUTINE update_inputs_physiq_time … … 80 81 81 82 !! tableau dans tracer_mod.F90 82 nqtot=nq83 83 if ((TRACER_MODE .eq. 1) .or. (TRACER_MODE .ge. 42)) THEN 84 84 nqtot=2 … … 107 107 SUBROUTINE update_inputs_physiq_constants 108 108 109 !USE module_model_constants110 !use comcstfi_h, only: omeg,mugaz111 !use planete_h, only: year_day,periheli,aphelie, &112 ! peri_day,obliquit,emin_turb, &113 ! lmixmin114 109 use planete_mod, only: year_day, periastr, apoastr, peri_day,& 115 110 obliquit, z0, lmixmin, emin_turb … … 117 112 emisice,dtemisice 118 113 ! z0_default 119 !use comsoil_h, only: volcapa120 114 use comcstfi_mod, only: rad, omeg, g, mugaz, rcp, cpp, r 121 !! comcstfi_h122 115 use phys_state_var_mod, only :cloudfrac,totcloudfrac,hice,rnat,pctsrf_sic,tsea_ice 123 !use iniorbit 124 !use time_phylmdz_mod, only: dtphys, daysec,day_ini 125 126 127 !open(17,file='controle.txt',form='formatted',status='old') 128 !rewind(17) 129 !read(17,*) 130 !read(17,*) 131 !read(17,*) day_ini !(tab0+3) 132 !read(17,*) 133 !read(17,*) !tab0+5) 134 !read(17,*) omeg !(tab0+6) 135 !read(17,*) !(tab0+7) 136 !read(17,*) !(tab0+8) 137 !read(17,*) !(tab0+9) 138 !read(17,*) daysec 139 !read(17,*) dtphys !tab0+11) 140 !read(17,*) 141 !read(17,*) 142 !read(17,*) year_day !(tab0+14) 143 !read(17,*) periastr !tab0+15) 144 !read(17,*) apoastr !tab0+16) 145 !read(17,*) peri_day !tab0+17) 146 !read(17,*) obliquit !tab0+18) 147 !read(17,*) z0 148 !read(17,*) 149 !read(17,*) 150 !read(17,*) 151 !read(17,*) 152 !read(17,*) emisice(1) 153 !read(17,*) emisice(2) 154 !read(17,*) emissiv 155 !read(17,*) 156 !read(17,*) 157 !read(17,*) 158 !read(17,*) 159 !read(17,*) iceradius(1) 160 !read(17,*) iceradius(2) 161 !read(17,*) dtemisice(1) 162 !read(17,*) dtemisice(2) 163 !close(17) 164 !cpp=(8.314511/(mugaz/1000.0))/rcp 165 !print*,'cpp',cpp 166 !print*,'g',g 167 168 !emissiv(:)=EMIS 169 !cloudfrac(:,:)=0.5 170 !totcloudfrac(:)=0.5 171 !hice(:)=0. 172 !rnat(:)=0. 173 !pctsrf_sic(:)=0. 174 !tsea_ice(:)=0. 175 !qsurf(:,:) = 0. 176 !print*,'iceradius',iceradius,'dtemisice',dtemisice 177 !print*,'apoastr,periastr,year_day,peri_day,obliq',apoastr,periastr,year_day,peri_day,obliquit 178 !print*,'emissiv',emissiv 179 180 ! SUBROUTINE iniorbit(apoastr,periastr,year_day,peri_day,obliq) 181 116 !JL22 this routine does not do anything for the generic interface 117 ! The various use abave can surely be removed. 182 118 END SUBROUTINE update_inputs_physiq_constants 183 119 … … 272 208 latitude_deg(:) = plat(:)/DEGRAD 273 209 cell_area(:) = parea(:) 274 !call planetwide_sumval(parea,totarea_planet)275 !print*,'parea',parea(1)276 !totarea=SSUM(ngrid,parea,1)277 210 totarea=ngrid*parea(1) 278 !totarea_planet=SSUM(ngrid,parea,1)279 211 totarea_planet=ngrid*parea(1) 280 212 … … 294 226 DO k=1, nlayer 295 227 read(12,*) znw(k) 296 !write(6,*) 'read level ', k,grid%znw(k)297 228 ENDDO 298 229 close(12) … … 319 250 JULYR,TRACER_MODE,& 320 251 M_ALBEDO,CST_AL,& 321 M_TSURF,M_EMISS,M_CO2ICE,&252 P_TSURF,M_EMISS,M_CO2ICE,& 322 253 M_GW,M_Z0,CST_Z0,& 323 254 M_H2OICE,& … … 335 266 REAL, INTENT(IN ) :: CST_AL, phisfi_val, CST_Z0 336 267 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: & 337 M_ALBEDO, M_TSURF,M_EMISS,M_CO2ICE,M_H2OICE,M_Z0268 M_ALBEDO,P_TSURF,M_EMISS,M_CO2ICE,M_H2OICE,M_Z0 338 269 REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN ) :: M_GW 339 270 340 !print*,'ALLOCATED(phisfi)',ALLOCATED(phisfi)341 !print*,'size phisfi',size(phisfi)342 271 DO j = jps,jpe 343 272 DO i = ips,ipe … … 352 281 !---------------------! 353 282 phisfi(subs) = phisfi_val 354 ! print*,'size phisfi',size(phisfi)355 !print*,'phisfi',phisfi(subs)356 283 !---------------! 357 284 ! Ground albedo ! … … 383 310 !----------------------------! 384 311 z0 = CST_Z0 385 !IF (JULYR .le. 8999) THEN 386 ! IF (CST_Z0 == 0) THEN 387 ! z0(subs) = M_Z0(i,j) 388 ! ELSE 389 ! z0(subs) = CST_Z0 390 ! IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** SET CONSTANT SURF ROUGHNESS (m) ',CST_Z0 391 ! ENDIF 392 !ELSE 393 ! IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** IDEALIZED SIMULATION z0 (m) ', CST_Z0 394 ! z0(subs)=CST_Z0 395 !ENDIF 396 !!!!! ADDITIONAL SECURITY. THIS MIGHT HAPPEN WITH OLD INIT FILES. 397 !IF (z0(subs) == 0.) THEN 398 ! IF ( (i == ips) .AND. (j == jps) ) PRINT *, 'WELL, z0 is 0, this is no good. Setting to old defaults value 0.01 m' 399 ! z0(subs) = 0.01 400 !ENDIF 401 !!!!! ADDITIONAL SECURITY. INTERP+SMOOTH IN GEOGRID MIGHT YIELD NEGATIVE Z0 !!! 402 !IF (z0(subs) < 0.) THEN 403 ! PRINT *, 'WELL, z0 is NEGATIVE, this is impossible. better stop here.' 404 ! PRINT *, 'advice --> correct interpolation / smoothing of z0 in WPS' 405 ! PRINT *, ' -- or check the constant value set in namelist.input' 406 ! STOP 407 !ENDIF 408 312 409 313 !-----------------------------------------------! 410 314 ! Ground temperature, emissivity, CO2 ice cover ! 411 315 !-----------------------------------------------! 412 tsurf(subs) = M_TSURF(i,j)316 tsurf(subs) = P_TSURF(i,j) 413 317 emis(subs) = M_EMISS(i,j) 414 318 !do i=1,noceanmx … … 466 370 M_TI,CST_TI,& 467 371 M_ISOIL,M_DSOIL,& 468 M_TSOIL, M_TSURF)372 M_TSOIL,P_TSURF) 469 373 470 374 use comsoil_h, only: inertiedat,mlayer,layer,volcapa … … 476 380 REAL, INTENT(IN ) :: CST_TI 477 381 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: & 478 M_TI, M_TSURF382 M_TI, P_TSURF 479 383 REAL, DIMENSION( ims:ime, nsoil, jms:jme ), INTENT(IN) :: & 480 384 M_TSOIL, M_ISOIL, M_DSOIL … … 541 445 IF ( (i == ips) .AND. (j == jps) ) PRINT *,'** Mars ** no tsoil. set it to tsurf.' 542 446 do k=1,nsoil 543 !print*,'M_TSURF(i,j)',M_TSURF(1,:) 544 !print*,'size M_TSURF',size(M_TSURF) 545 !print*,'size tsoil',size(tsoil) 546 tsoil(subs,k) = M_TSURF(i,j) 547 !print*,'tsoil(subs,k)',tsoil(subs,k) 447 tsoil(subs,k) = P_TSURF(i,j) 548 448 enddo 549 449 ENDIF -
trunk/WRF.COMMON/INTERFACES_V4/dynphy_wrf_generic_lmd/update_outputs_physiq_mod.F
r2866 r2868 9 9 ips,ipe,jps,jpe,& 10 10 TRACER_MODE,& 11 M_TSURF,M_CO2ICE,&11 P_TSURF,M_CO2ICE,& 12 12 M_H2OICE) 13 13 … … 20 20 INTEGER :: i,j,subs 21 21 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: & 22 M_TSURF,M_CO2ICE,M_H2OICE23 24 DO j = jps,jpe 25 DO i = ips,ipe 26 27 !-----------------------------------! 28 ! 1D subscript for physics "cursor" ! 29 !-----------------------------------! 30 subs = (j-jps)*(ipe-ips+1)+(i-ips+1) 31 32 !-------------------------------------------------------! 33 ! Save key variables for restart and output and nesting ! 34 !-------------------------------------------------------! 35 M_TSURF(i,j) = tsurf(subs)22 P_TSURF,M_CO2ICE,M_H2OICE 23 24 DO j = jps,jpe 25 DO i = ips,ipe 26 27 !-----------------------------------! 28 ! 1D subscript for physics "cursor" ! 29 !-----------------------------------! 30 subs = (j-jps)*(ipe-ips+1)+(i-ips+1) 31 32 !-------------------------------------------------------! 33 ! Save key variables for restart and output and nesting ! 34 !-------------------------------------------------------! 35 P_TSURF(i,j) = tsurf(subs) 36 36 37 37 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.