Ignore:
Timestamp:
Jul 15, 2011, 9:06:27 AM (13 years ago)
Author:
emillour
Message:

Mars GCM:

Implemented using 'z0' roughness length map (important: 'z0' reference

field is in datafile surface.nc, which has also been updated).

  • made z0 a z0(ngridmx) array and moved 'z0' from 'planete.h' to 'surfdat.h'; added a 'z0_default' (common in surfdat.h) corresponding to the 'control' array value (contole(19) in startfi.nc).
  • adapted 'tabfi.F' to use 'z0_default'.
  • adapted 'phyetat0.F' to look for a 'z0' field in startfi.nc. If 'z0' is not found in the startfi.nc file, then the uniform default value (z0_default) is used.
  • modified 'physdem1.F' to write 'z0' field to restart.nc
  • adapted use of z0() in 'physiq.F' (diagnostic computation of surface stress), 'vdifc.F' and 'vdif_cd.F'.
  • adapted 'dustdevil.F' to use 'z0_default'.
  • 'testphys1d.F' now uses 'z0_default', and the value to use can be set in run.def (with "z0=TheValueYouWant?").
  • modified 'datareadnc.F' to load reference map of 'z0' from surface.nc, and added a 'z0' option in 'newstart.F' to force a uniform value of z0. Note that the use of the z0 map is automatic when using newstart, but only when it loads a start_archive.nc file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/dyn3d/newstart.F

    r171 r224  
    9090      real zmeaS(iip1,jjp1),zstdS(iip1,jjp1)
    9191      real zsigS(iip1,jjp1),zgamS(iip1,jjp1),ztheS(iip1,jjp1)
     92      real z0S(iip1,jjp1)
    9293
    9394c variable physique
     
    365366      call getin("datadir",datafile) ! in case user specified another path
    366367
    367       CALL datareadnc(relief,phis,alb,surfith,zmeaS,zstdS,zsigS,zgamS,
    368      .          ztheS)
     368      CALL datareadnc(relief,phis,alb,surfith,z0S,
     369     &          zmeaS,zstdS,zsigS,zgamS,ztheS)
    369370
    370371      CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,phis,phisfi)
     
    372373      CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,surfith,surfithfi)
    373374      CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,alb,albfi)
     375      CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,z0S,z0)
    374376      CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,zmeaS,zmea)
    375377      CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,zstdS,zstd)
     
    470472      write(*,*) 'flat : no topography ("aquaplanet")'
    471473      write(*,*) 'bilball : uniform albedo and thermal inertia'
     474      write(*,*) 'z0 : set a uniform surface roughness length'
    472475      write(*,*) 'coldspole : cold subsurface and high albedo at S.pole'
    473476      write(*,*) 'qname : change tracer name'
     
    567570          CALL gr_dyn_fi(nsoilmx,iip1,jjp1,ngridmx,ith,ithfi)
    568571          CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,alb,albfi)
     572       
     573         ! also reset surface roughness length to default value
     574         write(*,*) 'surface roughness length set to:',z0_default,' m'
     575         z0(:)=z0_default
     576
     577!       z0 : set surface roughness length to a constant value
     578!       -----------------------------------------------------
     579        else if (trim(modif) .eq. 'z0') then
     580          write(*,*) 'set a uniform surface roughness length'
     581          write(*,*) ' value for z0_default (ex: ',z0_default,')?'
     582          ierr=1
     583          do while (ierr.ne.0)
     584            read(*,*,iostat=ierr) z0_default
     585          enddo
     586          z0(:)=z0_default
    569587
    570588c       coldspole : sous-sol de la calotte sud toujours froid
Note: See TracChangeset for help on using the changeset viewer.