Ignore:
Timestamp:
Sep 5, 2012, 5:12:50 PM (12 years ago)
Author:
acolaitis
Message:

LES. Reorganized mode 3. dust_profile is now read by ideal.exe and stored in mars_qdust and mars_qndust. Added -mcmodel for large executable in the debug options of makegcm.

Location:
trunk/MESOSCALE/LMD_MM_MARS/SRC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/Registry.EM

    r766 r772  
    114114state  real  QH2O      ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt) "QH2O"       "Water vapor mixing ratio"   "kg kg-1"
    115115state  real  QH2O_ICE  ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt) "QH2O_ICE"   "Water ice mixing ratio"     "kg kg-1"
    116 state  real  QDUST     ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt) "QDUST"      "Dust mixing ratio"          "kg kg-1"
     116state  real  qdust     ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt) "qdust"      "Dust mixing ratio"          "kg kg-1"
     117state  real  qndust    ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt) "qndust"     "Dust number density"        " m-3 "
    117118state  real  qtrac1    ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt) "qtrac1"     "Decaying tracer 1"          "kg kg-1"
    118119state  real  upward    ikjftb  scalar  1  -  i01rhusdf=(bdy_interp:dt) "upward"     "Decaying tracer surf"       "kg kg-1"
     
    232233state  real   mars_dsoil     ilj   misc  1  -  i012rd  "MARS_DSOIL"  "soil depths"             "m"
    233234state  real   mars_gw        ilj   misc  1  -  i012rd  "MARS_GW"     "gwparam"                 " "
     235state  real   mars_qdust     ikj   misc  1  -  i012rd  "MARS_QDUST"   "dust mass mixing ratio" "kg/kg"
     236state  real   mars_qndust    ikj   misc  1  -  i012rd  "MARS_QNDUST"   "dust number density"    " "
    234237####
    235238####
     
    14961499package   water        mars==1                      -              moist:qv;scalar:qh2o,qh2o_ice
    14971500package   dust         mars==2                      -              moist:qv;scalar:qdust
     1501package   dust2eq      mars==3                      -              scalar:qdust,qndust
    14981502package   radioac      mars==20                     -              scalar:qtrac1
    14991503package   radioac2     mars==21                     -              scalar:upward,downward
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_first_rk_step_part1.F

    r678 r772  
    631631     &        ,MARS_Z0=grid%mars_z0             &
    632632     &        ,CST_Z0=config_flags%init_Z0      &
     633     &        ,MARS_QDUST=grid%mars_qdust       &
     634     &        ,MARS_QNDUST=grid%mars_qndust     &
    633635#endif
    634636     &        ,MARS_GW=grid%mars_gw                                       &
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/LES/modif_mars/module_initialize_les.F

    r674 r772  
    114114!!MARS
    115115 REAL :: lon_input, lat_input, alt_input, tsurf_input
     116 ! for mode 3
     117 LOGICAL :: MARS_MODE_INIT
     118 REAL, DIMENSION(nl_max) :: qdust,qndust,dust_p_level
    116119!!MARS
    117120
     
    346349    grid%mars_tsurf(i,j)=0.
    347350!! <<
     351!! >> Used for mode 3:
     352    grid%mars_qdust(i,:,j)=0.
     353    grid%mars_qndust(i,:,j)=0.
     354!! <<
    348355    grid%slpx(i,j) = 0.
    349356    grid%slpy(i,j) = 0.
     
    690697  print *, 'constant meridional wind ', config_flags%init_V
    691698ENDIF
     699
    692700!!!MARS MARS
    693701
     
    754762  ENDDO
    755763  ENDDO
     764
     765!!!!! MARS INITIALIZE MODE 3 FOR LES
     766
     767!! RESTART=config_flags%restart -> this routine is not used in restart
     768
     769  MARS_MODE_INIT=config_flags%mars
     770
     771  IF (MARS_MODE_INIT .EQ. 3)  THEN
     772  write (*,*) 'MARS MODE 3 INITIALIZATION, READING INPUT_DUST (module_initialize_les.F)'
     773    ! load a profile of dust (same for all points)
     774    call read_dust(qdust,qndust,dust_p_level,nl_in)
     775    p_level = grid%znu(1)*(pd_surf - grid%p_top) + grid%p_top
     776      IF (dust_p_level(1) .lt. p_level) then !input profile needs rescaling to avoid a plateau. This happens when you use different sources to initialize the pressure of the LES and the input_dust. Typicaly: you use the MCD for input_therm and different runs for input_dust, that dont have the same surface pressure ! This trick is ok because we dont want to initialize with a very precise profile of dust, just a realistic one.
     777         dust_p_level = dust_p_level * p_level/dust_p_level(1)
     778     ENDIF
     779     DO k=1,kte-1
     780         p_level = grid%znu(k)*(pd_surf - grid%p_top) + grid%p_top
     781         grid%mars_qdust(its:ite,k,jts:jte)=interp_0( qdust, dust_p_level, p_level, nl_in )
     782         grid%mars_qndust(its:ite,k,jts:jte)=interp_0( qndust, dust_p_level, p_level, nl_in )
     783     ENDDO
     784  ENDIF
     785
     786!!!!! MARS
     787
    756788
    757789 END SUBROUTINE init_domain_rk
     
    10081040      end subroutine read_therm
    10091041
     1042!!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
     1043      subroutine read_dust(qdust,qndust,dust_p_level,n)
     1044      implicit none
     1045      integer n
     1046      real qdust(n),qndust(n),dust_p_level(n)
     1047      logical end_of_file
     1048
     1049      integer k
     1050
     1051! first element is the surface
     1052
     1053      open(unit=11,file='input_dust',form='formatted',status='old')
     1054      rewind(11)
     1055      end_of_file = .false.
     1056      k = 0
     1057      do while (.not. end_of_file)
     1058
     1059        read(11,*,end=102) qdust(k+1), qndust(k+1), dust_p_level(k+1)
     1060        write(*,*) k, qdust(k+1), qndust(k+1), dust_p_level(k+1)
     1061        k = k+1
     1062        go to 113
     1063 102    end_of_file = .true.
     1064 113    continue
     1065      enddo
     1066
     1067      close(unit=11,status = 'keep')
     1068
     1069      end subroutine read_dust
     1070!!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
     1071
     1072
    10101073END MODULE module_initialize_ideal
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/mars_lmd_new/makegcm_mpifort

    r684 r772  
    374374        else if $LINUX then
    375375           ## for ifort
    376              set optim=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check "
    377              set optim90=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check "
    378              set optimtru90=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check "
     376             set optim=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check -mcmodel=large -shared-intel"
     377             set optim90=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check -mcmodel=large -shared-intel"
     378             set optimtru90=" -DMESOSCALE -g -no-ftz -traceback -ftrapuv -fp-stack-check -mcmodel=large -shared-intel"
    379379        else
    380380           echo "pas d option debug predefinie pour cette machine"
  • trunk/MESOSCALE/LMD_MM_MARS/SRC/WRFV2/phys/module_lmd_driver.F

    r766 r772  
    4141        MARS_Z0, &
    4242        CST_Z0, &
     43        MARS_QDUST, &
     44        MARS_QNDUST, &
    4345#endif
    4446        MARS_GW, &
     
    6971   USE module_model_constants
    7072   USE module_wrf_error
    71    USE module_init_utilities
    7273! add new modules here, if needed ...
    7374
     
    145146REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT   )  :: &
    146147     MARS_FLUXRAD,MARS_WSTAR
     148REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN   )  :: &
     149     MARS_QDUST, MARS_QNDUST
    147150#endif
    148151REAL, DIMENSION( ims:ime, 5, jms:jme ), INTENT(IN   )  :: &
     
    189192   INTEGER :: lctindex,ziindex
    190193   LOGICAL :: end_of_file
    191    ! *** ----------------------- ***
    192 
    193    ! *** for Mars Mode 3         ***
    194    INTEGER nm3
    195    PARAMETER(nm3=1000)
    196    REAL, DIMENSION(nm3) :: qdust,qndust,dust_p_level
    197194   ! *** ----------------------- ***
    198195
     
    871868!--------------------------------!
    872869#ifdef NEWPHYS
     870!!! Initialize SCALAR for MODE 3.
     871IF ((MARS_MODE .EQ. 3) .and. (firstcall .EQV. .true.) .and. (.not. restart)) THEN
     872     SCALAR(i,kps:kpe,j,2)=MARS_QDUST(i,kps:kpe,j)
     873     SCALAR(i,kps:kpe,j,3)=MARS_QNDUST(i,kps:kpe,j)
     874ENDIF
    873875IF (MARS_MODE .EQ. 0) THEN
    874876    q_prof(:,1)=0.95
     
    884886      q_prof(:,:) = 0.95
    885887   ENDIF
    886   ENDIF
    887   !!! DUST AND DUSTN
    888   IF (MARS_MODE .EQ. 3 .and. firstcall .EQV. .true. .and. (.not. restart)) THEN
    889       call read_dust(qdust,qndust,dust_p_level,nm3)
    890       if (dust_p_level(1) .lt. p_prof(1)) then !input profile needs rescaling to avoid a plateau. This happens when you use different sources to initialize the pressure of the LES and the input_dust. Typicaly: you use the MCD for input_therm and different runs for input_dust, that dont have the same surface pressure ! This trick is ok because we dont want to initialize with a very precise profile of dust, just a realistic one.
    891          dust_p_level = dust_p_level * p_prof(1)/dust_p_level(1)         
    892       endif
    893       DO k=1, nlayer
    894         q_prof(k,1) = interp_0(qdust, dust_p_level, p_prof(k), nm3)
    895         q_prof(k,2) = interp_0(qndust, dust_p_level, p_prof(k), nm3)
    896       ENDDO
    897       SCALAR(i,kps:kpe,j,2:3)=q_prof(:,:)  ! because we need to initialize the value of scalar!
    898888  ENDIF
    899889#else
     
    17171707!!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
    17181708
    1719 
    1720 !!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
    1721       subroutine read_dust(qdust,qndust,dust_p_level,n)
    1722       implicit none
    1723       integer n
    1724       real qdust(n),qndust(n),dust_p_level(n)
    1725       logical end_of_file
    1726 
    1727       integer k
    1728 
    1729 ! first element is the surface
    1730 
    1731       open(unit=11,file='input_dust',form='formatted',status='old')
    1732       rewind(11)
    1733       end_of_file = .false.
    1734       k = 0
    1735       do while (.not. end_of_file)
    1736 
    1737         read(11,*,end=102) qdust(k+1), qndust(k+1), dust_p_level(k+1)
    1738         write(*,*) k, qdust(k+1), qndust(k+1), dust_p_level(k+1)
    1739         k = k+1
    1740         go to 113
    1741  102    end_of_file = .true.
    1742  113    continue
    1743       enddo
    1744 
    1745       close(unit=11,status = 'keep')
    1746 
    1747       end subroutine read_dust
    1748 !!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
    1749 
    17501709END MODULE module_lmd_driver
Note: See TracChangeset for help on using the changeset viewer.