Changeset 2630


Ignore:
Timestamp:
Mar 1, 2022, 9:16:34 PM (3 years ago)
Author:
abierjon
Message:

Mars GCM:
Fix ticket #93. start2archive now correctly stores the variable albedo from
startfi.nc in the output file start_archive.nc, and newstart reads the variable
albedo in start_archive.nc before outputing it in restartfi.nc

AB+LL

Location:
trunk/LMDZ.MARS
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2628 r2630  
    36253625  to the new terminology "mountain top dust flows", accordingly to ticket #71.
    36263626  The new flag read in callphys.def is "topflows".
     3627
     3628== 01/03/2022 == AB+LL
     3629Fix ticket #93. start2archive now correctly stores the variable albedo from
     3630startfi.nc in the output file start_archive.nc, and newstart reads the variable
     3631albedo in start_archive.nc before outputing it in restartfi.nc
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/lect_start_archive.F

    r2466 r2630  
    11      SUBROUTINE lect_start_archive(ngrid,nlayer,nqtot,
    2      &     date,tsurf,tsoil,emis,q2,
     2     &     date,tsurf,tsoil,albedo,emis,q2,
    33     &     t,ucov,vcov,ps,co2ice,h,phisold_newgrid,
    44     &     q,qsurf,tauscaling,totcloudfrac,surfith,nid,
     
    4747      REAL,INTENT(OUT) :: tsoil(ngrid,nsoilmx) ! soil temperature
    4848      REAL,INTENT(OUT) :: co2ice(ngrid) ! CO2 ice layer
    49       REAL,INTENT(OUT) :: emis(ngrid)
     49      REAL,INTENT(OUT) :: albedo(ngrid,2) ! surface albedo
     50      REAL,INTENT(OUT) :: emis(ngrid) ! ground emissivity
    5051      REAL,INTENT(OUT) :: q2(ngrid,nlayer+1),qsurf(ngrid,nqtot)
    5152      REAL,INTENT(OUT) :: tauscaling(ngrid) ! dust conversion factor
     
    135136      real totcloudfracS(iip1,jjp1)
    136137      real watercapS(iip1,jjp1)
     138      real albedoS(iip1,jjp1)
    137139
    138140      real ptotal, co2icetotal
     
    165167      real, dimension(:,:), allocatable :: totcloudfracold
    166168      real, dimension(:,:), allocatable :: watercapold
     169      real, dimension(:,:), allocatable :: albedoold
    167170
    168171      real tab_cntrl(100)
     
    367370      allocate(totcloudfracold(imold+1,jmold+1))
    368371      allocate(watercapold(imold+1,jmold+1))
     372      allocate(albedoold(imold+1,jmold+1))
    369373
    370374      allocate(var (imold+1,jmold+1,llm))
     
    692696
    693697c-----------------------------------------------------------------------
    694 c 5.1 Lecture des champs 2D (co2ice, emis,ps,tsurf,Tg[10], q2surf, tauscaling,totcloudfrac,watercap)
     698c 5.1 Lecture des champs 2D (co2ice,emis,ps,tsurf,Tg[10], q2surf, tauscaling,totcloudfrac,watercap,albedo)
    695699c-----------------------------------------------------------------------
    696700 
     
    824828        IF (ierr .NE. NF_NOERR) THEN
    825829           PRINT*, "lect_start_archive: Failed loading <watercap>"
     830           PRINT*, NF_STRERROR(ierr)
     831           CALL abort
     832        ENDIF
     833      ENDIF
     834c
     835      ierr = NF_INQ_VARID (nid, "albedo", nvarid)
     836      IF (ierr .NE. NF_NOERR) THEN
     837         PRINT*, "lect_start_archive: <albedo> not in file"
     838         albedoold(:,:) = 0.
     839      ELSE
     840#ifdef NC_DOUBLE
     841        ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count,
     842     &                            albedoold)
     843#else
     844        ierr = NF_GET_VARA_REAL(nid,nvarid,start,count,
     845     &                          albedoold)
     846#endif
     847        IF (ierr .NE. NF_NOERR) THEN
     848           PRINT*, "lect_start_archive: Failed loading <albedo>"
    826849           PRINT*, NF_STRERROR(ierr)
    827850           CALL abort
     
    11201143     &                   jjm,1,rlonuold,rlatvold,rlonu,rlatv)
    11211144      call gr_dyn_fi (1,iim+1,jjm+1,ngrid,watercaps,watercap)
     1145
     1146c Surface albedo
     1147      call interp_horiz (albedoold,albedoS,imold,jmold,iim,
     1148     &                   jjm,1,rlonuold,rlatvold,rlonu,rlatv)
     1149      call gr_dyn_fi (1,iim+1,jjm+1,ngrid,albedoS,albedo(:,1))
     1150     
     1151      albedo(:,2)=albedo(:,1)
    11221152
    11231153c     write(46,*) 'emis',emis
     
    14821512      deallocate(totcloudfracold)
    14831513      deallocate(watercapold)
     1514      deallocate(albedoold)
    14841515      deallocate(var,varp1)
    14851516
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F

    r2565 r2630  
    417417        write(*,*) 'Reading file START_ARCHIVE'
    418418        CALL lect_start_archive(ngridmx,llm,nqtot,
    419      &   date,tsurf,tsoil,emis,q2,
     419     &   date,tsurf,tsoil,albedo,emis,q2,
    420420     &   t,ucov,vcov,ps,co2ice,teta,phisold_newgrid,q,qsurf,
    421421     &   tauscaling,totcloudfrac,surfith,nid,watercap)
  • trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/start2archive.F

    r2565 r2630  
    8989      REAL,ALLOCATABLE :: qsurfS(:,:)
    9090      REAL emisS(ip1jmp1)
     91      REAL albedoS(ip1jmp1)
    9192
    9293c Variables intermediaires : vent naturel, mais pas coord scalaire
     
    246247c tsurf --> tsurfS
    247248c co2ice --> co2iceS
     249c watercap --> watercapS
    248250c tsoil --> tsoilS
     251c inertiedat --> ithS
    249252c emis --> emisS
     253c albedo --> albedoS
    250254c q2 --> q2S
    251255c qsurf --> qsurfS
     
    262266      call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,inertiedat,ithS)
    263267      call gr_fi_dyn(1,ngridmx,iip1,jjp1,emis,emisS)
     268      call gr_fi_dyn(1,ngridmx,iip1,jjp1,albedo(:,1),albedoS)
    264269      call gr_fi_dyn(llm+1,ngridmx,iip1,jjp1,q2,q2S)
    265270      call gr_fi_dyn(nqtot,ngridmx,iip1,jjp1,qsurf,qsurfS)
     
    343348
    344349c-----------------------------------------------------------------------
    345 c Ecriture des champs  (co2ice,emis,ps,Tsurf,T,u,v,q2,q,qsurf)
     350c Ecriture des champs  (co2ice,emis,albedo,ps,Tsurf,T,u,v,q2,q,qsurf)
    346351c-----------------------------------------------------------------------
    347352c ATTENTION: q2 a une couche de plus!!!!
     
    361366     &  'sub grid cloud fraction',' ',2,totcloudfracS)
    362367      call write_archive(nid,ntime,'emis','grd emis',' ',2,emisS)
     368      call write_archive(nid,ntime,'albedo','surface albedo',' ',
     369     &                             2,albedoS)
    363370      call write_archive(nid,ntime,'ps','Psurf','Pa',2,ps)
    364371      call write_archive(nid,ntime,'tsurf','surf T','K',2,tsurfS)
  • trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90

    r2578 r2630  
    102102      REAL :: timestart ! to pick which initial state to start from
    103103      REAL :: surfemis  ! constant emissivity when no startfi
    104       REAL :: surfalbedo  ! constant emissivity when no startfi
     104      REAL :: surfalbedo  ! constant albedo when no startfi
    105105      CHARACTER(len=5) :: modname="phyetat0"
    106106
Note: See TracChangeset for help on using the changeset viewer.