Changeset 2884 for trunk/LMDZ.MARS


Ignore:
Timestamp:
Jan 31, 2023, 9:15:06 PM (22 months ago)
Author:
romain.vande
Message:

Mars PCM:
Watercaptag is now outputed in the starfi.nc.
There is a new mode : icelocationmode=5 to read watercaptag from startfi and to do as iceloctaionmode=4 if the variable is not present.
RV

Location:
trunk/LMDZ.MARS
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2883 r2884  
    38493849== 31/01/2023 == RV
    38503850Small fix : move an endif misplaced for watercap
     3851
     3852== 31/01/2023 == RV
     3853Watercaptag is now outputed in the starfi.nc.
     3854There is a new mode : icelocationmode=5 to read watercaptag from startfi and to do as iceloctaionmode=4 if the variable is not present.
  • trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90

    r2883 r2884  
    1414  use tracer_mod, only: noms ! tracer names
    1515  use surfdat_h, only: phisfi, albedodat, z0, z0_default,&
    16                        zmea, zstd, zsig, zgam, zthe, hmons, summit, base
     16                       zmea, zstd, zsig, zgam, zthe, hmons, summit, base,&
     17                       watercaptag
    1718  use iostart, only: nid_start, open_startphy, close_startphy, &
    1819                     get_field, get_var, inquire_field, &
     
    102103      REAL :: surfemis  ! constant emissivity when no startfi
    103104      REAL :: surfalbedo  ! constant albedo when no startfi
     105
     106      REAL :: watercaptag_tmp(ngrid)
     107
    104108      CHARACTER(len=5) :: modname="phyetat0"
    105109
     
    641645  call soil_settings(nid_start,ngrid,nsoil,tsurf,tsoil,indextime)
    642646endif ! of if (startphy_file)
     647
     648if (startphy_file) then
     649   call get_field("watercaptag",watercaptag_tmp,found,indextime)
     650   if (.not.found) then
     651     write(*,*) "phyetat0: Failed loading <watercaptag> : ", &
     652                          "<watercaptag> is set as defined by icelocationmode in surfini.F"
     653     watercaptag(:)=.false.
     654   else
     655     do ig=1,ngrid
     656       if(watercaptag_tmp(ig).lt.0.5) then
     657          watercaptag(ig)=.false.
     658       else
     659          watercaptag(ig)=.true.
     660       endif
     661     enddo
     662   endif
     663endif !startphy_file
     664
    643665!
    644666! close file:
  • trunk/LMDZ.MARS/libf/phymars/phyredem.F90

    r2829 r2884  
    1414                       z0_default, albedice, emisice, emissiv, &
    1515                       iceradius, dtemisice, phisfi, z0,   &
    16                        hmons,summit,base
     16                       hmons,summit,base,watercaptag
    1717  use dimradmars_mod, only: tauvis
    1818  use iostart, only : open_restartphy, close_restartphy, &
     
    4040
    4141  real :: tab_cntrl(length) ! nb "length=100" defined in iostart module
     42  integer :: ig
     43  real :: watercaptag_tmp(ngrid)
    4244 
    4345  ! Create physics start file
     
    133135  call put_field("z0","Surface roughness length",z0)
    134136 
     137  do ig=1,ngrid
     138    if(watercaptag(ig)) then
     139       watercaptag_tmp(ig)=1
     140    else
     141       watercaptag_tmp(ig)=0
     142    endif
     143  enddo
     144
     145  call put_field("watercaptag","Infinite water reservoir",watercaptag_tmp)
     146
    135147  ! Close file
    136148  call close_restartphy
  • trunk/LMDZ.MARS/libf/phymars/surfini.F

    r2826 r2884  
    4343! resolution, and easily adaptable for dynamico
    4444! For visualisation : > /u/tnalmd/bin/watercaps gcm_txt_output_file
    45       INTEGER,SAVE :: icelocationmode = 4
     45      INTEGER,SAVE :: icelocationmode = 5
    4646     
    4747!$OMP THREADPRIVATE(icelocationmode)
     
    118118c=======================================================================
    119119! Initialize watercaptag (default is false)
    120       watercaptag_glo(:)=.false.
     120!      watercaptag_glo(:)=.false. !Already done in phyetat0 if needed
    121121
    122122c     water ice outliers
     
    142142         
    143143         if (ngrid .ne. 1) then
    144            watercaptag(:) = .false.
     144!           watercaptag(:) = .false.
    145145           longwatercaptag(:) = .false.
    146146         endif
     
    159159      call gather(latitude,lati_glo)
    160160      call gather(longitude,long_glo)
     161      call gather(watercaptag,watercaptag_glo)
    161162
    162163      if (is_master) then
     
    447448!         print*,'watercaptag_glo(:), ',watercaptag_glo(:)
    448449
     450        ELSE IF (icelocationmode .eq. 5) THEN
     451     
     452         print*,'icelocationmode = 5'
     453         print*,'Surfini: ice caps defined using startfi.nc data'
     454         do ig=1,ngrid
     455           if(any(watercaptag_glo)) then
     456           else
     457              call locate_watercaptag(klon_glo,lati_glo,
     458     &            long_glo,watercaptag_glo)
     459           endif
     460         enddo
     461
     462!         print*,'watercaptag_glo(:), ',watercaptag_glo(:)
     463
    449464        ELSE
    450465     
    451466         print*, 'In surfini.F, icelocationmode is ', icelocationmode
    452          print*, 'It should be 1, 2, 3 or 4 (default is 4)'
     467         print*, 'It should be 1, 2, 3, 4 or 5 (default is 5)'
    453468         call abort_physic("surfini","wrong icelocationmode",1)
    454469
Note: See TracChangeset for help on using the changeset viewer.