Ignore:
Timestamp:
Sep 23, 2013, 9:56:47 AM (11 years ago)
Author:
emillour
Message:

Mars GCM:

  • IMPORTANT CHANGE: Removed all reference/use of ngridmx (dimphys.h) in routines (necessary prerequisite to using parallel dynamics); in most cases this just means adding 'ngrid' as routine argument, and making local saved variables allocatable (and allocated at first call). In the process, had to convert many *.h files to equivalent modules: yomaer.h => yomaer_h.F90 , surfdat.h => surfdat_h.F90 , comsaison.h => comsaison_h.F90 , yomlw.h => yomlw_h.F90 , comdiurn.h => comdiurn_h.F90 , dimradmars.h => dimradmars_mod.F90 , comgeomfi.h => comgeomfi_h.F90, comsoil.h => comsoil_h.F90 , slope.h => slope_mod.F90
  • Also updated EOF routines, everything is now in eofdump_mod.F90
  • Removed unused routine lectfux.F (in dyn3d)

EM

Location:
trunk/LMDZ.MARS/libf/dyn3d
Files:
1 deleted
5 edited

Legend:

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

    r38 r1047  
    3434c=======================================================================
    3535 
     36      use comsoil_h, only: nsoilmx, mlayer
    3637      implicit none
    3738
     
    4849#include "serre.h"
    4950#include "control.h"
    50 #include"comsoil.h"
     51!#include"comsoil.h"
    5152
    5253#include "netcdf.inc"
  • trunk/LMDZ.MARS/libf/dyn3d/lect_start_archive.F

    r1036 r1047  
    1       SUBROUTINE lect_start_archive(nqtot,date,tsurf,tsoil,emis,q2,
     1      SUBROUTINE lect_start_archive(ngrid,nlayer,nqtot,
     2     &     date,tsurf,tsoil,emis,q2,
    23     &     t,ucov,vcov,ps,co2ice,h,phisold_newgrid,
    34     &     q,qsurf,surfith,nid)
     
    1718c=======================================================================
    1819      use infotrac, only: tnom
     20      use comsoil_h, only: nsoilmx, layer, mlayer, volcapa, inertiedat
    1921      implicit none
    2022
    2123#include "dimensions.h"
    22 #include "dimphys.h"
    23 #include "surfdat.h"
    24 #include "comsoil.h"
    25 #include "dimradmars.h"
    26 #include "yomaer.h"
     24!#include "dimphys.h"
     25!#include "surfdat.h"
     26!#include "comsoil.h"
     27!#include "dimradmars.h"
     28!#include "yomaer.h"
    2729#include "planete.h"
    2830#include "paramet.h"
     
    4951c et autres:
    5052c----------
     53      integer,intent(in) :: ngrid ! number of atmospheric columns
     54                                  ! on new physics grid
     55      integer,intent(in) :: nlayer ! number of atmospheric layers
     56                                   ! on new grid
    5157      integer,intent(in) :: nqtot ! number of advected tracers
    5258
     
    98104c variable physique
    99105c------------------
    100       REAL tsurf(ngridmx) ! surface temperature
    101       REAL tsoil(ngridmx,nsoilmx) ! soil temperature
    102       REAL co2ice(ngridmx) ! CO2 ice layer
    103       REAL emis(ngridmx)
    104       REAL q2(ngridmx,nlayermx+1),qsurf(ngridmx,nqtot)
    105 c     REAL phisfi(ngridmx)
     106      REAL tsurf(ngrid) ! surface temperature
     107      REAL tsoil(ngrid,nsoilmx) ! soil temperature
     108      REAL co2ice(ngrid) ! CO2 ice layer
     109      REAL emis(ngrid)
     110      REAL q2(ngrid,nlayer+1),qsurf(ngrid,nqtot)
     111c     REAL phisfi(ngrid)
    106112
    107113      INTEGER i,j,l
     
    176182
    177183      real surfith(iip1,jjp1) ! surface thermal inertia
    178 !      real surfithfi(ngridmx)
     184!      real surfithfi(ngrid)
    179185      ! surface thermal inertia at old horizontal grid resolution
    180186      real, dimension(:,:), allocatable :: surfithold
     
    335341      allocate(varp1 (imold+1,jmold+1,llm+1))
    336342
    337       write(*,*) 'q2',ngridmx,nlayermx+1
     343      write(*,*) 'q2',ngrid,nlayer+1
    338344      write(*,*) 'q2S',iip1,jjp1,llm+1
    339345      write(*,*) 'q2old',imold+1,jmold+1,lmold+1
     
    10001006      call interp_horiz (tsurfold,tsurfs,imold,jmold,iim,jjm,1,
    10011007     &                   rlonuold,rlatvold,rlonu,rlatv)
    1002       call gr_dyn_fi (1,iim+1,jjm+1,ngridmx,tsurfs,tsurf)
     1008      call gr_dyn_fi (1,iim+1,jjm+1,ngrid,tsurfs,tsurf)
    10031009c     write(44,*) 'tsurf', tsurf
    10041010
     
    10071013!     &                  imold,jmold,iim,jjm,nsoilmx,
    10081014!     &                   rlonuold,rlatvold,rlonu,rlatv)
    1009 !      call gr_dyn_fi (nsoilmx,iim+1,jjm+1,ngridmx,tsoils,tsoil)
     1015!      call gr_dyn_fi (nsoilmx,iim+1,jjm+1,ngrid,tsoils,tsoil)
    10101016c     write(45,*) 'tsoil',tsoil
    10111017
     
    10131019      call interp_horiz (emisold,emiss,imold,jmold,iim,jjm,1,
    10141020     &                   rlonuold,rlatvold,rlonu,rlatv)
    1015       call gr_dyn_fi (1,iim+1,jjm+1,ngridmx,emiss,emis)
     1021      call gr_dyn_fi (1,iim+1,jjm+1,ngrid,emiss,emis)
    10161022c     write(46,*) 'emis',emis
    10171023c-----------------------------------------------------------------------
     
    11301136
    11311137      ! Reshape inertiedatS to scalar grid as inertiedat
    1132       call gr_dyn_fi (nsoilmx,iim+1,jjm+1,ngridmx,
     1138      call gr_dyn_fi (nsoilmx,iim+1,jjm+1,ngrid,
    11331139     &                  inertiedatS,inertiedat)
    11341140     
     
    12031209
    12041210      ! Reshape tsoilS to scalar grid as tsoil
    1205        call gr_dyn_fi (nsoilmx,iim+1,jjm+1,ngridmx,tsoilS,tsoil)
     1211       call gr_dyn_fi (nsoilmx,iim+1,jjm+1,ngrid,tsoilS,tsoil)
    12061212
    12071213
     
    12291235     &                   rlonuold,rlatvold,rlonu,rlatv)
    12301236      write (*,*) 'lect_start_archive: q2s ', q2s (1,2,1)  ! INFO
    1231       call gr_dyn_fi (llm+1,iim+1,jjm+1,ngridmx,q2s,q2)
     1237      call gr_dyn_fi (llm+1,iim+1,jjm+1,ngrid,q2s,q2)
    12321238      write (*,*) 'lect_start_archive: q2 ', q2 (1,2)  ! INFO
    12331239c     write(47,*) 'q2',q2
     
    12781284      enddo
    12791285
    1280       call gr_dyn_fi (nqtot,iim+1,jjm+1,ngridmx,qsurfs,qsurf)
     1286      call gr_dyn_fi (nqtot,iim+1,jjm+1,ngrid,qsurfs,qsurf)
    12811287
    12821288c traceurs 3D
     
    13291335      enddo
    13301336     
    1331       call gr_dyn_fi (1,iim+1,jjm+1,ngridmx,co2ices,co2ice)
     1337      call gr_dyn_fi (1,iim+1,jjm+1,ngrid,co2ices,co2ice)
    13321338
    13331339c-----------------------------------------------------------------------
  • trunk/LMDZ.MARS/libf/dyn3d/newstart.F

    r1036 r1047  
    1919      use infotrac, only: iniadvtrac, nqtot, tnom
    2020      use tracer_mod, only: noms, igcm_h2o_vap, igcm_h2o_ice
     21      use surfdat_h, only: phisfi, z0, zmea, zstd, zsig, zgam, zthe,
     22     &                     albedodat, z0_default
     23      use comsoil_h, only: inertiedat, layer, mlayer, nsoilmx
    2124      implicit none
    2225
    2326#include "dimensions.h"
     27      integer, parameter :: ngridmx = (2+(jjm-1)*iim - 1/jjm)
    2428#include "dimphys.h"
    25 #include "surfdat.h"
    26 #include "comsoil.h"
    27 #include "dimradmars.h"
    28 #include "yomaer.h"
     29!#include "surfdat.h"
     30!#include "comsoil.h"
     31!#include "dimradmars.h"
     32!#include "yomaer.h"
    2933#include "planete.h"
    3034#include "paramet.h"
     
    404408
    405409        write(*,*) 'Reading file START_ARCHIVE'
    406         CALL lect_start_archive(nqtot,date,tsurf,tsoil,emis,q2,
    407      .   t,ucov,vcov,ps,co2ice,teta,phisold_newgrid,q,qsurf,
     410        CALL lect_start_archive(ngridmx,llm,nqtot,
     411     &   date,tsurf,tsoil,emis,q2,
     412     &   t,ucov,vcov,ps,co2ice,teta,phisold_newgrid,q,qsurf,
    408413     &   surfith,nid)
    409414        write(*,*) "OK, read start_archive file"
     
    425430        write(*,*) 'Reading file STARTFI'
    426431        fichnom = 'startfi.nc'
    427         CALL phyetat0 (fichnom,tab0,Lmodif,nsoilmx,nqtot,
     432        CALL phyetat0 (fichnom,tab0,Lmodif,nsoilmx,ngridmx,llm,nqtot,
    428433     .        day_ini,time,
    429434     .        tsurf,tsoil,emis,q2,qsurf,co2ice)
     
    858863          endif
    859864         
    860           call inichim_newstart(nq, q, qsurf, ps, flagh2o, flagthermo)
     865          call inichim_newstart(ngridmx, nq, q, qsurf, ps,
     866     &                          flagh2o, flagthermo)
    861867
    862868         ! We want to have the very same value at lon -180 and lon 180
     
    14721478C
    14731479
    1474       call physdem0("restartfi.nc",lonfi,latfi,nsoilmx,nqtot,
    1475      .              dtphys,real(day_ini),0.0,
     1480      call physdem0("restartfi.nc",lonfi,latfi,nsoilmx,ngridmx,llm,
     1481     .              nqtot,dtphys,real(day_ini),0.0,
    14761482     .              airefi,albfi,ithfi,zmea,zstd,zsig,zgam,zthe)
    1477       call physdem1("restartfi.nc",nsoilmx,nqtot,
     1483      call physdem1("restartfi.nc",nsoilmx,ngridmx,llm,nqtot,
    14781484     .              dtphys,hour_ini,
    14791485     .              tsurf,tsoil,co2ice,emis,q2,qsurf)
  • trunk/LMDZ.MARS/libf/dyn3d/start2archive.F

    r1036 r1047  
    2020
    2121      use infotrac, only: iniadvtrac, nqtot, tnom
     22      use comsoil_h, only: nsoilmx, inertiedat
     23      use surfdat_h, only: ini_surfdat_h
     24      use comsoil_h, only: ini_comsoil_h
    2225      implicit none
    2326
    2427#include "dimensions.h"
     28      integer, parameter :: ngridmx = (2+(jjm-1)*iim - 1/jjm)
    2529#include "paramet.h"
    2630#include "comconst.h"
     
    3438#include "description.h"
    3539
    36 #include "dimphys.h"
    37 #include "comsoil.h"
     40!#include "dimphys.h"
     41!#include "comsoil.h"
    3842!#include"advtrac.h"
    3943#include "netcdf.inc"
     
    6266      REAL tsoil(ngridmx,nsoilmx) ! Soil temperature
    6367      REAL co2ice(ngridmx)      ! CO2 ice layer
    64       REAL q2(ngridmx,nlayermx+1)
     68      REAL q2(ngridmx,llm+1)
    6569      REAL,ALLOCATABLE :: qsurf(:,:)
    6670      REAL emis(ngridmx)
     
    126130      allocate(qsurf(ngridmx,nqtot))
    127131      allocate(qsurfS(ip1jmp1,nqtot))
     132      call ini_surfdat_h(ngridmx)
     133      call ini_comsoil_h(ngridmx)
     134     
    128135
    129136      fichnom = 'start.nc'
     
    135142      Lmodif=0
    136143
    137       CALL phyetat0 (fichnom,0,Lmodif,nsoilmx,nqtot,day_ini_fi,timefi,
    138      .      tsurf,tsoil,emis,q2,qsurf,co2ice)
     144      CALL phyetat0 (fichnom,0,Lmodif,nsoilmx,ngridmx,llm,nqtot,
     145     &      day_ini_fi,timefi,tsurf,tsoil,emis,q2,qsurf,co2ice)
    139146
    140147       ierr = NF_OPEN (fichnom, NF_NOWRITE,nid1)
  • trunk/LMDZ.MARS/libf/dyn3d/write_archive.F

    r38 r1047  
    3232c=======================================================================
    3333
     34      use comsoil_h, only: nsoilmx
    3435      implicit none
    3536
Note: See TracChangeset for help on using the changeset viewer.