Ignore:
Timestamp:
Jul 22, 2024, 9:29:09 PM (4 months ago)
Author:
abarral
Message:

Replace most uses of CPP_DUST by the corresponding logical defined in lmdz_cppkeys_wrapper.F90
Convert several files from .F to .f90 to allow Dust to compile w/o rrtm/ecrad
Create lmdz_yoerad.f90
(lint) Remove "!" on otherwise empty line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/dyn3d/dynetat0.F90

    r5091 r5099  
    11SUBROUTINE dynetat0(fichnom,vcov,ucov,teta,q,masse,ps,phis,time)
    2 !
     2
    33!-------------------------------------------------------------------------------
    44! Authors: P. Le Van , L.Fairhead
     
    99  USE strings_mod, ONLY: maxlen, msg, strStack, real2str, int2str
    1010  USE netcdf,      ONLY: NF90_OPEN,  NF90_NOWRITE, NF90_INQ_VARID, &
    11                          NF90_CLOSE, NF90_GET_VAR, NF90_NoErr
     11                         NF90_CLOSE, nf90_get_var, nf90_noerr
    1212  USE readTracFiles_mod, ONLY: new2oldH2O, newHNO3, oldHNO3, getKey
    1313  USE control_mod, ONLY: planet_type
     
    8282  pa         = tab_cntrl(idecal+13)
    8383  preff      = tab_cntrl(idecal+14)
    84 !
     84
    8585  clon       = tab_cntrl(idecal+15)
    8686  clat       = tab_cntrl(idecal+16)
    8787  grossismx  = tab_cntrl(idecal+17)
    8888  grossismy  = tab_cntrl(idecal+18)
    89 !
     89
    9090  IF ( tab_cntrl(idecal+19)==1. )  THEN
    9191    fxyhypb  = .TRUE.
     
    116116  CALL get_var2("aire" ,aire)
    117117  var="temps"
    118   IF(NF90_INQ_VARID(fID,var,vID)/=NF90_NoErr) THEN
     118  IF(NF90_INQ_VARID(fID,var,vID)/=nf90_noerr) THEN
    119119    CALL msg('missing field <temps> ; trying with <Time>', modname)
    120120    var="Time"
    121121    CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
    122122  END IF
    123   CALL err(NF90_GET_VAR(fID,vID,time),"get",var)
     123  CALL err(nf90_get_var(fID,vID,time),"get",var)
    124124  CALL get_var2("phisinit",phis)
    125125  CALL get_var3("ucov",ucov)
     
    132132  ll=.FALSE.
    133133#ifdef REPROBUS
    134   ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= NF90_NoErr                                 !--- DETECT OLD REPRO start.nc FILE
     134  ll = NF90_INQ_VARID(fID, 'HNO3tot', vID) /= nf90_noerr                                 !--- DETECT OLD REPRO start.nc FILE
    135135#endif
    136136  DO iq=1,nqtot
     
    145145    END IF
    146146    !--------------------------------------------------------------------------------------------------------------------------
    147     IF(NF90_INQ_VARID(fID, var, vID) == NF90_NoErr .AND. .NOT.lSkip) THEN                !=== REGULAR CASE: AVAILABLE VARIABLE
    148       CALL err(NF90_GET_VAR(fID,vID,q(:,:,:,iq)),"get",var)
    149     !--------------------------------------------------------------------------------------------------------------------------
    150     ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == NF90_NoErr) THEN                         !=== TRY WITH ALTERNATE NAME
     147    IF(NF90_INQ_VARID(fID, var, vID) == nf90_noerr .AND. .NOT.lSkip) THEN                !=== REGULAR CASE: AVAILABLE VARIABLE
     148      CALL err(nf90_get_var(fID,vID,q(:,:,:,iq)),"get",var)
     149    !--------------------------------------------------------------------------------------------------------------------------
     150    ELSE IF(NF90_INQ_VARID(fID, oldVar, vID) == nf90_noerr) THEN                         !=== TRY WITH ALTERNATE NAME
    151151      CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to <'//TRIM(oldVar)//'>', modname)
    152       CALL err(NF90_GET_VAR(fID,vID,q(:,:,:,iq)),"get",oldVar)
     152      CALL err(nf90_get_var(fID,vID,q(:,:,:,iq)),"get",oldVar)
    153153    !--------------------------------------------------------------------------------------------------------------------------
    154154    ELSE IF(tracers(iq)%iso_iGroup == iH2O .AND. niso > 0) THEN                          !=== WATER ISOTOPES
     
    209209  REAL,             INTENT(OUT) :: v(:)
    210210  CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
    211   CALL err(NF90_GET_VAR(fID,vID,v),"get",var)
     211  CALL err(nf90_get_var(fID,vID,v),"get",var)
    212212END SUBROUTINE get_var1
    213213
     
    217217  REAL,             INTENT(OUT) :: v(:,:)
    218218  CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
    219   CALL err(NF90_GET_VAR(fID,vID,v),"get",var)
     219  CALL err(nf90_get_var(fID,vID,v),"get",var)
    220220END SUBROUTINE get_var2
    221221
     
    225225  REAL,             INTENT(OUT) :: v(:,:,:)
    226226  CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var)
    227   CALL err(NF90_GET_VAR(fID,vID,v),"get",var)
     227  CALL err(nf90_get_var(fID,vID,v),"get",var)
    228228END SUBROUTINE get_var3
    229229
     
    233233  CHARACTER(LEN=*), INTENT(IN) :: typ    !--- TYPE OF OPERATION
    234234  CHARACTER(LEN=*), INTENT(IN) :: nam    !--- FIELD/FILE NAME
    235   IF(ierr==NF90_NoERR) RETURN
     235  IF(ierr==nf90_noerr) RETURN
    236236  SELECT CASE(typ)
    237237    CASE('inq');   mesg="Field <"//TRIM(nam)//"> is missing"
Note: See TracChangeset for help on using the changeset viewer.