Ignore:
Timestamp:
Sep 11, 2013, 2:34:44 PM (11 years ago)
Author:
emillour
Message:

Mars GCM: (a first step towards using parallel dynamics)

  • IMPORTANT CHANGE: Implemented dynamic tracers. It is no longer necessary to compile the model with the '-t #' option, number of tracers is simply read from tracer.def file (as before). Adapted makegcm_* scripts (and co.) accordingly. Technical aspects of the switch to dynamic tracers are:
    • advtrac.h (in dyn3d) removed and replaced by module infotrac.F
    • tracer.h (in phymars) removed and replaced by module tracer_mod.F90 (which contains nqmx, the number of tracers, etc. and can be used anywhere in the physics).
  • Included some side cleanups: removed unused files (in dyn3d) anldoppler2.F, anl_mcdstats.F and anl_stats-diag.F, and all the unecessary dimensions.* files in grid/dimension.
  • Checked that changes are clean and that GCM yields identical results (in debug mode) to previous svn version.

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/physdem.F

    r999 r1036  
    33     .                   alb,ith,pzmea,pzstd,pzsig,pzgam,pzthe)
    44
     5      use infotrac, only: nqtot, tnom
    56      implicit none
    67c
     
    3233#include "netcdf.inc"
    3334#include "dimphys.h"
    34 #include "advtrac.h"
     35!#include "advtrac.h"
    3536#include "callkeys.h"
    3637c
     
    585586!                    qsurf02, ...)
    586587      count=0
    587       do iq=1,nqmx
     588      do iq=1,nqtot
    588589        txt= " "
    589590        write(txt,'(a1,i2.2)')'q',iq
     
    596597        endif
    597598      enddo
    598       if (count.eq.nqmx) then
     599      if (count.eq.nqtot) then
    599600        write(*,*) "physdem0:tracers seem to follow old naming ",
    600601     &             "convention (qsurf01,qsurf02,...)"
     
    602603        write(*,*) "     but you should run newstart to rename them"
    603604        oldtracernames=.true.
    604       endif ! of if (count.eq.nqmx)
     605      endif ! of if (count.eq.nqtot)
    605606
    606607      IF(nq.GE.1) THEN
     
    693694     .                   phystep,time,
    694695     .                   tsurf,tsoil,co2ice,emis,q2,qsurf)
     696      use infotrac, only: nqtot, tnom
    695697      implicit none
    696698c
     
    720722#include "netcdf.inc"
    721723#include "dimphys.h"
    722 #include "advtrac.h"
     724!#include "advtrac.h"
    723725#include "callkeys.h"
    724726c
     
    918920      IF (firstcall) THEN
    919921        count=0
    920         do iq=1,nqmx
     922        do iq=1,nqtot
    921923          txt= " "
    922924          write(txt,'(a1,i2.2)')'q',iq
     
    929931          endif
    930932        enddo
    931         if (count.eq.nqmx) then
     933        if (count.eq.nqtot) then
    932934          write(*,*) "physdem1:tracers seem to follow old naming ",
    933935     &               "convention (qsurf01,qsurf02,...)"
     
    935937          write(*,*) "     but you should run newstart to rename them"
    936938          oldtracernames=.true.
    937         endif ! of if (count.eq.nqmx)
     939        endif ! of if (count.eq.nqtot)
    938940      ENDIF ! of if(firstcall)
    939941     
    940942      ! If computing water cycle with ice, move surface ice
    941       ! back to qsurf(nqmx)
     943      ! back to qsurf(nqtot)
    942944      IF (oldtracernames .and. water) THEN
    943945       !"loop" to avoid potential out-of-bounds on arrays
    944         write(*,*)'physdem1: moving surface water ice to index ',nqmx
    945         do iq=nqmx,nqmx
     946        write(*,*)'physdem1: moving surface water ice to index ',nqtot
     947        do iq=nqtot,nqtot
    946948          qsurf(1:ngridmx,iq)=qsurf(1:ngridmx,iq-1)
    947949          qsurf(1:ngridmx,iq-1)=0
Note: See TracChangeset for help on using the changeset viewer.