Changeset 2959 for trunk/LMDZ.MARS/libf
- Timestamp:
- May 5, 2023, 3:15:04 PM (19 months ago)
- Location:
- trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/lect_start_archive.F
r2943 r2959 26 26 & subslope_dist,end_comslope_h,ini_comslope_h 27 27 use netcdf 28 use surfdat_h, ONLY: watercaptag 28 29 implicit none 29 30 … … 139 140 real totcloudfracS(iip1,jjp1) 140 141 real watercapS(iip1,jjp1,nslope) 142 real watercaptagS(iip1,jjp1) 141 143 real albedoS(iip1,jjp1,nslope) 142 144 … … 177 179 real, dimension(:,:,:), allocatable :: watercapold 178 180 real, dimension(:,:), allocatable :: watercapold_noslope 181 real, dimension(:,:), allocatable :: watercaptagold 182 real, dimension(:), allocatable :: watercaptag_tmp 179 183 real, dimension(:,:,:), allocatable :: albedoold 180 184 real, dimension(:,:), allocatable :: albedoold_noslope … … 426 430 allocate(totcloudfracold(imold+1,jmold+1)) 427 431 allocate(watercapold(imold+1,jmold+1,nslope)) 432 allocate(watercaptagold(imold+1,jmold+1)) 433 allocate(watercaptag_tmp(ngrid)) 428 434 allocate(albedoold(imold+1,jmold+1,nslope)) 429 435 … … 908 914 IF (ierr .NE. NF_NOERR) THEN 909 915 PRINT*, "lect_start_archive: Failed loading <watercap>" 916 PRINT*, NF_STRERROR(ierr) 917 CALL abort 918 ENDIF 919 ENDIF 920 921 c 922 ierr = NF_INQ_VARID (nid, "watercaptag", nvarid) 923 IF (ierr .NE. NF_NOERR) THEN 924 PRINT*, "lect_start_archive: <watercaptag> not in file" 925 PRINT*, "watercaptag set to false, will be adapted in 926 & surfini of PCM" 927 watercaptagold(:,:) = 0 928 ELSE 929 ierr = nf90_get_var(nid, nvarid,watercaptagold) 930 IF (ierr .NE. NF_NOERR) THEN 931 PRINT*, "lect_start_archive: Failed loading <watercaptag>" 910 932 PRINT*, NF_STRERROR(ierr) 911 933 CALL abort … … 1230 1252 & watercap(:,1)) 1231 1253 1254 c Watercaptag 1255 if(imold.eq.iim .and. jmold.eq.jjm) then 1256 else 1257 print *, "We are doing an horizontal interpolation, 1258 & watercaptag will be set to false and redefined proprely 1259 & in the PCM(surfini)" 1260 watercaptagold(:,:)=0 1261 endif 1262 call interp_horiz (watercaptagold(:,:),watercaptags(:,:), 1263 & imold,jmold,iim,jjm,1,rlonuold,rlatvold,rlonu,rlatv) 1264 call gr_dyn_fi (1,iim+1,jjm+1,ngrid,watercaptags(:,:), 1265 & watercaptag_tmp(:)) 1266 1267 do i=1,ngrid 1268 if(watercaptag_tmp(i).gt. 0.5) then 1269 watercaptag(i)=.true. 1270 else 1271 watercaptag(i)=.false. 1272 endif 1273 enddo 1274 1275 1232 1276 c Surface albedo 1233 1277 call interp_horiz (albedoold(:,:,1),albedoS(:,:,1), … … 1605 1649 deallocate(totcloudfracold) 1606 1650 deallocate(watercapold) 1651 deallocate(watercaptagold) 1607 1652 deallocate(albedoold) 1608 1653 deallocate(var,varp1) -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive.F
r2943 r2959 20 20 21 21 use infotrac, only: infotrac_init, nqtot, tname 22 use comsoil_h, only: nsoilmx, inertiedat 23 use surfdat_h, only: ini_surfdat_h, qsurf 22 use comsoil_h, only: nsoilmx, inertiedat, inertiesoil 23 use surfdat_h, only: ini_surfdat_h, qsurf,watercaptag 24 24 use comsoil_h, only: ini_comsoil_h 25 25 ! use comgeomphy, only: initcomgeomphy … … 66 66 REAL,ALLOCATABLE :: tsurf(:,:) ! Surface temperature 67 67 REAL,ALLOCATABLE :: tsoil(:,:,:) ! Soil temperature 68 REAL,ALLOCATABLE :: inertiesoil(:,:,:) ! Soil thermal inertia (!= inertiedat which is for present day climate)69 68 REAL,ALLOCATABLE :: watercap(:,:) ! h2o ice layer 70 69 REAL :: tauscaling(ngridmx) ! dust conversion factor … … 87 86 REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia for inertie dat (present day climate) 88 87 REAL,ALLOCATABLE :: watercapS(:,:) 88 REAL,ALLOCATABLE :: watercaptag_tmp(:) 89 REAL,ALLOCATABLE :: watercaptagS(:) 89 90 REAL :: tauscalingS(ip1jmp1) 90 91 REAL :: totcloudfracS(ip1jmp1) … … 167 168 allocate(tsurf(ngridmx,nslope)) 168 169 allocate(tsoil(ngridmx,nsoilmx,nslope)) 169 allocate(inertiesoil(ngridmx,nsoilmx,nslope))170 170 allocate(watercap(ngridmx,nslope)) 171 171 allocate(emis(ngridmx,nslope)) … … 177 177 allocate(inertiesoilS(ip1jmp1,nsoilmx,nslope)) 178 178 allocate(watercapS(ip1jmp1,nslope)) 179 allocate(watercaptagS(ip1jmp1)) 179 180 allocate(emisS(ip1jmp1,nslope)) 180 181 allocate(albedoS(ip1jmp1,nslope)) … … 207 208 ENDIF 208 209 210 CALL surfini(ngridmx,qsurf) 211 209 212 ierr = NF_CLOSE(nid1) 210 213 … … 287 290 & tsoilS(:,:,islope)) 288 291 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,inertiesoil(:,:,islope), 289 & inertiesoil (:,:,islope))292 & inertiesoilS(:,:,islope)) 290 293 ! Note: thermal inertia "inertiedat" is in comsoil.h 291 294 call gr_fi_dyn(1,ngridmx,iip1,jjp1,emis(:,islope), … … 302 305 call gr_fi_dyn(1,ngridmx,iip1,jjp1,tauscaling,tauscalingS) 303 306 call gr_fi_dyn(1,ngridmx,iip1,jjp1,totcloudfrac,totcloudfracS) 307 308 allocate(watercaptag_tmp(ngridmx)) 309 do ij=1,ngridmx 310 if(watercaptag(ij)) then 311 watercaptag_tmp(ij)=1 312 else 313 watercaptag_tmp(ij)=0 314 endif 315 enddo 316 317 call gr_fi_dyn(1,ngridmx,iip1,jjp1,watercaptag_tmp(:), 318 & watercaptagS(:)) 304 319 305 320 c======================================================================= … … 402 417 call write_archive(nid,ntime,'watercap','couche de glace h2o', 403 418 & 'kg/m2',2,watercapS) 419 call write_archive(nid,ntime,'watercaptag','couche de glace h2o', 420 & 'kg/m2',2,watercaptagS) 404 421 call write_archive(nid,ntime,'tauscaling', 405 422 & 'dust conversion factor',' ',2,tauscalingS) … … 462 479 & 'J.s-1/2.m-2.K-1',-3,inertiesoilS(:,:,:)) 463 480 ! Write soil thermal inertia for current climate 464 call write_archive(nid,ntime,'inertiedat - present day TI',465 & 'Soil thermal inertia ',481 call write_archive(nid,ntime,'inertiedat', 482 & 'Soil thermal inertia (present day TI)', 466 483 & 'J.s-1/2.m-2.K-1',-3,ithS) 467 484 -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive_SSO.F
r2943 r2959 20 20 21 21 use infotrac, only: infotrac_init, nqtot, tname 22 use comsoil_h, only: nsoilmx, inertiedat 22 use comsoil_h, only: nsoilmx, inertiedat,inertiesoil 23 23 use surfdat_h, only: ini_surfdat_h, qsurf 24 use comsoil_h, only: ini_comsoil_h25 24 ! use comgeomphy, only: initcomgeomphy 26 25 use filtreg_mod, only: inifilr … … 69 68 REAL,ALLOCATABLE :: tsurf(:,:) ! Surface temperature 70 69 REAL,ALLOCATABLE :: tsoil(:,:,:) ! Soil temperature 71 REAL,ALLOCATABLE :: inertiesoil(:,:,:) ! Soil thermal inertia (!= inertiedat which is for present day climate)72 70 REAL,ALLOCATABLE :: watercap(:,:) ! h2o ice layer 73 71 REAL tauscaling(ngridmx) ! dust conversion factor … … 185 183 allocate(tsurf(ngridmx,nslope)) 186 184 allocate(tsoil(ngridmx,nsoilmx,nslope)) 187 allocate(inertiesoil(ngridmx,nsoilmx,nslope))188 185 allocate(watercap(ngridmx,nslope)) 189 186 allocate(emis(ngridmx,nslope)) … … 302 299 & tsoilS(:,:,islope)) 303 300 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,inertiesoil(:,:,islope), 304 & inertiesoil (:,:,islope))301 & inertiesoilS(:,:,islope)) 305 302 ! Note: thermal inertia "inertiedat" is in comsoil.h 306 303 call gr_fi_dyn(1,ngridmx,iip1,jjp1,emis(:,islope), … … 313 310 & subslope_distS(:,islope)) 314 311 enddo 312 315 313 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,inertiedat,ithS) 316 314 call gr_fi_dyn(llm+1,ngridmx,iip1,jjp1,q2,q2S) … … 497 495 call write_archive(nid,ntime,'tsoil','Soil temperature', 498 496 & 'K',-3,tsoilS(:,:,:)) 497 499 498 ! Write soil thermal inertia 500 499 call write_archive(nid,ntime,'inertiesoil','Soil TI', -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/write_archive.F
r2952 r2959 226 226 & nom.eq."ZGAM" .or. nom.eq."albedodat" .or. 227 227 & nom.eq."z0" .or. nom.eq."summit" .or. nom.eq."hmons" 228 & .or. nom.eq."base" ) then228 & .or. nom.eq."base".or. nom.eq."watercaptag") then 229 229 230 230 if (ierr /= NF_NOERR) then
Note: See TracChangeset
for help on using the changeset viewer.