Changeset 2914 for trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars
- Timestamp:
- Mar 14, 2023, 10:30:06 AM (22 months ago)
- Location:
- trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive_SSO.F
r2828 r2914 33 33 USE phyetat0_mod, ONLY: phyetat0 34 34 USE exner_hyb_m, ONLY: exner_hyb 35 use comslope_mod, ONLY: nslope,def_slope,def_slope_mean, 36 & subslope_dist 37 USE comcstfi_h, only: pi 35 38 ! AD: SSO parameters 36 39 USE surfdat_h, ONLY: phisfi, albedodat, z0, z0_default, … … 64 67 c Variable Physiques (grille physique) 65 68 c ------------------------------------ 66 REAL tsurf(ngridmx) ! Surface temperature67 REAL tsoil(ngridmx,nsoilmx) ! Soil temperature68 REAL watercap(ngridmx) ! h2o ice layer69 REAL,ALLOCATABLE :: tsurf(:,:) ! Surface temperature 70 REAL,ALLOCATABLE :: tsoil(:,:,:) ! Soil temperature 71 REAL,ALLOCATABLE :: watercap(:,:) ! h2o ice layer 69 72 REAL tauscaling(ngridmx) ! dust conversion factor 70 73 REAL totcloudfrac(ngridmx) ! sub-grid cloud fraction 71 74 REAL q2(ngridmx,llm+1) 72 REAL emis(ngridmx)73 REAL albedo(ngridmx,2)75 REAL,ALLOCATABLE :: emis(:,:) 76 REAL,ALLOCATABLE :: albedo(:,:,:) 74 77 REAL wstar(ngridmx) 75 78 DOUBLE PRECISION mem_Nccn_co2(ngridmx,llm) … … 84 87 c ------------------------------------ 85 88 REAL T(ip1jmp1,llm),us(ip1jmp1,llm),vs(ip1jmp1,llm) 86 REAL tsurfS(ip1jmp1)87 REAL tsoilS(ip1jmp1,nsoilmx)89 REAL,ALLOCATABLE :: tsurfS(:,:) 90 REAL,ALLOCATABLE :: tsoilS(:,:,:) 88 91 REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia 89 REAL watercapS(ip1jmp1)92 REAL,ALLOCATABLE :: watercapS(:,:) 90 93 REAL tauscalingS(ip1jmp1) 91 94 REAL totcloudfracS(ip1jmp1) 92 95 REAL q2S(ip1jmp1,llm+1) 93 REAL,ALLOCATABLE :: qsurfS(:,:) 94 REAL emisS(ip1jmp1) 96 REAL,ALLOCATABLE :: qsurfS(:,:,:) 97 REAL,ALLOCATABLE :: emisS(:,:) 98 REAL,ALLOCATABLE :: albedoS(:,:) 99 REAL, ALLOCATABLE :: subslope_distS(:,:) 95 100 96 101 ! AD: SSO parameters … … 123 128 data fichier /'startfi'/ 124 129 125 INTEGER ij, l,i,j,isoil,iq 130 INTEGER ij, l,i,j,isoil,iq,islope 126 131 character*80 fichnom 127 132 integer :: ierr,ntime … … 150 155 151 156 ! allocate arrays: 152 allocate(q(ip1jmp1,llm,nqtot)) 153 allocate(qsurfS(ip1jmp1,nqtot)) 154 157 allocate(q(ip1jmp1,llm,nqtot)) 155 158 156 159 fichnom = 'start.nc' … … 178 181 Lmodif=0 179 182 183 allocate(tsurf(ngridmx,nslope)) 184 allocate(tsoil(ngridmx,nsoilmx,nslope)) 185 allocate(watercap(ngridmx,nslope)) 186 allocate(emis(ngridmx,nslope)) 187 allocate(albedo(ngridmx,2,nslope)) 188 189 allocate(qsurfS(ip1jmp1,nqtot,nslope)) 190 allocate(tsurfS(ip1jmp1,nslope)) 191 allocate(tsoilS(ip1jmp1,nsoilmx,nslope)) 192 allocate(watercapS(ip1jmp1,nslope)) 193 allocate(emisS(ip1jmp1,nslope)) 194 allocate(albedoS(ip1jmp1,nslope)) 195 allocate(subslope_distS(ip1jmp1,nslope)) 196 180 197 CALL phyetat0 (fichnom,0,Lmodif,nsoilmx,ngridmx,llm,nqtot, 181 198 & day_ini_fi,timefi,tsurf,tsoil,albedo,emis,q2,qsurf, 182 & tauscaling,totcloudfrac,wstar,watercap) 199 & tauscaling,totcloudfrac,wstar,watercap,def_slope, 200 & def_slope_mean,subslope_dist) 183 201 184 202 ierr = NF_OPEN (fichnom, NF_NOWRITE,nid1) … … 271 289 c----------------------------------------------------------------------- 272 290 273 call gr_fi_dyn(1,ngridmx,iip1,jjp1,tsurf,tsurfS) 274 call gr_fi_dyn(1,ngridmx,iip1,jjp1,watercap,watercapS) 275 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,tsoil,tsoilS) 291 do islope=1,nslope 292 call gr_fi_dyn(1,ngridmx,iip1,jjp1,tsurf(:,islope), 293 & tsurfS(:,islope)) 294 call gr_fi_dyn(1,ngridmx,iip1,jjp1,watercap(:,islope), 295 & watercapS(:,islope)) 296 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,tsoil(:,:,islope), 297 & tsoilS(:,:,islope)) 276 298 ! Note: thermal inertia "inertiedat" is in comsoil.h 299 call gr_fi_dyn(1,ngridmx,iip1,jjp1,emis(:,islope), 300 & emisS(:,islope)) 301 call gr_fi_dyn(1,ngridmx,iip1,jjp1,albedo(:,1,islope), 302 & albedoS(:,islope)) 303 call gr_fi_dyn(nqtot,ngridmx,iip1,jjp1,qsurf(:,:,islope), 304 & qsurfS(:,:,islope)) 305 call gr_fi_dyn(1,ngridmx,iip1,jjp1,subslope_dist(:,islope), 306 & subslope_distS(:,islope)) 307 enddo 277 308 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,inertiedat,ithS) 278 call gr_fi_dyn(1,ngridmx,iip1,jjp1,emis,emisS)279 309 call gr_fi_dyn(llm+1,ngridmx,iip1,jjp1,q2,q2S) 280 call gr_fi_dyn(nqtot,ngridmx,iip1,jjp1,qsurf,qsurfS)281 310 call gr_fi_dyn(1,ngridmx,iip1,jjp1,tauscaling,tauscalingS) 282 311 call gr_fi_dyn(1,ngridmx,iip1,jjp1,totcloudfrac,totcloudfracS) … … 308 337 DO j=1,jjp1 309 338 DO i=1,iim 339 DO islope=1,nslope 310 340 ptotal=ptotal+aire(i+(iim+1)*(j-1))*ps(i+(iim+1)*(j-1))/g 311 341 co2icetotal = co2icetotal + 312 & qsurfS(i+(iim+1)*(j-1),igcm_co2)*aire(i+(iim+1)*(j-1)) 342 & qsurfS(i+(iim+1)*(j-1),igcm_co2,islope)* 343 & aire(i+(iim+1)*(j-1))* 344 & subslope_distS(i+(iim+1)*(j-1),islope)/ 345 & cos(pi*def_slope_mean(islope)) 346 ENDDO 313 347 ENDDO 314 348 ENDDO … … 349 383 ierr = NF_CREATE('start_archive.nc', 350 384 & IOR(NF_CLOBBER,NF_64BIT_OFFSET), nid) 351 call ini_archive(nid,day_ini,phis,ithS,tab_cntrl_fi) 385 call ini_archive(nid,day_ini,phis,ithS,tab_cntrl_fi, 386 & def_slope,subslope_distS) 352 387 endif 353 388 … … 392 427 & 'sub grid cloud fraction',' ',2,totcloudfracS) 393 428 call write_archive(nid,ntime,'emis','grd emis',' ',2,emisS) 429 call write_archive(nid,ntime,'albedo','surface albedo',' ', 430 & 2,albedoS) 394 431 call write_archive(nid,ntime,'ps','Psurf','Pa',2,ps) 395 432 call write_archive(nid,ntime,'tsurf','surf T','K',2,tsurfS) … … 433 470 txt=trim(tname(iq))//"_surf" 434 471 call write_archive(nid,ntime,txt,'Tracer on surface', 435 & 'kg.m-2',2,qsurfS( 1,iq))472 & 'kg.m-2',2,qsurfS(:,iq,:)) 436 473 enddo 437 474 … … 452 489 ! Write soil temperatures tsoil 453 490 call write_archive(nid,ntime,'tsoil','Soil temperature', 454 & 'K',-3,tsoilS )491 & 'K',-3,tsoilS(:,:,:)) 455 492 456 493 ! Write soil thermal inertia -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/write_archive.F
r2913 r2914 222 222 223 223 if(nom.eq."tauscaling" .or. nom.eq."totcloudfrac" .or. 224 & nom.eq."ps" .or. nom.eq."q2surf") then 224 & nom.eq."ps" .or. nom.eq."q2surf" .or. nom.eq."ZMEA" .or. 225 & nom.eq."ZSTD" .or. nom.eq."ZSIG" .or. nom.eq."ZTHE" .or. 226 & nom.eq."ZGAM" .or. nom.eq."albedodat" .or. 227 & nom.eq."z0" .or. nom.eq."summit" .or. nom.eq."hmons" 228 & .or. nom.eq."base") then 225 229 226 230 if (ierr /= NF_NOERR) then
Note: See TracChangeset
for help on using the changeset viewer.