Changeset 5075 for LMDZ6/trunk/libf/misc
- Timestamp:
- Jul 19, 2024, 10:05:57 AM (12 months ago)
- Location:
- LMDZ6/trunk/libf/misc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/misc/lmdz_netcdf.F90
r5073 r5075 4 4 ! 1) Turn netcdf into a "real" fortran module, without the INCLUDE call 5 5 ! 2) Handle the NC_DOUBLE CPP key. This key should ONLY be used here. 6 ! Ideally, the "real" netcdf module/headers should ONLY be called here. (WIP) TODO6 ! The "real" netcdf module/headers should ONLY be called here. 7 7 ! --------------------------------------------- 8 ! TODO check all uses of `use netcdf` + netcdf.inc9 8 10 9 MODULE lmdz_netcdf -
LMDZ6/trunk/libf/misc/write_field.F90
r2342 r5075 1 !2 ! $Id$3 !4 1 module write_field 5 implicit none 2 USE lmdz_netcdf, ONLY: nf_sync, nf90_put_var, nf_enddef, nf_def_dim, nf_unlimited, & 3 nf_clobber, nf90_format, nf_create, nf_def_var 4 5 implicit none 6 6 7 7 integer, parameter :: MaxWriteField = 100 … … 73 73 subroutine WriteField_gen(name,Field,dimx,dimy,dimz) 74 74 implicit none 75 include 'netcdf.inc'76 75 character(len=*) :: name 77 76 integer :: dimx,dimy,dimz … … 102 101 count(4)=1 103 102 104 status = NF_PUT_VARA_DOUBLE(FieldId(Index),FieldVarId(Index),start,count,Field)103 status = nf90_put_var(FieldId(Index),FieldVarId(Index),Field,start,count) 105 104 status = NF_SYNC(FieldId(Index)) 106 105 … … 109 108 subroutine CreateNewField(name,dimx,dimy,dimz) 110 109 implicit none 111 include 'netcdf.inc'112 110 character(len=*) :: name 113 111 integer :: dimx,dimy,dimz … … 126 124 status = NF_DEF_DIM(FieldId(NbField),'Z',dimz,TabDim(3)) 127 125 status = NF_DEF_DIM(FieldId(NbField),'iter',NF_UNLIMITED,TabDim(4)) 128 status = NF_DEF_VAR(FieldId(NbField),FieldName(NbField),NF _DOUBLE,4,TabDim,FieldVarId(NbField))126 status = NF_DEF_VAR(FieldId(NbField),FieldName(NbField),NF90_FORMAT,4,TabDim,FieldVarId(NbField)) 129 127 status = NF_ENDDEF(FieldId(NbField)) 130 128 131 129 end subroutine CreateNewField 132 133 134 130 135 131 subroutine write_field1D(name,Field) … … 285 281 //trim(int2str(pos+offset)) & 286 282 //'," ---> ",g22.16," | ")' 287 ! d épent de l'implémention, sur compaq, c'est necessaire283 ! d�pent de l'impl�mention, sur compaq, c'est necessaire 288 284 ! Pos=Pos+ColumnSize 289 285 endif -
LMDZ6/trunk/libf/misc/wxios.F90
r4817 r5075 70 70 reformaop = "average" 71 71 72 IF (op .EQ."inst(X)") THEN72 IF (op=="inst(X)") THEN 73 73 reformaop = "instant" 74 74 END IF 75 75 76 IF (op .EQ."once") THEN76 IF (op=="once") THEN 77 77 reformaop = "once" 78 78 END IF 79 79 80 IF (op .EQ."t_max(X)") THEN80 IF (op=="t_max(X)") THEN 81 81 reformaop = "maximum" 82 82 END IF 83 83 84 IF (op .EQ."t_min(X)") THEN84 IF (op=="t_min(X)") THEN 85 85 reformaop = "minimum" 86 86 END IF … … 604 604 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 605 605 SUBROUTINE wxios_add_field(fieldname, fieldgroup, fieldlongname, fieldunit) 606 USE netcdf, only: nf90_fill_real606 USE lmdz_netcdf, only: nf90_fill_real 607 607 608 608 IMPLICIT NONE … … 621 621 def = nf90_fill_real 622 622 623 IF (fieldunit .EQ." ") THEN623 IF (fieldunit == " ") THEN 624 624 newunit = "-" 625 625 ELSE … … 666 666 667 667 ! Ajout Abd pour NMC: 668 IF (fid .LE.6) THEN668 IF (fid<=6) THEN 669 669 axis_id="presnivs" 670 670 ELSE … … 682 682 683 683 !On selectionne le bon groupe de champs: 684 IF (fdim .EQ.2) THEN684 IF (fdim==2) THEN 685 685 CALL xios_get_handle("fields_2D", fieldgroup) 686 686 ELSE … … 726 726 CALL xios_set_attr(field, level=field_level, enabled=.TRUE.) 727 727 728 IF (fdim .EQ.2) THEN728 IF (fdim==2) THEN 729 729 !Si c'est un champ 2D: 730 730 IF (prt_level >= 10) THEN
Note: See TracChangeset
for help on using the changeset viewer.