Changeset 2134


Ignore:
Timestamp:
Oct 24, 2014, 7:53:24 PM (10 years ago)
Author:
lguez
Message:

In nudging procedures, replaced explicit Euler integration of nudged
fields by exact integration. This does not change anything if
guide_add is true, but it changes the value of alpha if guide_add is
false. We could have taken into account the variation of the nudging
field during a nudging time step. This would be a small correction. We
choose not to take it into account for the time being. Also, we add a
restriction on zonal nudging: we allow it only for a grid which is
regular in longitude. It does not seem to make sense otherwise and the
exact integration would take more programming for an irregular grid.

In the sequential version, copying the parallel versions, set
iguide_int to 1 when the input value is 0.

Location:
LMDZ5/trunk/libf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3d/guide_mod.F90

    r2124 r2134  
    7171    INCLUDE "netcdf.inc"
    7272
     73    ! For grossismx:
     74    include "serre.h"
     75
    7376    INTEGER                :: error,ncidpl,rid,rcod
    7477    CHARACTER (len = 80)   :: abort_message
     
    8992    CALL getpar('guide_add',.false.,guide_add,'for�age constant?')
    9093    CALL getpar('guide_zon',.false.,guide_zon,'guidage moy zonale')
     94    if (guide_zon .and. abs(grossismx - 1.) > 0.01) &
     95         call abort_gcm("guide_init", &
     96         "zonal nudging requires grid regular in longitude", 1)
    9197
    9298!   Constantes de rappel. Unite : fraction de jour
     
    112118    ELSE if (iguide_sav == 0) then
    113119       iguide_sav = huge(0)
    114     else
     120    ELSE
    115121       iguide_sav=day_step*iguide_sav
    116122    ENDIF
     
    127133! Parametres pour lecture des fichiers
    128134    CALL getpar('iguide_read',4,iguide_read,'freq. lecture guidage')
    129     CALL getpar('iguide_int',4,iguide_int,'freq. lecture guidage')
    130     IF (iguide_int.GT.0) THEN
     135    CALL getpar('iguide_int',4,iguide_int,'freq. interpolation vert')
     136    IF (iguide_int.EQ.0) THEN
     137        iguide_int=1
     138    ELSEIF (iguide_int.GT.0) THEN
    131139        iguide_int=day_step/iguide_int
    132140    ELSE
     
    10041012        enddo
    10051013    ENDIF ! guide_reg
     1014
     1015    if (.not. guide_add) alpha = 1. - exp(- alpha)
    10061016
    10071017  END SUBROUTINE tau2alpha
  • LMDZ5/trunk/libf/dyn3dmem/guide_loc_mod.F90

    r2124 r2134  
    6868
    6969  SUBROUTINE guide_init
    70    
     70
    7171    USE control_mod
     72
    7273    IMPLICIT NONE
    7374 
     
    7576    INCLUDE "paramet.h"
    7677    INCLUDE "netcdf.inc"
     78
     79    ! For grossismx:
     80    include "serre.h"
    7781
    7882    INTEGER                :: error,ncidpl,rid,rcod
     
    9498    CALL getpar('guide_add',.false.,guide_add,'for�age constant?')
    9599    CALL getpar('guide_zon',.false.,guide_zon,'guidage moy zonale')
     100    if (guide_zon .and. abs(grossismx - 1.) > 0.01) &
     101         call abort_gcm("guide_init", &
     102         "zonal nudging requires grid regular in longitude", 1)
    96103
    97104!   Constantes de rappel. Unite : fraction de jour
     
    15191526            enddo
    15201527        enddo
    1521    
    15221528    ENDIF ! guide_reg
     1529
     1530    if (.not. guide_add) alpha = 1. - exp(- alpha)
    15231531
    15241532  END SUBROUTINE tau2alpha
  • LMDZ5/trunk/libf/dyn3dpar/guide_p_mod.F90

    r2124 r2134  
    6767
    6868  SUBROUTINE guide_init
    69    
     69
    7070    USE control_mod
     71
    7172    IMPLICIT NONE
    7273 
     
    7475    INCLUDE "paramet.h"
    7576    INCLUDE "netcdf.inc"
     77
     78    ! For grossismx:
     79    include "serre.h"
    7680
    7781    INTEGER                :: error,ncidpl,rid,rcod
     
    9397    CALL getpar('guide_add',.false.,guide_add,'for�age constant?')
    9498    CALL getpar('guide_zon',.false.,guide_zon,'guidage moy zonale')
     99    if (guide_zon .and. abs(grossismx - 1.) > 0.01) &
     100         call abort_gcm("guide_init", &
     101         "zonal nudging requires grid regular in longitude", 1)
    95102
    96103!   Constantes de rappel. Unite : fraction de jour
     
    157164    ncidpl=-99
    158165    if (guide_plevs.EQ.1) then
    159        if (ncidpl.eq.-99) then 
     166       if (ncidpl.eq.-99) then
    160167          rcod=nf90_open('apbp.nc',Nf90_NOWRITe, ncidpl)
    161168          if (rcod.NE.NF_NOERR) THEN
     
    165172       endif
    166173    elseif (guide_plevs.EQ.2) then
    167        if (ncidpl.EQ.-99) then 
     174       if (ncidpl.EQ.-99) then
    168175          rcod=nf90_open('P.nc',Nf90_NOWRITe,ncidpl)
    169176          if (rcod.NE.NF_NOERR) THEN
     
    12511258        enddo
    12521259    ENDIF ! guide_reg
     1260
     1261    if (.not. guide_add) alpha = 1. - exp(- alpha)
    12531262
    12541263  END SUBROUTINE tau2alpha
Note: See TracChangeset for help on using the changeset viewer.