Changeset 3449


Ignore:
Timestamp:
Jan 25, 2019, 6:27:10 PM (5 years ago)
Author:
oboucher
Message:

changed hard coded CO2 molar mass to corresponding variable
and capitalize all of: if endif or and

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/phyetat0.F90

    r3435 r3449  
    110110  IF (carbon_cycle_tr .OR. carbon_cycle_cpl) THEN
    111111     co2_ppm = tab_cntrl(3)
    112      RCO2    = co2_ppm * 1.0e-06  * 44.011/28.97
     112     RCO2    = co2_ppm * 1.0e-06  * RMCO2/28.97
    113113     ! ELSE : keep value from .def
    114   END IF
     114  ENDIF
    115115
    116116  ! co2_ppm0 : initial value of atmospheric CO2 (from create_etat0_limit.e .def)
     
    121121  tab_cntrl(6)=nbapp_rad
    122122
    123   if (iflag_cycle_diurne.GE.1) tab_cntrl( 7) = iflag_cycle_diurne
    124   if (soil_model) tab_cntrl( 8) =1.
    125   if (new_oliq) tab_cntrl( 9) =1.
    126   if (ok_orodr) tab_cntrl(10) =1.
    127   if (ok_orolf) tab_cntrl(11) =1.
    128   if (ok_limitvrai) tab_cntrl(12) =1.
     123  IF (iflag_cycle_diurne.GE.1) tab_cntrl( 7) = iflag_cycle_diurne
     124  IF (soil_model) tab_cntrl( 8) =1.
     125  IF (new_oliq) tab_cntrl( 9) =1.
     126  IF (ok_orodr) tab_cntrl(10) =1.
     127  IF (ok_orolf) tab_cntrl(11) =1.
     128  IF (ok_limitvrai) tab_cntrl(12) =1.
    129129
    130130  itau_phy = tab_cntrl(15)
     
    222222        zmasq(i) = fractint(i)
    223223     ENDIF
    224   END DO
     224  ENDDO
    225225  fractint (1 : klon) =  pctsrf(1 : klon, is_oce)  &
    226226       + pctsrf(1 : klon, is_sic)
     
    233233        zmasq(i) = 1. - fractint(i)
    234234     ENDIF
    235   END DO
     235  ENDDO
    236236
    237237!===================================================================
     
    358358  !          dummy values (as is the case when generated by ce0l,
    359359  !          or by iniaqua)
    360   if ( (maxval(q_ancien).eq.minval(q_ancien))       .or. &
    361        (maxval(ql_ancien).eq.minval(ql_ancien))     .or. &
    362        (maxval(qs_ancien).eq.minval(qs_ancien))     .or. &
    363        (maxval(prw_ancien).eq.minval(prw_ancien))   .or. &
    364        (maxval(prlw_ancien).eq.minval(prlw_ancien)) .or. &
    365        (maxval(prsw_ancien).eq.minval(prsw_ancien)) .or. &
    366        (maxval(t_ancien).eq.minval(t_ancien)) ) then
     360  IF ( (maxval(q_ancien).EQ.minval(q_ancien))       .OR. &
     361       (maxval(ql_ancien).EQ.minval(ql_ancien))     .OR. &
     362       (maxval(qs_ancien).EQ.minval(qs_ancien))     .OR. &
     363       (maxval(prw_ancien).EQ.minval(prw_ancien))   .OR. &
     364       (maxval(prlw_ancien).EQ.minval(prlw_ancien)) .OR. &
     365       (maxval(prsw_ancien).EQ.minval(prsw_ancien)) .OR. &
     366       (maxval(t_ancien).EQ.minval(t_ancien)) ) THEN
    367367    ancien_ok=.false.
    368   endif
     368  ENDIF
    369369
    370370  found=phyetat0_get(klev,clwcon,"CLWCON","CLWCON",0.)
     
    433433        found=phyetat0_get(1,trs(:,it),"trs_"//tname(iiq), &
    434434              "Surf trac"//tname(iiq),0.)
    435      END DO
     435     ENDDO
    436436     CALL traclmdz_from_restart(trs)
    437437  ENDIF
     
    443443        IF (ierr /= 0) CALL abort_physic('phyetat0', 'pb allocation co2_send', 1)
    444444        found=phyetat0_get(1,co2_send,"co2_send","co2 send",co2_ppm)
    445      END IF
    446   END IF
     445     ENDIF
     446  ENDIF
    447447
    448448!===========================================
     
    451451
    452452!  ondes de gravite non orographiques
    453   if (ok_gwd_rando) found = &
     453  IF (ok_gwd_rando) found = &
    454454       phyetat0_get(klev,du_gwd_rando,"du_gwd_rando","du_gwd_rando",0.)
    455   IF (.not. ok_hines .and. ok_gwd_rando) found &
     455  IF (.NOT. ok_hines .AND. ok_gwd_rando) found &
    456456       = phyetat0_get(klev,du_gwd_front,"du_gwd_front","du_gwd_front",0.)
    457457
     
    477477        IF (.NOT. found) THEN
    478478            found=phyetat0_get(1,tslab,"tslab","tslab",0.)
    479         END IF
     479        ENDIF
    480480      ELSE
    481481          DO i=1,nslay
    482482            WRITE(str2,'(i2.2)') i
    483483            found=phyetat0_get(1,tslab(:,i),"tslab"//str2,"tslab",0.) 
    484           END DO
    485       END IF
     484          ENDDO
     485      ENDIF
    486486      IF (.NOT. found) THEN
    487487          PRINT*, "phyetat0: Le champ <tslab> est absent"
     
    489489          DO i=1,nslay
    490490              tslab(:,i)=MAX(ftsol(:,is_oce),271.35)
    491           END DO
    492       END IF
     491          ENDDO
     492      ENDIF
    493493
    494494      ! Sea ice variables
     
    499499              PRINT*, "Initialisation a tsol_sic"
    500500                  tice(:)=ftsol(:,is_sic)
    501           END IF
     501          ENDIF
    502502          found=phyetat0_get(1,seaice,"seaice","seaice",0.)
    503503          IF (.NOT. found) THEN
     
    507507              WHERE (pctsrf(:,is_sic).GT.EPSFRA)
    508508                  seaice=917.
    509               END WHERE
    510           END IF
    511       END IF !sea ice INT
    512   END IF ! Slab       
     509              ENDWHERE
     510          ENDIF
     511      ENDIF !sea ice INT
     512  ENDIF ! Slab       
    513513
    514514  ! on ferme le fichier
Note: See TracChangeset for help on using the changeset viewer.