From 71a7081bfe40e6f3e66455f26835dc9fced4bda5 Mon Sep 17 00:00:00 2001 From: Marlee Smith Date: Thu, 14 Jul 2022 15:41:17 -0600 Subject: [PATCH 1/8] Changing the tmp array to an integer --- models/wrf/model_mod.f90 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/models/wrf/model_mod.f90 b/models/wrf/model_mod.f90 index e616693e7c..a9a0805261 100644 --- a/models/wrf/model_mod.f90 +++ b/models/wrf/model_mod.f90 @@ -3758,7 +3758,7 @@ subroutine nc_write_model_atts( ncid, dom_id ) logical, parameter :: write_precip = .false. integer, dimension(num_domains) :: weDimID, weStagDimID, snDimID, snStagDimID, & - btDimID, btStagDimID, slSDimID, tmp + btDimID, btStagDimID, slSDimID integer :: MemberDimID, DomDimID integer :: DXVarID, DYVarID, TRUELAT1VarID, TRUELAT2VarID, STAND_LONVarID @@ -3777,7 +3777,7 @@ subroutine nc_write_model_atts( ncid, dom_id ) !integer, dimension(num_domains) :: MapFacMVarID, MapFacUVarID, MapFacVVarID integer :: var_id -integer :: i, id, ret +integer :: i, id, ret, tmp character(len=129) :: title character(len=32) :: context = 'nc_write_model_atts' @@ -4293,19 +4293,19 @@ subroutine nc_write_model_atts( ncid, dom_id ) !nc -- convert internally logical boundary condition variables into integers before filling if ( wrf%dom(dom_id)%periodic_x ) then - tmp(dom_id) = 1 + tmp = 1 else - tmp(dom_id) = 0 + tmp = 0 endif -call nc_check(nf90_put_var(ncid, PERIODIC_XVarID, tmp(1:num_domains) ), & +call nc_check(nf90_put_var(ncid, PERIODIC_XVarID, tmp ), & 'nc_write_model_atts','put_var PERIODIC_XVarID') if ( wrf%dom(dom_id)%polar ) then - tmp(dom_id) = 1 + tmp = 1 else - tmp(dom_id) = 0 + tmp = 0 endif -call nc_check(nf90_put_var(ncid, POLARVarID, tmp(1:num_domains) ), & +call nc_check(nf90_put_var(ncid, POLARVarID, tmp ), & 'nc_write_model_atts','put var POLARVarID') From 8400e7f0e36157fc500b85d1bbda00cec31ed54c Mon Sep 17 00:00:00 2001 From: Marlee Smith Date: Thu, 14 Jul 2022 15:42:43 -0600 Subject: [PATCH 2/8] fixing incorrect comment - default values of polar, periodic_x = .false. --- models/wrf/model_mod.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/wrf/model_mod.f90 b/models/wrf/model_mod.f90 index a9a0805261..f86de2d294 100644 --- a/models/wrf/model_mod.f90 +++ b/models/wrf/model_mod.f90 @@ -301,7 +301,7 @@ module model_mod ! input NetCDF file ("periodic_x" and "polar" are namelist items in the &bdy_control ! section of a standard WRF "namelist.input" file), but for now we have included them ! in the "model_nml" group of DART's own "input.nml". Above, their default values are - ! both set to .true. (indicating a global domain). + ! both set to .false. logical :: periodic_x logical :: periodic_y logical :: polar From fd45e9c4ade41db9811bcec97eb3cb2db045904a Mon Sep 17 00:00:00 2001 From: Marlee Smith Date: Wed, 20 Jul 2022 14:19:14 -0600 Subject: [PATCH 3/8] =?UTF-8?q?Changed=20the=20definition=20of=20the=20res?= =?UTF-8?q?t=20of=20the=20arrays=20of=20length(num=5Fdomains)=20to=20ints?= =?UTF-8?q?=20in=20nc=5Fwrite=5Fmodel=5Fatts().=20Fixed=20calls=20to=20nf9?= =?UTF-8?q?0=5Fdef=5Fvar()=20and=20nf90=5Fput=5Fatt()=20to=20no=20longer?= =?UTF-8?q?=20attempt=20to=20index=20these=20variables=20(now=20ints).?= =?UTF-8?q?=E2=80=A8=20Fixed=20calls=20to=20nf90=5Fput=5Fvar()=20by=20usin?= =?UTF-8?q?g=20wrf%dom(id)=20instead=20of=20wrf%dom(1:num=5Fdomains).=20Re?= =?UTF-8?q?moved=20the=20call=20to=20nf90=5Fdef=5Fdim()=20for=20the=20doma?= =?UTF-8?q?in=20variable.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/wrf/model_mod.f90 | 213 +++++++++++++++++++-------------------- 1 file changed, 105 insertions(+), 108 deletions(-) diff --git a/models/wrf/model_mod.f90 b/models/wrf/model_mod.f90 index f86de2d294..83d94c3409 100644 --- a/models/wrf/model_mod.f90 +++ b/models/wrf/model_mod.f90 @@ -3757,7 +3757,7 @@ subroutine nc_write_model_atts( ncid, dom_id ) logical, parameter :: write_precip = .false. -integer, dimension(num_domains) :: weDimID, weStagDimID, snDimID, snStagDimID, & +integer :: weDimID, weStagDimID, snDimID, snStagDimID, & btDimID, btStagDimID, slSDimID integer :: MemberDimID, DomDimID @@ -3765,7 +3765,7 @@ subroutine nc_write_model_atts( ncid, dom_id ) integer :: CEN_LATVarID, CEN_LONVarID, MAP_PROJVarID integer :: PERIODIC_XVarID, POLARVarID -integer, dimension(num_domains) :: DNVarID, ZNUVarID, DNWVarID, phbVarID, & +integer :: DNVarID, ZNUVarID, DNWVarID, phbVarID, & MubVarID, LonVarID, LatVarID, ilevVarID, XlandVarID, hgtVarID , LatuVarID, & LatvVarID, LonuVarID, LonvVarID, ZNWVarID @@ -3826,9 +3826,6 @@ subroutine nc_write_model_atts( ncid, dom_id ) !>@todo FIXME we shouldn't need domain anymore because this !> routine is called once per domain. -call nc_check(nf90_def_dim(ncid=ncid, name="domain", & - len = num_domains, dimid = DomDimID), & - 'nc_write_model_atts','def_dim domain') !>@todo FIXME all the variables below should have Time as !> the first dimension. they shouldn't have _d0X in their @@ -3838,25 +3835,25 @@ subroutine nc_write_model_atts( ncid, dom_id ) id = dom_id ! write( idom , '(I1)') dom_id call nc_check(nf90_def_dim(ncid=ncid, name='west_east', & - len = wrf%dom(id)%we, dimid = weDimID(id)), & + len = wrf%dom(id)%we, dimid = weDimID), & 'nc_write_model_atts','def_dim west_east') call nc_check(nf90_def_dim(ncid=ncid, name='west_east_stag', & - len = wrf%dom(id)%wes, dimid = weStagDimID(id)), & + len = wrf%dom(id)%wes, dimid = weStagDimID), & 'nc_write_model_atts','def_dim west_east_stag') call nc_check(nf90_def_dim(ncid=ncid, name='south_north', & - len = wrf%dom(id)%sn, dimid = snDimID(id)), & + len = wrf%dom(id)%sn, dimid = snDimID), & 'nc_write_model_atts','def_dim south_north') call nc_check(nf90_def_dim(ncid=ncid, name='south_north_stag', & - len = wrf%dom(id)%sns, dimid = snStagDimID(id)), & + len = wrf%dom(id)%sns, dimid = snStagDimID), & 'nc_write_model_atts','def_dim south_north_stag') call nc_check(nf90_def_dim(ncid=ncid, name='bottom_top', & - len = wrf%dom(id)%bt, dimid = btDimID(id)), & + len = wrf%dom(id)%bt, dimid = btDimID), & 'nc_write_model_atts','def_dim bottom_top') call nc_check(nf90_def_dim(ncid=ncid, name='bottom_top_stag', & - len = wrf%dom(id)%bts, dimid = btStagDimID(id)), & + len = wrf%dom(id)%bts, dimid = btStagDimID), & 'nc_write_model_atts','def_dim bottom_top_stag') call nc_check(nf90_def_dim(ncid=ncid, name='soil_layers_stag', & - len = wrf%dom(id)%sls, dimid = slSDimID(id)), & + len = wrf%dom(id)%sls, dimid = slSDimID), & 'nc_write_model_atts','def_dim soil_layers_stag') !enddo @@ -4002,54 +3999,54 @@ subroutine nc_write_model_atts( ncid, dom_id ) write( idom , '(I1)') dom_id call nc_check(nf90_def_var(ncid, name='DN', xtype=nf90_real, & - dimids= btDimID(id), varid=DNVarID(id)), & + dimids= btDimID, varid=DNVarID), & 'nc_write_model_atts','def_var DN_do'//idom) -call nc_check(nf90_put_att(ncid, DNVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, DNVarID, 'long_name', & 'dn values on half (mass) levels'), & 'nc_write_model_atts','put_att DN_do'//idom//' long_name') -call nc_check(nf90_put_att(ncid, DNVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, DNVarID, 'description', & 'dn values on half (mass) levels'), & 'nc_write_model_atts','put_att DN_do'//idom//' description') -call nc_check(nf90_put_att(ncid, DNVarID(id), 'units', & +call nc_check(nf90_put_att(ncid, DNVarID, 'units', & ''), & 'nc_write_model_atts','put_att DN_do'//idom//' units') call nc_check(nf90_def_var(ncid, name='ZNU', xtype=nf90_real, & - dimids= btDimID(id), varid=ZNUVarID(id)), & + dimids= btDimID, varid=ZNUVarID), & 'nc_write_model_atts','def_var ZNU') -call nc_check(nf90_put_att(ncid, ZNUVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, ZNUVarID, 'long_name', & 'eta values on half (mass) levels'), & 'nc_write_model_atts','put_att ZNU'//' long_name') -call nc_check(nf90_put_att(ncid, ZNUVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, ZNUVarID, 'description', & 'eta values on half (mass) levels'), & 'nc_write_model_atts','put_att ZNU'//' description') -call nc_check(nf90_put_att(ncid, ZNUVarID(id), 'units', & +call nc_check(nf90_put_att(ncid, ZNUVarID, 'units', & ''), & 'nc_write_model_atts','put_att ZNU'//' units') call nc_check(nf90_def_var(ncid, name='ZNW', xtype=nf90_real, & - dimids= btStagDimID(id), varid=ZNWVarID(id)), & + dimids= btStagDimID, varid=ZNWVarID), & 'nc_write_model_atts','def_var ZNW') -call nc_check(nf90_put_att(ncid, ZNWVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, ZNWVarID, 'long_name', & 'eta values on full (mass) levels'), & 'nc_write_model_atts','put_att ZNW'//' long_name') -call nc_check(nf90_put_att(ncid, ZNWVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, ZNWVarID, 'description', & 'eta values on full (mass) levels'), & 'nc_write_model_atts','put_att ZNW'//' description') -call nc_check(nf90_put_att(ncid, ZNWVarID(id), 'units', & +call nc_check(nf90_put_att(ncid, ZNWVarID, 'units', & ''), & 'nc_write_model_atts','put_att ZNW'//' units') call nc_check(nf90_def_var(ncid, name='DNW', xtype=nf90_real, & - dimids= btDimID(id), varid=DNWVarID(id)), & + dimids= btDimID, varid=DNWVarID), & 'nc_write_model_atts','def_var DNW') -call nc_check(nf90_put_att(ncid, DNWVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, DNWVarID, 'long_name', & 'dn values on full (w) levels'), & 'nc_write_model_atts','def_var DNW'//' long_name') -call nc_check(nf90_put_att(ncid, DNWVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, DNWVarID, 'description', & 'dn values on full (w) levels'), & 'nc_write_model_atts','def_var DNW'//' description') -call nc_check(nf90_put_att(ncid, DNWVarID(id), 'units', & +call nc_check(nf90_put_att(ncid, DNWVarID, 'units', & ''), & 'nc_write_model_atts','def_var DNW'//' units') @@ -4060,17 +4057,17 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! MUB:stagger = '' ; coordinate_char = 'XLONG'//' XLAT' call nc_check(nf90_def_var(ncid, name='MUB', xtype=nf90_real, & - dimids= (/ weDimID(id), snDimID(id) /), varid=MubVarID(id)), & + dimids= (/ weDimID, snDimID /), varid=MubVarID), & 'nc_write_model_atts','def_var MUB') -call nc_check(nf90_put_att(ncid, MubVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, MubVarID, 'long_name', & 'base state dry air mass in column'), & 'nc_write_model_atts','put_att MUB'//' long_name') -call nc_check(nf90_put_att(ncid, MubVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, MubVarID, 'description', & 'base state dry air mass in column'), & 'nc_write_model_atts','put_att MUB'//' description') -call nc_check(nf90_put_att(ncid, MubVarID(id), 'units', 'Pa'), & +call nc_check(nf90_put_att(ncid, MubVarID, 'units', 'Pa'), & 'nc_write_model_atts','put_att MUB'//' units') -call nc_check(nf90_put_att(ncid, MubVarID(id), 'coordinates', & +call nc_check(nf90_put_att(ncid, MubVarID, 'coordinates', & trim(coordinate_char)), & 'nc_write_model_atts','put_att MUB'//' coordinates') @@ -4080,17 +4077,17 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! XLONG:MemoryOrder = 'XY ' ; ! XLONG:stagger = '' ; call nc_check(nf90_def_var(ncid, name='XLONG', xtype=nf90_real, & - dimids= (/ weDimID(id), snDimID(id) /), varid=LonVarID(id)), & + dimids= (/ weDimID, snDimID /), varid=LonVarID), & 'nc_write_model_atts','def_var XLONG') - call nc_check(nf90_put_att(ncid, LonVarID(id), 'long_name', & + call nc_check(nf90_put_att(ncid, LonVarID, 'long_name', & 'LONGITUDE, WEST IS NEGATIVE'), & 'nc_write_model_atts','put_att XLONG'//' long_name') - call nc_check(nf90_put_att(ncid, LonVarID(id), 'units', 'degrees_east'), & + call nc_check(nf90_put_att(ncid, LonVarID, 'units', 'degrees_east'), & 'nc_write_model_atts','put_att XLONG'//' units') - call nc_check(nf90_put_att(ncid, LonVarID(id), 'valid_range', & + call nc_check(nf90_put_att(ncid, LonVarID, 'valid_range', & (/ -180.0_r8, 180.0_r8 /)), & 'nc_write_model_atts','put_att XLONG'//' valid_range') - call nc_check(nf90_put_att(ncid, LonVarID(id), 'description', & + call nc_check(nf90_put_att(ncid, LonVarID, 'description', & 'LONGITUDE, WEST IS NEGATIVE'), & 'nc_write_model_atts','put_att XLONG'//' description') @@ -4099,17 +4096,17 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! XLONG:MemoryOrder = 'XY ' ; ! XLONG:stagger = '' ; call nc_check(nf90_def_var(ncid, name='XLONG_U', xtype=nf90_real, & - dimids= (/ weStagDimID(id), snDimID(id) /), varid=LonuVarID(id)), & + dimids= (/ weStagDimID, snDimID /), varid=LonuVarID), & 'nc_write_model_atts','def_var XLONG_U') - call nc_check(nf90_put_att(ncid, LonuVarID(id), 'long_name', & + call nc_check(nf90_put_att(ncid, LonuVarID, 'long_name', & 'LONGITUDE, WEST IS NEGATIVE'), & 'nc_write_model_atts','put_att XLONG_U'//' long_name') - call nc_check(nf90_put_att(ncid, LonuVarID(id), 'units', 'degrees_east'), & + call nc_check(nf90_put_att(ncid, LonuVarID, 'units', 'degrees_east'), & 'nc_write_model_atts','put_att XLONG_U'//' units') - call nc_check(nf90_put_att(ncid, LonuVarID(id), 'valid_range', & + call nc_check(nf90_put_att(ncid, LonuVarID, 'valid_range', & (/ -180.0_r8, 180.0_r8 /)), & 'nc_write_model_atts','put_att XLONG_U'//' valid_range') - call nc_check(nf90_put_att(ncid, LonuVarID(id), 'description', & + call nc_check(nf90_put_att(ncid, LonuVarID, 'description', & 'LONGITUDE, WEST IS NEGATIVE'), & 'nc_write_model_atts','put_att XLONG_U'//' description') @@ -4118,17 +4115,17 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! XLONG:MemoryOrder = 'XY ' ; ! XLONG:stagger = '' ; call nc_check(nf90_def_var(ncid, name='XLONG_V', xtype=nf90_real, & - dimids= (/ weDimID(id), snStagDimID(id) /), varid=LonvVarID(id)), & + dimids= (/ weDimID, snStagDimID /), varid=LonvVarID), & 'nc_write_model_atts','def_var XLONG_V') -call nc_check(nf90_put_att(ncid, LonvVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, LonvVarID, 'long_name', & 'LONGITUDE, WEST IS NEGATIVE'), & 'nc_write_model_atts','put_att XLONG_V'//' long_name') -call nc_check(nf90_put_att(ncid, LonvVarID(id), 'units', 'degrees_east'), & +call nc_check(nf90_put_att(ncid, LonvVarID, 'units', 'degrees_east'), & 'nc_write_model_atts','put_att XLONG_V'//' units') -call nc_check(nf90_put_att(ncid, LonvVarID(id), 'valid_range', & +call nc_check(nf90_put_att(ncid, LonvVarID, 'valid_range', & (/ -180.0_r8, 180.0_r8 /)), & 'nc_write_model_atts','put_att XLONG_V'//' valid_range') -call nc_check(nf90_put_att(ncid, LonvVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, LonvVarID, 'description', & 'LONGITUDE, WEST IS NEGATIVE'), & 'nc_write_model_atts','put_att XLONG_V'//' description') @@ -4138,17 +4135,17 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! XLAT:MemoryOrder = 'XY ' ; ! XLAT:stagger = '' ; call nc_check(nf90_def_var(ncid, name='XLAT', xtype=nf90_real, & - dimids=(/ weDimID(id), snDimID(id) /), varid=LatVarID(id)), & + dimids=(/ weDimID, snDimID /), varid=LatVarID), & 'nc_write_model_atts','def_var XLAT') -call nc_check(nf90_put_att(ncid, LatVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, LatVarID, 'long_name', & 'LATITUDE, SOUTH IS NEGATIVE'), & 'nc_write_model_atts','put_att XLAT'//' long_name') -call nc_check(nf90_put_att(ncid, LatVarID(id), 'units', 'degrees_north'), & +call nc_check(nf90_put_att(ncid, LatVarID, 'units', 'degrees_north'), & 'nc_write_model_atts','put_att XLAT'//' units') -call nc_check(nf90_put_att(ncid, LatVarID(id), 'valid_range', & +call nc_check(nf90_put_att(ncid, LatVarID, 'valid_range', & (/ -90.0_r8, 90.0_r8 /)), & 'nc_write_model_atts','put_att XLAT'//' valid_range') -call nc_check(nf90_put_att(ncid, LatVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, LatVarID, 'description', & 'LATITUDE, SOUTH IS NEGATIVE'), & 'nc_write_model_atts','put_att XLAT'//' description') @@ -4157,17 +4154,17 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! XLAT_U:MemoryOrder = 'XY ' ; ! XLAT_U:stagger = '' ; call nc_check(nf90_def_var(ncid, name='XLAT_U', xtype=nf90_real, & - dimids=(/ weStagDimID(id), snDimID(id) /), varid=LatuVarID(id)), & + dimids=(/ weStagDimID, snDimID /), varid=LatuVarID), & 'nc_write_model_atts','def_var XLAT_U') -call nc_check(nf90_put_att(ncid, LatuVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, LatuVarID, 'long_name', & 'LATITUDE, SOUTH IS NEGATIVE'), & 'nc_write_model_atts','put_att XLAT_U'//' long_name') -call nc_check(nf90_put_att(ncid, LatuVarID(id), 'units', 'degrees_north'), & +call nc_check(nf90_put_att(ncid, LatuVarID, 'units', 'degrees_north'), & 'nc_write_model_atts','put_att XLAT_U'//' units') -call nc_check(nf90_put_att(ncid, LatuVarID(id), 'valid_range', & +call nc_check(nf90_put_att(ncid, LatuVarID, 'valid_range', & (/ -90.0_r8, 90.0_r8 /)), & 'nc_write_model_atts','put_att XLAT_U'//' valid_range') -call nc_check(nf90_put_att(ncid, LatuVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, LatuVarID, 'description', & 'LATITUDE, SOUTH IS NEGATIVE'), & 'nc_write_model_atts','put_att XLAT_U'//' description') @@ -4176,31 +4173,31 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! XLAT_V:MemoryOrder = 'XY ' ; ! XLAT_V:stagger = '' ; call nc_check(nf90_def_var(ncid, name='XLAT_V', xtype=nf90_real, & - dimids=(/ weDimID(id), snStagDimID(id) /), varid=LatvVarID(id)), & + dimids=(/ weDimID, snStagDimID /), varid=LatvVarID), & 'nc_write_model_atts','def_var XLAT_V') -call nc_check(nf90_put_att(ncid, LatvVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, LatvVarID, 'long_name', & 'LATITUDE, SOUTH IS NEGATIVE'), & 'nc_write_model_atts','put_att XLAT_V'//' long_name') -call nc_check(nf90_put_att(ncid, LatvVarID(id), 'units', 'degrees_north'), & +call nc_check(nf90_put_att(ncid, LatvVarID, 'units', 'degrees_north'), & 'nc_write_model_atts','put_att XLAT_V'//' units') -call nc_check(nf90_put_att(ncid, LatvVarID(id), 'valid_range', & +call nc_check(nf90_put_att(ncid, LatvVarID, 'valid_range', & (/ -90.0_r8, 90.0_r8 /)), & 'nc_write_model_atts','put_att XLAT_V'//' valid_range') -call nc_check(nf90_put_att(ncid, LatvVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, LatvVarID, 'description', & 'LATITUDE, SOUTH IS NEGATIVE'), & 'nc_write_model_atts','put_att XLAT_V'//' description') ! grid levels call nc_check(nf90_def_var(ncid, name='level', xtype=nf90_short, & - dimids=btDimID(id), varid=ilevVarID(id)), & + dimids=btDimID, varid=ilevVarID), & 'nc_write_model_atts','def_var level') -call nc_check(nf90_put_att(ncid, ilevVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, ilevVarID, 'long_name', & 'level index'), & 'nc_write_model_atts','put_att level'//' long_name') -call nc_check(nf90_put_att(ncid, ilevVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, ilevVarID, 'description', & 'level index'), & 'nc_write_model_atts','put_att level'//' description') -call nc_check(nf90_put_att(ncid, ilevVarID(id), 'units', & +call nc_check(nf90_put_att(ncid, ilevVarID, 'units', & ''), & 'nc_write_model_atts','put_att level'//' units') @@ -4212,19 +4209,19 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! XLAND:stagger = '' ; coordinate_char = 'XLONG'//' XLAT' call nc_check(nf90_def_var(ncid, name='XLAND', xtype=nf90_short, & - dimids= (/ weDimID(id), snDimID(id) /), varid=XlandVarID(id)), & + dimids= (/ weDimID, snDimID /), varid=XlandVarID), & 'nc_write_model_atts','def_var XLAND') -call nc_check(nf90_put_att(ncid, XlandVarID(id), 'long_name', & +call nc_check(nf90_put_att(ncid, XlandVarID, 'long_name', & 'LAND MASK (1 FOR LAND, 2 FOR WATER)'), & 'nc_write_model_atts','put_att XLAND'//' long_name') -call nc_check(nf90_put_att(ncid, XlandVarID(id), 'units', ' '), & +call nc_check(nf90_put_att(ncid, XlandVarID, 'units', ' '), & 'nc_write_model_atts','put_att XLAND'//' units') -call nc_check(nf90_put_att(ncid, XlandVarID(id), 'coordinates', & +call nc_check(nf90_put_att(ncid, XlandVarID, 'coordinates', & trim(coordinate_char)), & 'nc_write_model_atts','put_att XLAND'//' coordinates') -call nc_check(nf90_put_att(ncid, XlandVarID(id), 'valid_range', (/ 1, 2 /)), & +call nc_check(nf90_put_att(ncid, XlandVarID, 'valid_range', (/ 1, 2 /)), & 'nc_write_model_atts','put_att XLAND'//' valid_range') -call nc_check(nf90_put_att(ncid, XlandVarID(id), 'description', & +call nc_check(nf90_put_att(ncid, XlandVarID, 'description', & 'LAND MASK (1 FOR LAND, 2 FOR WATER)'), & 'nc_write_model_atts','put_att XLAND'//' description') @@ -4235,36 +4232,36 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! PHB:stagger = 'Z' ; coordinate_char = 'XLONG'//' XLAT' call nc_check(nf90_def_var(ncid, name='PHB', xtype=nf90_real, & - dimids= (/ weDimID(id), snDimID(id), btStagDimID(id) /), varid=phbVarId(id)), & + dimids= (/ weDimID, snDimID, btStagDimID /), varid=phbVarId), & 'nc_write_model_atts','def_var PHB') -call nc_check(nf90_put_att(ncid, phbVarId(id), 'long_name', & +call nc_check(nf90_put_att(ncid, phbVarId, 'long_name', & 'base-state geopotential'), & 'nc_write_model_atts','put_att PHB'//' long_name') -call nc_check(nf90_put_att(ncid, phbVarId(id), 'description', & +call nc_check(nf90_put_att(ncid, phbVarId, 'description', & 'base-state geopotential'), & 'nc_write_model_atts','put_att PHB'//' description') -call nc_check(nf90_put_att(ncid, phbVarId(id), 'units', 'm2/s2'), & +call nc_check(nf90_put_att(ncid, phbVarId, 'units', 'm2/s2'), & 'nc_write_model_atts','put_att PHB'//' units') -call nc_check(nf90_put_att(ncid, phbVarId(id), 'coordinates', & +call nc_check(nf90_put_att(ncid, phbVarId, 'coordinates', & trim(coordinate_char)), & 'nc_write_model_atts','put_att PHB'//' coordinates') -call nc_check(nf90_put_att(ncid, phbVarId(id), 'units_long_name', 'm{2} s{-2}'), & +call nc_check(nf90_put_att(ncid, phbVarId, 'units_long_name', 'm{2} s{-2}'), & 'nc_write_model_atts','put_att PHB'//' units_long_name') coordinate_char = 'XLONG'//' XLAT' call nc_check(nf90_def_var(ncid, name='HGT', xtype=nf90_real, & - dimids= (/ weDimID(id), snDimID(id) /), varid=hgtVarId(id)), & + dimids= (/ weDimID, snDimID /), varid=hgtVarId), & 'nc_write_model_atts','def_var HGT') -call nc_check(nf90_put_att(ncid, hgtVarId(id), 'long_name', 'Terrain Height'), & +call nc_check(nf90_put_att(ncid, hgtVarId, 'long_name', 'Terrain Height'), & 'nc_write_model_atts','put_att HGT'//' long_name') -call nc_check(nf90_put_att(ncid, hgtVarId(id), 'description', 'Terrain Height'), & +call nc_check(nf90_put_att(ncid, hgtVarId, 'description', 'Terrain Height'), & 'nc_write_model_atts','put_att HGT'//' description') -call nc_check(nf90_put_att(ncid, hgtVarId(id), 'units', 'm'), & +call nc_check(nf90_put_att(ncid, hgtVarId, 'units', 'm'), & 'nc_write_model_atts','put_att HGT'//' units') -call nc_check(nf90_put_att(ncid, hgtVarId(id), 'coordinates', & +call nc_check(nf90_put_att(ncid, hgtVarId, 'coordinates', & trim(coordinate_char)), & 'nc_write_model_atts','put_att HGT'//' coordinates') -call nc_check(nf90_put_att(ncid, hgtVarId(id), 'units_long_name', 'meters'), & +call nc_check(nf90_put_att(ncid, hgtVarId, 'units_long_name', 'meters'), & 'nc_write_model_atts','put_att HGT'//' units_long_name') ! Leave define mode so we can actually fill the variables. @@ -4274,21 +4271,21 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! Fill the variables we can !----------------------------------------------------------------- -call nc_check(nf90_put_var(ncid, DXVarID, wrf%dom(1:num_domains)%dx), & +call nc_check(nf90_put_var(ncid, DXVarID, wrf%dom(id)%dx), & 'nc_write_model_atts','put_var dx') -call nc_check(nf90_put_var(ncid, DYVarID, wrf%dom(1:num_domains)%dy), & +call nc_check(nf90_put_var(ncid, DYVarID, wrf%dom(id)%dy), & 'nc_write_model_atts','put_var dy') -call nc_check(nf90_put_var(ncid, TRUELAT1VarID, wrf%dom(1:num_domains)%proj%truelat1), & +call nc_check(nf90_put_var(ncid, TRUELAT1VarID, wrf%dom(id)%proj%truelat1), & 'nc_write_model_atts','put_var truelat1') -call nc_check(nf90_put_var(ncid, TRUELAT2VarID, wrf%dom(1:num_domains)%proj%truelat2), & +call nc_check(nf90_put_var(ncid, TRUELAT2VarID, wrf%dom(id)%proj%truelat2), & 'nc_write_model_atts','put_var truelat2') -call nc_check(nf90_put_var(ncid, STAND_LONVarID, wrf%dom(1:num_domains)%proj%stdlon), & +call nc_check(nf90_put_var(ncid, STAND_LONVarID, wrf%dom(id)%proj%stdlon), & 'nc_write_model_atts','put_var stdlon') -call nc_check(nf90_put_var(ncid, CEN_LATVarID, wrf%dom(1:num_domains)%cen_lat), & +call nc_check(nf90_put_var(ncid, CEN_LATVarID, wrf%dom(id)%cen_lat), & 'nc_write_model_atts','put_var cen_lat') -call nc_check(nf90_put_var(ncid, CEN_LONVarID, wrf%dom(1:num_domains)%cen_lon), & +call nc_check(nf90_put_var(ncid, CEN_LONVarID, wrf%dom(id)%cen_lon), & 'nc_write_model_atts','put_var cen_lon') -call nc_check(nf90_put_var(ncid, MAP_PROJVarID, wrf%dom(1:num_domains)%map_proj), & +call nc_check(nf90_put_var(ncid, MAP_PROJVarID, wrf%dom(id)%map_proj), & 'nc_write_model_atts','put_var map_proj') !nc -- convert internally logical boundary condition variables into integers before filling @@ -4310,33 +4307,33 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! defining grid levels -call nc_check(nf90_put_var(ncid, DNVarID(id), wrf%dom(id)%dn), & +call nc_check(nf90_put_var(ncid, DNVarID, wrf%dom(id)%dn), & 'nc_write_model_atts','put_var dn') -call nc_check(nf90_put_var(ncid, ZNUVarID(id), wrf%dom(id)%znu), & +call nc_check(nf90_put_var(ncid, ZNUVarID, wrf%dom(id)%znu), & 'nc_write_model_atts','put_var znu') -call nc_check(nf90_put_var(ncid, ZNWVarID(id), wrf%dom(id)%znw), & +call nc_check(nf90_put_var(ncid, ZNWVarID, wrf%dom(id)%znw), & 'nc_write_model_atts','put_var znw') -call nc_check(nf90_put_var(ncid, DNWVarID(id), wrf%dom(id)%dnw), & +call nc_check(nf90_put_var(ncid, DNWVarID, wrf%dom(id)%dnw), & 'nc_write_model_atts','put_var dnw') ! defining horizontal -call nc_check(nf90_put_var(ncid, mubVarID(id), wrf%dom(id)%mub), & +call nc_check(nf90_put_var(ncid, mubVarID, wrf%dom(id)%mub), & 'nc_write_model_atts','put_var mub') -call nc_check(nf90_put_var(ncid, LonVarID(id), wrf%dom(id)%longitude), & +call nc_check(nf90_put_var(ncid, LonVarID, wrf%dom(id)%longitude), & 'nc_write_model_atts','put_var longitude') -call nc_check(nf90_put_var(ncid, LonuVarID(id), wrf%dom(id)%longitude_u), & +call nc_check(nf90_put_var(ncid, LonuVarID, wrf%dom(id)%longitude_u), & 'nc_write_model_atts','put_var longitude_u') -call nc_check(nf90_put_var(ncid, LonvVarID(id), wrf%dom(id)%longitude_v), & +call nc_check(nf90_put_var(ncid, LonvVarID, wrf%dom(id)%longitude_v), & 'nc_write_model_atts','put_var longitude_v') -call nc_check(nf90_put_var(ncid, LatVarID(id), wrf%dom(id)%latitude), & +call nc_check(nf90_put_var(ncid, LatVarID, wrf%dom(id)%latitude), & 'nc_write_model_atts','put_var latitude') -call nc_check(nf90_put_var(ncid, LatuVarID(id), wrf%dom(id)%latitude_u), & +call nc_check(nf90_put_var(ncid, LatuVarID, wrf%dom(id)%latitude_u), & 'nc_write_model_atts','put_var latitude_u') -call nc_check(nf90_put_var(ncid, LatvVarID(id), wrf%dom(id)%latitude_v), & +call nc_check(nf90_put_var(ncid, LatvVarID, wrf%dom(id)%latitude_v), & 'nc_write_model_atts','put_var latitude_v') -call nc_check(nf90_put_var(ncid, ilevVarID(id), (/ (i,i=1,wrf%dom(id)%bt) /)), & +call nc_check(nf90_put_var(ncid, ilevVarID, (/ (i,i=1,wrf%dom(id)%bt) /)), & 'nc_write_model_atts','put_var bt') -call nc_check(nf90_put_var(ncid, XlandVarID(id), wrf%dom(id)%land), & +call nc_check(nf90_put_var(ncid, XlandVarID, wrf%dom(id)%land), & 'nc_write_model_atts','put_var land') ! call nc_check(nf90_put_var(ncid, MapFacMVarID(id), wrf%dom(id)%mapfac_m), & ! 'nc_write_model_atts','put_var mapfac_m') @@ -4344,9 +4341,9 @@ subroutine nc_write_model_atts( ncid, dom_id ) ! 'nc_write_model_atts','put_var mapfac_u') ! call nc_check(nf90_put_var(ncid, MapFacVVarID(id), wrf%dom(id)%mapfac_v), & ! 'nc_write_model_atts','put_var mapfac_v') -call nc_check(nf90_put_var(ncid, phbVarID(id), wrf%dom(id)%phb), & +call nc_check(nf90_put_var(ncid, phbVarID, wrf%dom(id)%phb), & 'nc_write_model_atts','put_var phb') -call nc_check(nf90_put_var(ncid, hgtVarID(id), wrf%dom(id)%hgt), & +call nc_check(nf90_put_var(ncid, hgtVarID, wrf%dom(id)%hgt), & 'nc_write_model_atts','put_var hgt') From d9973f9be3ee86de67eb942a9d7e53d173d718d0 Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Thu, 21 Jul 2022 15:56:08 -0600 Subject: [PATCH 4/8] remove todo about domain loop and commented out do loop --- models/wrf/model_mod.f90 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/models/wrf/model_mod.f90 b/models/wrf/model_mod.f90 index 83d94c3409..0ec532a83a 100644 --- a/models/wrf/model_mod.f90 +++ b/models/wrf/model_mod.f90 @@ -3824,16 +3824,11 @@ subroutine nc_write_model_atts( ncid, dom_id ) 'nc_write_model_atts','def_dim domain') endif -!>@todo FIXME we shouldn't need domain anymore because this -!> routine is called once per domain. !>@todo FIXME all the variables below should have Time as -!> the first dimension. they shouldn't have _d0X in their -!> names. +!> the first dimension. -!do id=1,num_domains id = dom_id -! write( idom , '(I1)') dom_id call nc_check(nf90_def_dim(ncid=ncid, name='west_east', & len = wrf%dom(id)%we, dimid = weDimID), & 'nc_write_model_atts','def_dim west_east') @@ -3855,7 +3850,6 @@ subroutine nc_write_model_atts( ncid, dom_id ) call nc_check(nf90_def_dim(ncid=ncid, name='soil_layers_stag', & len = wrf%dom(id)%sls, dimid = slSDimID), & 'nc_write_model_atts','def_dim soil_layers_stag') -!enddo !----------------------------------------------------------------- ! Create the (empty) Variables and the Attributes From 3fb27fa3a3a9552a7ba69b5a779eee29a879ed3f Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Thu, 21 Jul 2022 16:09:13 -0600 Subject: [PATCH 5/8] removed the local dom_id. No need to have this mutable dom_id since we do not loop, use the intent(in) id instead --- models/wrf/model_mod.f90 | 55 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/models/wrf/model_mod.f90 b/models/wrf/model_mod.f90 index 0ec532a83a..29315cc503 100644 --- a/models/wrf/model_mod.f90 +++ b/models/wrf/model_mod.f90 @@ -3748,12 +3748,12 @@ end subroutine get_wrf_horizontal_location !*********************************************************************** -subroutine nc_write_model_atts( ncid, dom_id ) +subroutine nc_write_model_atts( ncid, id ) !----------------------------------------------------------------- ! Writes the model-specific attributes to a netCDF file integer, intent(in) :: ncid ! netCDF file identifier -integer, intent(in) :: dom_id +integer, intent(in) :: id logical, parameter :: write_precip = .false. @@ -3777,7 +3777,7 @@ subroutine nc_write_model_atts( ncid, dom_id ) !integer, dimension(num_domains) :: MapFacMVarID, MapFacUVarID, MapFacVVarID integer :: var_id -integer :: i, id, ret, tmp +integer :: i, ret, tmp character(len=129) :: title character(len=32) :: context = 'nc_write_model_atts' @@ -3828,28 +3828,27 @@ subroutine nc_write_model_atts( ncid, dom_id ) !>@todo FIXME all the variables below should have Time as !> the first dimension. - id = dom_id - call nc_check(nf90_def_dim(ncid=ncid, name='west_east', & - len = wrf%dom(id)%we, dimid = weDimID), & - 'nc_write_model_atts','def_dim west_east') - call nc_check(nf90_def_dim(ncid=ncid, name='west_east_stag', & - len = wrf%dom(id)%wes, dimid = weStagDimID), & - 'nc_write_model_atts','def_dim west_east_stag') - call nc_check(nf90_def_dim(ncid=ncid, name='south_north', & - len = wrf%dom(id)%sn, dimid = snDimID), & - 'nc_write_model_atts','def_dim south_north') - call nc_check(nf90_def_dim(ncid=ncid, name='south_north_stag', & - len = wrf%dom(id)%sns, dimid = snStagDimID), & - 'nc_write_model_atts','def_dim south_north_stag') - call nc_check(nf90_def_dim(ncid=ncid, name='bottom_top', & - len = wrf%dom(id)%bt, dimid = btDimID), & - 'nc_write_model_atts','def_dim bottom_top') - call nc_check(nf90_def_dim(ncid=ncid, name='bottom_top_stag', & - len = wrf%dom(id)%bts, dimid = btStagDimID), & - 'nc_write_model_atts','def_dim bottom_top_stag') - call nc_check(nf90_def_dim(ncid=ncid, name='soil_layers_stag', & - len = wrf%dom(id)%sls, dimid = slSDimID), & - 'nc_write_model_atts','def_dim soil_layers_stag') +call nc_check(nf90_def_dim(ncid=ncid, name='west_east', & + len = wrf%dom(id)%we, dimid = weDimID), & + 'nc_write_model_atts','def_dim west_east') +call nc_check(nf90_def_dim(ncid=ncid, name='west_east_stag', & + len = wrf%dom(id)%wes, dimid = weStagDimID), & + 'nc_write_model_atts','def_dim west_east_stag') +call nc_check(nf90_def_dim(ncid=ncid, name='south_north', & + len = wrf%dom(id)%sn, dimid = snDimID), & + 'nc_write_model_atts','def_dim south_north') +call nc_check(nf90_def_dim(ncid=ncid, name='south_north_stag', & + len = wrf%dom(id)%sns, dimid = snStagDimID), & + 'nc_write_model_atts','def_dim south_north_stag') +call nc_check(nf90_def_dim(ncid=ncid, name='bottom_top', & + len = wrf%dom(id)%bt, dimid = btDimID), & + 'nc_write_model_atts','def_dim bottom_top') +call nc_check(nf90_def_dim(ncid=ncid, name='bottom_top_stag', & + len = wrf%dom(id)%bts, dimid = btStagDimID), & + 'nc_write_model_atts','def_dim bottom_top_stag') +call nc_check(nf90_def_dim(ncid=ncid, name='soil_layers_stag', & + len = wrf%dom(id)%sls, dimid = slSDimID), & + 'nc_write_model_atts','def_dim soil_layers_stag') !----------------------------------------------------------------- ! Create the (empty) Variables and the Attributes @@ -3990,7 +3989,7 @@ subroutine nc_write_model_atts( ncid, dom_id ) -write( idom , '(I1)') dom_id +write( idom , '(I1)') id call nc_check(nf90_def_var(ncid, name='DN', xtype=nf90_real, & dimids= btDimID, varid=DNVarID), & @@ -4283,7 +4282,7 @@ subroutine nc_write_model_atts( ncid, dom_id ) 'nc_write_model_atts','put_var map_proj') !nc -- convert internally logical boundary condition variables into integers before filling -if ( wrf%dom(dom_id)%periodic_x ) then +if ( wrf%dom(id)%periodic_x ) then tmp = 1 else tmp = 0 @@ -4291,7 +4290,7 @@ subroutine nc_write_model_atts( ncid, dom_id ) call nc_check(nf90_put_var(ncid, PERIODIC_XVarID, tmp ), & 'nc_write_model_atts','put_var PERIODIC_XVarID') -if ( wrf%dom(dom_id)%polar ) then +if ( wrf%dom(id)%polar ) then tmp = 1 else tmp = 0 From 65065d6ccca05f4b2e7c98352f6e230586ff39d0 Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Fri, 22 Jul 2022 13:45:28 -0600 Subject: [PATCH 6/8] removed DomDimId from variable definition --- models/wrf/model_mod.f90 | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/models/wrf/model_mod.f90 b/models/wrf/model_mod.f90 index 29315cc503..d8a5211528 100644 --- a/models/wrf/model_mod.f90 +++ b/models/wrf/model_mod.f90 @@ -3760,7 +3760,6 @@ subroutine nc_write_model_atts( ncid, id ) integer :: weDimID, weStagDimID, snDimID, snStagDimID, & btDimID, btStagDimID, slSDimID -integer :: MemberDimID, DomDimID integer :: DXVarID, DYVarID, TRUELAT1VarID, TRUELAT2VarID, STAND_LONVarID integer :: CEN_LATVarID, CEN_LONVarID, MAP_PROJVarID integer :: PERIODIC_XVarID, POLARVarID @@ -3860,7 +3859,7 @@ subroutine nc_write_model_atts( ncid, id ) !----------------------------------------------------------------- call nc_check(nf90_def_var(ncid, name='DX', xtype=nf90_real, & - dimids= DomDimID, varid=DXVarID), & + varid=DXVarID), & 'nc_write_model_atts','def_var DX') call nc_check(nf90_put_att(ncid, DXVarID, 'long_name', 'X HORIZONTAL RESOLUTION'), & 'nc_write_model_atts','put_att DX long_name') @@ -3870,7 +3869,7 @@ subroutine nc_write_model_atts( ncid, id ) 'nc_write_model_atts','put_att DX units') call nc_check(nf90_def_var(ncid, name='DY', xtype=nf90_real, & - dimids= DomDimID, varid=DYVarID), & + varid=DYVarID), & 'nc_write_model_atts','def_var DY') call nc_check(nf90_put_att(ncid, DYVarID, 'long_name', 'Y HORIZONTAL RESOLUTION'), & 'nc_write_model_atts','put_att DY long_name') @@ -3880,7 +3879,7 @@ subroutine nc_write_model_atts( ncid, id ) 'nc_write_model_atts','put_att DY units') call nc_check(nf90_def_var(ncid, name='TRUELAT1', xtype=nf90_real, & - dimids= DomDimID, varid=TRUELAT1VarID), & + varid=TRUELAT1VarID), & 'nc_write_model_atts','def_var TRUELAT1') call nc_check(nf90_put_att(ncid, TRUELAT1VarID, 'long_name', & 'first standard parallel'), & @@ -3893,7 +3892,7 @@ subroutine nc_write_model_atts( ncid, id ) 'nc_write_model_atts','put_att TRUELAT1 units') call nc_check(nf90_def_var(ncid, name='TRUELAT2', xtype=nf90_real, & - dimids= DomDimID, varid=TRUELAT2VarID), & + varid=TRUELAT2VarID), & 'nc_write_model_atts','def_var TRUELAT2') call nc_check(nf90_put_att(ncid, TRUELAT2VarID, 'long_name', & 'second standard parallel'), & @@ -3906,7 +3905,7 @@ subroutine nc_write_model_atts( ncid, id ) 'nc_write_model_atts','put_att TRUELAT2 units') call nc_check(nf90_def_var(ncid, name='STAND_LON', xtype=nf90_real, & - dimids= DomDimID, varid=STAND_LONVarID), & + varid=STAND_LONVarID), & 'nc_write_model_atts','def_var STAND_LON') call nc_check(nf90_put_att(ncid, STAND_LONVarID, 'long_name', & 'standard longitude'), & @@ -3919,7 +3918,7 @@ subroutine nc_write_model_atts( ncid, id ) 'nc_write_model_atts','put_att STAND_LON units') call nc_check(nf90_def_var(ncid, name='CEN_LAT', xtype=nf90_real, & - dimids= DomDimID, varid=CEN_LATVarID), & + varid=CEN_LATVarID), & 'nc_write_model_atts','def_var CEN_LAT') call nc_check(nf90_put_att(ncid, CEN_LATVarID, 'long_name', & 'center latitude'), & @@ -3932,7 +3931,7 @@ subroutine nc_write_model_atts( ncid, id ) 'nc_write_model_atts','put_att CEN_LAT units') call nc_check(nf90_def_var(ncid, name='CEN_LON', xtype=nf90_real, & - dimids= DomDimID, varid=CEN_LONVarID), & + varid=CEN_LONVarID), & 'nc_write_model_atts','def_var CEN_LON') call nc_check(nf90_put_att(ncid, CEN_LONVarID, 'long_name', & 'central longitude'), & @@ -3945,7 +3944,7 @@ subroutine nc_write_model_atts( ncid, id ) 'nc_write_model_atts','put_att CEN_LON units') call nc_check(nf90_def_var(ncid, name='MAP_PROJ', xtype=nf90_real, & - dimids= DomDimID, varid=MAP_PROJVarID), & + varid=MAP_PROJVarID), & 'nc_write_model_atts','def_var MAP_PROJ') call nc_check(nf90_put_att(ncid, MAP_PROJVarID, 'long_name', & 'domain map projection'), & @@ -3962,7 +3961,7 @@ subroutine nc_write_model_atts( ncid, id ) ! carried internally as logicals, they will first need to be ! converted back to integers. call nc_check(nf90_def_var(ncid, name='PERIODIC_X', xtype=nf90_int, & - dimids= DomDimID, varid=PERIODIC_XVarID), & + varid=PERIODIC_XVarID), & 'nc_write_model_atts','def_var PERIODIC_X') call nc_check(nf90_put_att(ncid, PERIODIC_XVarID, 'long_name', & 'Longitudinal periodic b.c. flag'), & @@ -3975,7 +3974,7 @@ subroutine nc_write_model_atts( ncid, id ) 'nc_write_model_atts','put_att PERIODIC_X units') call nc_check(nf90_def_var(ncid, name='POLAR', xtype=nf90_int, & - dimids= DomDimID, varid=POLARVarID), & + varid=POLARVarID), & 'nc_write_model_atts','def_var POLAR') call nc_check(nf90_put_att(ncid, POLARVarID, 'long_name', & 'Polar periodic b.c. flag'), & From 5ec6f9f1ac3c2cbfddb9a5f5cc9e64966a6ab6e3 Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Wed, 27 Jul 2022 14:06:48 -0600 Subject: [PATCH 7/8] bump version and changelog --- CHANGELOG.rst | 6 ++++++ conf.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b8ede3cf6f..77b65c6b36 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,6 +22,12 @@ individual files. The changes are now listed with the most recent at the top. +**July 27 2022 :: Bug-fix for WRF model_mod nc_model_atts. Tag: v10.0.5** + +- Removes obsolete domain dimension from nc_write_model_atts for WRF model_mod. + This code was left over from when multiple domains could be written to a single + NetCDF file in DART. + **July 21 2022 :: Bug-fixes for DART_LAB rank histograms and get_close caching. Tag: v10.0.4** - Fixes DART_LAB prior and posterior rank histogram calculation. diff --git a/conf.py b/conf.py index bd5635f383..503ce390b3 100644 --- a/conf.py +++ b/conf.py @@ -21,7 +21,7 @@ author = 'Data Assimilation Research Section' # The full version, including alpha/beta/rc tags -release = '10.0.4' +release = '10.0.5' master_doc = 'README' # -- General configuration --------------------------------------------------- From 85369cac6d869e7b586db975d35e015fe493ff74 Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Wed, 27 Jul 2022 14:12:05 -0600 Subject: [PATCH 8/8] typo --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 77b65c6b36..b700254b85 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -22,7 +22,7 @@ individual files. The changes are now listed with the most recent at the top. -**July 27 2022 :: Bug-fix for WRF model_mod nc_model_atts. Tag: v10.0.5** +**July 27 2022 :: Bug-fix for WRF model_mod nc_write_model_atts. Tag: v10.0.5** - Removes obsolete domain dimension from nc_write_model_atts for WRF model_mod. This code was left over from when multiple domains could be written to a single