Changeset 2914


Ignore:
Timestamp:
Mar 14, 2023, 10:30:06 AM (20 months ago)
Author:
romain.vande
Message:

Mars PCM:
Adapt start2archive_SSO.F to the subslope parametrisation.
RV

Location:
trunk/LMDZ.MARS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2913 r2914  
    39433943Adapt start2archive.F to the subslope parametrisation.
    39443944Small correction for newstart.
     3945
     3946== 14/03/2023 == RV
     3947Adapt start2archive_SSO.F to the subslope parametrisation.
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive_SSO.F

    r2828 r2914  
    3333      USE phyetat0_mod, ONLY: phyetat0
    3434      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
    3538! AD: SSO parameters
    3639      USE surfdat_h, ONLY: phisfi, albedodat, z0, z0_default,
     
    6467c Variable Physiques (grille physique)
    6568c ------------------------------------
    66       REAL tsurf(ngridmx)        ! Surface temperature
    67       REAL tsoil(ngridmx,nsoilmx) ! Soil temperature
    68       REAL watercap(ngridmx)        ! h2o ice layer
     69      REAL,ALLOCATABLE :: tsurf(:,:)        ! Surface temperature
     70      REAL,ALLOCATABLE :: tsoil(:,:,:) ! Soil temperature
     71      REAL,ALLOCATABLE :: watercap(:,:)        ! h2o ice layer
    6972      REAL tauscaling(ngridmx) ! dust conversion factor
    7073      REAL totcloudfrac(ngridmx) ! sub-grid cloud fraction
    7174      REAL q2(ngridmx,llm+1)
    72       REAL emis(ngridmx)
    73       REAL albedo(ngridmx,2)
     75      REAL,ALLOCATABLE :: emis(:,:)
     76      REAL,ALLOCATABLE :: albedo(:,:,:)
    7477      REAL wstar(ngridmx)
    7578      DOUBLE PRECISION mem_Nccn_co2(ngridmx,llm)
     
    8487c ------------------------------------
    8588      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(:,:,:)
    8891      REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia
    89       REAL watercapS(ip1jmp1)
     92      REAL,ALLOCATABLE :: watercapS(:,:)
    9093      REAL tauscalingS(ip1jmp1)
    9194      REAL totcloudfracS(ip1jmp1)
    9295      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(:,:)
    95100
    96101! AD: SSO parameters
     
    123128      data  fichier /'startfi'/
    124129
    125       INTEGER ij, l,i,j,isoil,iq
     130      INTEGER ij, l,i,j,isoil,iq,islope
    126131      character*80      fichnom
    127132      integer :: ierr,ntime
     
    150155
    151156! allocate arrays:
    152       allocate(q(ip1jmp1,llm,nqtot))
    153       allocate(qsurfS(ip1jmp1,nqtot))
    154      
     157      allocate(q(ip1jmp1,llm,nqtot))     
    155158
    156159      fichnom = 'start.nc'
     
    178181      Lmodif=0
    179182
     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
    180197      CALL phyetat0 (fichnom,0,Lmodif,nsoilmx,ngridmx,llm,nqtot,
    181198     &      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)
    183201
    184202       ierr = NF_OPEN (fichnom, NF_NOWRITE,nid1)
     
    271289c-----------------------------------------------------------------------
    272290
    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))
    276298      ! 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
    277308      call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,inertiedat,ithS)
    278       call gr_fi_dyn(1,ngridmx,iip1,jjp1,emis,emisS)
    279309      call gr_fi_dyn(llm+1,ngridmx,iip1,jjp1,q2,q2S)
    280       call gr_fi_dyn(nqtot,ngridmx,iip1,jjp1,qsurf,qsurfS)
    281310      call gr_fi_dyn(1,ngridmx,iip1,jjp1,tauscaling,tauscalingS)
    282311      call gr_fi_dyn(1,ngridmx,iip1,jjp1,totcloudfrac,totcloudfracS)
     
    308337      DO j=1,jjp1
    309338         DO i=1,iim
     339           DO islope=1,nslope
    310340           ptotal=ptotal+aire(i+(iim+1)*(j-1))*ps(i+(iim+1)*(j-1))/g
    311341           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
    313347         ENDDO
    314348      ENDDO
     
    349383         ierr = NF_CREATE('start_archive.nc',
    350384     &  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)
    352387      endif
    353388
     
    392427     &  'sub grid cloud fraction',' ',2,totcloudfracS)
    393428      call write_archive(nid,ntime,'emis','grd emis',' ',2,emisS)
     429      call write_archive(nid,ntime,'albedo','surface albedo',' ',
     430     &                             2,albedoS)
    394431      call write_archive(nid,ntime,'ps','Psurf','Pa',2,ps)
    395432      call write_archive(nid,ntime,'tsurf','surf T','K',2,tsurfS)
     
    433470        txt=trim(tname(iq))//"_surf"
    434471        call write_archive(nid,ntime,txt,'Tracer on surface',
    435      &  'kg.m-2',2,qsurfS(1,iq))
     472     &  'kg.m-2',2,qsurfS(:,iq,:))
    436473      enddo
    437474
     
    452489! Write soil temperatures tsoil
    453490      call write_archive(nid,ntime,'tsoil','Soil temperature',
    454      &     'K',-3,tsoilS)
     491     &     'K',-3,tsoilS(:,:,:))
    455492
    456493! Write soil thermal inertia
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/write_archive.F

    r2913 r2914  
    222222
    223223           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
    225229
    226230           if (ierr /= NF_NOERR) then
Note: See TracChangeset for help on using the changeset viewer.