Ignore:
Timestamp:
Oct 5, 2021, 8:34:09 AM (3 years ago)
Author:
emillour
Message:

Mars GCM utilities:
Minor fixes to run with picky gfortran 10.3.0 which requires one element arrays
(rather than scalars) when calling NetCDF routines, andf that stop statements
should not be followed by strings. While at it replaced tabs with spaces.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/util/aeroptical.F90

    r2443 r2567  
    13041304  hybrid=.true.
    13051305  if (ierr.ne.nf90_noerr) then
    1306     stop "init2 Error: Failed reading aps"
     1306    write(*,*) "init2 Error: Failed reading aps"
     1307    stop
    13071308  endif
    13081309
     
    13161317  ierr=nf90_inq_varid(gcmfid,"bps",tmpvarid)
    13171318  if (ierr.ne.nf90_noerr) then
    1318     stop "init2 Error: Failed to get bps ID."
     1319    write(*,*) "init2 Error: Failed to get bps ID."
     1320    stop
    13191321  endif
    13201322  ierr=NF90_GET_VAR(gcmfid,tmpvarid,bps)
    13211323  if (ierr.ne.nf90_noerr) then
    1322     stop "init2 Error: Failed reading bps"
     1324    write(*,*) "init2 Error: Failed reading bps"
     1325    stop
    13231326  endif
    13241327endif
     
    13381341    apbp=.true.
    13391342    if (ierr.ne.nf90_noerr) then
    1340       stop "Error: Failed reading ap"
     1343      write(*,*) "Error: Failed reading ap"
     1344      stop
    13411345    endif
    13421346  endif
     
    13571361    apbp=.true.
    13581362    if (ierr.ne.nf90_noerr) then
    1359       stop "Error: Failed reading bp"
     1363      write(*,*) "Error: Failed reading bp"
     1364      stop
    13601365    endif
    13611366  endif
     
    13721377  ierr=NF90_GET_VAR(gcmfid,tmpvarid,sigma)
    13731378  if (ierr.ne.nf90_noerr) then
    1374     stop "init2 Error: Failed reading sigma"
     1379    write(*,*) "init2 Error: Failed reading sigma"
     1380    stop
    13751381  endif
    13761382endif ! of if (.not.hybrid)
     
    13891395  ierr=NF90_GET_VAR(gcmfid,tmpvarid,aire)
    13901396  if (ierr.ne.nf90_noerr) then
    1391     stop "init2 Error: Failed reading aire"
     1397    write(*,*) "init2 Error: Failed reading aire"
     1398    stop
    13921399  endif
    13931400  area = .true.
     
    14071414  ierr=NF90_GET_VAR(gcmfid,tmpvarid,phisinit)
    14081415  if (ierr.ne.nf90_noerr) then
    1409     stop "init2 Error: Failed reading phisinit"
     1416    write(*,*) "init2 Error: Failed reading phisinit"
     1417    stop
    14101418  endif
    14111419  phis = .true.
     
    14261434  ierr=NF90_DEF_VAR(outfid,"aps",nf90_float,(/layerdimout/),tmpvarid)
    14271435  if (ierr.ne.nf90_noerr) then
    1428      stop "init2 Error: Failed to define the variable aps"
     1436     write(*,*) "init2 Error: Failed to define the variable aps"
     1437     stop
    14291438  endif
    14301439  ! Write the attributes
     
    14371446  ierr=NF90_PUT_VAR(outfid,tmpvarid,aps)
    14381447  if (ierr.ne.nf90_noerr) then
    1439     stop "init2 Error: Failed to write aps"
     1448    write(*,*) "init2 Error: Failed to write aps"
     1449    stop
    14401450  endif
    14411451
     
    14461456  ierr=NF90_DEF_VAR(outfid,"bps",nf90_float,(/layerdimout/),tmpvarid)
    14471457  if (ierr.ne.nf90_noerr) then
    1448      stop "init2 Error: Failed to define the variable bps"
     1458     write(*,*) "init2 Error: Failed to define the variable bps"
     1459     stop
    14491460  endif
    14501461  ! Write the attributes
     
    14571468  ierr=NF90_PUT_VAR(outfid,tmpvarid,bps)
    14581469  if (ierr.ne.nf90_noerr) then
    1459     stop "init2 Error: Failed to write bps"
     1470    write(*,*) "init2 Error: Failed to write bps"
     1471    stop
    14601472  endif
    14611473
     
    14681480    ierr=NF90_DEF_VAR(outfid,"ap",nf90_float,(/interlayerdimout/),tmpvarid)
    14691481    if (ierr.ne.nf90_noerr) then
    1470        stop "init2 Error: Failed to define the variable ap"
     1482       write(*,*) "init2 Error: Failed to define the variable ap"
     1483       stop
    14711484    endif
    14721485    ! Write the attributes
     
    14791492    ierr=NF90_PUT_VAR(outfid,tmpvarid,ap)
    14801493    if (ierr.ne.nf90_noerr) then
    1481       stop "Error: Failed to write ap"
     1494      write(*,*) "Error: Failed to write ap"
     1495      stop
    14821496    endif
    14831497
     
    14891503    ierr=NF90_DEF_VAR(outfid,"bp",nf90_float,(/interlayerdimout/),tmpvarid)
    14901504    if (ierr.ne.nf90_noerr) then
    1491        stop "init2 Error: Failed to define the variable bp"
     1505       write(*,*) "init2 Error: Failed to define the variable bp"
     1506       stop
    14921507    endif
    14931508    ! Write the attributes
     
    15001515    ierr=NF90_PUT_VAR(outfid,tmpvarid,bp)
    15011516    if (ierr.ne.nf90_noerr) then
    1502       stop "Error: Failed to write bp"
     1517      write(*,*) "Error: Failed to write bp"
     1518      stop
    15031519    endif
    15041520  endif ! of if (apbp)
     
    15111527  ierr=NF90_DEF_VAR(outfid,"sigma",nf90_float,(/layerdimout/),tmpvarid)
    15121528  if (ierr.ne.nf90_noerr) then
    1513      stop "init2 Error: Failed to define the variable sigma"
     1529     write(*,*) "init2 Error: Failed to define the variable sigma"
     1530     stop
    15141531  endif
    15151532  ! Write the attributes
     
    15221539  ierr=NF90_PUT_VAR(outfid,tmpvarid,sigma)
    15231540  if (ierr.ne.nf90_noerr) then
    1524     stop "init2 Error: Failed to write sigma"
     1541    write(*,*) "init2 Error: Failed to write sigma"
     1542    stop
    15251543  endif
    15261544endif ! of if (hybrid)
     
    15371555  ierr=NF90_DEF_VAR(outfid,"aire",nf90_float,(/londimout,latdimout/),tmpvarid)
    15381556  if (ierr.ne.nf90_noerr) then
    1539      stop "init2 Error: Failed to define the variable aire"
     1557     write(*,*) "init2 Error: Failed to define the variable aire"
     1558     stop
    15401559  endif
    15411560  ! Write the attributes
     
    15481567  ierr=NF90_PUT_VAR(outfid,tmpvarid,aire)
    15491568  if (ierr.ne.nf90_noerr) then
    1550     stop "init2 Error: Failed to write aire"
     1569    write(*,*) "init2 Error: Failed to write aire"
     1570    stop
    15511571  endif
    15521572endif ! of if (area)
     
    15591579  ierr=NF90_DEF_VAR(outfid,"phisinit",nf90_float,(/londimout,latdimout/),tmpvarid)
    15601580  if (ierr.ne.nf90_noerr) then
    1561     stop "init2 Error: Failed to define the variable phisinit"
     1581    write(*,*) "init2 Error: Failed to define the variable phisinit"
     1582    stop
    15621583  endif
    15631584  ! Write the attributes
     
    15701591  ierr=NF90_PUT_VAR(outfid,tmpvarid,phisinit)
    15711592  if (ierr.ne.nf90_noerr) then
    1572     stop "init2 Error: Failed to write phisinit"
     1593    write(*,*) "init2 Error: Failed to write phisinit"
     1594    stop
    15731595  endif
    15741596
Note: See TracChangeset for help on using the changeset viewer.