Ignore:
Timestamp:
Mar 19, 2026, 2:07:40 PM (12 days ago)
Author:
jbclement
Message:

PEM:

  • Fix the writing of potential temperature and air mass in "start.nc".
  • Add the checking of variable validity when writing a variable in a NetCDF file.

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/io_netcdf.F90

    r4134 r4145  
    4545integer(di), protected, private :: ncid_file              ! File ID
    4646integer(di), protected, private :: varid                  ! Variable ID
    47 integer(di)          :: ncid_diagevo           ! File ID specific to "diagevo.nc"
     47integer(di)                     :: ncid_diagevo           ! File ID specific to "diagevo.nc"
    4848
    4949! INTERFACES
     
    340340! CODE
    341341! ----
     342! Read
    342343if (present(found)) then
    343344    call check_nc(nf90_inq_varid(ncid_file,var_name,varid),'inquiring '//var_name,found)
     
    347348    call check_nc(nf90_get_var(ncid_file,varid,var),'getting '//var_name)
    348349end if
     350
     351! Check the variable validity
    349352call check_valid_var_nc(var_name,var)
    350353
     
    380383! CODE
    381384! ----
     385! Read
    382386if (present(found)) then
    383387    call check_nc(nf90_inq_varid(ncid_file,var_name,varid),'inquiring '//var_name,found)
     
    387391    call check_nc(nf90_get_var(ncid_file,varid,var),'getting '//var_name)
    388392end if
     393
     394! Check the variable validity
    389395call check_valid_var_nc(var_name,var)
    390396
     
    420426! CODE
    421427! ----
     428! Read
    422429if (present(found)) then
    423430    call check_nc(nf90_inq_varid(ncid_file,var_name,varid),'inquiring '//var_name,found)
     
    427434    call check_nc(nf90_get_var(ncid_file,varid,var),'getting '//var_name)
    428435end if
     436
     437! Check the variable validity
    429438call check_valid_var_nc(var_name,var)
    430439
     
    460469! CODE
    461470! ----
     471! Read
    462472if (present(found)) then
    463473    call check_nc(nf90_inq_varid(ncid_file,var_name,varid),'inquiring '//var_name,found)
     
    467477    call check_nc(nf90_get_var(ncid_file,varid,var),'getting '//var_name)
    468478end if
     479
     480! Check the variable validity
    469481call check_valid_var_nc(var_name,var)
    470482
     
    500512! CODE
    501513! ----
     514! Read
    502515if (present(found)) then
    503516    call check_nc(nf90_inq_varid(ncid_file,var_name,varid),'inquiring '//var_name,found)
     
    507520    call check_nc(nf90_get_var(ncid_file,varid,var),'getting '//var_name)
    508521end if
     522
     523! Check the variable validity
    509524call check_valid_var_nc(var_name,var)
    510525
     
    546561! CODE
    547562! ----
     563! Check the variable validity
     564call check_valid_var_nc(var_name,var)
     565
    548566! Diagevol logic priority over standard logic
    549567if (open_diagevo) then
     
    610628! CODE
    611629! ----
     630! Check the variable validity
     631call check_valid_var_nc(var_name,var)
     632
    612633! Diagevol logic priority over standard logic
    613634if (open_diagevo) then
     
    681702! CODE
    682703! ----
     704! Check the variable validity
     705call check_valid_var_nc(var_name,var)
     706
    683707! Diagevol logic priority over standard logic
    684708if (open_diagevo) then
     
    752776! CODE
    753777! ----
     778! Check the variable validity
     779call check_valid_var_nc(var_name,var)
     780
    754781! Diagevol logic priority over standard logic
    755782if (open_diagevo) then
     
    823850! CODE
    824851! ----
     852! Check the variable validity
     853call check_valid_var_nc(var_name,var)
     854
    825855! Diagevol logic priority over standard logic
    826856if (open_diagevo) then
Note: See TracChangeset for help on using the changeset viewer.