Changeset 5099 for LMDZ6/branches/Amaury_dev/tools
- Timestamp:
- Jul 22, 2024, 9:29:09 PM (4 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/tools/fcm/doc/standards/fortran_standard.html
r1578 r5099 1070 1070 ! Description: 1071 1071 ! <Explain the usage of the subroutine and what it does.> 1072 ! 1072 1073 1073 ! (c) Crown copyright Met Office. All rights reserved. 1074 1074 ! For further details please refer to the file COPYRIGHT.txt -
LMDZ6/branches/Amaury_dev/tools/make_sso/make_sso_SpherePack.f90
r5088 r5099 1 1 !------------------------------------------------------------------------------- 2 ! 2 3 3 PROGRAM make_sso 4 ! 4 5 5 !------------------------------------------------------------------------------- 6 6 ! Purpose: Project ETOPO file (GMT4 axes conventions) on spherical harmonics. … … 117 117 SELECT CASE(arg) 118 118 CASE('-i'); f_in=args(k); msg='Missing file "'//TRIM(f_in)//'".' 119 ll=NF90_OPEN(f_in,NF90_NOWRITE,fID)/= NF90_NOERR119 ll=NF90_OPEN(f_in,NF90_NOWRITE,fID)/=nf90_noerr 120 120 IF(.NOT.ll) n=NF90_CLOSE(fID) 121 121 CASE('-res'); nlon_ou=str2int(args(k)); k=k+1 … … 135 135 IF(ALL(['noro','spec']/=fmsk)) THEN 136 136 msg='Missing or wrong "-m" option ; can be "noro", "spec" or a mask file' 137 CALL err(NF90_OPEN(fmsk,NF90_NOWRITE,fID)/= NF90_NOERR,msg)137 CALL err(NF90_OPEN(fmsk,NF90_NOWRITE,fID)/=nf90_noerr,msg) 138 138 CALL nc(NF90_INQ_VARID(fID,"MaskOcean",vID),"MaskOcean") !--- MASK ID 139 139 CALL nc(NF90_INQUIRE_VARIABLE(fID,vID,dimids=dIDs)) !--- DIMS IDS 140 CALL nc( NF90_INQUIRE_DIMENSION(fID,dIDs(1),len=nlon_ou),'x')!--- NB LONG141 CALL nc( NF90_INQUIRE_DIMENSION(fID,dIDs(2),len=nlat_ou),'y')!--- NB LAT140 CALL nc(nf90_inquire_dimension(fID,dIDs(1),len=nlon_ou),'x')!--- NB LONG 141 CALL nc(nf90_inquire_dimension(fID,dIDs(2),len=nlat_ou),'y')!--- NB LAT 142 142 CALL nc(NF90_CLOSE(fID)) 143 143 END IF … … 153 153 CALL nc(NF90_INQ_VARID(fID,vnam,vID)) 154 154 CALL nc(NF90_INQUIRE_VARIABLE (fID,vID,dimids=dIDs)) 155 CALL nc( NF90_INQUIRE_DIMENSION(fID,dIDs(1),len=nlon_in,name=lonn))156 CALL nc( NF90_INQUIRE_DIMENSION(fID,dIDs(2),len=nlat_in,name=latn))155 CALL nc(nf90_inquire_dimension(fID,dIDs(1),len=nlon_in,name=lonn)) 156 CALL nc(nf90_inquire_dimension(fID,dIDs(2),len=nlat_in,name=latn)) 157 157 WRITE(*,*)TRIM(vnam)//' is '//TRIM(lonn)//'('//TRIM(int2str(nlon_in))//')*' & 158 158 //TRIM(latn)//'('//TRIM(int2str(nlat_in))//')' … … 161 161 CALL nc(NF90_INQ_VARID(fID,lonn,loID) ,lonn) 162 162 CALL nc(NF90_INQ_VARID(fID,latn,laID) ,latn) 163 CALL nc( NF90_GET_VAR(fID,loID,lon_in) ,lonn)164 CALL nc( NF90_GET_VAR(fID,laID,lat_in) ,latn)163 CALL nc(nf90_get_var (fID,loID,lon_in) ,lonn) 164 CALL nc(nf90_get_var (fID,laID,lat_in) ,latn) 165 165 CALL nc(NF90_GET_ATT (fID,loID,'units',lonu),lonn) 166 166 CALL nc(NF90_GET_ATT (fID,laID,'units',latu),latn) 167 CALL nc( NF90_GET_VAR(fID,vID,h(:,:),[1,1],[nlon_in+1,nlat_in]),vnam)167 CALL nc(nf90_get_var (fID,vID,h(:,:),[1,1],[nlon_in+1,nlat_in]),vnam) 168 168 CALL nc(NF90_CLOSE(fID)) 169 169 … … 368 368 ALLOCATE(msko(nlon_ou,nlat_ou)) 369 369 msg='Missing or wrong "-m" option ; can be "noro", "spec" or a mask file' 370 CALL err(NF90_OPEN(fmsk,NF90_NOWRITE,fID)/= NF90_NOERR,msg)370 CALL err(NF90_OPEN(fmsk,NF90_NOWRITE,fID)/=nf90_noerr,msg) 371 371 CALL nc(NF90_INQ_VARID(fID,"MaskOcean",vID),"MaskOcean") !--- MASK ID 372 CALL nc( NF90_GET_VAR(fID,vID,msko(:,:))) !--- MASK372 CALL nc(nf90_get_var(fID,vID,msko(:,:))) !--- MASK 373 373 CALL nc(NF90_CLOSE(fID)) 374 374 msko(:,:)=1.0-msko(:,:) … … 526 526 527 527 !------------------------------------------------------------------------------- 528 ! 528 529 529 SUBROUTINE diffusion_filter(a,b) 530 ! 530 531 531 !------------------------------------------------------------------------------- 532 532 ! Purpose: ECMWF bi-laplacian diffusion filter to limit aliasing. … … 557 557 558 558 END SUBROUTINE diffusion_filter 559 ! 560 !------------------------------------------------------------------------------- 561 562 563 !------------------------------------------------------------------------------- 564 ! 559 560 !------------------------------------------------------------------------------- 561 562 563 !------------------------------------------------------------------------------- 564 565 565 SUBROUTINE lowpass_filter(a,b,d,dd) 566 ! 566 567 567 !------------------------------------------------------------------------------- 568 568 ! Purpose: ECMWF lowpass filter. … … 585 585 586 586 END SUBROUTINE lowpass_filter 587 ! 588 !------------------------------------------------------------------------------- 589 590 591 !------------------------------------------------------------------------------- 592 ! 587 588 !------------------------------------------------------------------------------- 589 590 591 !------------------------------------------------------------------------------- 592 593 593 SUBROUTINE bandpass_filter(a,b,d1,dd1,d2,dd2) 594 ! 594 595 595 !------------------------------------------------------------------------------- 596 596 ! Purpose: ECMWF bandpass filter. Calls lowpass filter with 2 different scales. … … 616 616 617 617 END SUBROUTINE bandpass_filter 618 ! 619 !------------------------------------------------------------------------------- 620 621 622 !------------------------------------------------------------------------------- 623 ! 618 619 !------------------------------------------------------------------------------- 620 621 622 !------------------------------------------------------------------------------- 623 624 624 SUBROUTINE lowpass(d,dd,h) 625 ! 625 626 626 !------------------------------------------------------------------------------- 627 627 IMPLICIT NONE … … 639 639 640 640 END SUBROUTINE lowpass 641 ! 642 !------------------------------------------------------------------------------- 643 644 645 !------------------------------------------------------------------------------- 646 ! 641 642 !------------------------------------------------------------------------------- 643 644 645 !------------------------------------------------------------------------------- 646 647 647 SUBROUTINE spatial_filter_1(u,D,dd) 648 ! 648 649 649 !------------------------------------------------------------------------------- 650 650 ! Purpose: Spatial filter ; using spectral lowpass filter. … … 665 665 666 666 END SUBROUTINE spatial_filter_1 667 ! 668 !------------------------------------------------------------------------------- 669 670 671 !------------------------------------------------------------------------------- 672 ! 667 668 !------------------------------------------------------------------------------- 669 670 671 !------------------------------------------------------------------------------- 672 673 673 SUBROUTINE spatial_filter_m(u,D,dd) 674 ! 674 675 675 !------------------------------------------------------------------------------- 676 676 ! Purpose: Spatial filter ; using spectral lowpass filter. … … 712 712 713 713 END SUBROUTINE spatial_filter_m 714 ! 715 !------------------------------------------------------------------------------- 716 717 718 !------------------------------------------------------------------------------- 719 ! 714 715 !------------------------------------------------------------------------------- 716 717 718 !------------------------------------------------------------------------------- 719 720 720 SUBROUTINE grid_noro0(xin,yin,zin,xou,you,zphi,mask) 721 ! 721 722 722 !------------------------------------------------------------------------------- 723 723 ! Purpose: Sub-cell scales orographic parameters coomputation. Angles in radians … … 810 810 811 811 END SUBROUTINE grid_noro0 812 ! 813 !------------------------------------------------------------------------------- 814 815 816 !------------------------------------------------------------------------------- 817 ! 812 813 !------------------------------------------------------------------------------- 814 815 816 !------------------------------------------------------------------------------- 817 818 818 SUBROUTINE nc(ncres,var) 819 ! 819 820 820 !------------------------------------------------------------------------------- 821 821 ! Purpose: NetCDF errors handling. … … 830 830 CHARACTER(LEN=256) :: msg 831 831 !------------------------------------------------------------------------------- 832 IF(ncres/= NF90_NoErr) THEN832 IF(ncres/=nf90_noerr) THEN 833 833 msg='Error in routine '//TRIM(sub) 834 834 IF(fnam/='') msg=TRIM(msg)//' for file "'//TRIM(fnam)//'"' … … 838 838 839 839 END SUBROUTINE nc 840 ! 841 !------------------------------------------------------------------------------- 842 843 844 !------------------------------------------------------------------------------- 845 ! 840 841 !------------------------------------------------------------------------------- 842 843 844 !------------------------------------------------------------------------------- 845 846 846 ELEMENTAL FUNCTION int2str(val) 847 ! 847 848 848 !------------------------------------------------------------------------------- 849 849 IMPLICIT NONE … … 865 865 866 866 !------------------------------------------------------------------------------- 867 ! 867 868 868 SUBROUTINE err(ierr,str) 869 ! 869 870 870 !------------------------------------------------------------------------------- 871 871 IMPLICIT NONE … … 880 880 881 881 END SUBROUTINE err 882 ! 883 !------------------------------------------------------------------------------- 884 885 886 !------------------------------------------------------------------------------- 887 ! 882 883 !------------------------------------------------------------------------------- 884 885 886 !------------------------------------------------------------------------------- 887 888 888 SUBROUTINE error(sub,ierr) 889 ! 889 890 890 !------------------------------------------------------------------------------- 891 891 IMPLICIT NONE … … 900 900 STOP 901 901 END SUBROUTINE error 902 ! 903 !------------------------------------------------------------------------------- 904 905 906 !------------------------------------------------------------------------------- 907 ! 902 903 !------------------------------------------------------------------------------- 904 905 906 !------------------------------------------------------------------------------- 907 908 908 ELEMENTAL FUNCTION real2str(val) 909 ! 909 910 910 !------------------------------------------------------------------------------- 911 911 IMPLICIT NONE … … 927 927 928 928 !------------------------------------------------------------------------------- 929 ! 929 930 930 SUBROUTINE flip(a) 931 ! 931 932 932 !------------------------------------------------------------------------------- 933 933 IMPLICIT NONE … … 945 945 946 946 END SUBROUTINE flip 947 ! 947 948 948 !------------------------------------------------------------------------------- 949 949 … … 1068 1068 1069 1069 !------------------------------------------------------------------------------- 1070 ! 1070 1071 1071 ELEMENTAL CHARACTER(LEN=256) FUNCTION strLow(str) RESULT(out) 1072 ! 1072 1073 1073 !------------------------------------------------------------------------------- 1074 1074 IMPLICIT NONE … … 1088 1088 1089 1089 END FUNCTION strLow 1090 ! 1090 1091 1091 !------------------------------------------------------------------------------- 1092 1092 1093 1093 END PROGRAM make_sso 1094 ! 1095 !------------------------------------------------------------------------------- 1094 1095 !------------------------------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/tools/netcdf95/Datasets/nf95_find_coord.f90
r5088 r5099 15 15 ! attribute "std_name". 16 16 17 use netcdf, only: NF90_MAX_NAME, NF90_NOERR17 use netcdf, only: NF90_MAX_NAME, nf90_noerr 18 18 use nf95_get_att_m, only: nf95_get_att 19 19 use nf95_inq_varid_m, only: nf95_inq_varid … … 80 80 call nf95_inquire_dimension(ncid, dimid_local, name_local) 81 81 call nf95_inq_varid(ncid, name_local, varid_local, ncerr) 82 if (ncerr == NF90_NOERR) then82 if (ncerr == nf90_noerr) then 83 83 call nf95_inquire_variable(ncid, varid_local, dimids=dimids) 84 84 if (size(dimids) == 1) then … … 86 86 ! We have found a coordinate 87 87 call nf95_get_att(ncid, varid_local, "units", values, ncerr) 88 if (ncerr == NF90_NOERR)then88 if (ncerr == nf90_noerr)then 89 89 if (exact) then 90 90 found = any(values == units) -
LMDZ6/branches/Amaury_dev/tools/netcdf95/Variables/nf95_get_var.f90
r5088 r5099 1 1 module nf95_get_var_m 2 2 3 use netcdf, only: nf90_get_var, NF90_NOERR3 use netcdf, only: nf90_get_var, nf90_noerr 4 4 5 5 use nf95_abort_m, only: nf95_abort -
LMDZ6/branches/Amaury_dev/tools/netcdf95/Variables/nf95_get_var_array.h
r4918 r5099 16 16 end if 17 17 18 if (ncerr_not_opt == NF90_NOERR.and. present(new_missing)) then18 if (ncerr_not_opt == nf90_noerr .and. present(new_missing)) then 19 19 call nf95_get_missing(ncid, varid, missing) 20 20 where (values == missing) values = new_missing -
LMDZ6/branches/Amaury_dev/tools/netcdf95/Variables/nf95_get_var_scalar.h
r4918 r5099 14 14 end if 15 15 16 if (ncerr_not_opt == NF90_NOERR.and. present(new_missing)) then16 if (ncerr_not_opt == nf90_noerr .and. present(new_missing)) then 17 17 call nf95_get_missing(ncid, varid, missing) 18 18 if (values == missing) values = new_missing
Note: See TracChangeset
for help on using the changeset viewer.