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/phymars/phyetat0.F

    r38 r224  
    464464      xmax = MAXVAL(emis)
    465465      PRINT*,'Surface emissivity <emis>:', xmin, xmax
     466
     467!
     468! surface roughness length (NB: z0 is a common in surfdat.h)
     469!
     470      ierr=nf90_inq_varid(nid,"z0",nvarid)
     471      if (ierr.ne.nf90_noerr) then
     472        write(*,*) 'phyetat0: did not find z0 field!'
     473        write(*,*) 'will use constant value of z0_default instead'
     474        z0(:)=z0_default
     475      else
     476        ierr=nf90_get_var(nid,nvarid,z0)
     477        if (ierr.ne.nf90_noerr) then
     478          write(*,*) 'phyetat0: Failed loading <z0>'
     479          write(*,*)trim(nf90_strerror(ierr))
     480          call abort
     481        endif
     482        xmin=1.0E+20
     483        xmax=-1.0E+20
     484        xmin=minval(z0)
     485        xmax=maxval(z0)
     486        write(*,*)'Surface roughness <z0>:',xmin,xmax
     487      endif
     488
     489
    466490c
    467491c pbl wind variance
Note: See TracChangeset for help on using the changeset viewer.