Ignore:
Timestamp:
May 4, 2012, 5:14:30 PM (13 years ago)
Author:
jleconte
Message:
  • Correction a huge bug in newstart: rcp and cpp can now be changed in start.nc files and are the same as in startfi.nc;

Even when starting from start and startfi files.

  • rcp, cpp and mugaz can now be computed using gases.def in newstart
  • Correction of a bug arising in gcm.F when the solar days are long (thanks Melanie V.)
Location:
trunk/LMDZ.GENERIC/libf/dyn3d
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/dyn3d/gcm.F

    r253 r649  
    409409             rday_ecri = rdaym_ini
    410410           ELSE
    411              rday_ecri = INT( rdayvrai )
     411             rday_ecri = INT(rdaym_ini)+INT(day_ini)
    412412           ENDIF
    413413c
  • trunk/LMDZ.GENERIC/libf/dyn3d/newstart.F

    r588 r649  
    176176!      CHARACTER*80 :: visu_file
    177177
    178 !      cpp    = 744.499 ! for Mars, instead of 1004.70885 (Earth)
    179 !      preff  = 610.    ! for Mars, instead of 101325. (Earth)
    180 !      pa     = 20      ! for Mars, instead of 500 (Earth)
    181178      cpp    = 0.
    182179      preff  = 0.
     
    246243      endif
    247244
     245
     246c=======================================================================
     247c  INITIALISATIONS DIVERSES
     248c=======================================================================
     249! Load tracer names:
     250      call iniadvtrac(nq,numvanle)
     251      ! tnom(:) now contains tracer names
     252! JL12 we will need the tracer names to read start in dyneta0
     253
    248254c-----------------------------------------------------------------------
    249255c Lecture du tableau des parametres du run (pour la dynamique)
     
    284290          tab_cntrl(i+50)=tab_cntrl_bis(i)
    285291        enddo
    286       write(*,*) 'printing tab_cntrl', tab_cntrl
    287       do i=1,100
    288         write(*,*) i,tab_cntrl(i)
    289       enddo
     292        write(*,*) 'printing tab_cntrl', tab_cntrl
     293        do i=1,100
     294          write(*,*) i,tab_cntrl(i)
     295        enddo
     296       
     297        ! Lmodif set to 0 to disable modifications possibility in phyeta0                           
     298        write(*,*) 'Reading file START'
     299        fichnom = 'start.nc'
     300        CALL dynetat0(fichnom,nqmx,vcov,ucov,teta,q,masse,
     301     .       ps,phis,time)
     302
     303        write(*,*) 'Reading file STARTFI'
     304        fichnom = 'startfi.nc'
     305        CALL phyetat0 (fichnom,tab0,Lmodif,nsoilmx,nqmx,
     306     .        day_ini,time,
     307     .        tsurf,tsoil,emis,q2,qsurf,   !) ! temporary modif by RDW
     308     .        cloudfrac,totalfrac,hice)
     309
     310        ! copy albedo and soil thermal inertia
     311        do i=1,ngridmx
     312          albfi(i) = albedodat(i)
     313          do j=1,nsoilmx
     314           ithfi(i,j) = inertiedat(i,j)
     315          enddo
     316        ! build a surfithfi(:) using 1st layer of ithfi(:), which might
     317        ! be neede later on if reinitializing soil thermal inertia
     318          surfithfi(i)=ithfi(i,1)
     319        enddo
     320
    290321     
    291322      endif
     
    332363     .            p_omeg,p_g,p_cpp,p_mugaz,p_daysec,time)
    333364      else if (choix_1.eq.1) then
     365         Lmodif=1 ! Lmodif set to 1 to allow modifications in phyeta0                           
    334366         call tabfi (nid_fi,Lmodif,tab0,day_ini,lllm,p_rad,
    335367     .            p_omeg,p_g,p_cpp,p_mugaz,p_daysec,time)
     
    349381c  INITIALISATIONS DIVERSES
    350382c=======================================================================
    351 ! Load tracer names:
    352       call iniadvtrac(nq,numvanle)
    353       ! tnom(:) now contains tracer names
    354383! Initialize global tracer indexes (stored in tracer.h)
    355384      call initracer()
     
    423452        ierr= NF_CLOSE(nid)
    424453
    425       else if (choix_1.eq.1) then !  c'est l'appel a tabfi de phyeta0 qui
    426                                   !  permet de changer les valeurs du
    427                                   !  tab_cntrl Lmodif=1
    428         tab0=0
    429         Lmodif=1 ! Lmodif set to 1 to allow modifications in phyeta0                           
    430         write(*,*) 'Reading file START'
    431         fichnom = 'start.nc'
    432         CALL dynetat0(fichnom,nqmx,vcov,ucov,teta,q,masse,
    433      .       ps,phis,time)
    434 
    435         write(*,*) 'Reading file STARTFI'
    436         fichnom = 'startfi.nc'
    437         CALL phyetat0 (fichnom,tab0,Lmodif,nsoilmx,nqmx,
    438      .        day_ini,time,
    439      .        tsurf,tsoil,emis,q2,qsurf,   !) ! temporary modif by RDW
    440      .        cloudfrac,totalfrac,hice)
    441 
    442         ! copy albedo and soil thermal inertia
    443         do i=1,ngridmx
    444           albfi(i) = albedodat(i)
    445           do j=1,nsoilmx
    446            ithfi(i,j) = inertiedat(i,j)
    447           enddo
    448         ! build a surfithfi(:) using 1st layer of ithfi(:), which might
    449         ! be neede later on if reinitializing soil thermal inertia
    450           surfithfi(i)=ithfi(i,1)
    451         enddo
    452 
     454      else if (choix_1.eq.1) then
     455         !do nothing, start and startfi have already been read
    453456      else
    454457        CALL exit(1)
Note: See TracChangeset for help on using the changeset viewer.