Changeset 2907 for trunk/LMDZ.MARS
- Timestamp:
- Feb 28, 2023, 2:39:58 PM (21 months ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2904 r2907 3912 3912 and 3913 3913 - "at least one opacity is not a missing value but is 0" (in which case we set tau=0) 3914 3915 == 28/02/2023 == RV 3916 Further implementation of subslope parametrisation. 3917 Carefull ! This is a devolpment revision and it still need improvements and tests. 3918 However, this commit should not change anything for nslope=1. Only nslope=1 is possible for now! 3919 Sloped variables in the startfi are outputed along the nslope dimension. 3920 Possibility to output variables on a specific subslope in diagfi using VAR_slopeXX in the diagfi.def, 3921 with VAR the variable name (ex: tsurf, co2ice...) and XX the slope number (ex: 04, 07...). 3922 Without any specific mention to slope, variable named VAR in the diagfi.def will correspond to the variable in the flat slope, this can change in the future. 3923 Other code changes for nslope.gt.1 (sometimes the grid mesh average is used instead of the value of the subslope) 3924 3925 -
trunk/LMDZ.MARS/libf/phymars/iostart.F90
r2896 r2907 692 692 ierr=NF90_REDEF(nid_restart) 693 693 #ifdef NC_DOUBLE 694 if(field_name.eq. "tauscaling" .or. field_name.eq. "totcloudfrac" .or. field_name.eq. "wstar" ) then 694 695 ierr=NF90_DEF_VAR(nid_restart,field_name,NF90_DOUBLE,& 695 696 (/idim2,idim7/),nvarid) 696 #else 697 else 698 ierr=NF90_DEF_VAR(nid_restart,field_name,NF90_DOUBLE,& 699 (/idim2,idim8,idim7/),nvarid) 700 endif 701 #else 702 if(field_name.eq. "tauscaling" .or. field_name.eq. "totcloudfrac" .or. field_name.eq. "wstar" ) then 697 703 ierr=NF90_DEF_VAR(nid_restart,field_name,NF90_FLOAT,& 698 704 (/idim2,idim7/),nvarid) 705 else 706 ierr=NF90_DEF_VAR(nid_restart,field_name,NF90_DOUBLE,& 707 (/idim2,idim8,idim7/),nvarid) 708 endif 699 709 #endif 700 710 if (ierr.ne.NF90_NOERR) then -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r2900 r2907 815 815 dsotop(:,:)=0. 816 816 dwatercap(:,:)=0 817 818 call compute_meshgridavg(ngrid,nq,albedo,emis,tsurf,qsurf, 819 & albedo_meshavg,emis_meshavg,tsurf_meshavg,qsurf_meshavg) 817 820 818 821 ! Dust scenario conversion coefficient from IRabs to VISext … … 1029 1032 clearsky=.false. ! part with clouds for both cases CLFvarying true/false 1030 1033 CALL callradite(icount,ngrid,nlayer,nq,zday,zls,pq, 1031 & albedo (:,:,1),1032 & emis(:,1),mu0,zplev,zplay,pt,tsurf(:,1),fract,dist_sol,igout,1034 & albedo_meshavg,emis_meshavg, 1035 & mu0,zplev,zplay,pt,tsurf(:,1),fract,dist_sol,igout, 1033 1036 & zdtlw,zdtsw,fluxsurf_lw(:,iflat),fluxsurf_dn_sw(:,:,iflat), 1034 1037 & fluxsurf_up_sw, … … 1037 1040 & tau,aerosol,dsodust,tauscaling,dust_rad_adjust,IRtoVIScoef, 1038 1041 & taucloudtes,rdust,rice,nuice,riceco2,nuiceco2, 1039 & qsurf (:,igcm_co2,1),rstormdust,rtopdust,totstormfract,1042 & qsurf_meshavg(:,igcm_co2),rstormdust,rtopdust,totstormfract, 1040 1043 & clearatm,dsords,dsotop,nohmons,clearsky,totcloudfrac) 1041 1044 … … 1053 1056 clearsky=.true. 1054 1057 CALL callradite(icount,ngrid,nlayer,nq,zday,zls,pq, 1055 & albedo (:,:,1),emis(:,1),mu0,zplev,zplay,pt,1058 & albedo_meshavg,emis_meshavg,mu0,zplev,zplay,pt, 1056 1059 & tsurf(:,1),fract, 1057 1060 & dist_sol,igout,zdtlwclf,zdtswclf, … … 1061 1064 & dsodust,tauscaling,dust_rad_adjust,IRtoVIScoef, 1062 1065 & taucloudtesclf,rdust, 1063 & rice,nuice,riceco2, nuiceco2,qsurf(:,igcm_co2,1), 1066 & rice,nuice,riceco2, nuiceco2, 1067 & qsurf_meshavg(:,igcm_co2), 1064 1068 & rstormdust,rtopdust,totstormfract, 1065 1069 & clearatm,dsords,dsotop, … … 1313 1317 c for radiative transfer 1314 1318 & clearatm,icount,zday,zls, 1315 & tsurf,qsurf (:,igcm_co2,iflat),igout,1319 & tsurf,qsurf_meshavg(:,igcm_co2),igout, 1316 1320 & totstormfract,tauscaling, 1317 1321 & dust_rad_adjust,IRtoVIScoef, … … 1377 1381 & zzlay,zdtsw,zdtlw, 1378 1382 & icount,zday,zls,tsurf(:,iflat), 1379 & qsurf (:,igcm_co2,iflat),1383 & qsurf_meshavg(:,igcm_co2), 1380 1384 & igout,aerosol,tauscaling,dust_rad_adjust, 1381 1385 & IRtoVIScoef,totstormfract,clearatm, … … 1500 1504 dwatercap(ig,:)=dwatercap(ig,:)+dwatercap_dif(ig,:) 1501 1505 ENDDO 1502 ccall compute_meshgridavg(ngrid,nq,albedo,emis,tsurf,zdqsdif,1503 c& albedo_meshavg,emis_meshavg,tsurf_meshavg,zdqsdif_meshavg_tmp)1506 call compute_meshgridavg(ngrid,nq,albedo,emis,tsurf,zdqsdif, 1507 & albedo_meshavg,emis_meshavg,tsurf_meshavg,zdqsdif_meshavg_tmp) 1504 1508 IF (.not.turb_resolved) THEN 1505 1509 DO l=1,nlayer … … 1539 1543 zdqdif(1:ngrid,1,1:nq)=0. 1540 1544 zdqdif(1:ngrid,1,igcm_dust_number) = 1541 . -zdqsdif(1:ngrid,igcm_dust_number,iflat)1545 . -zdqsdif_meshavg_tmp(1:ngrid,igcm_dust_number) 1542 1546 zdqdif(1:ngrid,1,igcm_dust_mass) = 1543 . -zdqsdif(1:ngrid,igcm_dust_mass,iflat)1547 . -zdqsdif_meshavg_tmp(1:ngrid,igcm_dust_mass) 1544 1548 zdqdif(1:ngrid,2:nlayer,1:nq) = 0. 1545 1549 DO iq=1, nq … … 2605 2609 call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq, 2606 2610 . ptimestep,ztime_fin, 2607 . tsurf(:,iflat),tsoil(:,:,iflat),albedo(:,:,iflat), 2608 . emis(:,iflat), 2609 . q2,qsurf(:,:,iflat),tauscaling,totcloudfrac,wstar, 2610 . watercap(:,iflat)) 2611 . tsurf,tsoil,albedo, 2612 . emis,q2,qsurf,tauscaling,totcloudfrac,wstar, 2613 . watercap) 2611 2614 2612 2615 ENDIF ! of IF (write_restart) … … 3155 3158 call WRITEDIAGFI(ngrid,"emis","Surface emissivity","w.m-1",2, 3156 3159 & emis(:,iflat)) 3160 do islope=1,nslope 3161 write(str2(1:2),'(i2.2)') islope 3162 call WRITEDIAGFI(ngrid,"emis_slope"//str2, 3163 & "Surface emissivity","w.m-1",2, emis(:,islope)) 3164 ENDDO 3157 3165 c call WRITEDIAGFI(ngrid,"pplay","Pressure","Pa",3,zplay) 3158 3166 c call WRITEDIAGFI(ngrid,"pplev","Pressure","Pa",3,zplev) … … 3165 3173 call WRITEDIAGFI(ngrid,"tsurf","Surface temperature","K",2, 3166 3174 & tsurf(:,iflat)) 3175 do islope=1,nslope 3176 write(str2(1:2),'(i2.2)') islope 3177 call WRITEDIAGFI(ngrid,"tsurf_slope"//str2, 3178 & "Surface temperature","K",2, 3179 & tsurf(:,islope)) 3180 ENDDO 3167 3181 call WRITEDIAGFI(ngrid,"ps","surface pressure","Pa",2,ps) 3168 3182 call WRITEDIAGFI(ngrid,"co2ice","co2 ice thickness" 3169 3183 & ,"kg.m-2",2,qsurf(:,igcm_co2,iflat)) 3184 do islope=1,nslope 3185 write(str2(1:2),'(i2.2)') islope 3186 call WRITEDIAGFI(ngrid,"co2ice_slope"//str2,"co2 ice thickness" 3187 & ,"kg.m-2",2,qsurf(:,igcm_co2,islope)) 3188 ENDDO 3170 3189 call WRITEDIAGFI(ngrid,"watercap","Water ice thickness" 3171 3190 & ,"kg.m-2",2,watercap(:,iflat)) 3172 3191 do islope=1,nslope 3192 write(str2(1:2),'(i2.2)') islope 3193 call WRITEDIAGFI(ngrid,"watercap_slope"//str2, 3194 & "Water ice thickness" 3195 & ,"kg.m-2",2,watercap(:,islope)) 3196 ENDDO 3173 3197 call WRITEDIAGFI(ngrid,"temp_layer1","temperature in layer 1", 3174 3198 & "K",2,zt(1,1)) … … 3177 3201 call WRITEDIAGFI(ngrid,"fluxsurf_lw","fluxsurf_lw","W.m-2",2, 3178 3202 & fluxsurf_lw(:,iflat)) 3203 do islope=1,nslope 3204 write(str2(1:2),'(i2.2)') islope 3205 call WRITEDIAGFI(ngrid,"fluxsurf_lw_slope"//str2, 3206 & "fluxsurf_lw","W.m-2",2, 3207 & fluxsurf_lw(:,islope)) 3208 ENDDO 3179 3209 call WRITEDIAGFI(ngrid,"fluxsurf_dn_sw","fluxsurf_dn_sw", 3180 3210 & "W.m-2",2,fluxsurf_dn_sw_tot(:,iflat)) 3211 do islope=1,nslope 3212 write(str2(1:2),'(i2.2)') islope 3213 call WRITEDIAGFI(ngrid,"fluxsurf_dn_sw_slope"//str2, 3214 & "fluxsurf_dn_sw", 3215 & "W.m-2",2,fluxsurf_dn_sw_tot(:,islope)) 3216 ENDDO 3181 3217 call WRITEDIAGFI(ngrid,"fluxtop_lw","fluxtop_lw","W.m-2",2, 3182 3218 & fluxtop_lw) … … 3306 3342 & 'kg.m-2',2, 3307 3343 & qsurf(1:ngrid,igcm_h2o_ice,iflat)) 3344 do islope=1,nslope 3345 write(str2(1:2),'(i2.2)') islope 3346 call WRITEDIAGFI(ngrid,'qsurf02_slope'//str2, 3347 & 'surface tracer','kg.m-2',2, 3348 & qsurf(1:ngrid,igcm_h2o_ice,islope)) 3349 ENDDO 3308 3350 #endif 3309 3351 call WRITEDIAGFI(ngrid,'mtot', … … 3400 3442 call WRITEDIAGFI(ngrid,'h2o_ice_s', 3401 3443 & 'surface h2o_ice', 3402 & 'kg.m-2',2,qsurf(1,igcm_h2o_ice,iflat)) 3444 & 'kg.m-2',2,qsurf(1,igcm_h2o_ice,iflat)) 3445 do islope=1,nslope 3446 write(str2(1:2),'(i2.2)') islope 3447 call WRITEDIAGFI(ngrid,'h2o_ice_s_slope'//str2, 3448 & 'surface h2o_ice', 3449 & 'kg.m-2',2,qsurf(1,igcm_h2o_ice,islope)) 3450 ENDDO 3403 3451 if (hdo) then 3404 3452 call WRITEDIAGFI(ngrid,'hdo_ice_s', 3405 3453 & 'surface hdo_ice', 3406 & 'kg.m-2',2,qsurf(1,igcm_hdo_ice,iflat)) 3454 & 'kg.m-2',2,qsurf(1,igcm_hdo_ice,iflat)) 3455 do islope=1,nslope 3456 write(str2(1:2),'(i2.2)') islope 3457 call WRITEDIAGFI(ngrid,'hdo_ice_s_slope'//str2, 3458 & 'surface hdo_ice', 3459 & 'kg.m-2',2,qsurf(1,igcm_hdo_ice,islope)) 3460 ENDDO 3407 3461 3408 3462 do ig=1,ngrid … … 3423 3477 & 'albedo', 3424 3478 & '',2,albedo(1,1,iflat)) 3479 do islope=1,nslope 3480 write(str2(1:2),'(i2.2)') islope 3481 CALL WRITEDIAGFI(ngrid,'albedo_slope'//str2, 3482 & 'albedo', 3483 & '',2,albedo(1,1,islope)) 3484 ENDDO 3425 3485 if (tifeedback) then 3426 3486 call WRITEDIAGSOIL(ngrid,"soiltemp", … … 3429 3489 call WRITEDIAGSOIL(ngrid,'soilti', 3430 3490 & 'Soil Thermal Inertia', 3431 & 'J.s-1/2.m-2.K-1',3,inertiesoil(:,:,iflat)) 3491 & 'J.s-1/2.m-2.K-1',3,inertiesoil(:,:,iflat)) 3492 do islope=1,nslope 3493 write(str2(1:2),'(i2.2)') islope 3494 call WRITEDIAGSOIL(ngrid,'soilti_slope'//str2, 3495 & 'Soil Thermal Inertia', 3496 & 'J.s-1/2.m-2.K-1',3,inertiesoil(:,:,islope)) 3497 ENDDO 3432 3498 endif 3433 3499 !A. Pottier … … 3528 3594 call WRITEDIAGFI(ngrid,'qsurf'//str2,'qsurf', 3529 3595 & 'kg.m-2',2,qsurf(1,iq,iflat)) 3596 do islope=1,nslope 3597 write(str2(1:2),'(i2.2)') islope 3598 call WRITEDIAGFI(ngrid,'qsurf_slope'//str2,'qsurf', 3599 & 'kg.m-2',2,qsurf(1,iq,islope)) 3600 ENDDO 3530 3601 end do 3531 3602 endif ! (doubleq) … … 3555 3626 & 'stormdust injection', 3556 3627 & 'kg.m-2',2,qsurf(:,igcm_stormdust_mass,iflat)) 3628 do islope=1,nslope 3629 write(str2(1:2),'(i2.2)') islope 3630 call WRITEDIAGFI(ngrid,'qsurf_slope'//str2, 3631 & 'stormdust injection', 3632 & 'kg.m-2',2,qsurf(:,igcm_stormdust_mass,islope)) 3633 ENDDO 3557 3634 call WRITEDIAGFI(ngrid,'pdqsurf', 3558 3635 & 'tendancy stormdust mass at surface', 3559 & 'kg.m-2',2,dqsurf(:,igcm_stormdust_mass,iflat)) 3636 & 'kg.m-2',2,dqsurf(:,igcm_stormdust_mass,iflat)) 3637 do islope=1,nslope 3638 write(str2(1:2),'(i2.2)') islope 3639 call WRITEDIAGFI(ngrid,'pdqsurf_slope'//str2, 3640 & 'tendancy stormdust mass at surface', 3641 & 'kg.m-2',2,dqsurf(:,igcm_stormdust_mass,islope)) 3642 ENDDO 3560 3643 call WRITEDIAGFI(ngrid,'wspeed','vertical speed stormdust', 3561 3644 & 'm/s',3,wspeed(:,1:nlayer)) … … 3620 3703 call WRITEDIAGFI(ngrid,'surfccnq','Surf nuclei mass mr', 3621 3704 & 'kg.m-2',2,qsurf(1,igcm_ccn_mass,iflat)) 3705 do islope=1,nslope 3706 write(str2(1:2),'(i2.2)') islope 3707 call WRITEDIAGFI(ngrid,'surfccnq_slope'//str2, 3708 & 'Surf nuclei mass mr', 3709 & 'kg.m-2',2,qsurf(1,igcm_ccn_mass,islope)) 3710 ENDDO 3622 3711 call WRITEDIAGFI(ngrid,'surfccnN','Surf nuclei number', 3623 3712 & 'kg.m-2',2,qsurf(1,igcm_ccn_number,iflat)) 3713 do islope=1,nslope 3714 write(str2(1:2),'(i2.2)') islope 3715 call WRITEDIAGFI(ngrid,'surfccnN_slope'//str2, 3716 & 'Surf nuclei number', 3717 & 'kg.m-2',2,qsurf(1,igcm_ccn_number,islope)) 3718 ENDDO 3624 3719 endif ! (scavenging) 3625 3720 … … 3772 3867 call writediagsoil(ngrid,"soiltemp","Soil temperature","K", 3773 3868 & 3,tsoil(:,:,iflat)) 3869 do islope=1,nslope 3870 write(str2(1:2),'(i2.2)') islope 3871 call writediagsoil(ngrid,"soiltemp_slope"//str2, 3872 & "Soil temperature","K", 3873 & 3,tsoil(:,:,islope)) 3874 ENDDO 3774 3875 ! Write surface temperature 3775 3876 ! call writediagsoil(ngrid,"tsurf","Surface temperature","K", … … 3802 3903 call writediagsoil(ngrid,"soiltemp","Soil temperature","K", 3803 3904 & 3,tsoil(:,:,iflat)) 3905 do islope=1,nslope 3906 write(str2(1:2),'(i2.2)') islope 3907 call writediagsoil(ngrid,"soiltemp_slope"//str2, 3908 & "Soil temperature","K", 3909 & 3,tsoil(:,:,islope)) 3910 ENDDO 3804 3911 3805 3912 ! THERMALS STUFF 1D … … 3826 3933 call WRITEDIAGFI(ngrid,"tsurf","Surface temperature","K",0, 3827 3934 & tsurf(:,iflat)) 3935 do islope=1,nslope 3936 write(str2(1:2),'(i2.2)') islope 3937 call WRITEDIAGFI(ngrid,"tsurf_slope"//str2, 3938 & "Surface temperature","K",0, 3939 & tsurf(:,islope)) 3940 ENDDO 3828 3941 call WRITEDIAGFI(ngrid,"u","u wind","m/s",1,zu) 3829 3942 call WRITEDIAGFI(ngrid,"v","v wind","m/s",1,zv) … … 3840 3953 call WRITEDIAGFI(ngrid,"co2ice","co2 ice thickness" 3841 3954 & ,"kg.m-2",0,qsurf(:,igcm_co2,iflat)) 3955 do islope=1,nslope 3956 write(str2(1:2),'(i2.2)') islope 3957 call WRITEDIAGFI(ngrid,"co2ice_slope"//str2, 3958 & "co2 ice thickness" 3959 & ,"kg.m-2",0,qsurf(:,igcm_co2,islope)) 3960 ENDDO 3842 3961 3843 3962 if (igcm_co2.ne.0) then … … 3878 3997 call WRITEDIAGFI(ngrid,'dqsdifdustq','diffusion', 3879 3998 & 'kg.m-2.s-1',0,zdqsdif(1,igcm_dust_mass,iflat)) 3999 do islope=1,nslope 4000 write(str2(1:2),'(i2.2)') islope 4001 call WRITEDIAGFI(ngrid,'dqsdifdustq_slope'//str2, 4002 & 'diffusion', 4003 & 'kg.m-2.s-1',0,zdqsdif(1,igcm_dust_mass,islope)) 4004 ENDDO 3880 4005 call WRITEDIAGFI(ngrid,'dqsdifrdsq','diffusion', 3881 4006 & 'kg.m-2.s-1',0,zdqsdif(1,igcm_stormdust_mass,iflat)) 4007 do islope=1,nslope 4008 write(str2(1:2),'(i2.2)') islope 4009 call WRITEDIAGFI(ngrid,'dqsdifrdsq_slope'//str2, 4010 & 'diffusion', 4011 & 'kg.m-2.s-1',0,zdqsdif(1,igcm_stormdust_mass,islope)) 4012 ENDDO 3882 4013 call WRITEDIAGFI(ngrid,'mstormdtot', 3883 4014 & 'total mass of stormdust only', … … 3903 4034 & 'stormdust at surface', 3904 4035 & 'kg.m-2',0,qsurf(:,igcm_stormdust_mass,iflat)) 4036 do islope=1,nslope 4037 write(str2(1:2),'(i2.2)') islope 4038 call WRITEDIAGFI(ngrid,'rdsqsurf_slope'//str2, 4039 & 'stormdust at surface', 4040 & 'kg.m-2',0,qsurf(:,igcm_stormdust_mass,islope)) 4041 ENDDO 3905 4042 call WRITEDIAGFI(ngrid,'qsurf', 3906 4043 & 'dust mass at surface', 3907 4044 & 'kg.m-2',0,qsurf(:,igcm_dust_mass,iflat)) 4045 do islope=1,nslope 4046 write(str2(1:2),'(i2.2)') islope 4047 call WRITEDIAGFI(ngrid,'qsurf_slope'//str2, 4048 & 'dust mass at surface', 4049 & 'kg.m-2',0,qsurf(:,igcm_dust_mass,islope)) 4050 ENDDO 3908 4051 call WRITEDIAGFI(ngrid,'wspeed','vertical speed stormdust', 3909 4052 & 'm/s',1,wspeed) … … 3996 4139 & 'albedo', 3997 4140 & '',2,albedo(1,1,iflat)) 3998 4141 do islope=1,nslope 4142 write(str2(1:2),'(i2.2)') islope 4143 CALL WRITEDIAGFI(ngrid,'albedo_slope'//str2, 4144 & 'albedo', 4145 & '',2,albedo(1,1,islope)) 4146 ENDDO 3999 4147 IF (hdo) THEN 4000 4148 CALL WRITEDIAGFI(ngrid,'mtotD',
Note: See TracChangeset
for help on using the changeset viewer.